Parcourir la source

minor function changes

pkg
David il y a 7 ans
Parent
révision
dd8ae8c0f8
3 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. +1
    -1
      R/animate_options.R
  2. +0
    -1
      R/process_data_helpers.R
  3. +2
    -1
      R/tidyr_helpers.R

+ 1
- 1
R/animate_options.R Voir le fichier

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)
} }

+ 0
- 1
R/process_data_helpers.R Voir le fichier



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) %>%

+ 2
- 1
R/tidyr_helpers.R Voir le fichier

#' #'
#' @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



Chargement…
Annuler
Enregistrer