[Rd] deparse(substitute(arg)) in C?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sun Apr 18 10:01:40 CEST 2004
Isn't it much easier to just pass deparse(substitute(arg)) as an extra
argument to the .Internal call?
deparse is no problem, as it has C-level equivalents. substitute is more
of a problem as you need to give the correct evaluation environment.
Since you can call .Internal directly or inside a wrapper function, the
latter is not entirely clear to me (but presumably it is the argument of
the wrapper and not of .Internal that you want). Then you need to worry
about not evaluating arguments to the .Internal call, which can only be
done for all args ....
On Sat, 17 Apr 2004, Duncan Murdoch wrote:
> In R code, "deparse(substitute(arg))" is the usual way to construct a
> label for an argument. Is there an equivalent to this in C code
> working on an SEXP, inside a function called by .Internal()?
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list