From d7f40fe7ac42766f7712e946823d603798f7e519 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Sat, 18 May 2024 20:36:32 +0100 Subject: [PATCH] do not remove find_columns yet --- NAMESPACE | 1 + R/extract_column_names.R | 4 ++++ R/means_by_group.R | 6 +++++- man/extract_column_names.Rd | 11 +++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/NAMESPACE b/NAMESPACE index 9fe247ca1..5926d19ab 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -273,6 +273,7 @@ export(distribution_mode) export(empty_columns) export(empty_rows) export(extract_column_names) +export(find_columns) export(format_text) export(get_columns) export(kurtosis) diff --git a/R/extract_column_names.R b/R/extract_column_names.R index 74cd2d2d3..f1cd68be2 100644 --- a/R/extract_column_names.R +++ b/R/extract_column_names.R @@ -174,3 +174,7 @@ data_find <- function(data, ... ) } + +#' @rdname extract_column_names +#' @export +find_columns <- data_find diff --git a/R/means_by_group.R b/R/means_by_group.R index 826eac094..63bbb3a11 100644 --- a/R/means_by_group.R +++ b/R/means_by_group.R @@ -19,7 +19,11 @@ #' @param digits Optional scalar, indicating the amount of digits after decimal #' point when rounding estimates and values. #' @param ... Currently not used -#' @param group Deprecated. Use `by` instead. +#' @param group If `x` is a numeric vector, `group` should be a factor that +#' indicates the group-classifying categories. If `x` is a data frame, `group` +#' should be a character string, naming the variable in `x` that is used for +#' grouping. Numeric vectors are coerced to factors. Not that `group` should +#' only refer to a single variable. #' @inheritParams find_columns #' #' @return A data frame with information on mean and further summary statistics diff --git a/man/extract_column_names.Rd b/man/extract_column_names.Rd index 788a78151..d19beaa7a 100644 --- a/man/extract_column_names.Rd +++ b/man/extract_column_names.Rd @@ -5,6 +5,7 @@ \alias{get_columns} \alias{extract_column_names} \alias{data_find} +\alias{find_columns} \title{Find or get columns in a data frame based on search patterns} \usage{ data_select( @@ -46,6 +47,16 @@ data_find( verbose = TRUE, ... ) + +find_columns( + data, + select = NULL, + exclude = NULL, + ignore_case = FALSE, + regex = FALSE, + verbose = TRUE, + ... +) } \arguments{ \item{data}{A data frame.}