From 308954cc7976985367ae1d8dc7b1d2f7faf2faba Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Sat, 7 Sep 2024 06:53:32 +0200 Subject: [PATCH] use better column names --- R/redundant_equals_linter.R | 6 +++--- man/redundant_equals_linter.Rd | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/R/redundant_equals_linter.R b/R/redundant_equals_linter.R index a8d426378..d986dc184 100644 --- a/R/redundant_equals_linter.R +++ b/R/redundant_equals_linter.R @@ -20,7 +20,7 @@ #' ) #' #' lint( -#' text = "dt[x == FALSE, y]", +#' text = "dt[is_tall == FALSE, y]", #' linters = redundant_equals_linter() #' ) #' @@ -35,9 +35,9 @@ #' linters = redundant_equals_linter() #' ) #' -#' # in data.table semantics, dt[x] is a join, dt[(x)] is a subset +#' # in `{data.table}` semantics, `dt[x]` is a join, `dt[(x)]` is a subset #' lint( -#' text = "dt[!(x), y]", +#' text = "dt[(!is_tall), y]", #' linters = redundant_equals_linter() #' ) #' diff --git a/man/redundant_equals_linter.Rd b/man/redundant_equals_linter.Rd index 89695c265..3045cbc7b 100644 --- a/man/redundant_equals_linter.Rd +++ b/man/redundant_equals_linter.Rd @@ -27,7 +27,7 @@ lint( ) lint( - text = "dt[x == FALSE, y]", + text = "dt[is_tall == FALSE, y]", linters = redundant_equals_linter() ) @@ -42,8 +42,9 @@ lint( linters = redundant_equals_linter() ) +# in `{data.table}` semantics, `dt[x]` is a join, `dt[(x)]` is a subset lint( - text = "dt[!(x), y]", + text = "dt[(!is_tall), y]", linters = redundant_equals_linter() )