vector_to_tibble.Rd
Utility to convert named vector to two column tibble with first column being names of the vector and second being the vector
vector_to_tibble(vec, colname = "col")
vec | A vector |
---|---|
colname | Name of the column to be formed |
A tibble
The column containing names will be named 'names_colname'
#> # A tibble: 2 x 2 #> val_names val #> <chr> <dbl> #> 1 a 1 #> 2 b 2