Create column specification

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

cols_only(...)

col_logical()

col_integer()

col_double()

col_character()

col_skip()

col_number()

col_list(...)

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( #> a = col_integer() #> )
cols_only(a = col_integer())
#> cols_only( #> a = col_integer() #> )
# You can also use the standard abreviations cols(a = "i")
#> cols( #> a = col_integer() #> )
cols(a = "i", b = "d", c = "_")
#> cols( #> a = col_integer(), #> b = col_double(), #> c = col_skip() #> )