An Import Mechanism for R

This is an alternative mechanism for importing objects from packages. The syntax allows for importing multiple objects from a package with a single command in an expressive way. The import package bridges some of the gap between using library (or require) and direct (single-object) imports. Furthermore the imported objects are not placed in the current environment. It is also possible to import objects from stand-alone .R files. For more information, refer to the package vignette.


News

Version 1.1.0

  • There is now support to import objects from script files, i.e. a kind of "module". Scripts meant to expose objects for import should ideally be side-effect free, but this is not inforced. Any attachments are detached after import, but loaded namespaces remain loaded.

  • There is now a package vignette.

Version 1.0.2

  • You can now specify which library to use, and only one library is ever used in a single call: there is no ambiguity about where imports come from.
  • There is a distinction between using double- and triple colon syntax; analogously to using :: and ::: operators.
  • If the package is attached (e.g. via library) there is a startup message informing the user that the package is not meant to be attached.
  • It is only possible to use the functions with the import:: / import::: syntax.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("import")

1.1.0 by Stefan Milton Bache, 4 years ago


https://github.com/smbache/import


Report a bug at https://github.com/smbache/import/issues


Browse source code at https://github.com/cran/import


Authors: Stefan Milton Bache


Documentation:   PDF Manual  


MIT + file LICENSE license


Suggests knitr


Imported by iemisc, radiant, radiant.basics, radiant.data, radiant.design, radiant.model, radiant.multivariate.

Suggested by tibble, wrswoR.


See at CRAN