get_desc_stat: Get Descriptive Stat for one dataset

get_desc_statR Documentation

Get Descriptive Stat for one dataset

Usage

get_desc_stat(
  dat,
  raw = F,
  raw_name = F,
  raw_with_header = F,
  median_vars = NULL,
  detail = F,
  detail_simple = F,
  extra_col = F,
  sort = F,
  CI = F,
  CI_method = "wilson",
  alpha = 0.05
)

Arguments

dat

A dataframe

raw

if you want to get dataframe raw output, default is False

raw_name

if you want to get raw name stat instead of sample size, default is False

raw_with_header

if you want to get raw output with headers, default is false

median_vars

specify the variables that need median(IQR) instead of mean(SD)

detail

if you want to get all the descriptive stat for continuous variables, default is F

detail_simple

if you want to get all the descriptive stat in a condensed version for continuous variables, default is F

extra_col

if you want to preserve the original variable column, default is F

sort

logical, sort =T sorts the variables based on their sequence in the data, default is F, which puts continuous variables first

CI

logical, CI=T outputs confidence intervals, default is F

CI_method

string, the method for the CI of proportions, default is 'wilson', see binom::binom.confint

alpha

numeric, the alpha level for CI, default is 0.05 for 95

A html table for descriptive statistics This function generates descriptive stat for all the variables in a dataset


JiyueQin/tidyreport documentation built on Nov. 24, 2024, 9:24 a.m.