You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 satır
1.1KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/animate_sets.R
  3. \name{animate_intersect}
  4. \alias{animate_intersect}
  5. \title{Animates an intersect set}
  6. \usage{
  7. animate_intersect(x, y, export = "gif", ...)
  8. }
  9. \arguments{
  10. \item{x}{the x dataset}
  11. \item{y}{the y dataset}
  12. \item{export}{the export type, either gif, first or last. The latter two
  13. export ggplots of the first/last state of the join}
  14. \item{...}{further argument passed to base_plot}
  15. }
  16. \value{
  17. either a gif or a ggplot
  18. }
  19. \description{
  20. Animates an intersect set
  21. }
  22. \examples{
  23. x <- data_frame(
  24. id = 1:3,
  25. x = paste0("x", 1:3)
  26. )
  27. y <- data_frame(
  28. id = (1:4)[-3],
  29. y = paste0("y", (1:4)[-3])
  30. )
  31. animate_intersect(x, y, by = "id", export = "first")
  32. animate_intersect(x, y, by = "id", export = "last")
  33. \dontrun{
  34. # to save the ggplot, use
  35. ints <- animate_intersect(x, y, by = "id", export = "last")
  36. ggsave("intersect.pdf", ints)
  37. animate_intersect(x, y, by = "id", export = "gif")
  38. # to save the gif, use
  39. ints <- animate_union_all(x, y, by = "id", export = "gif")
  40. anim_save(ints, "intersect.gif")
  41. }
  42. }