Skip to content

Commit

Permalink
replaced requireNamespace() with rlang::check_installed()
Browse files Browse the repository at this point in the history
  • Loading branch information
dunkenwg committed Sep 30, 2024
1 parent d551175 commit 1fe6d3e
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.")

Check warning on line 49 in R/coalesce-data.R

View check run for this annotation

Codecov / codecov/patch

R/coalesce-data.R#L49

Added line #L49 was not covered by tests
x <- sf::st_as_sf(x)
}
x
Expand Down

0 comments on commit 1fe6d3e

Please sign in to comment.