stat_two_num: Summary table for comparative analysis between two numeric...

View source: R/stat_two_num.r

stat_two_numR Documentation

Summary table for comparative analysis between two numeric variables

Description

Create a summary table with t.test: statistic, p-value and IC(95%).

Usage

stat_two_num(df, grp_var, num_vars)

Arguments

df

A single data.frame

grp_var

A character variable from a data.frame

num_vars

One or more variables from a data.frame

Value

A gt table.

Examples


n <- 20

set.seed(123);df <-
 data.frame(
   grp_var = sample(paste("group", letters[1:2]),size = n,replace = TRUE),
   num_var1 = rnorm(n),
   num_var2 = abs(rnorm(n))
 )

stat_two_num(df,grp_var,c(num_var1,num_var2))

vbfelix/relper documentation built on May 10, 2024, 10:50 p.m.