|
- % Generated by roxygen2: do not edit by hand
- % Please edit documentation in R/animate_sets.R
- \name{animate_intersect}
- \alias{animate_intersect}
- \title{Animates an intersect set}
- \usage{
- animate_intersect(x, y, export = "gif", ...)
- }
- \arguments{
- \item{x}{the x dataset}
-
- \item{y}{the y dataset}
-
- \item{export}{the export type, either gif, first or last. The latter two
- export ggplots of the first/last state of the join}
-
- \item{...}{further argument passed to base_plot}
- }
- \value{
- either a gif or a ggplot
- }
- \description{
- Animates an intersect set
- }
- \examples{
- x <- data_frame(
- id = 1:3,
- x = paste0("x", 1:3)
- )
- y <- data_frame(
- id = (1:4)[-3],
- y = paste0("y", (1:4)[-3])
- )
-
- animate_intersect(x, y, by = "id", export = "first")
- animate_intersect(x, y, by = "id", export = "last")
-
- \dontrun{
- # to save the ggplot, use
- ints <- animate_intersect(x, y, by = "id", export = "last")
- ggsave("intersect.pdf", ints)
-
- animate_intersect(x, y, by = "id", export = "gif")
- # to save the gif, use
- ints <- animate_union_all(x, y, by = "id", export = "gif")
- anim_save(ints, "intersect.gif")
- }
-
- }
|