[Bioc-devel] Question about package dependency

Xu Ren xuren2120 @end|ng |rom gm@||@com
Tue Feb 19 16:01:54 CET 2019


Hi everyone,

I'm developing a Bioconductor package and I have a question about package
dependency. The functions in my package do not depend on ggplot2 but I used
ggplot2 to do some visualization in the package vignette. I'm wondering if
I should import ggplot2 in the DESCRIPTION file. If ggplot2 is not
imported, R CMD check will produce a note:


* checking tests ...

  Running ‘testthat.R’

 OK

* checking for unstated dependencies in vignettes ... NOTE

'library' or 'require' call not declared from: ‘ggplot2’

* checking package vignettes in ‘inst/doc’ ... OK

* checking running R code from vignettes ...

If ggplot2 is imported, since it is used only in the vignette, and none of
the function in my package depend on ggplot2, R CMD check generates another
note:

* checking loading without being on the library search path ... OK

* checking dependencies in R code ... NOTE

Namespace in Imports field not imported from: ‘ggplot2’

  All declared Imports should be used.

* checking S3 generic/method consistency ... OK

* checking replacement functions ... OK



So I'm wondering if ggplot2 should be imported in this case. Thank you!

Sincerely,
Xu Ren

	[[alternative HTML version deleted]]



More information about the Bioc-devel mailing list