nearestX: Get the x value of the reference to be used for sds...

Description Usage Arguments Value Examples

View source: R/lmsUtils.R

Description

If the provided x value is outside the x range of the reference (see xRanges method), the lowest or highest value of the range is returned respectively.

Usage

1
2
3
4
5
6
7
8
nearestX(
  x,
  sex = "male",
  measurement = "height",
  refName,
  ref = GrowthSDS::kromeyerHauschild,
  recodeSex = NULL
)

Arguments

x

x value of the subject (e.g. (gestational) age)

sex

Sex of the subject

measurement

The measurement from which y originates

refName

The name of the reference to be used to calculate the SDS values

ref

Reference object to be used to calculate the SDS, defaults to kromeyerHauschild either ref or refName must be given

recodeSex

list containing a mapping for sex to available sexes of the reference

Value

x value, adjusted to the selected reference

Examples

1
  nearestX(50, sex = 'male', measurement = 'height')

CrescNet/GrowthSDS documentation built on Feb. 4, 2021, 5:40 p.m.