Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vincentarelbundock/8d2e6ad7c13057d910bf13694d39c871 to your computer and use it in GitHub Desktop.
Save vincentarelbundock/8d2e6ad7c13057d910bf13694d39c871 to your computer and use it in GitHub Desktop.
remotes::install_github('vincentarelbundock/modelsummary')
library(modelsummary)
models <- list()
models[['OLS']] <- lm(mpg ~ factor(cyl), mtcars)
models[['Logit']] <- glm(am ~ factor(cyl), mtcars, family = binomial)
make_rows <- function(models) {
rows <- data.frame(term = 'factor(cyl)4', section = 'middle', position = 3)
for (n in names(models)) rows[[n]] <- '-'
rows
}
msummary(models, add_rows = make_rows(models))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment