[R] <no subject>

Uwe Ligges ligges at statistik.uni-dortmund.de
Tue Feb 24 15:08:22 CET 2004


Claudia Paladini wrote:

> 
> Dear ladies and gentlmen,
> I want to import a directory with about 400 files (.dat) in R. I know how to import a single file (with scan...) but I've good no idea how to import 400 at once. Can you help me ?
> Thanks a lot!
> Claudia 

> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Inn order to get a list "dat" containing all the data:

  setwd("path")
  files <- dir(pattern="dat$")
  dat <- lapply(files, scan)

Uwe Ligges




More information about the R-help mailing list