From 12186eb286bb5a1d1633442116ffa36930e094eb Mon Sep 17 00:00:00 2001 From: Greg Freedman Ellis Date: Wed, 5 Oct 2022 12:13:53 -0500 Subject: [PATCH] more tidyselect fixes --- R/interaction.R | 2 +- R/subset_svy_vars.R | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/interaction.R b/R/interaction.R index 6272a83..49b5e0f 100644 --- a/R/interaction.R +++ b/R/interaction.R @@ -132,7 +132,7 @@ recast_interact <- function(col, ...) { .dots <- rlang::quos(...) old_crosswalk <- crosswalk(col) - conversion <- dplyr::select(old_crosswalk, !!!.dots, "old_cw" = .data$`___srvyr_cw_id`) + conversion <- dplyr::select(old_crosswalk, !!!.dots, "old_cw" = dplyr::one_of("___srvyr_cw_id")) conversion <- dplyr::group_by(conversion, !!!.dots) conversion[["___srvyr_cw_id"]] <- group_indices(conversion) conversion <- ungroup(conversion) diff --git a/R/subset_svy_vars.R b/R/subset_svy_vars.R index 29100cf..f5f33ea 100644 --- a/R/subset_svy_vars.R +++ b/R/subset_svy_vars.R @@ -89,8 +89,8 @@ filtered_row_numbers <- function(.svy, ..., .preserve = FALSE) { filtered_vars[["___row_number"]] <- seq_len(nrow(filtered_vars)) filtered_vars <- dplyr::filter(filtered_vars, !!!dots, .preserve = .preserve) - row_numbers <- dplyr::select(filtered_vars, .data[["___row_number"]])[["___row_number"]] - filtered_vars <- dplyr::select(filtered_vars, -.data[["___row_number"]]) + row_numbers <- dplyr::pull(filtered_vars, name = "___row_number") + filtered_vars <- dplyr::select(filtered_vars, -dplyr::one_of("___row_number")) list(row_numbers = row_numbers, filtered_vars = filtered_vars)