David,

That's useful to highlight my problem.
If instead of e="e" we use a vector like GreenEyes:

> GreenEyes=c(1,2,3,4)
> niceplot(GreenEyes)
1 2 3 4
>

What I want is niceplot to print "GreenEyes" bot 1 2 3 4

I want this so I can use it in a legend without having to type in
"GreenEyes"...


On 10 March 2010 23:32, David Winsemius [via R] <
ml-node+1588214-2107833523-180...@n4.nabble.com<ml-node%2b1588214-2107833523-180...@n4.nabble.com>
> wrote:

> I think you need to provide a richer example:
>
> niceplot<-function(...) {
>    parms=list(...)
>
>   for (x in parms) {
>     cat(x)
>   }
> }
>  > e="e"
>
>  > niceplot(e)
> e
>
> On Mar 10, 2010, at 5:21 PM, ManInMoon wrote:
>
> >
> > I have writtn a function where I pass a variable number of arguments.
> >
> > I They are vectors and I can manipulate them, but I need to get hold
> > of the
> > name for a legend.
> >
> > niceplot<-function(...) {
> >   parms=list(...)
> >
> >  for (x in parms) {
> >    DoSomethingWith(x)
> >  }
> >
> > }
> >
> > BUT how how can I get something like namestring(...) of
> > nameofvector(x)?
> > --
> > View this message in context:
> http://n4.nabble.com/colname-of-arguments-tp1588146p1588146.html
> > Sent from the R help mailing list archive at Nabble.com.
> >
> > ______________________________________________
> > [hidden 
> > email]<http://n4.nabble.com/user/SendEmail.jtp?type=node&node=1588214&i=0>mailing
> >  list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> > and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> [hidden 
> email]<http://n4.nabble.com/user/SendEmail.jtp?type=node&node=1588214&i=1>mailing
>  list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>
>
> ------------------------------
> View message @
> http://n4.nabble.com/colname-of-arguments-tp1588146p1588214.html
> To unsubscribe from colname of ... arguments, click here< (link removed) ==>.
>
>
>

-- 
View this message in context: 
http://n4.nabble.com/colname-of-arguments-tp1588146p1588605.html
Sent from the R help mailing list archive at Nabble.com.

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to