[R] <no subject>

Timur Elzhov Timur.Elzhov at jinr.ru
Tue Feb 24 15:11:08 CET 2004

On Tue, Feb 24, 2004 at 02:34:35PM +0100, 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 ?

You can get list of the files you need:
  flist <- system("ls", intern = TRUE)

Then run on that list:
  for (fname in flist) {
      get(fname, scan(file = fname, ...))


More information about the R-help mailing list