From hadley at rice.edu  Wed Aug 25 14:34:03 2010
From: hadley at rice.edu (Hadley Wickham)
Date: Wed, 25 Aug 2010 07:34:03 -0500
Subject: [Rd] require is to suggests as what is to imports?
In-Reply-To: <AANLkTi=xVsz3z-3mxuFCGUJUDF2sLPjDvEJM3t4G9VWL@mail.gmail.com>
References: <AANLkTi=EOFdYKP0JUZLCz8r7KRJ1PaYFGQgresAQJ6r1@mail.gmail.com>
	<19572.12499.732450.953347@max.nulle.part>
	<AANLkTi=xVsz3z-3mxuFCGUJUDF2sLPjDvEJM3t4G9VWL@mail.gmail.com>
Message-ID: <AANLkTimqboW8yyObPqybKDu930hQm-G6JG8VPsSf7ULG@mail.gmail.com>

On Tue, Aug 24, 2010 at 6:55 PM, Henrik Bengtsson <hb at stat.berkeley.edu> wrote:
> isPackageInstalled <- function(package, ...) {
> ?path <- system.file(package=package);
> ?(path != "");
> }
>
> taken from R.utils (which also has a isPackageLoaded()).

Nice quick hack (subject to caveats Brian mentions).  Thanks!

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



[Rd] require is to suggests as what is to imports?
Hadley Wickham