Title: | Reference on Constants, Units and Uncertainty |
---|---|
Description: | CODATA internationally recommended values of the fundamental physical constants, provided as symbols for direct use within the R language. Optionally, the values with uncertainties and/or units are also provided if the 'errors', 'units' and/or 'quantities' packages are installed. The Committee on Data for Science and Technology (CODATA) is an interdisciplinary committee of the International Council for Science which periodically provides the internationally accepted set of values of the fundamental physical constants. This package contains the "2018 CODATA" version, published on May 2019: Eite Tiesinga, Peter J. Mohr, David B. Newell, and Barry N. Taylor (2020) <https://physics.nist.gov/cuu/Constants/>. |
Authors: | Iñaki Ucar [aut, cph, cre] |
Maintainer: | Iñaki Ucar <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.1 |
Built: | 2024-11-04 05:34:33 UTC |
Source: | https://github.com/r-quantities/constants |
This package provides the 2018 version of the CODATA internationally recommended values of the fundamental physical constants for their use within the R language.
Iñaki Ucar
Eite Tiesinga, Peter J. Mohr, David B. Newell, and Barry N. Taylor (2020). The 2018 CODATA Recommended Values of the Fundamental Physical Constants (Web Version 8.1). Database developed by J. Baker, M. Douma, and S. Kotochigova. Available at https://physics.nist.gov/cuu/Constants/, National Institute of Standards and Technology, Gaithersburg, MD 20899.
The Committee on Data for Science and Technology (CODATA) is an interdisciplinary committee of the International Council for Science. The Task Group on Fundamental Constants periodically provides the internationally accepted set of values of the fundamental physical constants. This dataset contains the "2018 CODATA" version, published on May 2019.
codata codata.cor
codata codata.cor
An object of class data.frame
with the following information
for each physical constant:
ASCII symbol
, quantity
description, type
,
value
, uncertainty
, unit
.
A matrix
of correlations between physical constants.
Eite Tiesinga, Peter J. Mohr, David B. Newell, and Barry N. Taylor (2020). The 2018 CODATA Recommended Values of the Fundamental Physical Constants (Web Version 8.1). Database developed by J. Baker, M. Douma, and S. Kotochigova. Available at https://physics.nist.gov/cuu/Constants/, National Institute of Standards and Technology, Gaithersburg, MD 20899.
A simple wrapper around grep
for exploring the CODATA dataset.
lookup(pattern, cols = c("symbol", "quantity", "type"), ...)
lookup(pattern, cols = c("symbol", "quantity", "type"), ...)
pattern |
character string containing a regular expression to be matched
(see |
cols |
columns to perform pattern matching (see |
... |
additional arguments for |
lookup("planck", ignore.case=TRUE)
lookup("planck", ignore.case=TRUE)
These named lists contain ready-to-use values for all the fundamental physical constants.
syms syms_with_errors syms_with_units syms_with_quantities
syms syms_with_errors syms_with_units syms_with_quantities
A list
, where names correspond to symbols in codata$symbol
.
syms
contains plain numeric values.
syms_with_errors
contains objects of type errors
, which
enables automatic uncertainty propagation.
syms_with_units
contains objects of type units
, which
enables automatic conversion, derivation and simplification.
syms_with_quantities
contains objects of type quantities
,
which combines errors
and units
.
The enriched versions of syms
are available only if the corresponding
optional packages, errors, units and/or quantities are
installed. See the documentation of these packages for further information.
Experimental support for correlations between constants is provided via the errors package, but it is disabled by default. To enable it, the following option must be set before loading the package:
options(constants.correlations=TRUE)
Alternatively, constants:::set_correlations()
may be used
interactively, but scripts should not rely on this non-exported function,
as it may disappear in future versions.
# the speed of light syms$c0 # use the constants in a local environment with(syms, c0) # attach only Planck-related constants (lkp <- lookup("planck", ignore.case=TRUE)) idx <- as.integer(rownames(lkp)) attach(syms[idx]) h plkl # the same with uncertainty detach(syms[idx]) attach(syms_with_errors[idx]) h plkl # the same with units detach(syms_with_errors[idx]) attach(syms_with_units[idx]) h plkl # the same with everything detach(syms_with_units[idx]) attach(syms_with_quantities[idx]) h plkl
# the speed of light syms$c0 # use the constants in a local environment with(syms, c0) # attach only Planck-related constants (lkp <- lookup("planck", ignore.case=TRUE)) idx <- as.integer(rownames(lkp)) attach(syms[idx]) h plkl # the same with uncertainty detach(syms[idx]) attach(syms_with_errors[idx]) h plkl # the same with units detach(syms_with_errors[idx]) attach(syms_with_units[idx]) h plkl # the same with everything detach(syms_with_units[idx]) attach(syms_with_quantities[idx]) h plkl