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.

52 satır
1.1KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/animate_joins.R
  3. \name{animate_inner_join}
  4. \alias{animate_inner_join}
  5. \title{Animates an inner join}
  6. \usage{
  7. animate_inner_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 an inner 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_inner_join(x, y, by = "id", export = "first")
  33. animate_inner_join(x, y, by = "id", export = "last")
  34. \dontrun{
  35. # to save the ggplot, use
  36. ij <- animate_inner_join(x, y, by = "id", export = "last")
  37. ggsave("inner-join.pdf", ij)
  38. animate_inner_join(x, y, by = "id", export = "gif")
  39. # to save the gif, use
  40. ij <- animate_inner_join(x, y, by = "id", export = "gif")
  41. anim_save(ij, "inner-join.gif")
  42. }
  43. }