Create a scorecard from a results directory prepared by score_pkg() or an external scorer (see external_scores).

render_scorecard(
  results_dir,
  risk_breaks = c(0.3, 0.7),
  overwrite = FALSE,
  add_traceability = "auto"
)

Arguments

results_dir

Directory with scoring results. This is the path returned by score_pkg().

risk_breaks

A numeric vector of length 2, with both numbers being between 0 and 1. These are used for the "breaks" when classifying scores into Risk categories. For example, for the default value of c(0.3, 0.7), for a given score: 0 <= score < 0.3 is "Low Risk", 0.3 <= score < 0.7 is "Medium Risk", and 0.7 <= score < 1 is "High Risk".

overwrite

Logical (T/F). If TRUE, will overwrite an existing file path if it exists

add_traceability

Logical (T/F). If TRUE, append a table that links package functionality to the documentation and test files. Defaults to "auto", which will include the matrix if found.

Details

If a plain text comments file is found in results_dir, it will automatically be included. Note that it must follow the naming convention of <pkg_name>_<pkg_version>.comments.txt

If a traceability matrix is found in results_dir, it will automatically be included unless overridden via add_traceability.