If all columns are different
If the columns differ from each other between experiments, I would wrap the experiments in the lists as follows:
library(plyr); experiments <- c("Experiment1","Experiment2","Experiment3"); suffixes <- c("per0","per50","per100");
Then you can iterate through data for further processing. llply is part of the plyr package. It iterates over the list (first l in llply ) and returns a list (second l ).
If all columns are the same
library(plyr); experiments <- c("Experiment1","Experiment2","Experiment3"); suffixes <- c("per0","per50","per100"); data <- ldply( experiments, function(experiment) { ldply( suffixes, function(suffix) { data.frame( experiment = experiment, suffix= suffix, fn = str_c(exper.name,'_',suffix,'.csv')) }) })
This will read all the data as one data.frame , which you can then analyze as needed (e.g. using plyr and / or subset ).
source share