From 59d24e975222fb9c90a984897f24675485f9f9da Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Sat, 8 Jun 2024 19:50:37 +0200 Subject: [PATCH] fix styling issues --- R/categorize.R | 1 - R/data_arrange.R | 1 - R/data_duplicated.R | 2 +- R/data_modify.R | 2 +- R/data_rescale.R | 2 +- R/data_reverse.R | 2 +- R/data_tabulate.R | 1 - R/data_unique.R | 2 +- R/normalize.R | 2 +- R/ranktransform.R | 2 +- R/unnormalize.R | 2 +- R/unstandardize.R | 2 +- R/utils-rows.R | 2 +- R/utils_standardize_center.R | 2 +- 14 files changed, 11 insertions(+), 14 deletions(-) diff --git a/R/categorize.R b/R/categorize.R index 454f2c490..a6562ab68 100644 --- a/R/categorize.R +++ b/R/categorize.R @@ -282,7 +282,6 @@ categorize.grouped_df <- function(x, regex = FALSE, verbose = TRUE, ...) { - grps <- attr(x, "groups", exact = TRUE)[[".rows"]] attr_data <- attributes(x) diff --git a/R/data_arrange.R b/R/data_arrange.R index 0560779d0..b64876a24 100644 --- a/R/data_arrange.R +++ b/R/data_arrange.R @@ -103,7 +103,6 @@ data_arrange.default <- function(data, select = NULL, safe = TRUE) { #' @export data_arrange.grouped_df <- function(data, select = NULL, safe = TRUE) { - grps <- attr(data, "groups", exact = TRUE) grps <- grps[[".rows"]] diff --git a/R/data_duplicated.R b/R/data_duplicated.R index 6a08a73f2..6f940812c 100644 --- a/R/data_duplicated.R +++ b/R/data_duplicated.R @@ -82,7 +82,7 @@ data_duplicated.grouped_df <- function(data, verbose = verbose ) - + grps <- attr(data, "groups", exact = TRUE) grps <- grps[[".rows"]] diff --git a/R/data_modify.R b/R/data_modify.R index 2f3b2142d..e7744c1f5 100644 --- a/R/data_modify.R +++ b/R/data_modify.R @@ -201,7 +201,7 @@ data_modify.grouped_df <- function(data, ..., .if = NULL, .at = NULL, .modify = # the data.frame method later... dots <- match.call(expand.dots = FALSE)[["..."]] - + grps <- attr(data, "groups", exact = TRUE) grps <- grps[[".rows"]] attr_data <- attributes(data) diff --git a/R/data_rescale.R b/R/data_rescale.R index 2cf9539af..5707e38f0 100644 --- a/R/data_rescale.R +++ b/R/data_rescale.R @@ -185,7 +185,7 @@ rescale.grouped_df <- function(x, ...) { info <- attributes(x) - + grps <- attr(x, "groups", exact = TRUE)[[".rows"]] # evaluate arguments diff --git a/R/data_reverse.R b/R/data_reverse.R index a5714b1f5..07641ec61 100644 --- a/R/data_reverse.R +++ b/R/data_reverse.R @@ -208,7 +208,7 @@ reverse.grouped_df <- function(x, ...) { info <- attributes(x) - + grps <- attr(x, "groups", exact = TRUE)[[".rows"]] # evaluate arguments diff --git a/R/data_tabulate.R b/R/data_tabulate.R index a9641911b..6a26a39c9 100644 --- a/R/data_tabulate.R +++ b/R/data_tabulate.R @@ -317,7 +317,6 @@ data_tabulate.grouped_df <- function(x, collapse = FALSE, verbose = TRUE, ...) { - grps <- attr(x, "groups", exact = TRUE) group_variables <- data_remove(grps, ".rows") grps <- grps[[".rows"]] diff --git a/R/data_unique.R b/R/data_unique.R index d4d87579b..8a2770516 100644 --- a/R/data_unique.R +++ b/R/data_unique.R @@ -118,7 +118,7 @@ data_unique.grouped_df <- function(data, verbose = verbose ) - + grps <- attr(data, "groups", exact = TRUE) grps <- grps[[".rows"]] diff --git a/R/normalize.R b/R/normalize.R index 4d823785b..3fd06a486 100644 --- a/R/normalize.R +++ b/R/normalize.R @@ -195,7 +195,7 @@ normalize.grouped_df <- function(x, ) info <- attributes(x) - + grps <- attr(x, "groups", exact = TRUE)[[".rows"]] # when we append variables, we call ".process_append()", which will diff --git a/R/ranktransform.R b/R/ranktransform.R index 1e99852b1..2b956c30b 100644 --- a/R/ranktransform.R +++ b/R/ranktransform.R @@ -110,7 +110,7 @@ ranktransform.grouped_df <- function(x, verbose = TRUE, ...) { info <- attributes(x) - + grps <- attr(x, "groups", exact = TRUE)[[".rows"]] # evaluate arguments diff --git a/R/unnormalize.R b/R/unnormalize.R index af67c4b9b..031227816 100644 --- a/R/unnormalize.R +++ b/R/unnormalize.R @@ -113,7 +113,7 @@ unnormalize.grouped_df <- function(x, ) info <- attributes(x) - + grps <- attr(x, "groups", exact = TRUE)[[".rows"]] x <- as.data.frame(x) diff --git a/R/unstandardize.R b/R/unstandardize.R index 7afc7a978..d9af0c5ed 100644 --- a/R/unstandardize.R +++ b/R/unstandardize.R @@ -177,7 +177,7 @@ unstandardize.grouped_df <- function(x, info <- attributes(x) - + grps <- attr(x, "groups", exact = TRUE)[[".rows"]] x <- as.data.frame(x) diff --git a/R/utils-rows.R b/R/utils-rows.R index 80b90d08e..4fbcaeda4 100644 --- a/R/utils-rows.R +++ b/R/utils-rows.R @@ -124,7 +124,7 @@ rowid_as_column.grouped_df <- function(x, var = "rowid") { paste0("There is already a variable named `", var, "` in your dataset.") ) } - + grps <- attr(x, "groups", exact = TRUE) grps <- grps[[".rows"]] diff --git a/R/utils_standardize_center.R b/R/utils_standardize_center.R index 3fb2b88c3..6c6826a3c 100644 --- a/R/utils_standardize_center.R +++ b/R/utils_standardize_center.R @@ -399,7 +399,7 @@ } info <- attributes(x) - + grps <- attr(x, "groups", exact = TRUE)[[".rows"]] # for grouped data frames, we can decide to remove group variable from selection