Skip to contents

Build a height value object for create_individual()'s height argument (or the writable Individual$height / OriginData$height field). Fills the OriginData Height characteristic (list(Value =, Unit =)).

Usage

height(value, unit = "cm")

Arguments

value

Numeric scalar. Height value.

unit

Character. Unit for height, validated against dimension "Length". Defaults to "cm".

Value

A height_spec object to pass to create_individual().

Examples

height(175)
#> $value
#> [1] 175
#> 
#> $unit
#> [1] "cm"
#> 
#> attr(,"class")
#> [1] "height_spec"    "osp_value_spec"
create_individual(name = "Subject", height = height(175))
#> 
#> ── Individual: Subject ─────────────────────────────────────────────────────────
#> 
#> ── Characteristics ──
#> 
#> • Height: 175 cm