lhtab3: Descriptive Statistics Continuous in matrix style

lhtab3R Documentation

Descriptive Statistics Continuous in matrix style

Description

Generate descriptive statistic of continuous variable with style

Usage

lhtab3(
  data,
  sort.header = c("group", "studyid"),
  sort.body = NULL,
  cont = c("bestpcttl", "WT"),
  cat = NULL,
  render = "demog.docx",
  overall = T,
  stacked = T,
  rounding = "sigfig(x,3)",
  stat1 = c("length(x)=N", "length(x[is.na(x)])=Nmiss", "mean(x,na.rm=T)=Mean",
    "median(x,na.rm=T)=Median", "min(x,na.rm=T)=Min", "max(x,na.rm=T)=Max", "cv(x)=CV",
    "geom(x)=GeoMean", "geocv(x)=GeoCV"),
  stat.label = list(c("N"), c("Mean", " (", "CV", ")"), c("Median", " [", "Min", "-",
    "Max", "]"), c("GeoMean", " (", "GeoCV", ")"))
)

Arguments

data

dataset

sort.header

horizontal sorting

sort.body

vertical sorting

cont

list of continuous variables

render

if docx or csv then render as flextable

overall

output overall

stacked

output the stats in stacking style for continuous

rounding

define rounding method for continuous

stat1

define statistic functions for continous

stat.label

define group of statistics to be outputted


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