named_vectors_to_df: Reshape named vectors to a data.frame.

View source: R/transform.R

named_vectors_to_dfR Documentation

Reshape named vectors to a data.frame.

Description

Construct a data.frame from a list of named vectors by filling in the shorter vectors with NAs.

Usage

named_vectors_to_df(list, name_suffix = "_name", value_suffix = "_value")

Arguments

list

(a list of vectors) The list of vectors.

name_suffix

(character scalar) The suffix to use on the names.

valie_suffix

(character scalar) The suffix to use on the values.

Examples

l = list(A = c(a = 1, b = 2, c = 3), B = c(a = 3, b = 2, c = 1))
named_vectors_to_df(l)

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