knitr::opts_chunk$set( message = FALSE, collapse = TRUE, comment = "#>")
library(mRclwhip) library(dplyr) library(arsenal)
# Create a data set dt <- mtcars[1:5, 1:6] %>% tibble::rownames_to_column(var = "Model") %>% mutate_if(is.numeric, scales::number) format_flextable(dt)
tableby(arm ~ age + sex + race + bmi + fu.stat, data = mockstudy) %>% format_tableby() %>% add_footer("P values arise from linear models for continuous variables and Pearson's chi-squared test for categorical")
modelsum(mdquality.s ~ age + bmi, data=mockstudy, adjust=~sex, family=binomial, show.adjust = F, show.intercept = F) %>% format_modelsum() %>% add_footer("P values from logistic regression adjusting for sex.")
second_header <- list(values = c("", "Group 1", "Group 2"), colwidths = c(1,3,3)) dt %>% format_flextable(header2 = second_header, bold_header = F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.