get_xyz: Get the x, y and z coordinates of the measurement

Description Usage Arguments Value Examples

View source: R/get_xyz.R

Description

The function removes rows with incomplete "x" or "y" components.

Usage

1
get_xyz(ind, yname)

Arguments

ind

An object of class individual.

yname

Name of outcome variable, e.g. "hgt". Must be one of slotNames(ind).

Value

A data frame with names "x", "y" and "z"

Examples

1
2
3
4
5
6
# Extract 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_xyz(ind, "wgt")
get_xyz(ind, "hgt")

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