Created
February 17, 2017 06:48
-
-
Save njtierney/aff88d1cb182c959b436154f48faf1e6 to your computer and use it in GitHub Desktop.
Gist of a little function for tidying the results of inla
This file contains 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
# broom tidy method for class "inla" | |
tidy.inla <- function(x){ | |
# x = model_inla | |
term_names <- rownames(x$summary.fixed) | |
tibble::as_tibble(x$summary.fixed) %>% | |
dplyr::mutate(terms = term_names) %>% | |
dplyr::select(terms, | |
dplyr::everything()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment