Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update load_all help with info on shims

  • Loading branch information...
commit 4b87c7ac5ed1ede72526e9d8ce566ea4897e93e8 1 parent 5eb6dd9
@wch wch authored
Showing with 21 additions and 1 deletion.
  1. +10 −0 R/load.r
  2. +11 −1 man/load_all.Rd
View
10 R/load.r
@@ -17,6 +17,8 @@
#' the imports environment, which has the name attribute
#' \code{imports:pkgname}. It is in turn is a child of
#' \code{<namespace:base>}, which is a child of the global environment.
+#' (There is also a copy of the base namespace that is a child of the empty
+#' environment.)
#'
#' The package environment \code{<package:pkgname>} is an ancestor of the
#' global environment. Normally when loading a package, the objects
@@ -31,6 +33,14 @@
#' loading an installed package with \code{\link{library}}, and can be
#' useful for checking for missing exports.
#'
+#' \code{load_all} also inserts shim functions into the imports environment
+#' of the laded package. It presently adds a replacement version of
+#' \code{system.file} which returns different paths from
+#' \code{base::system.file}. This is needed because installed and uninstalled
+#' package sources have different directory structures. Note that this is not
+#' a perfect replacement for \code{base::system.file}.
+#'
+#'
#' @param pkg package description, can be path or package name. See
#' \code{\link{as.package}} for more information
#' @param reset clear package environment and reset file cache before loading
View
12 man/load_all.Rd
@@ -41,7 +41,8 @@
a child of the imports environment, which has the name
attribute \code{imports:pkgname}. It is in turn is a
child of \code{<namespace:base>}, which is a child of the
- global environment.
+ global environment. (There is also a copy of the base
+ namespace that is a child of the empty environment.)
The package environment \code{<package:pkgname>} is an
ancestor of the global environment. Normally when loading
@@ -57,6 +58,15 @@
behavior when loading an installed package with
\code{\link{library}}, and can be useful for checking for
missing exports.
+
+ \code{load_all} also inserts shim functions into the
+ imports environment of the laded package. It presently
+ adds a replacement version of \code{system.file} which
+ returns different paths from \code{base::system.file}.
+ This is needed because installed and uninstalled package
+ sources have different directory structures. Note that
+ this is not a perfect replacement for
+ \code{base::system.file}.
}
\examples{
\dontrun{
Please sign in to comment.
Something went wrong with that request. Please try again.