File: mixed_units.Rd

package info (click to toggle)
r-cran-units 0.8-1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,068 kB
  • sloc: xml: 2,437; cpp: 175; sh: 13; makefile: 2
file content (33 lines) | stat: -rw-r--r-- 948 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mixed.R
\name{mixed_units}
\alias{mixed_units}
\alias{units<-.mixed_units}
\title{Create or convert to a mixed units list-column}
\usage{
mixed_units(x, values, ...)

\method{units}{mixed_units}(x) <- value
}
\arguments{
\item{x}{numeric, or vector of class \code{units}}

\item{values}{character vector with units encodings, or list with symbolic units of class \code{mixed_symbolic_units}}

\item{...}{ignored}

\item{value}{see values}
}
\description{
Create or convert to a mixed units list-column
}
\details{
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}.
}
\examples{
a <- 1:4
u <- c("m/s", "km/h", "mg/L", "g")
mixed_units(a, u)
units(a) = as_units("m/s")
mixed_units(a) # converts to mixed representation
}