tspec_combine: Combine multiple specifications

View source: R/spec_combine.R

tspec_combineR Documentation

Combine multiple specifications

Description

Combine multiple specifications

Usage

tspec_combine(...)

Arguments

...

Specifications to combine.

Value

A tibblify specification.

Examples

# union of fields
tspec_combine(
  tspec_df(tib_int("a")),
  tspec_df(tib_chr("b"))
)

# unspecified + x -> x
tspec_combine(
  tspec_df(tib_unspecified("a"), tib_chr("b")),
  tspec_df(tib_int("a"), tib_variant("b"))
)

# scalar + vector -> vector
tspec_combine(
  tspec_df(tib_chr("a")),
  tspec_df(tib_chr_vec("a"))
)

# scalar/vector + variant -> variant
tspec_combine(
  tspec_df(tib_chr("a")),
  tspec_df(tib_variant("a"))
)

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