Hi all,
I would like to turn some long strings like MyString$Myfield$MySubfield into 
variables but it looks like that the get does not like lists



so for example:

 test<-list(a=2) 

test 
>$a 
[1] 2 


get("test") 
>$a 
[1] 2 


get("test$a") 
>Fehler in get("test$a") : Objekt 'test$a' nicht gefunden 

lapply(test,function(x) return (x$a)) 
>Fehler in x$a : $ operator is invalid for atomic vectors 

What should I do to read those lists I have as strings?

I would like to thank you in advance for your reply

regards
A

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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