Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

vector2df

Convert a vector to a data frame


Description

Convert a vector into a 1-row 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)

mosaicCore

Common Utilities for Other MOSAIC-Family Packages

v0.9.0
GPL (>= 2)
Authors
Randall Pruim <rpruim@calvin.edu>, Daniel T. Kaplan <kaplan@macalester.edu>, Nicholas J. Horton <nhorton@amherst.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.