René's URL Explorer Experiment


Title: Keep or drop columns using their names and types — select • dplyr

Open Graph Title: Keep or drop columns using their names and types — select

Description: Select (and optionally rename) variables in a data frame, using a concise mini-language that makes it easy to refer to variables based on their name (e.g. a:f selects all columns from a on the left to f on the right) or type (e.g. where(is.numeric) selects all numeric columns). Overview of selection features Tidyverse selections implement a dialect of R where operators make it easy to select variables: : for selecting a range of consecutive variables. ! for taking the complement of a set of variables. & and | for selecting the intersection or the union of two sets of variables. c() for combining selections. In addition, you can use selection helpers. Some helpers select specific columns: everything(): Matches all variables. last_col(): Select last variable, possibly with an offset. group_cols(): Select all grouping columns. Other helpers select variables by matching patterns in their names: starts_with(): Starts with a prefix. ends_with(): Ends with a suffix. contains(): Contains a literal string. matches(): Matches a regular expression. num_range(): Matches a numerical range like x01, x02, x03. Or from variables stored in a character vector: all_of(): Matches variable names in a character vector. All names must be present, otherwise an out-of-bounds error is thrown. any_of(): Same as all_of(), except that no error is thrown for names that don't exist. Or using a predicate function: where(): Applies a function to all variables and selects those for which the function returns TRUE.

Open Graph Description: Select (and optionally rename) variables in a data frame, using a concise mini-language that makes it easy to refer to variables based on their name (e.g. a:f selects all columns from a on the left to f on the right) or type (e.g. where(is.numeric) selects all numeric columns). Overview of selection features Tidyverse selections implement a dialect of R where operators make it easy to select variables: : for selecting a range of consecutive variables. ! for taking the complement of a set of variables. & and | for selecting the intersection or the union of two sets of variables. c() for combining selections. In addition, you can use selection helpers. Some helpers select specific columns: everything(): Matches all variables. last_col(): Select last variable, possibly with an offset. group_cols(): Select all grouping columns. Other helpers select variables by matching patterns in their names: starts_with(): Starts with a prefix. ends_with(): Ends with a suffix. contains(): Contains a literal string. matches(): Matches a regular expression. num_range(): Matches a numerical range like x01, x02, x03. Or from variables stored in a character vector: all_of(): Matches variable names in a character vector. All names must be present, otherwise an out-of-bounds error is thrown. any_of(): Same as all_of(), except that no error is thrown for names that don't exist. Or using a predicate function: where(): Applies a function to all variables and selects those for which the function returns TRUE.

direct link

Domain: dplyr.tidyverse.org

NoneIE=edge
og:imagehttps://dplyr.tidyverse.org/logo.png

Links:

