knitr::opts_chunk$set(echo = TRUE)
library(DescrTab2)
descr(iris)

descr(
  iris,
  "Species",
  group_labels = list(setosa = "My custom group label"),
  var_options = list(Sepal.Length = list(label = "My custom variable label"))
)

descr(
  iris,
  "Species",
  group_labels = list(setosa = "My custom group label"),
  var_options = list(Sepal.Length = list(label = "My custom variable label")),
  format_options=list(caption="Test Caption")
)

Tooth2 <- ToothGrowth
Tooth2$categorical <- factor(sample(c("a", "b"), nrow(Tooth2), TRUE))
descr(Tooth2, "supp")

descr(data.frame(a=c("b\nc", "d"), e="f", "g"), "e")


imbi-heidelberg/DescrTab2 documentation built on Feb. 5, 2024, 6:51 a.m.