opts_units: Constructive options for class 'units'

View source: R/s3-units.R

opts_unitsR Documentation

Constructive options for class 'units'

Description

These options will be used on objects of class 'units'.

Usage

opts_units(constructor = c("set_units", "as_units", "next"), ...)

Arguments

constructor

String. Name of the function used to construct the object, see Details section.

...

Additional options used by user defined constructors through the opts object

Details

Depending on constructor, we construct the object as follows:

  • "set_units" (default): We build the object using units::set_units(x, value, mode = "standard") where value is the unit string as given by units::deparse_unit().

  • "as_units" : We build the object using units::as_units(x, value).

  • "next" : Use the constructor for the next supported class. Call .class2() on the object to see in which order the methods will be tried.

Value

An object of class <constructive_options/constructive_options_units>


constructive documentation built on Oct. 22, 2026, 5:07 p.m.