select_col: Select single column from a table

Description Usage Arguments Details Examples

View source: R/select_col.R

Description

Select a single column from a table and return as a vector. This is pretty-much just a wrapper for '[[', but is more descriptive and pipe friendly.

Usage

1
2
3
select_col(.data, col, nm = NULL)

select_col_(.data, col, nm = NULL)

Arguments

.data

A data frame

col

In select_col an unquoted column name. In select_col_, the column name as a string.

nm

If non-NULL, names to apply to the vector. In select_col an unquoted column name. In select_col_, the column name as a string.

Details

If the nm argument is used, then this can be seen as the inverse of enframe.

Examples

1
2
select_col(iris, Species)
select_col_(iris, "Species")

jrnold/rubbish documentation built on May 20, 2019, 2:05 a.m.