rspiro_check_somat: Check somatometric input data

View source: R/include.R

rspiro_check_somatR Documentation

Check somatometric input data

Description

This function checks the supplied somatometric input and returns a properly formatted data.frame

Usage

rspiro_check_somat(
  age,
  height,
  gender,
  ethnicity,
  NHANES = FALSE,
  JRS = FALSE,
  diff = FALSE
)

Arguments

age

Age in years

height

Height in meters

gender

Gender (1 = male, 2 = female) or a factor with two levels (first = male)

ethnicity

Ethnicity (GLI: 1 = Caucasian, 2 = African-American, 3 = NE Asian, 4 = SE Asian, 5 = Other/mixed, NHANES: 1 = Caucasian, 2 = African-American, 3 = Mexican-American)

NHANES

Logical. Is input data for the NHANES III equations? Defaults to FALSE.

JRS

Logical. Is input data for the JRS equations? Defaults to FALSE.

diff

Logical. Is input data for the GLI diffusing capacity equations? Defaults to FALSE.

Value

Returns a data frame with these four columns plus a column 'agebound', which is age rounded to the lowest 0.25 of the year.


thlytras/rspiro documentation built on June 24, 2024, 7:58 a.m.