getcols: Get data columns

Description Usage Arguments Value Examples

View source: R/getcols.R

Description

Get columns from a data table by specifying the index, column name as a string, or unquoted column name. Returns the column names or indices.

Usage

1
getcols(data, ..., as_index = FALSE)

Arguments

data

the existing tbl

...

Columns to get

as_index

return the column indices (defaults to name)

Value

vector of column names or indices

Examples

1
getcols(mtcars, 1, cyl, "disp", 5:7)

faux documentation built on Sept. 14, 2021, 1:08 a.m.