fix: use globalVariables for state.abb/state.name, regenerate docs
R-CMD-check / R CMD check (push) Successful in 1m36s

@importFrom does not work for base R lazy data objects — replaced with
utils::globalVariables() in the package file to suppress the R CMD check
NOTE. Removed the invalid @importFrom datasets tag from utils.R.

Also commits all man/ and NAMESPACE changes from devtools::document().
This commit is contained in:
2026-05-17 09:36:59 -06:00
parent b84fc2f7d0
commit bf6f7cc480
6 changed files with 61 additions and 39 deletions
+4
View File
@@ -7,4 +7,8 @@
## usethis namespace: end
NULL
# state.abb and state.name are lazy data from the datasets package (base R).
# They cannot be imported via @importFrom — suppress the R CMD check NOTE here.
utils::globalVariables(c("state.abb", "state.name"))
-1
View File
@@ -171,7 +171,6 @@ na_sum <- function(x) {
#' Title
#'
#' @param x a vector of state names
#' @importFrom datasets state.abb state.name
#' @return state abbreviations matching state naems provided in X
#' @export
#'