Skip to content

Commit

Permalink
Merge pull request #24 from poissonconsulting/reqName
Browse files Browse the repository at this point in the history
replaced `requireNamespace()` with `rlang::check_installed()`
  • Loading branch information
dunkenwg authored Oct 7, 2024
2 parents d551175 + 1fe6d3e commit 810ff2f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions R/coalesce-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ coalesce_data <- function(x, coalesce = list(), quiet = FALSE) {
x <- coalesce_cols(x, coalesce[i], quiet = quiet)
}
if (sf) {
if (!requireNamespace("sf", quietly = TRUE)) {
rlang::abort("sf package is required to preserve sf objects")
}
rlang::check_installed("sf", reason = "to preserve sf objects.")
x <- sf::st_as_sf(x)
}
x
Expand Down

0 comments on commit 810ff2f

Please sign in to comment.