Skip to content
Back to formatted view

Raw Message

Message-ID: <9901212236.AA09644@biosta.mskcc.org>
Date: 1999-01-21T22:36:06Z
From: E. S. Venkatraman
Subject: Calling survfit within a function

I have a function that generates data and tries to apply the survfit 
within it.  I have tried:

function(..){
x .....
survfit(Surv(tim,sts) ~ grp, data = x, envir = sys.frame(sys.parent()))
}

but I still get "Error: Object "x" not found".  Is there a fix?
(I use R-0.63.2 with the current survival4 package)

Thanks
E. S. Venkatraman
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._