Hi, res<- unlist(mget(ls())) names(res)<-NULL res #[1] 5 5 10 A.K.
----- Original Message ----- From: Rui Esteves <ruimax...@gmail.com> To: r-help@r-project.org Cc: Sent: Monday, April 29, 2013 7:07 AM Subject: [R] How to "call" an object given a string? Hello, This is very basic and very frustrating. Suppose this: >A=5 >B=5 >C=10 > ls() "A" "B" "C" I would like this >xpto() 5 5 10 How can I do xpto()? Thanks Rui [[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. ______________________________________________ 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.