[R] naming data.frames after their source file

David White dwhite at ling.ohio-state.edu
Sat May 5 17:39:34 CEST 2001

Hello R-list,

I have a batch of files that I want to turn into R data.frames for
analysis. I'd like to use a for loop to read.table into data frame and
name the data.frame after the source file. Here's the code I've tried:

for(i in 1:length(list.files("."))-1){

AFIK, the problem lies in the way I'm trying to name the data.frame.
I have spent some time pouring over the R documentation, but if the answer
was there I missed it. Any reference to the manuals or quick fix would be


S. David White
sdavidwhite at bigfoot.com
Columbus, Ohio

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list