| enframe | R Documentation |
enframe() returns a data.table::data.table() with two columns:
The names of x (or seq_along(x) if unnamed) and the values of x.
deframe() converts a two-column data.frame to a named vector.
If the data.frame only has a single column, an unnamed vector is returned.
enframe(x, name = "name", value = "value")
deframe(x)
x |
( |
name |
( |
value |
( |
data.table::data.table() or named vector.
x = 1:3
enframe(x)
x = set_names(1:3, letters[1:3])
enframe(x, value = "x_values")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.