?"["

Read the docs! Go thru an R tutorial.

-- Bert

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
Clifford Stoll




On Wed, Dec 17, 2014 at 7:24 PM, ce <zadi...@excite.com> wrote:
> Dear all,
>
> If I have a list like this how I can get an object of it  with a variable :
>
> foo<-list(A = c(1,3), B =c(1, 2), C = c(3, 1))
> var <- "A"
>
> get(paste("foo$",'A',sep=''))
> Error in get(paste("foo$", "A", sep = "")) : object 'foo$A' not found
>
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to