Make a dummy package skeleton including 'srr' roxygen2 tags which can
be used to try out the functionality of this package. Running the example
lines below which activate the 'srr' roclets, and show you what the output
of those roclets looks like. Feel free to examine the effect of modifying any
of the @srrstats
tags within the code as identified by running those lines.
Usage
srr_stats_pkg_skeleton(base_dir = tempdir(), pkg_name = "demo")
Arguments
- base_dir
The base directory where the package should be constructed.
- pkg_name
The name of the package. The final location of this package will be in
file.path(base_dir, pkg_name)
.
See also
Other helper:
srr_stats_categories()
,
srr_stats_checklist_check()
,
srr_stats_checklist()
,
srr_stats_pre_submit()
Examples
d <- srr_stats_pkg_skeleton (pkg_name = "mystatspkg")
# (capture.output of initial compliation messages)
x <- utils::capture.output (roxygen2::roxygenise (d), type = "output")
#> Setting `RoxygenNote` to "7.2.3"
#> ℹ Loading mystatspkg
#> ℹ Re-compiling mystatspkg (debug build)
#> Writing NAMESPACE
#> ──────────────────── rOpenSci Statistical Software Standards ───────────────────
#>
#> ── @srrstats standards (8 / 12):
#> * [G1.1, G1.2, G1.3, G2.0, G2.1] in function 'test_fn()' on line#11 of file [R/test.R]
#> * [RE2.2] on line#2 of file [tests/testthat/test-a.R]
#> * [G2.3] in function 'test()' on line#6 of file [src/cpptest.cpp]
#> * [G1.4] on line#17 of file [./README.Rmd]
#>
#> ── @srrstatsNA standards (1 / 12):
#> * [RE3.3] on line#5 of file [R/srr-stats-standards.R]
#>
#> ── @srrstatsTODO standards (3 / 12):
#> * [RE4.4] on line#14 of file [R/srr-stats-standards.R]
#> * [RE1.1] on line#11 of file [R/test.R]
#> * [G1.5] on line#17 of file [./README.Rmd]
#> ────────────────────────────────────────────────────────────────────────────────
#> Writing mystatspkg-package.Rd
#> Writing test_fn.Rd
#> Writing NAMESPACE