Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

50 lines
1.1KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/animate_sets.R
  3. \name{animate_union_all}
  4. \alias{animate_union_all}
  5. \title{Animates a union-all set}
  6. \usage{
  7. animate_union_all(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 a union-all 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_union_all(x, y, by = "id", export = "first")
  32. animate_union_all(x, y, by = "id", export = "last")
  33. \dontrun{
  34. # to save the ggplot, use
  35. un <- animate_union_all(x, y, by = "id", export = "last")
  36. ggsave("union-all.pdf", un)
  37. animate_union_all(x, y, by = "id", export = "gif")
  38. # to save the gif, use
  39. un <- animate_union_all(x, y, by = "id", export = "gif")
  40. anim_save(un, "union-all.gif")
  41. }
  42. }