[Rd] Re: R2.0.0 bug in function vcov in library survival (PR#7266)
On Wed, 6 Oct 2004, Thomas Lumley wrote: On Wed, 6 Oct 2004, Prof Brian Ripley wrote: Those vcov methods were removed from stats at 2004-08-28 20:40:13 +0100 survival now has vcov.{coxph,survreg} Looks like they have been removed from survival since: that is where they should be. They are very simple -- vcov.coxph - vcov.survreg - function (object, ...) object$var No, they haven't been updated to cope with lazy loading (they are defined in a top-level if statement to prevent conflicts in older versions of R). vcov.coxph is actually vcov.coxph-function (object, ...) { rval-object$var dimnames(rval)-list(names(coef(object)),names(coef(object))) rval } since object$var doesn't have dimnames. As Torsten has suggested, it looks like they were neither registered nor exported from the survival namespace, but the objects are in the namespace. (Nothing to do with lazy-loading, then.) library(survival) Loading required package: splines ls(asNamespace(survival), patt=^vcov) [1] vcov.coxph vcov.survreg Please register them in the next update. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Re: R2.0.0 bug in function vcov in library survival (PR#7266)
On Wed, 6 Oct 2004, Thomas Lumley wrote: On Wed, 6 Oct 2004, Prof Brian Ripley wrote: Those vcov methods were removed from stats at 2004-08-28 20:40:13 +0100 survival now has vcov.{coxph,survreg} Looks like they have been removed from survival since: that is where they should be. They are very simple -- vcov.coxph - vcov.survreg - function (object, ...) object$var No, they haven't been updated to cope with lazy loading (they are defined in a top-level if statement to prevent conflicts in older versions of R). vcov.coxph is actually vcov.coxph-function (object, ...) { rval-object$var dimnames(rval)-list(names(coef(object)),names(coef(object))) rval } since object$var doesn't have dimnames. As Torsten has suggested, it looks like they were neither registered nor exported from the survival namespace, but the objects are in the namespace. (Nothing to do with lazy-loading, then.) library(survival) Loading required package: splines ls(asNamespace(survival), patt=^vcov) [1] vcov.coxph vcov.survreg Please register them in the next update. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Re: R2.0.0 bug in function vcov in library survival (PR#7266)
On Wed, 6 Oct 2004, Prof Brian Ripley wrote: On Wed, 6 Oct 2004, Thomas Lumley wrote: No, they haven't been updated to cope with lazy loading (they are defined in a top-level if statement to prevent conflicts in older versions of R). vcov.coxph is actually vcov.coxph-function (object, ...) { rval-object$var dimnames(rval)-list(names(coef(object)),names(coef(object))) rval } since object$var doesn't have dimnames. As Torsten has suggested, it looks like they were neither registered nor exported from the survival namespace, but the objects are in the namespace. (Nothing to do with lazy-loading, then.) True. I misconstrued the advice against top-level code in packages. -thomas __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel