stat_two_num | R Documentation |
Create a summary table with t.test: statistic, p-value and IC(95%).
stat_two_num(df, grp_var, num_vars)
df |
A single data.frame |
grp_var |
A character variable from a data.frame |
num_vars |
One or more variables from a data.frame |
A gt table.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.