vec2df: Create a one-row tibble from a vector of values

View source: R/utilities.R

vec2dfR Documentation

Create a one-row tibble from a vector of values

Description

Create a one-row tibble from a vector of values

Usage

vec2df(vec, nms = NULL)

Arguments

vec

A vector of single values

nms

A vector of names to set as column names in the resulting data frame. Must be the same length as vec

Details

If the vector vec is a named vector, the names will become the column names of the resulting data frame. If the nms vector is provided, the names of the data frame will be set to those names, regardless of whether or not the vector vec had names.

Value

A tibble::tibble() with one row


pbs-assess/gfiscamutils documentation built on Oct. 24, 2024, 1:37 p.m.