2008/2/27, Lore Merdrignac <[EMAIL PROTECTED]>: > > Hi, > I have already posted a first problem of "NO_CONVERSION" with the package > SURVIVAL. But I still have a problem by using the function survfit() of the > package. > Here is the code : > > >>> from rpy import * > >>> r.library("survival") > >>> set_default_mode(NO_CONVERSION) > >>> d=r.rep(1,41) > >>> t=r.c( r.rep(6,5), r.rep(9,3) , r.rep(12,24), r.rep(15,9) ) > >>> r.plot(r.survfit(r.Surv(t,d))) > Traceback (most recent call last): > File "<interactive input>", line 1, in ? > RPy_RException: Erreur dans parse(text = paste(deparse(call[[2]]), 1, sep = > "~")) : > unexpected numeric constant dans : > "structure(c(6L, 6L, 6L, 6L, 6L, 9L, 9L, 9L, 12L, 12L, 12L, 12L, ~1 > 12L" > > Is there anything I am doing wrong ? I really need this function to > complete my survival analysis... I would really appreciate if anyone could > help me.
I guess that an emergency solution is to be doing the whole analysis in R. Otherwise, you could try splitting up a bit your expression r.plot(r.survfit(r.Surv(t,d))) to see better were things are going wrong: s = r.Surv(t,d) sf = r.survfit(s) plot(sf) The following has a chance to work (not tested): survPlot = r.get("plot.survfit", envir=r.getNamespace("survival")) survPlot(sf) L. PS: An alternative to the NO_CONVERSION business might be coming in not-so-long. > Thanks. > > Lore. > > ________________________________ > Windows Live Messenger 2008 vient de sortir, découvrez son nouveau design ! > Téléchargez gratuitement Messenger 2008 > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > rpy-list mailing list > rpy-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rpy-list > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list