knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) options(tidyverse.quiet = TRUE)
The goal of xplots is to easily save multiple plots stored in list columns of tibbles.
You can install the released version of xplots from GitHub with:
devtools::install_github("fkeck/xplots")
library(tidyverse) iris_plots <- iris %>% as_tibble() %>% group_by(Species) %>% nest() %>% mutate(plots = map2(data, Species, ~ ggplot(.x, aes(Sepal.Length, Sepal.Width)) + geom_point() + labs(title = .y) ) ) iris_plots
xplots::save_plots(iris_plots, plots, files = "myplot.pdf") # If Ghostscript is available you can add bookmarks to the pdf. xplots::save_plots(iris_plots, plots, files = "myplot_bkm.pdf", bookmarks = vars(Species))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.