Last data update: 2014.03.03

R: Create column specification
colsR Documentation

Create column specification

Description

Create column specification

Usage

cols(..., .default = col_guess())

cols_only(...)

Arguments

...

Either column objects created by col_*, or their abbreviated character names. If you're only overriding a few columns, it's best to refer to columns by name. If not named, the column types must match the column names exactly.

.default

Any named columns not explicitly overridden in ... will be read with this column type.

Examples

cols(a = col_integer())
cols_only(a = col_integer())

# You can also use the standard abreviations
cols(a = "i")
cols(a = "i", b = "d", c = "_")

Results