[R] Finding the name ob an object

kjetil@entelnet.bo kjetil at entelnet.bo
Mon Nov 10 19:01:26 CET 2003


On 10 Nov 2003 at 17:06, Christoph Lange wrote:

> test <- function(x){
+      return(substitute(x))}
> a <- 3
> test(a)
a


Kjetil Halvorsen

> 
> 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.
> 
> -- 
> Christoph Lange
> MPI fuer biologische Kybernetik  |Phone: +49-7071-601-607|
> Postfach 2169, D-72012 Tuebingen |FAX:   +49-7071-601-616|
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list