Load the necessary package and set CRAN repository.
Analyze the stringr package to create a traceability matrix.
There are a number of ways to do this:
Firstly, if you just want a traceability matrix with no test coverage, you can run the following code:
Secondly, if you want a traceability matrix with test coverage, you can run the following code:
stringr_tm_test <- risk.assessr::generate_traceability_matrix("stringr", version = "1.5.1", execute_coverage = TRUE)If you want a full analysis of the package containing a traceability matrix and ither risk data, you can run the following:
This returns a structured list with traceability and function risk information.
See how functions are mapped to risk and test coverage. This shows all the exported functions.
This shows functions categorized as high, medium, or low risk test coverage.
This shows functions categorized by higher risk function types.