tibble (version 1.2)

enframe: Converting atomic vectors to data frames

Description

A helper function that converts named atomic vectors or lists to two-column data frames. For unnamed vectors, the natural sequence is used as name column.

Usage

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

Arguments

x
An atomic vector
name, value
Names of the columns that store the names and values

Value

A tibble

Examples

Run this code
enframe(1:3)
enframe(c(a = 5, b = 7))

Run the code above in your browser using DataCamp Workspace