vector2df: Convert a vector to a data frame

View source: R/do.R

vector2dfR Documentation

Convert a vector to a data frame

Description

Convert a vector into a 1-raw data frame using the names of the vector as column names for the data frame

Usage

vector2df(x, nice_names = FALSE)

Arguments

x

a vector

nice_names

a logical indicating whether names should be nicified

Value

a data frame

Examples

vector2df(c(1, b = 2, `(Intercept)` = 3))
vector2df(c(1, b = 2, `(Intercept)` = 3), nice_names = TRUE)


mobilizingcs/mobilizr documentation built on Feb. 17, 2024, 7:49 p.m.