Hello,
I'm not sure I understand, but something like this?
a <- 5
get("a")
See ?get
Hope this helps,
Rui Barradas
Citando Christian Hoffmann <[email protected]>:
> This may seem trivial:
>
> ls() gives me names of variables as a character vector. How can I print
> the values 'behind' those character values:
>
> ls()
>> "a"
>> a
>
> [1] 5
>
> How can I do e.g. print("unknown"(ls())) and get the variable values in
> my current environment?
>
> --
> Christian W. Hoffmann
> CH - 8915 Hausen am Albis, Schweiz
> Rigiblickstrasse 15 b, Tel.+41-44-7640853
> mailto: [email protected]
> home: www.echoffmann.ch[1]
>
> ______________________________________________
> [email protected] 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.htmland provide commented,
> minimal, self-contained, reproducible code.
Ligações:
---------
[1] http://www.echoffmann.ch
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.