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

From: <timhesterberg_at_gmail.com>
Date: Thu, 07 Aug 2008 11:25:15 +0200 (CEST)


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)

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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 07 Aug 2008 - 09:33:39 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 07 Aug 2008 - 09:36:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive