Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

26 lines
613B

  1. source(here::here("R/00_base.R"))
  2. joined_dfs <- right_join(x, y, "id") %>%
  3. proc_data("y") %>%
  4. mutate(frame = 2, .x = .x + 1)
  5. extra_blocks <- inner_join(x, y, "id") %>%
  6. select(id) %>%
  7. proc_data("x") %>%
  8. mutate(frame = 2, .x = .x + 1)
  9. rj <- initial_dfs %>%
  10. bind_rows(joined_dfs, extra_blocks) %>%
  11. filter(!is.na(value)) %>%
  12. mutate(
  13. .id = ifelse(label == "x", label, .id),
  14. removed = as.integer(grepl("3", value))
  15. ) %>%
  16. arrange(removed, .id, frame, value) %>%
  17. plot_data("right_join(x, y)") %>%
  18. animate_plot()
  19. rj <- animate(rj)
  20. anim_save(here::here("images", "right-join.gif"), rj)