[Bioc-devel] Including data for @examples to run

Adam Price price0416 at gmail.com
Wed Apr 25 20:35:32 CEST 2018


I am currently developing a package and the only issue I have left at this
point is:

[1] "At least 80% of man pages documenting exported objects must have
runnable examples. The following pages do not:"

There are a few reasons why I'm using \dontrun{} for my examples and want
to know if there is any way to actually run my examples.

My package incorporates some automated data management and requires in
practice that certain directories exist.

I am storing some package environmental variables in my package like this:
myPackage_env <- new.env(parent=emptyenv())
assign("results_dir", "results/", envir=.myPackage_env)

My functions require things like this:
if(!exists("results_dir", envir=.myPackage_env))
{ stop(...) }

Maybe if I could somehow store the entire environment after a complete run
of my package and load that data then my functions might be able to run in
the @example sections.

How can I save the myPackage_env after an actual run of my package?
How can I make that data available to my @examples sections?

Thanks for any advice anyone can offer.


	[[alternative HTML version deleted]]

More information about the Bioc-devel mailing list