as_tidytable: Coerce an object to a data.table/tidytable

View source: R/as_tidytable.R

as_tidytableR Documentation

Coerce an object to a data.table/tidytable


A tidytable object is simply a data.table with nice printing features.

Note that all tidytable functions automatically convert data.frames & data.tables to tidytables in the background. As such this function will rarely need to be used by the user.


as_tidytable(x, ..., .name_repair = "unique", .keep_rownames = NULL)



An R object


Additional arguments to be passed to or from other methods.


Treatment of duplicate names. See ?vctrs::vec_as_names for options/details.


Default is FALSE. If TRUE, adds the input object's names as a separate column named "rn". .keep_rownames = "id" names the column "id" instead.


df <- data.frame(x = -2:2, y = c(rep("a", 3), rep("b", 2)))

df %>%

mtfairbanks/gdt documentation built on Nov. 24, 2022, 9:13 a.m.