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ů.

29 lines
609B

  1. # Animated dplyr joins with gganimate
  2. # * Garrick Aden-Buie
  3. # * garrickadenbuie.com
  4. # * MIT License: https://opensource.org/licenses/MIT
  5. library(tidyverse)
  6. library(gganimate)
  7. if (!getOption("tidy_verb_anim.font_registered", FALSE)) {
  8. source(here::here("R", "01_register-fonts.R"))
  9. }
  10. if (!getOption("tidy_verb_anim.functions_loaded", FALSE)) {
  11. source(here::here("R", "02_functions.R"))
  12. }
  13. source(here::here("R", "03_check-folders.R"))
  14. # Data ----
  15. set.seed(42)
  16. wide <- data_frame(
  17. id = rep(1:2),
  18. x = letters[1:2],
  19. y = letters[3:4],
  20. z = letters[5:6]
  21. )
  22. long <- tidyr::gather(wide, key, val, x:z)