readr (version 1.0.0)

cols_condense: Examine the column specifications for a data frame

Description

spec extracts the full column specifications. cols_condense takes a spec object and condenses its definition by setting the default column type to the most frequent type and only listing columns with a different type.

Usage

cols_condense(x)
spec(x)

Arguments

x
The data frame object to extract from

Value

A col_spec object.

Examples

Run this code
df <- read_csv(readr_example("mtcars.csv"))
s <- spec(df)
s

cols_condense(s)

Run the code above in your browser using DataCamp Workspace