Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

compute_CVrisk

Compute multiple CV risk scores


Description

Compute multiple CV risk scores

Usage

compute_CVrisk(
  df,
  scores = c("ascvd_10y_accaha", "ascvd_10y_frs", "ascvd_10y_frs_simple"),
  age,
  gender,
  race,
  sbp = NULL,
  bmi = NULL,
  hdl = NULL,
  totchol = NULL,
  bp_med = NULL,
  smoker = NULL,
  diabetes = NULL
)

Arguments

df

input dataframe

scores

scores to compute, default is all scores

age

patient age in years (required for all scores)

gender

patient gender (male or female)

race

character string for patient race (white, aa, other) column

sbp

character string of systolic blood pressure (in mm Hg) column

bmi

character string of Body mass index (kg/m2) column

hdl

character string of HDL column

totchol

character string of total cholesterol column

bp_med

character string of blood pressure medication column

smoker

character string of smoking status column

diabetes

character string of diabetes status column

Value

input data frame with risk score results appended as columns

Examples

library(CVrisk)
compute_CVrisk(sample_data,
  age = "age", race = "race", gender = "gender", bmi = "BMI", sbp = "sbp",
  hdl = "hdl", totchol = "totchol", bp_med = "bp_med", smoker = "smoker",
  diabetes = "diabetes"
)

CVrisk

Compute Risk Scores for Cardiovascular Diseases

v1.0.0
GPL-3
Authors
Victor Castro [aut, cre] (<https://orcid.org/0000-0001-7390-6354>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.