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
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.
---
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]
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
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
5 matches
Mail list logo