lcols: Create list parser specification

View source: R/lcols.R

lcolsR Documentation

Create list parser specification

Description

This is the deprecated way of creating a tibblify() specification. Use the tspec_*() + tib_*() functions instead.

Usage

lcols(..., .default = zap())

Arguments

...

Column specification objects created by lcol_*().

.default

Deprecated.

Value

A tibblify specification object.

Examples

lcols(
  id = lcol_int("id"),
  name = lcol_chr("name"),
  aliases = lcol_lst_of("aliases", character())
)

# To create multiple columns of the same type use the bang-bang-bang (!!!)
# operator together with `purrr::map()`
int_cols <- purrr::set_names(c("id", "age"))
chr_cols <- purrr::set_names(c("name", "title"))

lcols(
  !!!purrr::map(int_cols, lcol_int),
  !!!purrr::map(chr_cols, lcol_chr)
)

tibblify documentation built on Nov. 16, 2022, 5:07 p.m.