From h.wickham at gmail.com  Mon Feb 26 17:29:51 2007
From: h.wickham at gmail.com (hadley wickham)
Date: Mon, 26 Feb 2007 10:29:51 -0600
Subject: [Rd] Depending on many packages: another best practice question
In-Reply-To: <971536df0702250738o168336e5q67fd997eb86958ae@mail.gmail.com>
References: <f8e6ff050702231738x74d515c1pd246403fdf8ad21a@mail.gmail.com>
	<Pine.LNX.4.64.0702241828570.14494@gannet.stats.ox.ac.uk>
	<f8e6ff050702241121q1890ab16sff1d19bbb432eff6@mail.gmail.com>
	<Pine.LNX.4.64.0702242013310.15657@gannet.stats.ox.ac.uk>
	<f8e6ff050702250657i1ff01035je267f64a5d584b85@mail.gmail.com>
	<971536df0702250738o168336e5q67fd997eb86958ae@mail.gmail.com>
Message-ID: <f8e6ff050702260829y5b120e41o9a271f26db255c6a@mail.gmail.com>

> You can use
>
> if(require(myPackage)) { ... }

Yes, but the problem with this is that I now have the fact that this
function requires that package stated in two places - in the body of
the function, and in the examples - adding redundancy which makes
maintenance harder.

I guess what I really want, is some way to throw an error that R CMD
check won't complain about - ie. a special dependency not met error.

Hadley



[Rd] Depending on many packages: another best practice question
hadley wickham