Type: | Package |
Title: | Reference on Constants, Units and Uncertainty |
Version: | 1.0.1 |
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/. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
LazyData: | true |
URL: | https://github.com/r-quantities/constants |
BugReports: | https://github.com/r-quantities/constants/issues |
Depends: | R (≥ 3.5.0) |
Suggests: | errors (≥ 0.3.6), units, quantities, testthat |
ByteCompile: | yes |
RoxygenNote: | 7.1.1 |
NeedsCompilation: | no |
Packaged: | 2021-02-25 10:47:12 UTC; iucar |
Author: | Iñaki Ucar |
Maintainer: | Iñaki Ucar <iucar@fedoraproject.org> |
Repository: | CRAN |
Date/Publication: | 2021-02-25 13:20:05 UTC |
constants: Reference on Constants, Units and Uncertainty
Description
This package provides the 2018 version of the CODATA internationally recommended values of the fundamental physical constants for their use within the R language.
Author(s)
Iñaki Ucar
References
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.
See Also
CODATA Recommended Values of the Fundamental Physical Constants: 2018
Description
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.
Usage
codata
codata.cor
Format
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.
Source
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.
See Also
Lookup for Fundamental Physical Constants
Description
A simple wrapper around grep
for exploring the CODATA dataset.
Usage
lookup(pattern, cols = c("symbol", "quantity", "type"), ...)
Arguments
pattern |
character string containing a regular expression to be matched
(see |
cols |
columns to perform pattern matching (see |
... |
additional arguments for |
See Also
Examples
lookup("planck", ignore.case=TRUE)
Lists of Constants
Description
These named lists contain ready-to-use values for all the fundamental physical constants.
Usage
syms
syms_with_errors
syms_with_units
syms_with_quantities
Format
A list
, where names correspond to symbols in codata$symbol
.
-
syms
contains plain numeric values. -
syms_with_errors
contains objects of typeerrors
, which enables automatic uncertainty propagation. -
syms_with_units
contains objects of typeunits
, which enables automatic conversion, derivation and simplification. -
syms_with_quantities
contains objects of typequantities
, which combineserrors
andunits
.
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.
Details
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.
See Also
Examples
# 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