Skip to contents

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).

Value

The path to the directory holding the newly created package

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.3.1"
#> Writing NAMESPACE
#>  Loading mystatspkg
#>  Re-compiling mystatspkg (debug build)
#> ──────────────────── rOpenSci Statistical Software Standards ───────────────────
#> 
#> ── @srrstats standards (6 / 9): 
#>   * [G1.1, G1.2, G1.3, G2.0, G2.1] in function 'test_fn()' on line#11 of file [R/test.R]
#>   * [G2.3] in function 'test()' on line#6 of file [src/cpptest.cpp]
#> 
#> ── @srrstatsNA standards (1 / 9): 
#>   * [RE3.3] on line#5 of file [R/srr-stats-standards.R]
#> 
#> ── @srrstatsTODO standards (2 / 9): 
#>   * [RE4.4] on line#14 of file [R/srr-stats-standards.R]
#>   * [RE1.1] on line#11 of file [R/test.R]
#> ────────────────────────────────────────────────────────────────────────────────
#> Writing mystatspkg-package.Rd
#> Writing test_fn.Rd
#> Writing NAMESPACE