Skip to contenthttps://dplyr.tidyverse.org/reference/select.html#container
dplyrhttps://dplyr.tidyverse.org/index.html
Get startedhttps://dplyr.tidyverse.org/articles/dplyr.html
Referencehttps://dplyr.tidyverse.org/reference/index.html
Grouped datahttps://dplyr.tidyverse.org/articles/grouping.html
Two-table verbshttps://dplyr.tidyverse.org/articles/two-table.html
Recoding columns and replacing valueshttps://dplyr.tidyverse.org/articles/recoding-replacing.html
dplyr <-> base Rhttps://dplyr.tidyverse.org/articles/base.html
Column-wise operationshttps://dplyr.tidyverse.org/articles/colwise.html
Row-wise operationshttps://dplyr.tidyverse.org/articles/rowwise.html
Programming with dplyrhttps://dplyr.tidyverse.org/articles/programming.html
More articles...https://dplyr.tidyverse.org/articles/index.html
Version 1.2.0https://tidyverse.org/blog/2026/02/dplyr-1-2-0/
Version 1.1.0https://www.tidyverse.org/tags/dplyr-1-1-0/
Version 1.0.0https://www.tidyverse.org/blog/2020/06/dplyr-1-0-0/
Version 0.8.3https://www.tidyverse.org/blog/2019/07/dplyr-0-8-3/
Version 0.8.2https://www.tidyverse.org/blog/2019/06/dplyr-0-8-2/
Version 0.8.1https://www.tidyverse.org/blog/2019/05/dplyr-0-8-1/
Version 0.8.0https://www.tidyverse.org/blog/2019/02/dplyr-0-8-0/
Version 0.7.5https://www.tidyverse.org/blog/2018/06/dplyr-0.7.5/
Changeloghttps://dplyr.tidyverse.org/news/index.html
https://github.com/tidyverse/dplyr/
Ask AI ✨https://dplyr.tidyverse.org/
R/select.Rhttps://github.com/tidyverse/dplyr/blob/main/R/select.R
https://dplyr.tidyverse.org/reference/select.html#overview-of-selection-features
c()https://rdrr.io/r/base/c.html
everything()https://tidyselect.r-lib.org/reference/everything.html
last_col()https://tidyselect.r-lib.org/reference/everything.html
group_cols()https://dplyr.tidyverse.org/reference/group_cols.html
starts_with()https://tidyselect.r-lib.org/reference/starts_with.html
ends_with()https://tidyselect.r-lib.org/reference/starts_with.html
contains()https://tidyselect.r-lib.org/reference/starts_with.html
matches()https://tidyselect.r-lib.org/reference/starts_with.html
num_range()https://tidyselect.r-lib.org/reference/starts_with.html
all_of()https://tidyselect.r-lib.org/reference/all_of.html
any_of()https://tidyselect.r-lib.org/reference/all_of.html
all_of()https://tidyselect.r-lib.org/reference/all_of.html
where()https://tidyselect.r-lib.org/reference/where.html
https://dplyr.tidyverse.org/reference/select.html#ref-usage
https://dplyr.tidyverse.org/reference/select.html#arguments
https://dplyr.tidyverse.org/reference/select.html#arg--data
https://dplyr.tidyverse.org/reference/select.html#arg--
tidy-selecthttps://dplyr.tidyverse.org/reference/dplyr_tidy_select.html
https://dplyr.tidyverse.org/reference/select.html#value
https://dplyr.tidyverse.org/reference/select.html#methods
tbl_lazyhttps://dbplyr.tidyverse.org/reference/select.tbl_lazy.html
https://dplyr.tidyverse.org/reference/select.html#examples
starts_with()https://tidyselect.r-lib.org/reference/starts_with.html
libraryhttps://rdrr.io/r/base/library.html
tidyversehttps://tidyverse.tidyverse.org
as_tibblehttps://tibble.tidyverse.org/reference/as_tibble.html
selecthttps://dplyr.tidyverse.org/reference/select.html
selecthttps://dplyr.tidyverse.org/reference/select.html
selecthttps://dplyr.tidyverse.org/reference/select.html
selecthttps://dplyr.tidyverse.org/reference/select.html
chttps://rdrr.io/r/base/c.html
selecthttps://dplyr.tidyverse.org/reference/select.html
all_ofhttps://tidyselect.r-lib.org/reference/all_of.html
https://dplyr.tidyverse.org/reference/select.html#operators-
selecthttps://dplyr.tidyverse.org/reference/select.html
selecthttps://dplyr.tidyverse.org/reference/select.html
selecthttps://dplyr.tidyverse.org/reference/select.html
chttps://rdrr.io/r/base/c.html
selecthttps://dplyr.tidyverse.org/reference/select.html
ends_withhttps://tidyselect.r-lib.org/reference/starts_with.html
selecthttps://dplyr.tidyverse.org/reference/select.html
starts_withhttps://tidyselect.r-lib.org/reference/starts_with.html
ends_withhttps://tidyselect.r-lib.org/reference/starts_with.html
selecthttps://dplyr.tidyverse.org/reference/select.html
starts_withhttps://tidyselect.r-lib.org/reference/starts_with.html
ends_withhttps://tidyselect.r-lib.org/reference/starts_with.html
selecthttps://dplyr.tidyverse.org/reference/select.html
starts_withhttps://tidyselect.r-lib.org/reference/starts_with.html
ends_withhttps://tidyselect.r-lib.org/reference/starts_with.html
https://dplyr.tidyverse.org/reference/select.html#see-also
arrange()https://dplyr.tidyverse.org/reference/arrange.html
filter()https://dplyr.tidyverse.org/reference/filter.html
mutate()https://dplyr.tidyverse.org/reference/mutate.html
reframe()https://dplyr.tidyverse.org/reference/reframe.html
rename()https://dplyr.tidyverse.org/reference/rename.html
slice()https://dplyr.tidyverse.org/reference/slice.html
summarise()https://dplyr.tidyverse.org/reference/summarise.html
Hadley Wickhamhttps://hadley.nz
Romain Françoishttps://github.com/romainfrancois
Lionel Henryhttps://github.com/lionel-
Kirill Müllerhttps://krlmlr.info
Davis Vaughanhttps://github.com/DavisVaughan
https://www.posit.co
pkgdownhttps://pkgdown.r-lib.org/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no


URLs of crawlers that visited me.