[R] Get inside a function the name of a variable called as argument?

From: Julien Roux <Julien.Roux_at_unil.ch>
Date: Tue, 29 Apr 2008 15:53:02 +0200

Hi list,
I created a function to plot my data:
I want to write the name of the argument vector in the legend/title of the plot.
For example if I call:
> plot_function(my_vector)

I want "my_vector" to be written in the legend or title and so retrieve the name of this object as a string.

Is it possible to achieve this?
Thanks a lot for your help

Julien Roux, PhD student
Department of Ecology and Evolution
Biophore, University of Lausanne, 1015 Lausanne, Switzerland
tel: +41 21 692 4221    fax: +41 21 692 4165

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 29 Apr 2008 - 13:59:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 29 Apr 2008 - 17:30:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive