lhtab3 | R Documentation |
Generate descriptive statistic of continuous variable with style
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", ")"))
)
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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.