powered by
Returns a data.table::data.table() with two columns: The names of x (or seq_along(x) if unnamed) and the values of x.
data.table::data.table()
x
seq_along(x)
enframe(x, name = "name", value = "value")
(vector()) Vector to convert to a data.table::data.table().
vector()
(character(1)) Name for the first column with names.
character(1)
(character(1)) Name for the second column with values.
data.table::data.table().
# NOT RUN { x = 1:3 enframe(x) x = set_names(1:3, letters[1:3]) enframe(x, value = "x_values") # }
Run the code above in your browser using DataLab