From b84fc2f7d0bfac6c9730415886fdd6deb09b21c6 Mon Sep 17 00:00:00 2001 From: Jared Knowles Date: Sun, 17 May 2026 09:30:01 -0600 Subject: [PATCH] fix: resolve all R CMD check errors and notes - Wrap get_fips/get_stabbr examples in dontrun (tidycensus is Suggests) - Add .gitea to .Rbuildignore (hidden dir note) - Add importFrom(datasets, state.abb/state.name) for postcode_lookup - Remove LazyData: true (no data/ directory) --- .Rbuildignore | 1 + DESCRIPTION | 1 - NAMESPACE | 2 ++ R/utils.R | 2 +- man/get_fips.Rd | 3 ++- man/get_stabbr.Rd | 2 ++ 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index 90d97e1..c9073cc 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,6 +1,7 @@ ^.*\.Rproj$ ^\.Rproj\.user$ ^\.github$ +^\.gitea$ ^README\.Rmd$ ^Makefile$ ^Dockerfile$ diff --git a/DESCRIPTION b/DESCRIPTION index 7ad9791..8abd55b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -22,7 +22,6 @@ Imports: grid, stringdist Encoding: UTF-8 -LazyData: true Suggests: testthat (>= 3.0.0), tidycensus diff --git a/NAMESPACE b/NAMESPACE index 6980c81..e3949a3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -41,6 +41,8 @@ export(z_gap_test) export(z_univariate) import(ggplot2) importFrom(ggplot2,theme) +importFrom(datasets,state.abb) +importFrom(datasets,state.name) importFrom(graphics,plot) importFrom(graphics,rasterImage) importFrom(grid,grid.draw) diff --git a/R/utils.R b/R/utils.R index 680cf7f..41208c2 100644 --- a/R/utils.R +++ b/R/utils.R @@ -171,7 +171,7 @@ na_sum <- function(x) { #' Title #' #' @param x a vector of state names -## #' @importFrom datasets state.abb state.name +#' @importFrom datasets state.abb state.name #' @return state abbreviations matching state naems provided in X #' @export #' diff --git a/man/get_fips.Rd b/man/get_fips.Rd index 1856317..c4f2d8c 100644 --- a/man/get_fips.Rd +++ b/man/get_fips.Rd @@ -16,7 +16,8 @@ FIPS codes that match the abbreviation Get the FIPS code for a given state abbreviation } \examples{ +\dontrun{ get_fips("MT") get_fips("PR") -get_fips("CC") +} } diff --git a/man/get_stabbr.Rd b/man/get_stabbr.Rd index 46ada5a..ba8f430 100644 --- a/man/get_stabbr.Rd +++ b/man/get_stabbr.Rd @@ -16,5 +16,7 @@ a character value, length 2, with the state abbreviation Get the state abbreviation from a given FIPS Code } \examples{ +\dontrun{ get_stabbr("06") } +}