Why not just use an rbind() and create one data.frame? On Thursday, May 10, 2018, 10:34:19 a.m. EDT, Marcelo Mariano Silva <marcelomarianosi...@gmail.com> wrote: Hi,
Is it possible use a loop to process many data frames in the same way? For example, if I have three data frames, all with same variables df_bs_id1 <- read.csv("test1.csv",header =TRUE) df_bs_id2 <- read.csv("test2.csv",header =TRUE) df_bs_id3 <- read.csv("test3.csv",header =TRUE) How could I would implement a code loop that , for instance, would select two coluns of interest in a fashion of the code below ? # selecting only 2 columns of interest for (1, 1:3) { df_selected [i] <- df_bs_id[i] [ , c("column1", "column2")] } Tks MMS [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.