Is it possible to define an external special function (SPECIALSXP)?
I'm trying to do some language-level work, and don't want my arguments
evaluated before they hit C.
It looks like the only way to define a SPECIALSXP is by using XX0 in
the `eval' field of R_FunTab; is there any way to make this a
On 25/05/2011 1:10 PM, Peter Danenberg wrote:
Is it possible to define an external special function (SPECIALSXP)?
I'm trying to do some language-level work, and don't want my arguments
evaluated before they hit C.
It looks like the only way to define a SPECIALSXP is by using XX0 in
the `eval' fi
> However, if you don't want to evaluate the arguments, just pass
> substitute(arg) to your function instead of arg.
Thanks, Duncan; the problem is, I'm trying to substitute on `...' and
I don't think I can access `...' without inadvertently evaluating it.
I'm trying to write a debugging function
> f <- function(...) {
+ dotArgList <- substitute(list(...))
+ dotArgList
+ }
> f(cat("foo\n"), stop("Oops"), warning("Hmm"))
list(cat("foo\n"), stop("Oops"), warning("Hmm"))
> # i.e., no argument was evaluated
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Messa
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: William Dunlap
> Sent: Wednesday, May 25, 2011 11:20 AM
> To: 'Peter Danenberg'
> Cc: r-devel@r-project.org
> Subject: RE: [Rd] External special functions (SPECIALSXP)
>
> > f <- function(...) {
> +
On 25/05/2011 2:05 PM, Peter Danenberg wrote:
> However, if you don't want to evaluate the arguments, just pass
> substitute(arg) to your function instead of arg.
Thanks, Duncan; the problem is, I'm trying to substitute on `...' and
I don't think I can access `...' without inadvertently evalua
Quoth William Dunlap on Setting Orange, the 72nd of Discord:
> > f <- function(...) {
> + dotArgList <- substitute(list(...))
> + dotArgList
> + }
> > f(cat("foo\n"), stop("Oops"), warning("Hmm"))
> list(cat("foo\n"), stop("Oops"), warning("Hmm"))
> > # i.e., no argument was evaluated
Than
Sharpie wrote:
> Currently, the only Curry implementation I know of is in the roxygen
> package which is kind of a weird dependency to install just for this
> one function.
I end up using Curry so much outside of Roxygen that I spun it off
into the `functional' package:
https://r-forge.r-projec