animint2pages | R Documentation |
This function takes a named list of ggplots, generates interactive animations, and pushes the generated files to a specified GitHub repository. You can choose to keep the repository private or public. Before using this function set your appropriate git 'user.username' and 'user.email'
animint2pages(
plot.list,
github_repo,
commit_message = "Commit from animint2pages",
private = FALSE,
required_opts = c("title", "source"),
...
)
plot.list |
A named list of ggplots and option lists. |
github_repo |
The name of the GitHub repository to which the files will be pushed. |
commit_message |
A string specifying the commit message for the pushed files. |
private |
A logical flag indicating whether the GitHub repository should be private or not (default FALSE). |
required_opts |
Character vector of plot.list element names which are checked (stop with an error if not present). Use required_opts=NULL to skip check. |
... |
Additional options passed onto |
The function returns the initialized GitHub repository object.
## Not run:
library(animint2)
p1 <- ggplot(mtcars, aes(x = mpg, y = wt)) +
geom_point()
p2 <- ggplot(mtcars, aes(x = hp, y = wt)) +
geom_point()
viz <- list(plot1 = p1, plot2 = p2)
animint2pages(
viz,
github_repo = "my_animint2_plots",
commit_message = "New animint",
private = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.