I'm proposing to signal an error (from R >= 3.3.0) in such
examples -- which do "work" in R 3.2.x and earlier :

> f <- NULL; body(f) <- quote(sin(a+1)); f
function () 
sin(a + 1)
<environment: 0x48f9798>

> g <- NULL; formals(g) <- alist(x = pi, y=); g
function (x = pi, y) 
NULL
<environment: 0x4e6dfe8>
>

The proposal is that the underlying C code will signal an error
when such replacement functions would create a function out of
"something not a function".

Martin Maechler, ETH Zurich

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to