forked from tidyverse/dplyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes tidyverse#2896
- Loading branch information
Showing
19 changed files
with
166 additions
and
677 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
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
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,84 @@ | ||
|
||
#' @importFrom tidyselect vars_select | ||
#' @export | ||
tidyselect::vars_select | ||
#' @importFrom tidyselect vars_rename | ||
#' @export | ||
tidyselect::vars_rename | ||
#' @importFrom tidyselect vars_pull | ||
#' @export | ||
tidyselect::vars_pull | ||
|
||
#' @importFrom tidyselect current_vars | ||
#' @export | ||
tidyselect::current_vars | ||
|
||
#' @importFrom tidyselect contains | ||
#' @export | ||
tidyselect::contains | ||
#' @importFrom tidyselect ends_with | ||
#' @export | ||
tidyselect::ends_with | ||
#' @importFrom tidyselect everything | ||
#' @export | ||
tidyselect::everything | ||
#' @importFrom tidyselect matches | ||
#' @export | ||
tidyselect::matches | ||
#' @importFrom tidyselect num_range | ||
#' @export | ||
tidyselect::num_range | ||
#' @importFrom tidyselect one_of | ||
#' @export | ||
tidyselect::one_of | ||
#' @importFrom tidyselect starts_with | ||
#' @export | ||
tidyselect::starts_with | ||
|
||
|
||
#' Select variables | ||
#' | ||
#' These functions now live in the tidyselect package as | ||
#' [tidyselect::vars_select()], [tidyselect::vars_rename()] and | ||
#' [tidyselect::vars_pull()]. These dplyr aliases will be deprecated | ||
#' sometimes in the future. | ||
#' | ||
#' @param vars A character vector of existing column names. | ||
#' @param ... Expressions to compute. | ||
#' @param include,exclude Character vector of column names to always | ||
#' include/exclude. | ||
#' @param strict If `TRUE`, will throw an error if you attempt to | ||
#' rename a variable that doesn't exist. | ||
#' @param var A variable specified as in the same argument of | ||
#' [tidyselect::vars_pull()]. | ||
#' @export | ||
select_vars <- function(vars, ..., include = chr(), exclude = chr()) { | ||
tidyselect::vars_select(.vars = vars, ..., .include = include, .exclude = exclude) | ||
} | ||
#' @rdname select_vars | ||
#' @inheritParams tidyselect::vars_rename | ||
#' @export | ||
rename_vars <- function(vars, ..., strict = TRUE) { | ||
tidyselect::vars_rename(.vars = vars, ..., .strict = strict) | ||
} | ||
#' @rdname select_vars | ||
#' @inheritParams tidyselect::vars_pull | ||
#' @export | ||
select_var <- function(vars, var = -1) { | ||
tidyselect::vars_pull(vars, !! enquo(var)) | ||
} | ||
|
||
#' @rdname se-deprecated | ||
#' @param include,exclude Character vector of column names to always | ||
#' include/exclude. | ||
#' @export | ||
select_vars_ <- function(vars, args, include = chr(), exclude = chr()) { | ||
args <- compat_lazy_dots(args, caller_env()) | ||
select_vars(vars, !!! args, include = include, exclude = exclude) | ||
} | ||
#' @export | ||
#' @rdname se-deprecated | ||
rename_vars_ <- function(vars, args) { | ||
args <- compat_lazy_dots(args, caller_env()) | ||
rename_vars(vars, !!! args) | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.