compute_CVrisk: Compute multiple CV risk scores

View source: R/compute_CVrisk.R

compute_CVriskR Documentation

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", "chd_10y_mesa",
    "chd_10y_mesa_cac"),
  age,
  gender,
  race,
  sbp = NULL,
  bmi = NULL,
  hdl = NULL,
  totchol = NULL,
  bp_med = NULL,
  smoker = NULL,
  diabetes = NULL,
  lipid_med = NULL,
  fh_heartattack = NULL,
  cac = 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

lipid_med

character string of lipid medication column

fh_heartattack

character string of fh of heart attack status column

cac

character string of cac 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", lipid_med = "lipid_med",
  fh_heartattack = "fh_heartattack", cac = "cac"
)

CVrisk documentation built on Aug. 20, 2023, 1:06 a.m.