[R] enable object name to be called as object (a dataset)
runner
sunnyside500 at gmail.com
Fri Sep 7 23:42:07 CEST 2007
What I am trying to do is as follows:
- I have listed names of all wanted objects (datasets A,B,C... ) in current
workspace as a vector:
obj <- c('A','B','C')
- then i need to use these objects, say to extract all the 1st columns and
bind to an existing dataset ('data'):
for ( i in 1:3){
newdata <- obj[i]
data <- cbind(data,newdata [[1]] )
}
Obviously, it doesn't work since obj[i] is just a string of dataset name.
Here is my question: how to call it as a original dataset? Thanks.
--
View this message in context: http://www.nabble.com/enable-object-name-to-be-called-as-object-%28a-dataset%29-tf4403933.html#a12563767
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list