Re: [R] Get variable data Reading from the list

2012-08-28 Thread R. Michael Weylandt
On Tue, Aug 28, 2012 at 8:19 AM, Rantony wrote: > Here i have a variable > > MyVar <- data.frame(read.csv("D:\\Doc.csv")) read.csv() returns a data.frame so the outer call to data.frame() is superfluous. > > And now i am storing this variable name into a list. > > MyList <- list() > MyList [len

[R] Get variable data Reading from the list

2012-08-28 Thread Rantony
Here i have a variable MyVar <- data.frame(read.csv("D:\\Doc.csv")) And now i am storing this variable name into a list. MyList <- list() MyList [length(MyList )+1]<- "MyVar" Now what is the requirement is, i need to call the variable name "MyVar" from the list "MyList " and get the data. ---

Re: [R] Get variable data Reading from the list

2012-08-28 Thread Rantony
Thank you. From: arun kirshna [via R] [mailto:ml-node+s789695n4641565...@n4.nabble.com] Sent: Tuesday, August 28, 2012 7:25 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Get variable data Reading from the list Hi, MyList<-list() MyList[["MyVar"]]<-c(1:10) MyList[[1]] # [1]

Re: [R] Get variable data Reading from the list

2012-08-28 Thread Rantony
Yes. Thank you. This is what I wanted. Thanks ! From: jeff6868 [via R] [mailto:ml-node+s789695n4641563...@n4.nabble.com] Sent: Tuesday, August 28, 2012 7:03 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Get variable data Reading from the list Hello, And this: get(MyList[[1]]) w

Re: [R] Get variable data Reading from the list

2012-08-28 Thread jeff6868
Hello, And this: get(MyList[[1]]) with [[ ]] instead of [ ] ? If you do for example: MyList <- list() MyList [length(MyList )+1]<- "MyVar" MyVar <- c(1:10) get(MyList[[1]]) It seems to do what you want -- View this message in context: http://r.789695.n4.nabble.com/Get-variable-data-Reading