This function is very similar to usethis::use_vignette()
except
that it uses a template from biocthis
. This template includes
instructions for citing other packages using RefManageR
, uses
sessioninfo::session_info()
for displaying the R session information since
it includes GitHub installation information and other useful details. The
template also includes a section on how to ask for help and required
knowledge.
use_bioc_vignette(name, title = name)
Just like in usethis::use_vignette()
: base for file name to
use for new vignette. Should consist only of numbers, letters, _ and -.
Lower case is recommended.
Just like in usethis::use_vignette()
: the title of the
vignette.
This function adds and/or replaces the
vignettes/<name>.Rmd
file in your R package.
if (FALSE) { # \dontrun{
## Run this function in your package
pkg <- basename(usethis::proj_get())
biocthis::use_bioc_vignette(pkg, paste("Introduction to", pkg))
} # }
## Create an example package for illustrative purposes.
## Note: you do not need to run this for your own package!
pkgdir <- biocthis_example_pkg()
#> ✔ Setting active project to "/tmp/RtmpKDAe9y/biocthisexample".
#> Package: biocthisexample
#> Title: What the Package Does (One Line, Title Case)
#> Version: 0.0.0.9000
#> Authors@R (parsed):
#> * First Last <first.last@example.com> [aut, cre]
#> Description: What the package does (one paragraph).
#> License: `use_mit_license()`, `use_gpl3_license()` or friends to
#> pick a license
#> Encoding: UTF-8
#> Roxygen: list(markdown = TRUE)
#> RoxygenNote: 7.3.2
#> ✔ Setting active project to "/tmp/RtmpKDAe9y/biocthisexample".
## Create a template vignette file that is Bioconductor-friendly
biocthis::use_bioc_vignette("biocthisexample", "Introduction to biocthisexample")
#> ✔ Adding knitr to Suggests field in DESCRIPTION.
#> ☐ Use `requireNamespace("knitr", quietly = TRUE)` to test if knitr is
#> installed.
#> ☐ Then directly refer to functions with `knitr::fun()`.
#> ✔ Adding BiocStyle to Suggests field in DESCRIPTION.
#> ☐ Use `requireNamespace("BiocStyle", quietly = TRUE)` to test if BiocStyle is
#> installed.
#> ☐ Then directly refer to functions with `BiocStyle::fun()`.
#> ✔ Adding RefManageR to Suggests field in DESCRIPTION.
#> ☐ Use `requireNamespace("RefManageR", quietly = TRUE)` to test if RefManageR is
#> installed.
#> ☐ Then directly refer to functions with `RefManageR::fun()`.
#> ✔ Adding sessioninfo to Suggests field in DESCRIPTION.
#> ☐ Use `requireNamespace("sessioninfo", quietly = TRUE)` to test if sessioninfo
#> is installed.
#> ☐ Then directly refer to functions with `sessioninfo::fun()`.
#> ✔ Adding testthat to Suggests field in DESCRIPTION.
#> ☐ Use `requireNamespace("testthat", quietly = TRUE)` to test if testthat is
#> installed.
#> ☐ Then directly refer to functions with `testthat::fun()`.
#> ✔ Adding "knitr" to VignetteBuilder.
#> ✔ Adding "inst/doc" to .gitignore.
#> ✔ Creating vignettes/.
#> ✔ Adding "*.html" and "*.R" to vignettes/.gitignore.
#> ✔ Adding rmarkdown to Suggests field in DESCRIPTION.
#> ☐ Use `requireNamespace("rmarkdown", quietly = TRUE)` to test if rmarkdown is
#> installed.
#> ☐ Then directly refer to functions with `rmarkdown::fun()`.
#> ✔ Writing vignettes/biocthisexample.Rmd.
#> ☐ Edit vignettes/biocthisexample.Rmd.