Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

valid_udunits

Get information about valid units


Description

These functions require the xml2 package, and return data frames with complete information about pre-defined units from UDUNITS2. Inspect this data frames to determine what inputs are accepted by as_units (and the other functions it powers: as_units, set_units , units<-).

Usage

valid_udunits(quiet = FALSE)

valid_udunits_prefixes(quiet = FALSE)

Arguments

quiet

logical, defaults TRUE to give a message about the location of the udunits database being read.

Details

Any entry listed under symbol , symbol_aliases , name_singular , name_singular_aliases , name_plural , or name_plural_aliases is valid. Additionally, any entry under symbol or symbol_aliases may can also contain a valid prefix, as specified by valid_udunits_prefixes() .

Note, this is primarily intended for interactive use, the exact format of the returned data frames may change in the future.

Value

a data frame with columns symbol , symbol_aliases , name_singular , name_singular_aliases , name_plural , or name_plural_aliases , def , definition , comment , dimensionless and source_xml

Examples

if (requireNamespace("xml2", quietly = TRUE)) {
  valid_udunits()
  valid_udunits_prefixes()
  if(interactive())
    View(valid_udunits())
}

units

Measurement Units for R Vectors

v0.7-1
GPL-2
Authors
Edzer Pebesma [aut, cre] (<https://orcid.org/0000-0001-8049-7069>), Thomas Mailund [aut], Tomasz Kalinowski [aut], James Hiebert [ctb], Iñaki Ucar [aut] (<https://orcid.org/0000-0001-6403-5550>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.