[R] NAMESPACE and imports

Blaser Nello nblaser at ispm.unibe.ch
Fri Apr 19 17:43:58 CEST 2013

Not sure this fixes your problem, but as far as I can know (and can tell from the manual: http://cran.r-project.org/doc/manuals/r-release/R-exts.pdf), importFrom needs to know what functions you are importing [e.g. importFrom(Hmisc, "latex") importFrom(stats, "anova")]. 

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Frank Harrell
Sent: Freitag, 19. April 2013 16:26
To: r-help at r-project.org
Subject: [R] NAMESPACE and imports

I am cleaning up the rms package to not export functions not to be called directly by users.  rms uses generic functions defined in other packages. 
For example there is a latex method in the Hmisc package, and rms has a latex method for objects of class "anova.rms" so there are anova.rms and latex.anova.rms functions in rms.  I use:


S3method(anova, rms)
S3method(latex, anova.rms, bj, cph, Glm, Gls, lrm, naprint.delete, ols, pphsm, psm, rms, Rq, summary.rms, validate)

When doing R CMD INSTALL I get: [using R 2.15.3]

** preparing package for lazy loading
Error : c("bad 'S3method' directive: S3method(latex, anova.rms, bj, cph,
Glm, Gls, lrm, naprint.delete, ", "bad 'S3method' directive:     ols, pphsm,
psm, rms, Rq, summary.rms, validate)")
ERROR: lazy loading failed for package ‘rms’

Any advice appreciated.

Frank Harrell
Department of Biostatistics, Vanderbilt University
View this message in context: http://r.789695.n4.nabble.com/NAMESPACE-and-imports-tp4664718.html
Sent from the R help mailing list archive at Nabble.com.

R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list