Re: [R] Error in if (!length(fname) || !any(fname == zname)) { :

2007-05-04 Thread Frank E Harrell Jr
hongyuan cao wrote: > Dear R users, > > I tried to fit a cox proportional hazard model to get estimation of > stratified survival probability. my R code is as follows: > > cph(Surv(time.sur, status.sur)~ strat(colon[,13])+colon[,18] > +colon[,20]+colon[,9], surv=TRUE) > Error in if (!length(fna

Re: [R] Error in if (!length(fname) || !any(fname == zname)) { :

2007-05-04 Thread Prof Brian Ripley
I suggest reading the chapter on debugging in 'Writing R Extensions' and using the tools described there (such as options(error=recover)) would be at least as effective. Even traceback() would have helped the readers. Note that there is no function 'cph' in R: presumably we are supposed to gue

Re: [R] Error in if (!length(fname) || !any(fname == zname)) { :

2007-05-04 Thread Vladimir Eremeev
Vladimir Eremeev wrote: > > For me, the simplest way to find, what is wrong, would be tracing the R > code: > > library(debug) > mtrace(cph) > cph(Surv(time.sur, status.sur)~ strat(colon[,13])+colon[,18] > +colon[,20]+colon[,9], surv=TRUE) > > ... then find the place of the error and analyze

Re: [R] Error in if (!length(fname) || !any(fname == zname)) { :

2007-05-04 Thread Vladimir Eremeev
For me, the simplest way to find, what is wrong, would be tracing the R code: library(debug) mtrace(cph) cph(Surv(time.sur, status.sur)~ strat(colon[,13])+colon[,18] +colon[,20]+colon[,9], surv=TRUE) ... then find the place of the error and analyze how to adjust the function call arguments to av

[R] Error in if (!length(fname) || !any(fname == zname)) { :

2007-05-04 Thread hongyuan cao
Dear R users, I tried to fit a cox proportional hazard model to get estimation of stratified survival probability. my R code is as follows: cph(Surv(time.sur, status.sur)~ strat(colon[,13])+colon[,18] +colon[,20]+colon[,9], surv=TRUE) Error in if (!length(fname) || !any(fname == zname)) { :