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_col_select() reconstructs bare data.table objects #6171

Merged
merged 4 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/generics.R
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ dplyr_col_select <- function(.data, loc, names = NULL, error_call = caller_env()

# Patch base data frames to restore extra attributes that `[.data.frame` drops.
# We require `[` methods to keep extra attributes for all data frame subclasses.
if (identical(class(.data), "data.frame")) {
if (identical(class(.data), "data.frame") || identical(class(.data), c("data.table", "data.frame"))) {
Copy link
Member

Choose a reason for hiding this comment

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

Might be good to also mention the data.table handling in the comment and link to this PR

out <- dplyr_reconstruct(out, .data)
}

Expand Down
1 change: 0 additions & 1 deletion R/reexport-tibble.r
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ tibble::type_sum
#' `glimpse()` is provided by the pillar package, and re-exported
#' by dplyr. See [pillar::glimpse()] for more details.
#'
#' @inheritParams pillar::glimpse
#' @return x original x is (invisibly) returned, allowing `glimpse()` to be
#' used within a data pipeline.
#' @examples
Expand Down