library(tibble)
# rows vs columns
as_tibble(c(x = 1, y = 2))
#> # A tibble: 2 x 1
#> value
#> * <dbl>
#> 1 1
#> 2 2
as_tibble(list(x = 1, y = 2))
#> # A tibble: 1 x 2
#> x y
#> <dbl> <dbl>
#> 1 1 2
# fills in names
as_tibble(c(1, 2))
#> # A tibble: 2 x 1
#> value
#> <dbl>
#> 1 1
#> 2 2
as_tibble(list(1, 2))
#> Error: Columns 1, 2 must be named.
# different scheme for missing names
as_tibble(t(1:2))
#> # A tibble: 1 x 2
#> V1 V2
#> <int> <int>
#> 1 1 2
I'd recommend that as_tibble() always treats inputs as columns as if you want rows, you can use enframe(). Related to #205
I'd recommend that
as_tibble()always treats inputs as columns as if you want rows, you can useenframe(). Related to #205