| if (!quiet && length(extra_names)) { | if (!quiet && length(extra_names)) { | ||||
| extra_names <- paste0(sprintf("`%s`", extra_names), collapse = ", ") | extra_names <- paste0(sprintf("`%s`", extra_names), collapse = ", ") | ||||
| msg <- paste("Unknown animation options will be ignored:", extra_names) | msg <- paste("Unknown animation options will be ignored:", extra_names) | ||||
| if (isTrue(strict)) rlang::abort(msg) else rlang::warn(msg) | |||||
| if (isTRUE(strict)) rlang::abort(msg) else rlang::warn(msg) | |||||
| } | } | ||||
| invisible(ao) | invisible(ao) | ||||
| } | } |
| x <- x %>% | x <- x %>% | ||||
| mutate(.r = row_number()) %>% | mutate(.r = row_number()) %>% | ||||
| # TODO re-evaluate gather_ here | |||||
| tidyr::gather_(key = ".col", value = ".val", names(x)[grepl("^[^.]", names(x))]) %>% | tidyr::gather_(key = ".col", value = ".val", names(x)[grepl("^[^.]", names(x))]) %>% | ||||
| mutate(.x = x_keys[.col], | mutate(.x = x_keys[.col], | ||||
| .y = -.r) %>% | .y = -.r) %>% |
| #' | #' | ||||
| #' @examples | #' @examples | ||||
| #' NULL | #' NULL | ||||
| gather_spread <- function(lhs, rhs, sequence, key_values, export, detailed, ..., anim_opts = anim_options()) { | |||||
| gather_spread <- function(lhs, rhs, sequence, key_values, export, detailed, ..., | |||||
| anim_opts = anim_options(...)) { | |||||
| # lhs is the one state of the df | # lhs is the one state of the df | ||||
| # rhs is the target state | # rhs is the target state | ||||