get_range: Get a range from the antropometric data

Description Usage Arguments Value Examples

View source: R/get_range.R

Description

Get a range from the antropometric data

Usage

1
get_range(ind, ynames = c("hgt", "wgt", "hdc", "bmi"), slotname = "x")

Arguments

ind

An object of class individual.

ynames

A vector of name of outcome variable

slotname

The name of the slot, either "x" (often age), "y" (measure) or "z" (SDS).

Value

A numeric vector of length 2 (if success), or numeric(0) (if failed)

Examples

1
2
3
4
5
6
7
# Find age range of anthropometric measures
ind <- new("individual",
           hgt = new("xyz", x = c(0.3, 2, 6)),
           wgt = new("xyz", x = c(0.2, 1), y = c(1, NA)))
get_range(ind)
get_range(ind, slotname = "y")
get_range(ind, ynames = c("hdc", "bmi"))

stefvanbuuren/minihealth documentation built on March 11, 2021, 7:10 p.m.