Convert a Vector to a Data Frame

vector_to_df(vector, column_name)

Arguments

vector

The input vector

column_name

The base name for the columns

Value

A data frame with one row and columns determined by the length of the vector

Examples

vector_to_df(1:10, "nm")
#>   nm1 nm2 nm3 nm4 nm5 nm6 nm7 nm8 nm9 nm10
#> 1   1   2   3   4   5   6   7   8   9   10