[R] loop through files in a dir

Fred J. phddas at yahoo.com
Fri Mar 19 23:17:51 CET 2004


d <- dir("c:/data")
for (i in d){
  dt <- read.csv(c("c:/data/",i),header=FALSE)
}
wouldn't work because c("c:/data",i) puts out "string"
"string" where both strings need to be one string. 
how can I combinde both in one string, c:/data/i like
the good old perl "I wish".
thanks




More information about the R-help mailing list