From 1fe6d3e15c622b7c74dea116d7a755655bef7583 Mon Sep 17 00:00:00 2001 From: Duncan Kennedy Date: Mon, 30 Sep 2024 15:45:28 -0600 Subject: [PATCH] replaced `requireNamespace()` with `rlang::check_installed()` --- R/coalesce-data.R | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/R/coalesce-data.R b/R/coalesce-data.R index 0e82056..7539102 100644 --- a/R/coalesce-data.R +++ b/R/coalesce-data.R @@ -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