statsQL: Generate description of factor varaible.

Description Usage Arguments Value

View source: R/statistic_functions.R

Description

A method that generate description of factor variable and perform comparative statistic test in case of comparaison group.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
statsQL(
  data,
  variable,
  group = NULL,
  group_str = NULL,
  all = NA_asModality,
  round = 3,
  p_value = FALSE,
  forcedTest = NULL,
  NA_group_AsModality = FALSE,
  NA_asModality = FALSE,
  output = NULL
)

Arguments

data

a data.frame containing the data to describe

variable

a character vector of length 1. The name of the factor column to describe.

group

a character vector of length 1. The name of the factor column to use as commparaison group. Default to NULL.

group_str

a character vector. The name of the levels of the group variable to use. Default to NULL.

all

a boolean. If TRUE, total column will be displayed. Default to FALSE

round

an integer, number of maximal decimal. Default to 3

p_value

a boolean. If TRUE, comparaison test are performed.

forcedTest

a character vector of length 1. Must be one of "Pearson's Chi-squared test", "Pearson's Chi-squared test with Yates" or "Fisher's Exact Test for Count Data". Default to NULL.

NA_group_AsModality

a boolean. If TRUE, missing data of the group variable will be considered as levels. Default to FALSE

NA_asModality

a boolean. If TRUE, missing data of the factor variable to describe will be considered as levels. Default to FALSE

output

a data.frame, containing a previously generated data.frame or a new data.frame. data.frame are generated using createOutput() function.

Value

a data.frame containing the description of the factor variable


rgriffier/statsBordeaux documentation built on Aug. 11, 2021, 9:59 a.m.