I am using the USGS dataRetrieval package to get some TP data for specific USGS site numbers. Here is the code that I am using the get the data and restructure it. What I want to do is create some way for R to repeat this code for each of the station numbers so that I don't have to copy/paste the code and manually change the variables.
In this example, the variable I want to change is siteNumber. Is there a way to do this?
If you want to start pulling in parameters, you could use map2_dfr and pass the params column. I tried that but got an error (it appears that that "00060" discharge parameter is not reported for some sites, which threw and error in the dataRetrieval function that I don't have time to track down.