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, ...))
...
}
--
WBR,
Timur
______________________________________________
[EMAIL PROTECTED] 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