[R] Reading multiple csv files with a for loop
dizem.uerek at alumni.fh-aachen.de
Mon Jun 17 11:01:31 CEST 2013
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 ?
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.
More information about the R-help