syms {constants} | R Documentation |
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