Skip to content

Commit

Permalink
* removed zipcodeR dependency
Browse files Browse the repository at this point in the history
* disabled zip code formatting in `tidyup` post-processing
  • Loading branch information
andrewallenbruce committed Dec 11, 2024
1 parent 20c9496 commit 9e168e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/nppes.R
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ nppes <- function(npi = NULL,
...) {

npi <- npi %nn% validate_npi(npi)
name_type <- name_type %nn% rlang::arg_match(name_type, c("AO", "Provider"))
name_type <- name_type %nn% rlang::arg_match0(name_type, c("AO", "Provider"))
zip <- zip %nn% as.character(zip)

if (!is.null(entype)) {
Expand Down Expand Up @@ -240,7 +240,7 @@ nppes <- function(npi = NULL,
if (rlang::has_name(results, "pr_state")) results$pr_state <- fct_stabb(results$pr_state)
if (rlang::has_name(results, "purpose")) results$purpose <- fct_purp(results$purpose)
if (rlang::has_name(results, "pr_purpose")) results$pr_purpose <- fct_purp(results$pr_purpose)
if (rlang::has_name(results, "pr_zip")) results$pr_zip <- zipcodeR::normalize_zip(results$pr_zip)
# if (rlang::has_name(results, "pr_zip")) results$pr_zip <- zipcodeR::normalize_zip(results$pr_zip)

if (na.rm) results <- narm(results)
}
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ tidyup <- function(df,
if (!is.null(chr)) x <- dplyr::mutate(x, dplyr::across(dplyr::contains(chr), as.character))
if (!is.null(up)) x <- dplyr::mutate(x, dplyr::across(dplyr::contains(up), toupper))
if (!is.null(cred)) x <- dplyr::mutate(x, dplyr::across(dplyr::contains(cred), clean_credentials))
if (!is.null(zip)) x <- dplyr::mutate(x, dplyr::across(dplyr::contains(zip), format_zipcode))
if (!is.null(zip)) x <- x # dplyr::mutate(x, dplyr::across(dplyr::contains(zip), format_zipcode))
if (!is.null(lgl)) x <- dplyr::mutate(x, dplyr::across(dplyr::contains(lgl), as.logical))

return(x)
Expand Down

0 comments on commit 9e168e2

Please sign in to comment.