Background of code: For my project I have quite massive datasets in size and numbers I need to process and calculate a single value for each. My code works in such way that I only have to fill out a sample location number and that everything is calculated without having to change anything in the code itself anymore.
problem: I was able to make it work up to the last step. I can only figure out to save the separate data frames with the correct location names as csv to an output directory. my issue now is that I would like to merge the data frames to get a master file. However, I would need to upload these files with the correct names again so I can apply the rbind function. The location id name should be the same as the one I created before and should become a data frame. It also must adapt to the different sample locations I fill out at the start. I do not exactly know how to approach this problem. To make the code smooth and user friendly, I would like to learn how I could change the data frame name according to the location. I am not sure if what I am doing is a bit arbitrary. I hope that it is a bit clear.
what I did up to now:
at the start of my code I can write a number and it will start selecting the correct data in the correct file for that particular sampling point. The sampling id is made from the data itself using the S and L
S <- Season sampling (will be get a character based on sampling month)
L <- location number (combination of letters and numbers)
location_id <- paste(L,S, sep="", collapse=NULL)
The location id would result in R1W fore example and I am using this for further processing of the csv files. write.csv(df, paste(location_id, ".csv", sep=","))
so now I would like to do the following:
location_id <- df
outputs should be data frames with the names R1W R1D R2W etc.