enframe

0th

Percentile

Converting atomic vectors to data frames, and vice versa

enframe() converts named atomic vectors or lists to two-column data frames. For unnamed vectors, the natural sequence is used as name column.

deframe() converts two-column data frames to a named vector or list, using the first column as name and the second column as value.

Usage
enframe(x, name = "name", value = "value")

deframe(x)

Arguments
x

An atomic vector (for enframe()) or a data frame (for deframe())

name, value

Names of the columns that store the names and values

Value

A tibble

Aliases
  • enframe
  • deframe
Examples
# NOT RUN {
enframe(1:3)
enframe(c(a = 5, b = 7))
# }
Documentation reproduced from package tibble, version 1.3.4, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.