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

Implement expand #225

Merged
merged 11 commits into from
Mar 19, 2021
Merged

Implement expand #225

merged 11 commits into from
Mar 19, 2021

Conversation

markfairbanks
Copy link
Collaborator

@markfairbanks markfairbanks commented Mar 11, 2021

Implements expand() for usage on lazy data.tables.

A couple other small adjustments:

  • Removed a pipe from the internal slice_min_max() helper that was causing a note from devtools::check().
  • Bumped minimum data.table version to 1.13.0 to fix repro example does not work #224

Copy link
Member

@hadley hadley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Do you want to do complete() while you're in here?

R/step-subset-expand.R Outdated Show resolved Hide resolved
R/step-subset-slice.R Outdated Show resolved Hide resolved
R/step-subset.R Outdated
Comment on lines 122 to 126
if (is.null(x$allow_cartesian)) {
out$allow.cartesian <- TRUE
} else {
out$allow.cartesian <- parent$allow_cartesian
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (is.null(x$allow_cartesian)) {
out$allow.cartesian <- TRUE
} else {
out$allow.cartesian <- parent$allow_cartesian
}
out$allow.cartesian <- parent$allow_cartesian %||% TRUE

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up adding an explicit allow_cartesian = TRUE to step_subset_on() and it made this part much more straightforward

@markfairbanks
Copy link
Collaborator Author

Looks good! Do you want to do complete() while you're in here?

Yep, sounds good to me. I'll leave a comment when it's all ready.

@markfairbanks
Copy link
Collaborator Author

All set for review

@hadley hadley merged commit 3360f20 into tidyverse:master Mar 19, 2021
@hadley
Copy link
Member

hadley commented Mar 19, 2021

Perfect, thanks!

@markfairbanks markfairbanks deleted the expand branch March 28, 2021 13:56
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.

repro example does not work
2 participants