Open dlebauer opened 7 years ago
I'm having trouble with the for loop. I'm trying:
factors = c(20,48,75,95,99)
data = c()
for(i in factors){
file = (paste0("Ref_Factor_",as.character(i),".csv"))
data <- c(data,(read.csv(file)))
}
and it returns
cannot open file 'Ref_Factor_20.csv': No such file or directoryError in file(file, "rt") : cannot open the connection
I can see that Ref_Factor_20.csv exists in the data folder, so my guess is that I'm not specifying that I want to find it from there, but I'm not sure how to do that. I'd be happy to instead have a for loop that considers every file in the data folder, but despite googling, I'm now sure how to that either.
What is the output of "dir()" ?
most likely you are working from the Team_1 folder. Try "data/RefFactor",as.character(i),".csv" as the path.
@GraceJaffe @Ogaitnos Has this issue been resolved? It hasn't been closed yet if so.
it has been done for the 5 sets of data that we have, but I don't want to close it until we have the larger number of observations
Put reading of CSV files in a for loop, bind them together, and plot all curves on the same plot.
Current redundancy is not DRY, and inconvenient to have to open different files for each dataset.