Skip to content

Commit

Permalink
changes to avoid NOTEs, WARNINGs on CRAN
Browse files Browse the repository at this point in the history
- change URLs to final ones
- conceal code to import code based on units version
  • Loading branch information
Enchufa2 committed Feb 22, 2021
1 parent e99957e commit 9a61038
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Description: CODATA internationally recommended values of the fundamental
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)
<http://physics.nist.gov/constants>.
<https://physics.nist.gov/cuu/Constants/>.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Expand Down
12 changes: 6 additions & 6 deletions R/constants.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' 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 http://physics.nist.gov/constants,
#' Available at https://physics.nist.gov/cuu/Constants/,
#' National Institute of Standards and Technology, Gaithersburg, MD 20899.
#'
#' @seealso \code{\link{codata}}, \code{\link{syms}}, \code{\link{lookup}}.
Expand All @@ -35,7 +35,7 @@ NULL
#' 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 http://physics.nist.gov/constants,
#' Available at https://physics.nist.gov/cuu/Constants/,
#' National Institute of Standards and Technology, Gaithersburg, MD 20899.
#'
#' @seealso \code{\link{syms}}, \code{\link{lookup}}.
Expand Down Expand Up @@ -154,11 +154,11 @@ set_correlations <- function() {
if (requireNamespace("units", quietly = TRUE)) {
# define the speed of light
if (utils::packageVersion("units") < "0.7-0") {
try(units::remove_symbolic_unit("c"), silent=TRUE)
units::install_conversion_constant("c", "m/s", syms$c0)
try(getExportedValue("units", "remove_symbolic_unit")("c"), silent=TRUE)
getExportedValue("units", "install_conversion_constant")("c", "m/s", syms$c0)
} else {
units::remove_unit("c")
units::install_unit("c", paste(syms$c0, "m/s"))
getExportedValue("units", "remove_unit")("c")
getExportedValue("units", "install_unit")("c", paste(syms$c0, "m/s"))
}

syms_with_units <<- Map(
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ knitr::opts_chunk$set(

The **constants** package provides the 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). 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 http://physics.nist.gov/constants, National Institute of Standards and Technology, Gaithersburg, MD 20899.
> 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.
## Installation

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ published on May 2019.
> 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 <http://physics.nist.gov/constants>,
> National Institute of Standards and Technology, Gaithersburg, MD
> 20899.
> and S. Kotochigova. Available at
> <https://physics.nist.gov/cuu/Constants/>, National Institute of
> Standards and Technology, Gaithersburg, MD 20899.
## Installation

Expand Down
9 changes: 3 additions & 6 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
## Major release
## Patch release (resubmission)

Update to version 8.1, the 2018 CODATA recommended values.

The maintainer's address has changed. It is the same account, just a different
alias. I'm sending confirmation from the previous address to CRAN-submissions.
Fixes compatibility with upcoming `units` 0.7-0.

## Test environments

Expand All @@ -16,4 +13,4 @@ There were no ERRORs, WARNINGs or NOTEs.

## Downstream dependencies

There are currently no downstream dependencies for this package.
There are no downstream dependencies for this package.
2 changes: 1 addition & 1 deletion man/codata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/constants-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9a61038

Please sign in to comment.