An Import Mechanism for R

Alternative mechanism for importing objects from packages and R modules. The syntax allows for importing multiple objects 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.


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.


1.2.0 by Magnus Thor Torfason, a year ago

Report a bug at

Browse source code at

Authors: Stefan Milton Bache [aut] , Magnus Thor Torfason [aut, cre]

Documentation:   PDF Manual  

MIT + file LICENSE license

Suggests knitr, rmarkdown, magrittr, testthat

Imported by RadialVisGadgets, iemisc, radiant, radiant.basics,,, radiant.model, radiant.multivariate.

Suggested by pspline.inference, wrswoR.

See at CRAN