[Rd] package vignettes, suggests and R CMD check
Seth Falcon
sfalcon at fhcrc.org
Tue Nov 21 21:21:24 CET 2006
Peter Ruckdeschel <Peter.Ruckdeschel at uni-bayreuth.de> writes:
> right. Not a problem at all for us. But when submitting the package to CRAN
> this is a no-go condition ...
I'm not sure exactly how CRAN handles this. I would have thought
install happens before check.
>> You might also be able to make part of the vignette in A1 conditional
>> on having A2
>
> Sorry, I am stuck here: I do not see how you could do this; could you
> help me there?
Given what your end goal is, I don't think this is what you want.
But...
Don't list A2 in Suggests, don't list it in vignetteDepends. In
the vignette do:
haveA2 <- suppressWarnings(require("A2"))
if (haveA2) {
# wow, those A2 features are great
} else {
# sorry, we show you something else that is not as interesting
}
You may get a warning from R CMD check, there are sneaky ways around
it which I am not allowed to divuldge ;-)
>> (or, of course, consider splitting the vignette or
>> merging the packages).
>
> We thought about this, too; our reasons not to do so were:
>
> merging the packages: our packages already have a considerable size,
> and the additional features provided for in the extension packages
> may not be needed by everybody;
>
> splitting the vignette: It seemed to be a good idea for us,
> (a) not to have to repeat explications in the extension packages
> and (b) to draw the reader's attention to the features provided for
> by the extensions.
IMHO, you should reconsider the vignette. You could probably mention
some of the functionality available in A2 in the A1 vignette but put
actuall examples in the A2 vignette.
IMO, if there is enough reason to split the packages, then there is
enough reason to split the vignettes.
Now it would be interesting in general to have a mechanism for
packaging vignette documentation for multiple packages. A sort of
"meta-vignette" (oxymoron?). Indeed, perhaps this is another solution
for you: an empty documentation package that depends on A1, A2 where
the vignette lives.
+ seth
More information about the R-devel
mailing list