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.

23 lines
622B

  1. source(here::here("R/00_base.R"))
  2. joined_df <- full_join(x, y, "id") %>%
  3. proc_data("x") %>%
  4. mutate(.id = ifelse(value %in% c("4", "y4"), "y", .id)) %>%
  5. mutate(frame = 2, .x = .x + 1)
  6. extra_blocks <- inner_join(x, y, "id") %>%
  7. select(id) %>%
  8. proc_data("y") %>%
  9. mutate(frame = 2, .x = .x + 1)
  10. fj <- initial_dfs %>%
  11. bind_rows(joined_df, extra_blocks) %>%
  12. plot_data("full_join(x, y)") +
  13. transition_states(frame, transition_length = 2, state_length = 1) +
  14. enter_appear() +
  15. exit_disappear(early = TRUE) +
  16. ease_aes("sine-in-out")
  17. fj <- animate(fj)
  18. anim_save(here::here("images", "full-join.gif"), fj)