Martin Morgan
2012-Aug-17 20:24 UTC
[Rd] data() documentation ambiguous about loaded versus attached packages?
Under ?data
package: a character vector giving the package(s) to look in for data
sets, or 'NULL'.
By default, all packages in the search path are used, then
the 'data' subdirectory (if present) of the current working
directory.
which I think is accurate -- packages have to be attached for their data
to be found; being loaded (as when PkgB Imports: PkgA) is not
sufficient. Later we have
If 'lib.loc' and 'package' are both 'NULL' (the
default), the data
sets are searched for in all the currently loaded packages then in
the 'data' directory (if any) of the current working directory.
which I think is incorrect ('currently attached packages') and
If 'lib.loc = NULL' but 'package' is specified as a
character
vector, the specified package(s) are searched for first amongst
loaded packages and then in the default library/ies (see
'.libPaths').
which I'm unsure of -- probably 'amongst attached packages'.
FWIW most Bioconductor packages that use data() in function calls
currently do so without specifying 'package', and without specifying an
'envir' argument (hence overwriting user objects in the global
environment).
> R.version.string
[1] "R Under development (unstable) (2012-08-17 r60296)"
Martin
--
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold Building M1 B861
Phone: (206) 667-2793
Possibly Parallel Threads
- namespace S3 and S4 generic imports cannot both be satisfied:
- Namespace/inheritance problem in S4 methods for a union class
- S4 NAMESPACE method imports and exports do not include (promoted?) generics
- improved error message when existing implicit S4 generic is not imported?
- R CMD check fails to warn about undocumented classes and methods
