[R] packagename:::functionname vs. importFrom
hadley at rice.edu
Tue Jan 4 00:48:27 CET 2011
I think you mean packagename::functionname? The three colon form is
for accessing non-exported objects. Otherwise, I think using :: vs
importFrom is functionally identical - either approach delays package
loading until necessary.
On Mon, Jan 3, 2011 at 9:45 PM, Frank Harrell <f.harrell at vanderbilt.edu> wrote:
> In my rms package I use the packagename:::functionname construct in a number
> of places. If I instead use the importFrom declaration in the NAMESPACE
> file would that require the package to be available, and does it load the
> package when my package loads? If so I would keep using packagename::: to
> avoid up-front loading of other packages that are not always used.
> Frank Harrell
> Department of Biostatistics, Vanderbilt University
> View this message in context: http://r.789695.n4.nabble.com/packagename-functionname-vs-importFrom-tp3172684p3172684.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.
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
More information about the R-help