From 61671703c5b5a49d70e6430dc051c425f863d4d0 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Sat, 12 Aug 2023 15:07:52 +0200 Subject: [PATCH] fix typos in docs --- R/means_by_group.R | 15 +++++++-------- man/means_by_group.Rd | 14 +++++++------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/R/means_by_group.R b/R/means_by_group.R index ad32699b5..1d3f6fd52 100644 --- a/R/means_by_group.R +++ b/R/means_by_group.R @@ -12,19 +12,19 @@ #' @param ci Level of confidence interval for mean estimates. Default is `0.95`. #' Use `ci = NA` to suppress confidence intervals. #' @param weights If `x` is a numeric vector, `weights` should be a vector of -#' weighted that will be applied to weight all observations. If `x` is a data -#' frame, can also be a character string indicating the name of the variable in -#' `x` that should be used for weighting. Default is `NULL`, so no weights are -#' used. +#' weights that will be applied to weight all observations. If `x` is a data +#' frame, `weights` can also be a character string indicating the name of the +#' variable in `x` that should be used for weighting. Default is `NULL`, so no +#' weights are used. #' @param digits Optional scalar, indicating the amount of digits after decimal #' point when rounding estimates and values. #' @param ... Currently not used #' @inheritParams find_columns #' -#' @return A data frame with with information of mean and further summary -#' statistics for each sub-group. +#' @return A data frame with information on mean and further summary statistics +#' for each sub-group. #' -#' @details This function is comparable to `aggregate(x, group mean)`, but provides +#' @details This function is comparable to `aggregate(x, group, mean)`, but provides #' some further information, including summary statistics from a One-Way-ANOVA #' using `x` as dependent and `group` as independent variable. [`emmeans::contrast()`] #' is used to get p-values for each sub-group. P-values indicate whether each @@ -99,7 +99,6 @@ means_by_group.numeric <- function(x, group <- to_factor(group) } - # create string with variable names data <- stats::na.omit(data.frame( x = x, group = group, diff --git a/man/means_by_group.Rd b/man/means_by_group.Rd index f02cebcf8..9434452ad 100644 --- a/man/means_by_group.Rd +++ b/man/means_by_group.Rd @@ -39,10 +39,10 @@ only refer to a single variable.} Use \code{ci = NA} to suppress confidence intervals.} \item{weights}{If \code{x} is a numeric vector, \code{weights} should be a vector of -weighted that will be applied to weight all observations. If \code{x} is a data -frame, can also be a character string indicating the name of the variable in -\code{x} that should be used for weighting. Default is \code{NULL}, so no weights are -used.} +weights that will be applied to weight all observations. If \code{x} is a data +frame, \code{weights} can also be a character string indicating the name of the +variable in \code{x} that should be used for weighting. Default is \code{NULL}, so no +weights are used.} \item{digits}{Optional scalar, indicating the amount of digits after decimal point when rounding estimates and values.} @@ -99,14 +99,14 @@ functions (see 'Details'), this argument may be used as workaround.} \item{verbose}{Toggle warnings.} } \value{ -A data frame with with information of mean and further summary -statistics for each sub-group. +A data frame with information on mean and further summary statistics +for each sub-group. } \description{ Computes summary table of means by groups. } \details{ -This function is comparable to \verb{aggregate(x, group mean)}, but provides +This function is comparable to \code{aggregate(x, group, mean)}, but provides some further information, including summary statistics from a One-Way-ANOVA using \code{x} as dependent and \code{group} as independent variable. \code{\link[emmeans:contrast]{emmeans::contrast()}} is used to get p-values for each sub-group. P-values indicate whether each