Re: [R] How to tell R that "ABC" is the name of a dataset not a variable value

2010-09-13 Thread Jie Li
Thanks! This helps a lot! On Mon, Sep 13, 2010 at 4:35 PM, Joshua Wiley wrote: > Hi, > > Just to provide an example: > > > #Sample data copied to variables "X", "Y", and "Z" > Z <- Y <- X <- data.frame(A = 1:10) > > # A variable holding the names of the variables > datasetname <- c("X", "Y", "Z")

Re: [R] How to tell R that "ABC" is the name of a dataset not a variable value

2010-09-13 Thread Joshua Wiley
Hi, Just to provide an example: #Sample data copied to variables "X", "Y", and "Z" Z <- Y <- X <- data.frame(A = 1:10) # A variable holding the names of the variables datasetname <- c("X", "Y", "Z") # Use mget() to collect all the variables in a list # get() only gets one variable at a t ime,

Re: [R] How to tell R that "ABC" is the name of a dataset not a variable value

2010-09-13 Thread Henrique Dallazuanna
Se ?get function. On Mon, Sep 13, 2010 at 3:40 PM, Jie Li wrote: > All, > > For example, I have a dataset named "ABC" loaded into R > > ABC > [,1] [,2] [,3] > [1,]147 > [2,]258 > [3,]369 > > and I also have a variable datasetname > > datasetname > [1] "ABC