It works like Barry told me to do. Thanks a lot for your time :)
Lore.


> Date: Wed, 27 Feb 2008 12:24:53 +0100> From: [EMAIL PROTECTED]> To: 
> rpy-list@lists.sourceforge.net> Subject: Re: [Rpy] package : survival> > 
> 2008/2/27, Lore Merdrignac <[EMAIL PROTECTED]>:> >> > 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, ~1> > 12L"> >> > 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> > Wouldn't it 
> be because the variable name 'sf' is indeed not defined ?> (in your version 
> above, the variable name is 'ss').> > Anyway, because of the error that 
> variable will obviously not be created> (and I was shooting in the dark, 
> thinking that the error was coming from> the call to "plot"... now we know 
> that it is coming from "survfit").> > Out of curiosity, what is saying 
> "print(s)" ?> > > 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> >> >> > 
> ________________________________> > Windows Live Messenger 2008 vient de 
> sortir, entièrement personnalisable !> > 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> >> >> > > -- > 
> -----BEGIN PGP SIGNATURE-----> Version: GnuPG v1.4.6 (GNU/Linux)> > 
> iEYEARECAAYFAkYgwJ4ACgkQB/w/MLoyRDeQlgCeMp8v69/Wy24Q4IaBVhoG1M5R> 
> 2h4AoIOTvKbrFpTklRDjV7u8tEOeSQqt> =JPph> -----END PGP SIGNATURE-----> > 
> -------------------------------------------------------------------------> 
> 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 recommande de mettre à jour Internet Explorer.
http://specials.fr.msn.com/IE7P25
-------------------------------------------------------------------------
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

Reply via email to