Description Usage Arguments Value Author(s) Examples
Use lapply to a vector of risk factors and return a vector of scores.
1 2 3 | get_score(riskfactor, values, scores)
get_score_vec(rf_vec, values, scores)
|
riskfactor |
Raw risk factor. |
values |
Specified risk factors. |
scores |
Specified score according to the value. |
rf_vec |
A vector of risk factors |
A numeric score.
A vector of score
1 2 3 4 5 6 7 | values <- c(55, 60, 65, 70, 75, 80, 85, 90, 95, 100)
scores <- c(1.0000, 0.9747, 0.8967, 0.8303, 0.7730, 0.7232, 0.6793, 0.6405, 0.6059, 0.5748)
get_score(57.5, values, scores) # 0.98735
get_score(97.5, values, scores) # 0.59035
get_score(77, values, scores) # 0.75308
get_score_vec(c(57.5, 97.5,77), values, scores)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.