From 723fc33a7dcc835153ac3a314c3d9e78dcdebbc8 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Sun, 14 Jan 2024 11:07:46 -0600 Subject: [PATCH] avoid "data" in dplyr select --- R/readr-spec-aligned.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/readr-spec-aligned.R b/R/readr-spec-aligned.R index 3b7db62..b789ab7 100644 --- a/R/readr-spec-aligned.R +++ b/R/readr-spec-aligned.R @@ -29,7 +29,7 @@ readr_spec_aligned <- function(...) { # pattern <- "^[ ]+`?(.+?)`? = .+?(col_.+)\\\\.+$" pattern <- "^[ ]+`?(.+?)`? = (col_.+).*$" # pattern <- "^[ ]+(`?)(.+?)\\1 = (col_.+)$" - . <- NULL # This is solely for the sake of avoiding the R CMD check error. + aligned <- . <- NULL # This is solely for the sake of avoiding the R CMD check error. out <- readr::spec_csv(...) %>% @@ -51,7 +51,7 @@ readr_spec_aligned <- function(...) { # Pad the left side before appending the right side. aligned = sprintf(" %-*s = readr::%s", .data$padding, .data$left, .data$right) ) %>% - dplyr::select(.data$aligned) %>% + dplyr::select(aligned) %>% # tibble::add_row( # aligned = "col_types <- readr::cols_only(", # .before = 1