-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #390 from cmu-delphi/fixSelect
other keys defaulting to `character(0)` and fix `select` on grouped `epi_df`s
- Loading branch information
Showing
7 changed files
with
148 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# These methods (and maybe some others in methods-epi_df.R) are here to augment | ||
# `?dplyr_extending` implementations to get the correct behavior on grouped | ||
# `epi_df`s. It would be nice if there were a way to replace these with a | ||
# generic core that automatically fixed all misbehaving methods; see | ||
# brainstorming within Issue #223. | ||
|
||
#' @importFrom dplyr select | ||
#' @export | ||
select.epi_df <- function(.data, ...) { | ||
selected <- NextMethod(.data) | ||
might_decay <- reclass(selected, attr(selected, "metadata")) | ||
return(dplyr_reconstruct(might_decay, might_decay)) | ||
} | ||
|
||
# others to consider: | ||
# - arrange | ||
# - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters