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
[Bioc-devel] Question about package dependency
3 messages · Xu Ren, Shepherd, Lori, Vincent Carey
I believe this type of dependency belongs in the Suggests: field of the DESCRIPTION file. Lori Shepherd Bioconductor Core Team Roswell Park Cancer Institute Department of Biostatistics & Bioinformatics Elm & Carlton Streets Buffalo, New York 14263
From: Bioc-devel <bioc-devel-bounces at r-project.org> on behalf of Xu Ren <xuren2120 at gmail.com>
Sent: Tuesday, February 19, 2019 10:01:54 AM
To: bioc-devel at r-project.org
Subject: [Bioc-devel] Question about package dependency
Sent: Tuesday, February 19, 2019 10:01:54 AM
To: bioc-devel at r-project.org
Subject: [Bioc-devel] Question about package dependency
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]]
_______________________________________________
Bioc-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel
This email message may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited. If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.
put ggplot2 in Suggests: see 1.1.3 of https://cran.r-project.org/doc/manuals/r-release/R-exts.html The ?Suggests? field uses the same syntax as ?Depends? and lists packages that are not necessarily needed. This includes packages used only in examples, tests or vignettes (see Writing package vignettes <https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Writing-package-vignettes>), and packages loaded in the body of functions. E.g., suppose an example11 <https://cran.r-project.org/doc/manuals/r-release/R-exts.html#FOOT11> from package *foo* uses a dataset from package *bar*. Then it is not necessary to have *bar* use *foo* unless one wants to execute all the examples/tests/vignettes: it is useful to have *bar*, but not necessary. Version requirements can be specified but should be checked by the code which uses the package.
On Tue, Feb 19, 2019 at 10:02 AM Xu Ren <xuren2120 at gmail.com> wrote:
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]]
_______________________________________________ Bioc-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
The information in this e-mail is intended only for the ...{{dropped:18}}