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

ppaarrkk simon_ecc at yahoo.co.uk
Wed Jan 16 17:15:48 CET 2008


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, filesBox[4,1], sep=""), header =
FALSE)

But this doesn't work because filesBox[4,1] is an element of an array but I
want it as a new R (effectively) data frame.

Any ideas please ?
-- 
View this message in context: http://www.nabble.com/using-an-element-of-an-array-as-a-new-object-tp14884435p14884435.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list