lhtab1: Descriptive Statistics Continuous and Discrete

lhtab1R Documentation

Descriptive Statistics Continuous and Discrete

Description

Generate descriptive statistic of continuous and/or categorical variables

Usage

lhtab1(
  data,
  sort.by = c("study", "form"),
  cont = NULL,
  cat = c("Sex", "Race"),
  stats = "stat1",
  fun = "fun1",
  overall = "yes",
  render = "flex",
  transpose = F
)

Arguments

data

dataset

sort.by

sorting variables

cont

list of continuous variables

cat

list of categorical variables

stats

statistic functions. stat1 contained most of basic statistic function

fun

define the output

overall

if the overall stats required then overall="yes"

render

the output format as flexible table "flex", as "csv", or word document ("word"). Note that officer package is required for the word format and save the output as docx (ex: print(doc,"table1.docx))

transpose

when transpose is TRUE, the output will be in docx containing both continuous and categorical covariate


leonpheng/lhtool2 documentation built on April 13, 2025, 5:42 p.m.