enframe: Convert a vector to a data.table/tidytable

View source: R/enframe.R

enframeR Documentation

Convert a vector to a data.table/tidytable

Description

Converts named and unnamed vectors to a data.table/tidytable.

Usage

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

Arguments

x

A vector

name

Name of the column that stores the names. If name = NULL, a one-column tidytable will be returned.

value

Name of the column that stores the values.

Examples

vec <- 1:3
names(vec) <- letters[1:3]

enframe(vec)

mtfairbanks/gdt documentation built on April 12, 2024, 6:51 p.m.