Skip to content
Prev 96891 / 398500 Next

deparse(substitute(foo))

That works perfectly.

Thanks,
Whit
 

-----Original Message-----
From: Marc Schwartz [mailto:MSchwartz at mn.rr.com] 
Sent: Thursday, July 27, 2006 8:41 AM
To: Armstrong, Whit
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] deparse(substitute(foo))
On Thu, 2006-07-27 at 08:18 -0400, Armstrong, Whit wrote:
Try this:

x <- 1:10
y <- 10:20 
 
foo <- function(...) { 
   sapply(match.call()[-1], deparse)
}
[1] "x" "y"


HTH,

Marc Schwartz





This e-mail message is intended only for the named recipient(s) above. It may contain confidential information. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying of this e-mail and any attachment(s) is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender by replying to this e-mail and delete the message and any attachment(s) from your system. Thank you.