Learn R Programming

manymodelr (version 0.3.2)

select_col: A convenient selector gadget

Description

A convenient selector gadget

Usage

select_col(df, ...)

Arguments

df

The data set from which to select a column

...

columns to select, no quotes

Value

Returns a dataframe with selected columns

Details

A friendly way to select a column or several columns. Mainly for non-pipe usage It is recommended to use known select functions to do pipe manipulations. Otherwise convert to tibble

Examples

Run this code
# NOT RUN {
select_col(iris,Petal.Length,Sepal.Length,Species,Petal.Width)
# A pipe friendly example
# }
# NOT RUN {
library(dplyr)
as_tibble(iris) %>%
select_col(Species)
# }

Run the code above in your browser using DataLab