groutable: This is a wrapper function of compareGroups package

Description Usage Arguments Value Author(s) Examples

View source: R/groutable.R

Description

This is a wrapper function of compareGroups package

Usage

1
2
3
4
5
6
7
8
groutable(
  data,
  variable = 1,
  method = 1,
  writeTab = FALSE,
  digits = 3,
  write.p.adjust = FALSE
)

Arguments

data

a data frame

variable

A numeric to indicate which variable to be used for grouping

method

1 - forces analysis as "normal-distributed";2 - forces analysis as "continuous non-normal"; 3 - forces analysis as "categorical";4 - NA, which performs a Shapiro-Wilks test to decide between normal or non-normal.

writeTab

A boolean value to indicate whether to save the result or not

digits

show the number of digits

write.p.adjust

logical value indicates whether write the adjustd p values

Value

a statistical table

Author(s)

Zhonghui Gai

Examples

1
2
3
4
5
6
7
8
groutable(data = iris, variable = 5)
groutable(data = iris[1:100,], variable = 5)
groutable(data = droplevels(iris[1:100,]), variable = 5)
groutable(data = droplevels(iris[1:100,]), variable = 5, digits = 2)
groutable(data = droplevels(iris[1:100,]), variable = 5, digits = 2, method = 4)
data <- iris
data$Species <- as.character(data$Species)
groutable(data = droplevels(data[1:100,]), variable = 5, digits = 2, method = 4)

ZhonghuiGai/groutable documentation built on Jan. 1, 2022, 9:12 p.m.