R code to emulate PeakFQ software program from the USGS