Thanks for answering.
I had already tested to split the expression but there is still a problem with
the function survfit(). Nevertheless this expression works with R, but I have
to implement it with python. Indeed, I am trying to create a software for
survival analysis using python language...
>>> s=r.Surv(t,d)>>> ss=r.survfit(s)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,
>>> ~112L"
and obviously, I get then :
>>> survPlot = r.get("plot.survfit", envir=r.getNamespace("survival"))>>>
>>> survPlot(sf)Traceback (most recent call last): File "<interactive input>",
>>> line 1, in ?NameError: name 'sf' is not defined
Lore.
> Date: Wed, 27 Feb 2008 11:48:12 +0100> From: [EMAIL PROTECTED]> To:
> rpy-list@lists.sourceforge.net> Subject: Re: [Rpy] package : survival> >
> 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
_________________________________________________________________
Microsoft vous offre un logiciel pour classer, retoucher et partager vos photos
!
http://www.windowslive.fr/galerie/
-------------------------------------------------------------------------
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