You should be able to do this effectively in 1 line:
> my.data <- lapply( paste( 'data', 1:N, '.dat', sep='' ), read.table )
Then everything is in my.data, if you want them named then do a second line:
> names(my.data) <- paste( 'data', 1:N, '.dat', sep='' )
Doing the same analysis on each data
Tena koe Jeff
Try something like:
for (i in 1:n)
{
assign(paste('data', i, sep=''), read.table(paste('data', i, '.dat',
sep=''), header=F))
.
.
.
}
HTH
Peter Alspach
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Beha
2 matches
Mail list logo