Examples for 'vroom::cols_condense'


Examine the column specifications for a data frame

Aliases: cols_condense spec

Keywords:

### ** Examples

df <- vroom(vroom_example("mtcars.csv"))
Rows: 32 Columns: 12
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr  (1): model
dbl (11): mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
s <- spec(df)
s
cols(
  model = col_character(),
  mpg = col_double(),
  cyl = col_double(),
  disp = col_double(),
  hp = col_double(),
  drat = col_double(),
  wt = col_double(),
  qsec = col_double(),
  vs = col_double(),
  am = col_double(),
  gear = col_double(),
  carb = col_double(),
  .delim = ","
)
cols_condense(s)
cols(
  .default = col_double(),
  model = col_character(),
  .delim = ","
)

[Package vroom version 1.5.7 Index]