group_compare: group_compare

View source: R/group_compare.R

group_compareR Documentation

group_compare

Description

Creates a group comparison table. It (1) calculates an overall mean and sd, as well as a mean and sd for each group, (2) runs a two-samples t-test comparing both groups, and (3) calculates Cohen's d.

Usage

group_compare(
  data,
  cols,
  split,
  var.equal = FALSE,
  adjust.p = "none",
  adjust.d = FALSE,
  spround = FALSE,
  spround.p = TRUE,
  collapse = FALSE,
  na.rm = TRUE
)

Arguments

data

a data frame.

cols

a vector of strings specifying what columns to compare.

split

a string indicating the column that includes the grouping variable.

var.equal

a logical value indicating whether equal variances should be assumed.

adjust.p

a string indicating what type of correction for multiple comparisons should be used. Defaults to "none."

adjust.d

if TRUE, adjusts for a small sample and returns Hedges' g intead of Cohen's D.

spround

a logical value indicating whether values should be rounded for printing.

spround.p

a logical value indicating whether, if spround = TRUE, p-values should also be sprounded. Defaults to TRUE.

collapse

a logical value indicating whether means and SDs should be combined using paste_paren.

na.rm

a logical value indicating whether 'NA' values should be removed prior to computation.


camkay/panoply documentation built on Jan. 17, 2025, 6:31 a.m.