Re: [R] ts package on CRAN ?

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [R] ts package on CRAN ?
From: Martin Maechler (
Date: Sat 09 Oct 1999 - 00:00:16 EST

Message-Id: <>

>>>>> "PaulG" == Paul Gilbert <> writes:
(privately to me,
 I'm cc'ing to R-devel since this should be of a wider interest)

MM> However, if "tseries" would just contain a
MM> require(ts)

PaulG> So this is how this is suppose to be done. I guess I should read
PaulG> some documentation somewhere.


 (especially the last sections) should give quite a bit of info on this.

PaulG> Should this be "in line" in the
PaulG> library file or should it be in the .First.lib file?

There's no such thing as a ".First.lib" file; of course,
you mean the commonly used zzz.R file (containing the .First.lib <- .... )

Answer: Well, it depends.. :
Usually it doesn't matter where the require() is;
Current practice
 (grep'ing in my directory tree of all the source of all the CRAN packages)
reveals that people have adopted several different ways of doing this.

The zzz.R (which should also contain the .First.lib definition)
is good place to put such a general require().
Recently, we had a case where using
aaa.R (I think, even "Aaa.R") instead was recommended
{Idea: aaa.R would come at the very beginning of the installed package source}

If only very little functionality of a package depends on another
(non-standard) package, I'd consider to put the require(..)
only inside the function requiring the package, something like

   stop("The function `...' can only be used when package <pkg> is available!")

Martin Maechler <>
Seminar fuer Statistik, ETH-Zentrum  LEO D10	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To:

About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:09 EST