View source: R/weight_height.r
| weight_height | R Documentation |
This function calculates different variables based on weight and height and conversion from or to kilograms
weight_height(wt = NULL, ht = NULL, sex = NULL, bmi = NULL, type = "bmi")
wt |
vector with weight values, in either kg or lb depending on the type (see details) |
ht |
vector with height values in cm (see details) |
sex |
vector with SEX values (Where female is defined as a value of 1) |
bmi |
vector with BMI values (see details) |
type |
character with the type to be used for the calculations (see details) |
Currently the following types are defined within the function:
"kg-lb" : Convert units from kg to lb using the formula
\textrm{Weight (kg)} = \textrm{Weight (lb)} \cdot 2.20462262
"lb-kg" : Convert units from lb to kg using the formula
\textrm{Weight (lb)} = \frac{\textrm{Weight (kg)}}{2.20462262}
"bmi" : Calculates body mass index (BMI) using the standard formula (Quetelet1842,
\textrm{BMI} = \frac{\textrm{Weight (kg)}}{\textrm{Height (m)}^{2}}
"bsa": Body Surface Area, according to Gehan and Georg,
\textrm{BSA} = \exp{-3.751} \cdot \textrm{Height (cm)}^{0.422} \cdot \textrm{Weight (kg)}^{0.515}
"bsa2": Body Surface Area, according to DuBois and DuBois,
\textrm{BSA} = 0.007184 \cdot \textrm{Height (cm)}^{0.725} \cdot \textrm{Weight (kg)}^{0.425}
"bsam": Body Surface Area, according to Mosteller,
\textrm{BSA} = \sqrt{\frac{\textrm{Weight (kg)} \cdot \textrm{Height (cm)}}{3600}}
"bsah": Body Surface Area, according to Haycock,
\textrm{BSA} = 0.024265 \cdot \textrm{Height (cm)}^{0.3964} \cdot \textrm{Weight (kg)}^{0.5378}
"bsal": Body Surface Area in normal-weight and obese adults up to 250 kg, according to Livingston,
\textrm{BSA} = 0.1173 \cdot \textrm{Weight (kg)}^{0.6466}
"ffmj": Fat free mass, according to Janmahasatian:
\textrm{FFM}=\frac{9270 \cdot \textrm{Weight (kg)}}{k +\left(l \cdot \textrm{BMI}\right)}
, where k is 6680 for males and 8780 for females and l is 216 for males and 244 for females.
"ffms": Fat free mass in Indian patients, according to Sinha:
\textrm{FFM}=\frac{9270 \cdot \textrm{Weight (kg)}}{k \cdot l \cdot \textrm{BMI}^{0.28}}
, where k is 6680 for males and 8780 for females and l is 0.77 for males and 0.70 for females.
"lbmb" : Calculates lean body mass (LBM), according to Boers:
\textrm{LBM} = k \cdot \textrm{Weight (kg)} + l \cdot \textrm{Height (cm)} - m
, where k is 0.407 for males and 0.252 for females, and l is 0.267 for males and 0.473 for females, and m is 19.2 for males and 48.3 for females.
"lbmj" : Calculates lean body mass (LBM), according to James:
\textrm{LBM} = k \cdot \textrm{Weight (kg)} - l \cdot \left(\frac{\textrm{Weight (kg)}}{\textrm{Height (cm)}}\right)^2
, where k is 1.10 for males and 1.07 for females, and l is 128 in males and 148 in females.
"lbmp" : Calculates lean body mass (LBM) for children up to 14 years, according to Peters:
\textrm{LBM} = 3.8 \cdot 0.0215 \cdot \textrm{Weight (kg)}^{0.6469} \cdot \textrm{Height (cm)}^{0.7236}
"pnw" : Calculates the Predicted Normal Weight for obese patient, according to Duffull:
\textrm{PNWT} = k \cdot \textrm{Weight (kg)} - l \cdot \textrm{Height (cm)} \cdot \textrm{BMI} - m
, where k is 1.57 for males and 1.75 for females, and l is 0.0183 for males and 0.0242 for females, and m is 10.5 for males and 12.6 for females.
a vector with calculated values
Richard Hooijmaijers
tmp <- data.frame(id=1,WT=runif(3,70,120),HT=runif(3,160,220))
weight_height(wt=tmp$WT,ht=tmp$HT,type="bmi")
# example for use in dplyr
tmp |> dplyr::mutate(BMI = weight_height(wt=WT,ht=HT,type="bmi"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.