On Thu, Feb 21, 2008 at 8:08 AM, Lore Merdrignac <[EMAIL PROTECTED]> wrote: > > Hi, > I have a problem with the package "survival" in rpy. I have to use the > function survit() , and it works with R but not by calling R from python > with rpy : > > >>> ss=r.survfit(s,weights=pds) > Traceback (most recent call last): > File "<interactive input>", line 1, in ? > RPy_RException: Erreur dans UseMethod("survfit") : pas de méthode applicable > pour "survfit" > > It seems that there is nothing implemented in rpy for this function... > Do you know how I can manage this problem ? Have I made mistakes ? Or do > you know what function I could use to have similar results ?
Lore, You'll probably need to show how you construct "s", as it seems that survfit is looking for a particular type of object. If "s" is not a formula or a coxph object, that would explain the error. Note that there is type-conversion going on in rpy, so even though "s" might have started out as the correct type of object, it may not be by the time you are calling the function here. Sean ------------------------------------------------------------------------- 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