Re: [R] using an element of an array as a new object

2008-01-17 Thread ppaarrkk
Thankyou for the replies. assign() works. for (i in 1:7) assign(filesBox[i,1],read.table(paste(dir2, filesBox[i,1], sep=""), header = FALSE)) -- View this message in context: http://www.nabble.com/using-an-element-of-an-array-as-a-new-object-tp14884435p14917349.html Sent from the R help mail

Re: [R] using an element of an array as a new object

2008-01-16 Thread Greg Snow
o: r-help@r-project.org > Subject: [R] using an element of an array as a new object > > > I have an array called filesBox. I want to take each element > of the first column and assign a dataset to it. > > For example : > > filesBox[4,1] returns > > [1] &qu

Re: [R] using an element of an array as a new object

2008-01-16 Thread Julian Burgos
See ?assign. ppaarrkk wrote: > I have an array called filesBox. I want to take each element of the first > column and assign a dataset to it. > > For example : > > filesBox[4,1] returns > > [1] "fileR" > > Then I want to assign "fileR" which exists as a text file to the R object > "fileR" lik

[R] using an element of an array as a new object

2008-01-16 Thread ppaarrkk
I have an array called filesBox. I want to take each element of the first column and assign a dataset to it. For example : filesBox[4,1] returns [1] "fileR" Then I want to assign "fileR" which exists as a text file to the R object "fileR" like this : filesBox[4,1] <- read.table(paste(dir2, fi