View source: R/summarize_scores.R
summarize_scores | R Documentation |
This function serves as an example for how a risk score might be derived.
Assuming all assessments provided by riskmetric
are available in a
dataset, this function can be used to calculate a vector of risks.
summarize_scores(data, weights = NULL)
data |
a |
weights |
an optional vector of non-negative weights to be assigned to each assessment. |
a numeric vector of risk scores
## Not run:
library(dplyr)
summarize_scores(pkg_score(pkg_assess(as_tibble(pkg_ref("riskmetric")))))
library(dplyr)
pkg_ref("riskmetric") %>%
pkg_assess() %>%
pkg_score() %>%
summarize_scores()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.