doudpackage
The goal of doudpackage is to Creates the “table one” of biomedical papers. Fill it with your data and the name of the variable which you’ll make the group(s) out of and it will make univariate, bivariate analysis and parse it into HTML.
Installation
You can install the development version of doudpackage from GitHub with:
# install.packages("devtools")
devtools::install_github("tiago972/doudpackage")Example
library(doudpackage)
## basic example code
data(iris)
library(stringi)
iris$fact_1<-as.factor(as.character(sample(1:5, 150, replace = TRUE)))
n_na<-sample(1:150, 30)
iris[n_na, "fact_1"]<-NA
iris$fact_2<-as.factor(as.character(stri_rand_strings(150, 1, '[A-B]')))
iris$num<-runif(150, min = 0, max = 100)
n_na<-sample(1:150, 5)
iris[n_na, "num"]<-NA
iris_test<-descTab(iris, group = "Species", na.print = TRUE)
testParse<-parseClassFun(iris_test, levels_to_keep = list("fact_2" = "A"),
group_rows_labels = list("Size" = c("Petal.Length", "Petal.Width"),
"My_f" = c("num", "fact_2")))setosa
versicolor
virginica
Total