From hadley at rice.edu  Wed Sep  1 17:38:30 2010
From: hadley at rice.edu (Hadley Wickham)
Date: Wed, 1 Sep 2010 10:38:30 -0500
Subject: [Rd] S3 method for package listed in suggest/enhance
Message-ID: <AANLkTinP-oDc=EHUvFZi3ShsiYwrMeMhi3xEbxyyEBp9@mail.gmail.com>

Hi all,

The profr package provides a method for displaying its output with
ggplot: ggplot.print.  You don't need this ggplot2 to use profr, so
ggplot2 is listed under enhances in the DESCRIPTION file.

If I have just S3method(ggplot, profr) in my NAMESPACE, then I get:

** testing if installed package can be loaded
Error : object 'ggplot' not found whilst loading namespace 'profr'
ERROR: loading failed

If I have both S3method(ggplot, profr) and importFrom(ggplot2,
ggplot), then I get:

* checking package dependencies ... ERROR
Namespace dependency not required: ggplot2

What's the correct way of exporting an S3 method for a generic in a
suggested package?

Thanks,

Hadley



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



[Rd] S3 method for package listed in suggest/enhance
Hadley Wickham