Re: [R] R-help Digest, Vol 62, Issue 24

From: Terry Therneau <>
Date: Thu, 24 Apr 2008 08:49:34 -0500 (CDT)

---begin included message ----
i need to use pspline. In this pspline function coxph.wtest was used. When I try to make some change to this function by pulling out the pspline function, it turns out R gave me an error msg, saying coxph.wtest cannot be found. Even if i dont change anything in pspline and just rename it and run the function, it did not work out. Can any one help me with this? is there anyway to get the coxph.wtest function? thank you

  Your question is not completely clear to me, but I will guess that you have "pulled out" some code from coxph and tried to run it separately. If so, you are running into the name space problem: not all functions within the survival package are visible outside of the package. (Those for which the authors assumed that "no one would call the function themselves".) A quick solution is to make your own local copy
> coxph.wtest <- survival:::coxph.wtest

It will now be visible to you.         

                Terry T. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 24 Apr 2008 - 14:48:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Apr 2008 - 15:00:31 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive