Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

52 lines
1.1KB

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