[R] bug?

Thomas Lumley thomas at biostat.washington.edu
Tue Mar 9 18:11:43 CET 1999

On Tue, 9 Mar 1999, Mai Zhou wrote:

> Windows 9*/NT version, on an NT box  
> R 0.63.0 Beta (Nov 13, 1998)
> > library(survival4) 
> > test <- function(x,d) {
>       survfit(Surv(x,d) ~1)
> }
> > test( rexp(50), sample(c(0,1), size=50, replace=T) )
> Error: Object "x" not found
> > 
> Other functions like in the ctest library works out
> OK, the x and d got passed to the inner function.
> And here it did not got passed to Surv(), I guess.

This is fixed in the version of the survival library on CRAN in the devel
subdirectory, which goes with 0.63.3.  I don't know if that version is in
any Windows release.

It would be possible to just give the students an edited version of the
interpreted code for survival4.  The change is that
should be replaced with
wherever it occurs (it's in about three or four eval() statements)

This is an R/S incompatibility. I don't know if it qualifies as a bug -- I
think sys.frame(sys.parent()) is the preferred usage even in S.


r-help 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-help-request at stat.math.ethz.ch

More information about the R-help mailing list