num_compare: Compare a numerical variable across levels of a categorical...

View source: R/num_compare.R

num_compareR Documentation

Compare a numerical variable across levels of a categorical variable

Description

num_compare gives details about the distribution of a numeric variable across subsets of the dataset

Usage

num_compare(y, grp, plot = c("density", "boxplot", "none"))

Arguments

y

A numerical variable

grp

A categorical variable

plot

Type of plot to produce

Value

Returns a list including (1) group-wise summary statistics, (2) ANOVA decomposition, (3) eta-squared effect size, and (4) ggplot2 object, if requested.

Examples

v1 = rbinom(n=50, size=1, p=0.5)
v2 = rnorm(50)
num_compare(y=v2, grp=v1, plot='density')


tldr documentation built on May 31, 2023, 9:02 p.m.