tribble: Row-wise tibble creation

Description Usage Arguments Value See Also Examples

View source: R/tribble.R

Description

\lifecycle

maturing

Create tibbles using an easier to read row-by-row layout. This is useful for small tables of data where readability is important. Please see tibble-package for a general introduction.

Usage

1

Arguments

...

Arguments specifying the structure of a tibble. Variable names should be formulas, and may only appear before the data. These arguments are processed with rlang::list2() and support unquote via !! and unquote-splice via !!!.

Value

A tibble.

See Also

See quasiquotation for more details on tidy dots semantics, i.e. exactly how the ... argument is processed.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
tribble(
  ~colA, ~colB,
  "a",   1,
  "b",   2,
  "c",   3
)

# tribble will create a list column if the value in any cell is
# not a scalar
tribble(
  ~x,  ~y,
  "a", 1:3,
  "b", 4:6
)

krlmlr/tibble documentation built on Jan. 15, 2020, 7:56 a.m.