Title: | 'rOpenSci' Review Roclets |
---|---|
Description: | Companion package to 'rOpenSci' statistical software review project. |
Authors: | Mark Padgham [aut, cre] |
Maintainer: | Mark Padgham <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.3.026 |
Built: | 2024-10-28 11:19:44 UTC |
Source: | https://github.com/ropensci-review-tools/srr |
ssr
tags.Generate report from ssr
tags.
srr_report(path = ".", branch = "", view = TRUE, roxygenise = TRUE)
srr_report(path = ".", branch = "", view = TRUE, roxygenise = TRUE)
path |
Path to package for which report is to be generated |
branch |
By default a report will be generated from the current branch as set on the local git repository; this parameter can be used to specify any alternative branch. |
view |
If |
roxygenise |
If |
(invisibly) Markdown-formatted lines used to generate the final html document.
## Not run: path <- srr_stats_pkg_skeleton () srr_report (path) ## End(Not run)
## Not run: path <- srr_stats_pkg_skeleton () srr_report (path) ## End(Not run)
List all currently available categories and associated URLs to full category descriptions.
srr_stats_categories()
srr_stats_categories()
A data.frame
with 3 columns of "category" (the categories to be
submitted to srr_stats_checklist), "title" (the full title), and
"url".
Other helper:
srr_stats_checklist()
,
srr_stats_checklist_check()
,
srr_stats_pkg_skeleton()
,
srr_stats_pre_submit()
srr_stats_categories ()
srr_stats_categories ()
Obtain rOpenSci standards for statistical software, along with one or more category-specific standards, as a checklist, and store the result in the local clipboard ready to paste.
srr_stats_checklist(category = NULL, filename = NULL)
srr_stats_checklist(category = NULL, filename = NULL)
category |
One of the names of files given in the directory contents of https://github.com/ropensci/statistical-software-review-book/tree/main/standards, each of which is ultimately formatted into a sub-section of the standards. |
filename |
Optional name of local file to save markdown-formatted
checklist. A suffix of |
A character vector containing a markdown-style checklist of general standards along with standards for any additional categories.
Other helper:
srr_stats_categories()
,
srr_stats_checklist_check()
,
srr_stats_pkg_skeleton()
,
srr_stats_pre_submit()
## Not run: x <- srr_stats_checklist (category = "regression") # or write to specified file: f <- tempfile (fileext = ".md") x <- srr_stats_checklist (category = "regression", filename = f) ## End(Not run)
## Not run: x <- srr_stats_checklist (category = "regression") # or write to specified file: f <- tempfile (fileext = ".md") x <- srr_stats_checklist (category = "regression", filename = f) ## End(Not run)
Correct any potential formatting issues in a completed standards checklist
srr_stats_checklist_check(file)
srr_stats_checklist_check(file)
file |
Name of local file containing a completed checklist. Must be a
markdown document in |
Other helper:
srr_stats_categories()
,
srr_stats_checklist()
,
srr_stats_pkg_skeleton()
,
srr_stats_pre_submit()
## Not run: f <- tempfile (fileext = ".md") srr_stats_checklist (category = "regression", filename = f) chk <- srr_stats_checklist_check (f) ## End(Not run)
## Not run: f <- tempfile (fileext = ".md") srr_stats_checklist (category = "regression", filename = f) chk <- srr_stats_checklist_check (f) ## End(Not run)
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.
srr_stats_pkg_skeleton(base_dir = tempdir(), pkg_name = "demo")
srr_stats_pkg_skeleton(base_dir = tempdir(), pkg_name = "demo")
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 |
The path to the directory holding the newly created package
Other helper:
srr_stats_categories()
,
srr_stats_checklist()
,
srr_stats_checklist_check()
,
srr_stats_pre_submit()
d <- srr_stats_pkg_skeleton (pkg_name = "mystatspkg") # (capture.output of initial compliation messages) x <- utils::capture.output (roxygen2::roxygenise (d), type = "output")
d <- srr_stats_pkg_skeleton (pkg_name = "mystatspkg") # (capture.output of initial compliation messages) x <- utils::capture.output (roxygen2::roxygenise (d), type = "output")
Check that all standards are present in code, and listed either as '@srrstats' or '@srrstatsNA'
srr_stats_pre_submit(path = ".", quiet = FALSE)
srr_stats_pre_submit(path = ".", quiet = FALSE)
path |
Path to local repository to check |
quiet |
If 'FALSE', display information on status of package on screen. |
(Invisibly) List of any standards missing from code
Other helper:
srr_stats_categories()
,
srr_stats_checklist()
,
srr_stats_checklist_check()
,
srr_stats_pkg_skeleton()
d <- srr_stats_pkg_skeleton () # The skeleton has 'TODO' standards, and also has only a few from the full # list expected for the categories specified there. srr_stats_pre_submit (d)
d <- srr_stats_pkg_skeleton () # The skeleton has 'TODO' standards, and also has only a few from the full # list expected for the categories specified there. srr_stats_pre_submit (d)
Get values of all srrstats
tags in function documentation
srr_stats_roclet()
srr_stats_roclet()
Note that this function should never need to be called directly. It only exists to enable "@srrstats" tags to be parsed from roxygen2 documentation.
A roxygen2 roclet
Other roxygen:
srr_stats_roxygen()
srr_stats_roclet ()
srr_stats_roclet ()
Obtain rOpenSci standards for statistical software, along with one or more category-specific standards, as a checklist, convert to project-specific roxygen2 format, and save in nominated file.
srr_stats_roxygen( category = NULL, filename = "srr-stats-standards.R", overwrite = FALSE )
srr_stats_roxygen( category = NULL, filename = "srr-stats-standards.R", overwrite = FALSE )
category |
One of the names of files given in the directory contents of https://github.com/ropensci/statistical-software-review-book/tree/main/standards, each of which is ultimately formatted into a sub-section of the standards. |
filename |
Name of 'R' source file in which to write roxygen2-formatted lists of standards. |
overwrite |
If |
Nothing
Other roxygen:
srr_stats_roclet()
## Not run: path <- srr_stats_pkg_skeleton () # contains a few standards; insert all with: f <- file.path (path, "R", "srr-stats-standards.R") file.exists (f) length (readLines (f)) # only 14 lines srr_stats_roxygen ( category = "regression", file = f, overwrite = TRUE ) length (readLines (f)) # now much longer ## End(Not run)
## Not run: path <- srr_stats_pkg_skeleton () # contains a few standards; insert all with: f <- file.path (path, "R", "srr-stats-standards.R") file.exists (f) length (readLines (f)) # only 14 lines srr_stats_roxygen ( category = "regression", file = f, overwrite = TRUE ) length (readLines (f)) # now much longer ## End(Not run)