Measurement values series value object
values.RdBuild a measurement-values value object for create_observed_data()'s
values argument. Carries the measurement y-values, their dimension, and
an optional unit.
The dimension is required and has no default; it gates unit validation
and is written to the data-set column. When unit is supplied it is
validated against dimension via validate_unit().
Arguments
- value
Numeric vector. Measurement y-values.
- unit
Character. Optional unit for
value. When supplied, validated againstdimension.- dimension
Character. Dimension for
value(for example"Concentration (mass)"). Required: pass one of the names ofospsuite::ospDimensions.
Value
A values_spec object to pass to create_observed_data().
See also
Other value-object helpers:
age(),
error(),
fraction_unbound(),
gestational_age(),
height(),
intestinal_permeability(),
lipophilicity(),
permeability(),
solubility(),
time(),
weight()
Examples
values(c(0, 12, 18, 11, 5), unit = "mg/l", dimension = "Concentration (mass)")
#> $value
#> [1] 0 12 18 11 5
#>
#> $unit
#> [1] "mg/l"
#>
#> $dimension
#> [1] "Concentration (mass)"
#>
#> attr(,"class")
#> [1] "values_spec" "osp_value_spec"