[R] Name of data.frame as a text string?

Mark Knecht markknecht at gmail.com
Thu Jul 2 21:22:19 CEST 2009


Perfect! Thanks!

Cheers,
Mark

On 7/2/09, Phil Spector <spector at stat.berkeley.edu> wrote:
> Mark -
>    Take a look at the help file for substitute.
>  For example:
>
>
> > zz = function(x)print(substitute(x))
> > zz(variablename)
> >
>  variablename
>
>                                         - Phil
>
>
>
>  On Thu, 2 Jul 2009, Mark Knecht wrote:
>
>
> >
> > I've passed a data.frame as an input into a function which does some
> > plotting on a 4x4 matrix of certain parameters within in the
> > data.frame. I'd like to add a small header on top of each plot with
> > the name of the data.frame so that it's clear as I compare these 16
> > things where each on came from.
> >
> > So far I haven't found the right way to get the name of the data.frame
> > as a string which I can use in something like mtext. Is there one? If
> > I put dummy text in, or take the time to pass in the name by hand,
> > then I do get titles just as I'd like, but I'd far rather let the name
> > of the data.frame speak for itself.
> >
> > Thanks,
> > Mark
> >
> > ______________________________________________
> > R-help at 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.
> >
> >
>




More information about the R-help mailing list