Re: [R] colname of ... arguments

2010-03-11 Thread ManInMoon
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

Re: [R] colname of ... arguments

2010-03-11 Thread ManInMoon
That is quite helpful David niceplot-function(...) { parms=list(...) for (x in parms) { xname - paste(deparse(substitute(x), 500), collapse = \n) cat(xname) } } GreenEyes=c(1,2,3,4) niceplot(GreenEyes) c(1, 2, 3, 4) BUT what I want is: GreenEyes=c(1,2,3,4) niceplot(GreenEyes)

Re: [R] colname of ... arguments

2010-03-11 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 11.03.2010 09:34:06: 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

Re: [R] colname of ... arguments

2010-03-11 Thread Claudia Beleites
what about: niceplot-function(...) { arg.names - as.list (match.call () [-1]) for (a in seq_along (arg.names)) cat (as.character (as.expression (arg.names [[a]])), \n\n) } niceplot (greeneye, log (greeneye), 1:3) note that this works also if there is no greeneye Disclaimer: I don't know

Re: [R] colname of ... arguments

2010-03-11 Thread Duncan Murdoch
ManInMoon wrote: That is quite helpful David niceplot-function(...) { parms=list(...) for (x in parms) { xname - paste(deparse(substitute(x), 500), collapse = \n) cat(xname) } } GreenEyes=c(1,2,3,4) niceplot(GreenEyes) c(1, 2, 3, 4) BUT what I want is:

Re: [R] colname of ... arguments

2010-03-11 Thread Greg Snow
-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of ManInMoon Sent: Thursday, March 11, 2010 1:34 AM To: r-help@r-project.org Subject: Re: [R] colname of ... arguments David, That's useful to highlight my problem. If instead of e=e we use a vector like GreenEyes

Re: [R] colname of ... arguments

2010-03-11 Thread ManInMoon
Duncan, Thanks you - your deparse(substitute(...)) work - fantastic. But, when I pass in multiple arguments: f(z[,1],z[,2]) I only show first argument, rest shows up as NULL -- View this message in context: http://n4.nabble.com/colname-of-arguments-tp1588146p1588872.html Sent from the R help

Re: [R] colname of ... arguments

2010-03-11 Thread Duncan Murdoch
On 11/03/2010 7:25 AM, ManInMoon wrote: Duncan, Thanks you - your deparse(substitute(...)) work - fantastic. But, when I pass in multiple arguments: f(z[,1],z[,2]) I only show first argument, rest shows up as NULL Yes, that's because substitute has specific meanings for its two

Re: [R] colname of ... arguments

2010-03-11 Thread ManInMoon
Thanks Duncan - that works perfectly. -- View this message in context: http://n4.nabble.com/colname-of-arguments-tp1588146p1589687.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] colname of ... arguments

2010-03-10 Thread ManInMoon
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

Re: [R] colname of ... arguments

2010-03-10 Thread David Winsemius
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

Re: [R] colname of ... arguments

2010-03-10 Thread David Scott
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