gt_add_plots | R Documentation |
This function takes a list of ggplot2 plots and adds them into a gt table column.
gt_add_plots(gt_table, plots, col_index)
gt_table |
A gt table to add the plots into |
plots |
A list of ggplot2 plots, typically with the same length as the number of rows in gt_table |
col_index |
The index of the column in gt_table that is to be overwritten with the plots |
## Not run:
var_names <- c(wt = "Weight", am = "Transmission", mpg = "Consumption (mpg)", gear = "Gears")
cor_table <- cor_matrix(mtcars, var_names) %>%
report_cor_table(extras = tibble::tibble(Distributions = c(seq_along(var_names))))
large_text <- ggplot2::theme(axis.text.x = ggplot2::element_text(size = 40))
distr_plots <- plot_distributions(mtcars, var_names, plot_theme = large_text)
gt_add_plots(cor_table, distr_plots, 3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.