Created
June 16, 2020 20:46
-
-
Save vincentarelbundock/8d2e6ad7c13057d910bf13694d39c871 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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