From 0b876c1c552e0028ddb84248c5a8407660a2b084 Mon Sep 17 00:00:00 2001 From: Christopher Kenny Date: Sun, 30 Jun 2024 14:00:24 -0400 Subject: [PATCH] no need for purrr --- DESCRIPTION | 3 +-- R/datatables.R | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 90b9ff4..49ad8e9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -33,8 +33,7 @@ Imports: stringr, tibble, tidyr, - tinytiger, - purrr + tinytiger Depends: R (>= 4.0.0) Suggests: diff --git a/R/datatables.R b/R/datatables.R index e007942..3d6fb9f 100644 --- a/R/datatables.R +++ b/R/datatables.R @@ -175,8 +175,8 @@ block2prec <- function(block_table, matches, geometry = FALSE) { NA } }) |> - purrr::set_names(names(ret)) |> - purrr::discard(function(x) is.na(x)) + stats::setNames(names(ret)) |> + Filter(function(x) !is.na(x)) ret <- tidyr::complete( data = ret, matches_id = seq_len(nrow_to),