[R] worked in R, but not in S-Plus

Thomas Lumley tlumley at u.washington.edu
Wed Nov 10 16:52:05 CET 2004


On Tue, 9 Nov 2004, array chip wrote:

> Hi,
>
> I wrote a function that worked well in R, but not in
> S-Plus, can anyone suggest a solution?
>

If you change the argument of the function from x to ... it will give
  Error in eval(expr, envir, enclos) : Object "x" not found
which is almost compatible with what it does in S-PLUS.

If you want advice on how to change the behaviour in S-PLUS, this is the 
wrong list.

>> f.coxph.zph<-function(x)
> {
> 	cox.fit <- coxph(Surv(time.cox, status.cox) ~ x,
> na.action = na.exclude, method = "breslow")
> 	fit.zph<-cox.zph(cox.fit,transform='log')
> 	fit.zph$table[,3]
> }


 	-thomas




More information about the R-help mailing list