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.

31 line
728B

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