Skip to contents

Examine the column specification

Usage

get_spec(x)

Arguments

x

(data.frame) The data frame to extract a spec from.

Value

A tibblify specification as returned by tspec_df(), tspec_row(), tspec_object(), or tspec_recursive().

Examples

df <- tibblify(list(list(x = 1, y = "a"), list(x = 2)))
get_spec(df)
#> tspec_df(
#>   tib_dbl("x"),
#>   tib_chr("y", .required = FALSE),
#> )