summarize_scores {riskmetric} | R Documentation |
Summarize a default set of assessments into a single risk score
Description
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.
Usage
summarize_scores(data, weights = NULL)
Arguments
data |
a |
weights |
an optional vector of non-negative weights to be assigned to each assessment. |
Value
a numeric vector of risk scores
Examples
## 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)
[Package riskmetric version 0.2.4 Index]