R-alpha: buglet in return(invisible()) [R 0.50 and 0.60]
Peter Dalgaard BSA
p.dalgaard@kubism.ku.dk
30 Oct 1997 13:10:58 +0100
Martin Maechler <maechler@stat.math.ethz.ch> writes:
>
> Evaluate the following example to get the behavior :
>
> --- anybody: patch ? ---
>
>
> tst.i <- function(x)
> {
> if(missing(x))
> return(invisible())
> else if(!is.numeric(x)) stop("x must be numeric")
> ## else
> invisible((x+3)^2)
> }
Actually,
> tst.i<-function()return(invisible(3))
> tst.i()
[1] 3
(in my snapshot of 0.60, Oct 24) So return(invisible(...)) just
doesn't work.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=