[Rd] Should NEVER happen; please bug.report() [mkCLOSXP] (PR#7535)
McGehee, Robert
Robert.McGehee at geodecapital.com
Wed Jan 19 02:57:55 CET 2005
... which is equivalent to this:
as.function(list(function(x){}))
which doesn't really make sense (and is the same as part #2 of bug 7495
reported earlier anyway).
Jeroen, notice that w_R.fc[2] is a list containing a function, and not
the function itself. Not sure what this construct is good for, but if
you want to make lists of functions, use "[[" to index the list.
Also, I think the R patch may be as easy as adding the line
stopifnot(is(x[[1]], "language"))
to the as.function(x, ...) code
--Robert
-----Original Message-----
From: jjvanhoutte at ucdavis.edu [mailto:jjvanhoutte at ucdavis.edu]
Sent: Tuesday, January 18, 2005 8:25 PM
To: r-devel at stat.math.ethz.ch
Cc: R-bugs at biostat.ku.dk
Subject: [Rd] Should NEVER happen; please bug.report() [mkCLOSXP]
(PR#7535)
I'm probably not using the function right, but anyway, the program said:
"please bug.report."
> w_R.f1=function(PR,Pc) return (Pc*PR^3)
>
> w_R.f2=function(PR,Pc) return (Pc*PR)
>
> w_R.fc=c(w_R.f1,w_R.f2)
> w_R.fc[2]
[[1]]
function(PR,Pc) return (Pc*PR)
>
> RSD(type=3,
+ gparP=gpar(col="red"),
+ gparD=gpar(fill=FALSE,col=FALSE),
+ gparL=gpar(col="red",lwd=2),
+ gparSL=gpar(col=grey(0.5),lwd=2),
+ gparS=gpar(fill=FALSE,col=FALSE),
+ gparSP=gpar(col=grey(0.7)),
+ w_R.f=w_R.fc[2]
+ )
Error in R2SDgraph(...) : couldn't find function "w_R.f"
> as.function(w_R.fc[2])
Error in as.function.default(w_R.fc[2]) : invalid body argument for
"function"
Should NEVER happen; please bug.report() [mkCLOSXP]
--please do not edit the information below--
Version:
platform = i386-pc-mingw32
arch = i386
os = mingw32
system = i386, mingw32
status =
major = 2
minor = 0.1
year = 2004
month = 11
day = 15
language = R
Windows XP Home Edition (build 2600) Service Pack 2.0
Search Path:
.GlobalEnv, package:grid, package:methods, package:stats,
package:graphics,
package:grDevices, package:utils, package:datasets, Autoloads,
package:base
Respectfully,
Jeroen
______________________________________________
R-devel at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
More information about the R-devel
mailing list