/
metric_scaling.Rd
42 lines (36 loc) · 1.16 KB
/
metric_scaling.Rd
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
34
35
36
37
38
39
40
41
42
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/quantities.R
\name{metric_scaling}
\alias{metric_scaling}
\alias{scale_metric}
\alias{best_metric}
\alias{base_metric}
\title{Metric prefixes}
\usage{
scale_metric(q, prefix = "")
best_metric(q)
base_metric(q)
}
\arguments{
\item{q}{the \link{quantity} to scale}
\item{prefix}{a metric prefix (p, n, µ, m, k, M, etc.)}
}
\description{
These functions simplify scaling between different metric prefixes.
}
\section{Functions}{
\itemize{
\item \code{scale_metric}: scale to a specific metrix prefix (from whatever the quantity is currently in)
\item \code{best_metric}: convert to best metric prefix (i.e. one that gives at least 1 significant digit before the decimal),
if the quantity has a vector of values, scales to the best metric prefix for the median of all values
\item \code{base_metric}: convert to base metric prefix of microbialkitchen (i.e. to mol, L, etc.)
}}
\seealso{
Other quantity functions:
\code{\link{check_quantities}},
\code{\link{make_qty_units_explicit}()},
\code{\link{quantities}},
\code{\link{quantity_data}},
\code{\link{quantity_units}}
}
\concept{quantity functions}