Skip to content

Commit 68f02c9

Browse files
committed
Fixes for CRAN submission
1 parent 4f1dd6f commit 68f02c9

4 files changed

Lines changed: 5 additions & 2 deletions

File tree

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Added `search_cd()` function for searching ZIP codes contained within a given congressional district.
1010
- Added `is_zcta()` function for testing whether a given ZIP code is a ZIP code tabulation area (ZCTA).
1111
- Added `search_fips()` function for searching ZIP codes by state and county FIPS codes.
12+
- Added `get_cd()` and `search_cd()` functions for relating ZIP codes to congressional districts
1213
- Added the first vignette, "Introduction to zipcodeR"
1314

1415
# zipcodeR 0.1.0

R/globals.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
utils::globalVariables(c("zcta_crosswalk","zip_code_db","zcta_crosswalk"))
1+
utils::globalVariables(c("zcta_crosswalk","zip_code_db","zcta_crosswalk","zip_to_cd"))

R/zip_lookups.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ get_cd <- function(zip_code) {
255255
result <- data.frame(cbind(district,state))
256256
# Join the lookup result with tidycensus FIPS code data for more info
257257
joined <- result %>% dplyr::left_join(state_fips, by=c('state'='state_code'))
258-
output <- data.frame(joined$state.y[1],district) %>% dplyr::rename('state_fips' = 'joined.state.y.1.')
258+
output <- data.frame(joined$state.y[1],district) %>% dplyr::rename('state' = 'joined.state.y.1.')
259259

260260
return(list(state_fips = joined$state.y[1], district = district))
261261
}

cran-comments.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## Resubmission
44
This is a resubmission. In this version I have added several new features. See the NEWS.md file for details on changes.
55

6+
In this resubmission I have addressed the issue that led to my submission to fail due to undefined global variables by updating the file R/globals.R
7+
68
## Test environments
79
* local macOS Big Sur install, R 3.6.1
810
* win-builder (oldrelease, devel, release)

0 commit comments

Comments
 (0)