My list is a series of characters each with different values, how should I attach this to my file for loop when I'm iterating over the files. Also if I were to specify that my "rfg_url_list$url_list[1]" included everything in the file so 'rfg_url_list$url_list' would it iterate one at a time throughout the entirety of the loop?
querydata <- 1
convertdata <- 2
binddata <- 3
writedata <- 4
# Function for extracting data, names are indicative of whats going on in the loop.
for (i in rfg_url_list$url_list[1]) {
for (tempii in querydata) {
for (tempiii in convertdata) {
for (tempiv in binddata){
querydata <- GET(i) # This sends the string to the API server
convertdata <- content(querydata, type = 'application/json') # This converts API data to JSON
binddata <- do.call(rbind.data.frame, convertdata[["_return"]][["traces"]][[1]][["trace"]]) # Binds JSON data to data frame
writedata <- write.csv(binddata, file = "rainfalldata.csv", row.names = FALSE) # writes the data to a CSV file but needs to be done with different name based off list variables.
} #4
} #3
} #2
} #1