fselect | R Documentation |
dplyr::select()
/dplyr::rename()
fselect()
operates the exact same way as dplyr::select()
and
can be used naturally with tidy-select
helpers.
It uses collapse to perform the actual selecting of variables and is
considerably faster than dplyr for selecting exact columns,
and even more so when supplying the .cols
argument.
fselect(data, ..., .cols = NULL)
frename(data, ..., .cols = NULL)
data |
A data frame. |
... |
Variables to select using |
.cols |
(Optional) faster alternative to |
A data.frame
of selected columns.
library(timeplyr)
library(dplyr)
df <- slice_head(iris, n = 5)
fselect(df, Species, SL = Sepal.Length)
fselect(df, .cols = c("Species", "Sepal.Length"))
fselect(df, all_of(c("Species", "Sepal.Length")))
fselect(df, 5, 1)
fselect(df, .cols = c(5, 1))
df %>%
fselect(where(is.numeric))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.