I am getting an error that I don't understand from R CMD check on my current instance of the survival code. R2.7.1 on Linux. Here is the last of the log * checking line endings in Makefiles ... OK * checking for portable use of $BLAS_LIBS ... OK * creating survival-Ex.R ... OK * checking examples ... OK * checking tests ... make[1]: Entering directory `/home/therneau/research/surv/Rforge/pkg/survival.Rcheck/tests' Running 'aareg.R' make[1]: *** [aareg.Rout] Error 1 ... > tfit <- aareg(Surv(time, status) ~ x, test1) Error: could not find function "aareg" Execution halted -------------- The manual page aareg.Rd has a call to the function in the examples and that runs ok, and aareg is in the NAMESPACE exports. I'm almost certainly missing something obvious - please point it out. Thanks, Terry T.
On Mon, 9 Feb 2009, Terry Therneau wrote:> > tfit <- aareg(Surv(time, status) ~ x, test1) > Error: could not find function "aareg" > Execution halted > > -------------- > The manual page aareg.Rd has a call to the function in the examples and that > runs ok, and aareg is in the NAMESPACE exports. > > I'm almost certainly missing something obvious - please point it out. >Based on the r-forge code it looks like you need library(survival) in R code in tests/. It doesn't happen automatically like it does for examples. -thomas Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle
> ... you need library(survival) in R code in tests/. It doesn't happen > automatically like it does for examples.Thanks Thomas, that is exactly the hint I needed. I had read the "check" part of the manual 3 times in vain; once you pointed it out I was able to fine the answer in the manual's description of the 'test' subdirectory. Terry T.