[Rd] When a tests/*.R file is run, the package should automatically be loaded (PR#11950)

timhesterberg at gmail.com timhesterberg at gmail.com
Thu Aug 7 11:25:15 CEST 2008

Suppose that a package "foo" contains a tests directory with a number
of *.R files.  Currently, each of the .R files must begin with
or the library is not loaded.

I suggest that the package be loaded automatically (at the beginning
of each file, or before any of the files are run), with lib.loc set
to the location of the package being loaded.
This would be more convenient for package creators.
It would also avoid confusion and errors related to:
* name of the package (e.g. if the author is creating multiple versions)
* lib.loc (the location may not be in the standard path, and there may be
  copies of the library in different locations)

If someone does not want the library loaded (this seems far-fetched) they
could detach the library.

--please do not edit the information below--

 platform = i486-pc-linux-gnu
 arch = i486
 os = linux-gnu
 system = i486, linux-gnu
 status =
 major = 2
 minor = 7.1
 year = 2008
 month = 06
 day = 23
 svn rev = 45970
 language = R
 version.string = R version 2.7.1 (2008-06-23)


Search Path:
 .GlobalEnv, package:stats, package:graphics, package:grDevices,
package:utils, package:datasets, package:showStructure, package:Rcode,
package:splus2R, package:methods, Autoloads, package:base

	[[alternative HTML version deleted]]

More information about the R-devel mailing list