Skip to contents

Function called in .to_tibble().

Usage

.vector_2_tibble(.in_vec, .rowname = "rowname", .vec_name = "")

Arguments

.in_vec

input data

.rowname

user specified name for rows

.vec_name

name for vector, typically an expression

Value

tibble

Examples

letters[1:5] |> rlang::set_names() |> .vector_2_tibble()
#> # A tibble: 5 × 2
#>   rowname ``   
#>   <chr>   <chr>
#> 1 a       a    
#> 2 b       b    
#> 3 c       c    
#> 4 d       d    
#> 5 e       e    
letters[1:5] |> rlang::set_names() |> .vector_2_tibble(.rowname = 'a_name', .vec_name = 'alphas')
#> # A tibble: 5 × 2
#>   a_name alphas
#>   <chr>  <chr> 
#> 1 a      a     
#> 2 b      b     
#> 3 c      c     
#> 4 d      d     
#> 5 e      e