From 5eaf22c65999f561d03e60e41819fefe8d0928bd Mon Sep 17 00:00:00 2001 From: Nathan Kosiba Date: Thu, 15 Jun 2023 09:08:41 -0400 Subject: [PATCH] more hotfix updates after team discussion --- NAMESPACE | 2 -- NEWS.md | 3 ++- R/get.R | 9 ++++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 4a6b5e4..459e1d7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -9,7 +9,6 @@ export(log_write) export(write_log_header) export(write_unapproved_functions) export(write_used_functions) -importFrom(dplyr,across) importFrom(dplyr,anti_join) importFrom(dplyr,coalesce) importFrom(dplyr,distinct) @@ -59,7 +58,6 @@ importFrom(stringr,str_starts) importFrom(tibble,tibble) importFrom(tidyr,all_of) importFrom(tidyr,complete) -importFrom(tidyr,everything) importFrom(tidyr,pivot_wider) importFrom(utils,capture.output) importFrom(utils,getParseData) diff --git a/NEWS.md b/NEWS.md index cbd8a56..c8d7428 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # logrx 0.2.2 - - hotfix for update to `across()` and `.data$var` updates in source packages (#172) + - Hotfix to remove unnecessary `across()` and update `.data$var` top new syntax to match updates in source packages (#172) + - Add `{dplyr}` version requirement # logrx 0.2.1 diff --git a/R/get.R b/R/get.R index c0740b2..92f4ec7 100644 --- a/R/get.R +++ b/R/get.R @@ -139,8 +139,8 @@ get_masked_functions <- function(){ #' @param file File path of file to run #' #' @return tibble with `library` and `function_name` -#' @importFrom dplyr select distinct across mutate coalesce group_by ungroup -#' @importFrom tidyr pivot_wider complete all_of everything +#' @importFrom dplyr select distinct mutate coalesce group_by ungroup +#' @importFrom tidyr pivot_wider complete all_of #' @importFrom purrr safely #' @importFrom tibble tibble #' @importFrom utils getParseData @@ -197,8 +197,7 @@ get_used_functions <- function(file){ get_library(combine_tokens) %>% select(all_of(c("function_name", "library"))) %>% - distinct(across(.cols = everything(), - .fns = NULL)) + distinct() } @@ -241,7 +240,7 @@ get_library <- function(df){ mutate(library = ifelse( !is.na(df$SYMBOL_PACKAGE), paste0("package:", df$SYMBOL_PACKAGE), - .data$library) + .data[["library"]]) ) }