| unpack_tspec | R Documentation |
tidyr::unpack() makes data wider by expanding df-columns into individual
columns. Analogously, unpacking a tibblify specification makes a
specification which will result in a wider tibble by expanding tib_row()
specifications into their individual fields.
unpack_tspec(
spec,
...,
fields = NULL,
recurse = TRUE,
names_sep = NULL,
names_repair = c("unique", "universal", "check_unique", "unique_quiet",
"universal_quiet"),
names_clean = NULL
)
camel_case_to_snake_case(x)
spec |
( |
... |
These dots are for future extensions and must be empty. |
fields |
( |
recurse |
( |
names_sep |
( |
names_repair |
(
|
names_clean |
( |
x |
( |
A tibblify spec.
spec <- tspec_df(
tib_lgl("a"),
tib_row("x", tib_int("b"), tib_chr("c")),
tib_row("y", tib_row("z", tib_chr("d")))
)
unpack_tspec(spec)
# only unpack `x`
unpack_tspec(spec, fields = "x")
# do not unpack the fields in `y`
unpack_tspec(spec, recurse = FALSE)
camel_case_to_snake_case(c("ExampleText", "otherTextToConvert"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.