Debian Codegraph @

man/mixed_units.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/mixed.R
3 \name{mixed_units}
4 \alias{mixed_units}
5 \alias{units<-.mixed_units}
6 \title{Create or convert to a mixed units list-column}
7 \usage{
8 mixed_units(x, values, ...)
9
10 \method{units}{mixed_units}(x) <- value
11 }
12 \arguments{
13 \item{x}{numeric, or vector of class \code{units}}
14
15 \item{values}{character vector with units encodings, or list with symbolic units of class \code{mixed_symbolic_units}}
16
17 \item{...}{ignored}
18
19 \item{value}{see values}
20 }
21 \description{
22 Create or convert to a mixed units list-column
23 }
24 \details{
25 if \code{x} is of class \code{units}, \code{values} should be missing or of class \code{mixed_symbolic_units}; if \code{x} is numeric, \code{values} should be a character vector the length of \code{x}.
26 }
27 \examples{
28 a <- 1:4
29 u <- c("m/s", "km/h", "mg/L", "g")
30 mixed_units(a, u)
31 units(a) = as_units("m/s")
32 mixed_units(a) # converts to mixed representation
33 }