Fast 'tibble' alternatives
new_tbl(..., .nrows = NULL, .recycle = TRUE, .name_repair = FALSE)f_enframe(x, name = "name", value = "value")
f_deframe(x)
as_tbl(x)
A tibble or vector.
Key-value pairs.
integer(1) (Optional) number of rows.
Commonly used to initialise a 0-column data frame with rows.
logical(1) Should arguments be recycled?
Default is FALSE.
logical(1) Should duplicate names be made unique?
Default is TRUE.
A data frame or vector.
character(1) Name to use for column of names.
character(1) Name to use for column of values.
new_tbl and as_tbl are alternatives to
tibble and as_tibble respectively.
One of the main reasons that these do not share the same name prefixed with
f_ is because they don't always return the same result. For example
new_tbl() does not support 'quosures' and tidy injection.
f_enframe(x) where x is a data.frame converts x into a tibble
of column names and list-values.