Dear R-help users, I am quite new in R. I have multiple csv.files with different size. I would like to read them by using a for- loop and parallel by reading I need to add a new column which can be specified by myself.
But my for-loop does not work ! Could somebody give me any idea ? Many thanks! myfiles <-list() for ( i in 1:11) myfiles[i] <- read.csv(toread,header = TRUE, sep=") names(myfiles) <- paste(myfiles) mytotalfiles <- myfiles #sample the data by the number of the columns by adding a new column sample(i1, 1000, replace = FALSE, prob = NULL) for n <- 1000 sample <- myfiles[sample(nrow (df), 1000),] -- View this message in context: http://r.789695.n4.nabble.com/Reading-multiple-csv-files-with-a-for-loop-tp4669681.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list 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.