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

Lazily register slider_plus() and slider_minus() methods #80

Merged
merged 4 commits into from
Mar 30, 2023

Conversation

DavisVaughan
Copy link
Owner

@DavisVaughan DavisVaughan commented Nov 10, 2022

Joint PR with r-lib/slider#184

  • Bump required slider version in DESCRIPTION to CRAN version
  • Bump required slider version in skip_if_not_installed() to CRAN version
  • Remove slider Remote

It is beautiful:

i <- as.Date("1970-01-07") + 0:7
x <- clock::as_weekday(i)

slider::slide_index(
  .x = x,
  .i = i,
  .f = identity,
  .before = almanac::workdays(1),
  .after = almanac::workdays(1)
)
#> [[1]]
#> <weekday[2]>
#> [1] Wed Thu
#> 
#> [[2]]
#> <weekday[3]>
#> [1] Wed Thu Fri
#> 
#> [[3]]
#> <weekday[5]>
#> [1] Thu Fri Sat Sun Mon
#> 
#> [[4]]
#> <weekday[4]>
#> [1] Fri Sat Sun Mon
#> 
#> [[5]]
#> <weekday[4]>
#> [1] Fri Sat Sun Mon
#> 
#> [[6]]
#> <weekday[5]>
#> [1] Fri Sat Sun Mon Tue
#> 
#> [[7]]
#> <weekday[3]>
#> [1] Mon Tue Wed
#> 
#> [[8]]
#> <weekday[2]>
#> [1] Tue Wed

Created on 2022-11-09 with reprex v2.0.2.9000

@DavisVaughan DavisVaughan merged commit 9bb3a3b into main Mar 30, 2023
@DavisVaughan DavisVaughan deleted the feature/slider branch March 30, 2023 20:21
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.

1 participant