[R] Finding the name ob an object

Spencer Graves spencer.graves at pdf.com
Mon Nov 10 17:18:01 CET 2003


 > f <- function(x)deparse(substitute(x))
 > f(pi)
[1] "pi"

answer the question?  spencer graves

Christoph Lange wrote:

>Hi, all!
>
>I want to give an object to a function and use the NAME of this object
>inside the function to build new objects based on this name.
>
>How do I get the name of an object if I don't pass a string containing
>the name but the object itself?
>
>Christoph.
>
>  
>




More information about the R-help mailing list