select_via_class | R Documentation |
Select columns by class
select_via_class(.data, class, keep = TRUE)
.data |
a data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr) |
class |
variable class to select on |
keep |
if TRUE, keep variables of type class, otherwise drop |
an object of the same type as .data
## select factor columns
select_via_class(iris, "factor")
## select everything but factor columns
select_via_class(iris, "factor", FALSE)
## select numeric
select_via_class(iris, "numeric")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.