Skip to content
Prev 15267 / 63424 Next

bug report for as.function (PR#7702)

On Thu, 24 Feb 2005 15:59:13 +0100 (CET), becker@kfs.oeaw.ac.at wrote
:
A simpler version is as follows:
[[1]]
function() 1
Error in as.function.default(x1) : invalid body argument for
"function"
Should NEVER happen; please bug.report() [mkCLOSXP]

The problem is that as.function doesn't know how to handle an object
of mode function as the body of a function.  It expects a function
definition to be a call instead:
[[1]]
function() 1
function () 
function() 1
[1] "list"
[1] "function"
[1] "list"
[1] "call"

These tests were done in
Could someone else please deal with this?  I have trouble with test
builds right now.

Duncan Murdoch