Learn R Programming

physiology (version 1.2.1)

valid_height: Validate physiologic input parameters

Description

User may generate warnings for unreasonable or obviously erroneous heights.

Usage

valid_height(height_m, ht_min = 0.1, ht_max = 2.5,
  ht_min_hard = 0.001, ht_max_hard = 3, extra_msg = "",
  do_warn = TRUE, do_stop = FALSE, equal_ok = FALSE)

valid_height_adult(height_m, ht_min = 0.5, ht_max = 2.5, ht_min_hard = 0.001, ht_max_hard = 3, extra_msg = "", do_warn = TRUE, do_stop = FALSE, equal_ok = FALSE)

valid_weight(weight_kg, wt_min = 0.1, wt_max = 300, wt_min_hard = 0, wt_max_hard = 600, extra_msg = "", do_warn = TRUE, do_stop = FALSE, equal_ok = FALSE)

valid_weight_adult(weight_kg, wt_min = 5, wt_max = 300, wt_min_hard = 0, wt_max_hard = 600, extra_msg = "", do_warn = TRUE, do_stop = FALSE, equal_ok = FALSE)

valid_age(age_y, age_min = 0, age_max = 150, age_min_hard = 1e-05, age_max_hard = 150, extra_msg = "", do_warn = TRUE, do_stop = FALSE, equal_ok = FALSE)

valid_age_adult(age_y, age_min = 18, age_max = 150, age_min_hard = 17, age_max_hard = 150, extra_msg = "", do_warn = TRUE, do_stop = FALSE, equal_ok = FALSE)

valid_creatinine(scr_uM, scr_min = 8, scr_max = 1000, scr_min_hard = 0, scr_max_hard = 4000, extra_msg = "", do_warn = TRUE, do_stop = FALSE, equal_ok = FALSE)

Arguments

height_m

single numeric, height in meters

ht_min

minimum height below which to warn if warn = TRUE

ht_max

maximum height above which to warn if warn = TRUE

ht_min_hard

minimum height below which to warn regardless of warn

ht_max_hard

maximum height above which to warn if warn

extra_msg

single character string with additional message to append, default is ""

do_warn

single logical, if TRUE, will give warnings outside of soft limits

do_stop

single logical, stop instead of warning if any values outside hard limits

equal_ok

logical, if true, then being equal to a limit does not trigger a warning or error

weight_kg

numeric vector of weight(s) in kg

wt_min

minimum height below which to warn if warn = TRUE

wt_max

maximum height above which to warn if warn = TRUE

wt_min_hard

minimum height below which to warn regardless of warn

wt_max_hard

maximum height above which to warn if warn

age_y

numeric years

age_min

minimum age below which to warn if warn = TRUE

age_max

maximum age above which to warn if warn = TRUE

age_min_hard

minimum age below which to warn regardless of warn

age_max_hard

maximum age above which to warn if warn

scr_uM

numeric serum creatinine (umol/L)

scr_min

minimum serum creatinine below which to warn if warn = TRUE

scr_max

maximum serum creatinine above which to warn if warn = TRUE

scr_min_hard

minimum serum creatinine below which to warn regardless of warn

scr_max_hard

maximum serum creatinine above which to warn if warn