named_vector_to_df: Convert a named data to a data frame

named_vector_to_dfR Documentation

Convert a named data to a data frame

Description

Convert a named data to a data frame

Usage

named_vector_to_df(x, name_col = "name", value_col = "value")

Arguments

x

A vector

name_col

The name of the variable to use for the names

value_col

The name of the variable to use for the values

Value

A data frame

Examples

named_vector_to_df(c(a = 1, b = 2))
named_vector_to_df(c(a = 1, b = 2), "x", "y")

Deleetdk/kirkegaard documentation built on May 8, 2024, 12:27 a.m.