validDim: Determine whether a 1D dimension string is known and of the...

Description Usage Arguments Examples

Description

Determine whether a 1D dimension string is known and of the expected dimension type

Usage

1
2
validDim(dimstr, dim.type = c("ANY", "volume", "time", "mass", "count",
  "area"))

Arguments

dimstr

A string representing one units dimension (just one at a time, please). For example: kg, d, or m^3, but not kg/d or d^-1

dim.type

One or more acceptable dimension types

Examples

1
2
3
4
5
loadflex:::validDim('kg') # TRUE
loadflex:::validDim('kg', 'mass') # TRUE
loadflex:::validDim('kg', 'volume') # FALSE
loadflex:::validDim('whoknows') # FALSE
loadflex:::validDim('whoknows', 'time') # FALSE

McDowellLab/loadflex documentation built on May 8, 2019, 9:48 a.m.