Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dplyr 1.0.8 #98

Merged

Conversation

romainfrancois
Copy link
Contributor

We're in the process of releasing dplyr 1.0.8 (which depends on dev rlang which we'll release soon as well) and timetk appears to fail against them, because of this example:

#' library(tidyverse)
#' library(timetk)
#'
#' m4_monthly %>%
#'     group_by(id) %>%
#'     tk_augment_differences(value, .lags = 1:20)

We see:

── After ─────────────────────────────────────────────────────────────────────────────────────────────────────
> checking examples ... ERROR
  Running examples in ‘timetk-Ex.R’ failed
  The error most likely occurred in:
  
  > ### Name: tk_augment_differences
  > ### Title: Add many differenced columns to the data
  > ### Aliases: tk_augment_differences
  > 
  > ### ** Examples
  > 
  > library(tidyverse)
  ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
  ✔ ggplot2 3.3.5          ✔ purrr   0.3.4     
  ✔ tibble  3.1.6          ✔ dplyr   1.0.7.9000
  ✔ tidyr   1.1.4          ✔ stringr 1.4.0     
  ✔ readr   2.1.0          ✔ forcats 0.5.1     
  ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
  ✖ dplyr::filter() masks stats::filter()
  ✖ dplyr::lag()    masks stats::lag()
  > library(timetk)
  > 
  > m4_monthly %>%
  +     group_by(id) %>%
  +     tk_augment_differences(value, .lags = 1:20)
  Error: tk_augment_differences(.differences) is missing.
  Execution halted

> checking data for non-ASCII characters ... NOTE
    Note: found 2750 marked UTF-8 strings

1 error x | 0 warnings ✓ | 1 note x

This pull request hints in the direction of the issue. I'm not sure this error should remain, given that .differences has a default value. In that case, perhaps the example should be updated.

This might be related to this change in rlang::is_missing() r-lib/rlang#1106 . cc @lionel-

@lionel-
Copy link

lionel- commented Nov 30, 2021

In the next version of rlang, is_missing() treats default arguments as missing, consistently with base::missing().

@mdancho84
Copy link
Contributor

OK, I will likely need to update more than just the example because there are many situations where this could occur. Let me take a look and update. I'll approve the change for the time being.

@mdancho84 mdancho84 merged commit 725d0e9 into business-science:master Nov 30, 2021
mdancho84 added a commit that referenced this pull request Nov 30, 2021
@romainfrancois
Copy link
Contributor Author

Thanks @mdancho84 the pr is mostly to point in the direction :-)

@romainfrancois romainfrancois deleted the fix_tk_augment_differences branch November 30, 2021 14:58
@mdancho84
Copy link
Contributor

@romainfrancois I appreciate it! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants