as.data.frame_named.vector: Coerce to a Data Frame

View source: R/as.data.frame_named.vector.R

as.data.frame_named.vectorR Documentation

Coerce to a Data Frame

Description

converts a named vector to a 2 column data frame with the names in the first column and values in the second columns. Throws an error if no names are found. Row names are stripped out of the final data frame.

Usage

as.data.frame_named.vector(x, valname = deparse(substitute(x)))

Arguments

x

a named vector

valname

a character string to be used as the new column name. Defaults to the name of x

Value

a two column data frame with nrow = length(x)


crazybilly/ucbudar documentation built on July 15, 2024, 5:03 p.m.