From timhesterberg at gmail.com  Thu Aug  7 11:25:15 2008
From: timhesterberg at gmail.com (timhesterberg at gmail.com)
Date: Thu,  7 Aug 2008 11:25:15 +0200 (CEST)
Subject: [Rd] When a tests/*.R file is run,
	the package should automatically be loaded (PR#11950)
Message-ID: <20080807092515.ED0D6282EFF1@mail.pubhealth.ku.dk>

Suppose that a package "foo" contains a tests directory with a number
of *.R files.  Currently, each of the .R files must begin with
    library("foo")
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
multiple
  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--

Version:
 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)

Locale:
LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=C

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]]



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