Is there a way to get dcast
to output a tibble? (without using as_tibble
)
df <- tibble(a = letters[c(rep(1:3, 3), 1)], b = 1:10 + .1, c = 11:20 + .1)
df %>% class
# [1] "tbl_df" "tbl" "data.frame"
df %>% dcast(a ~ b) %>% class
# [1] "data.frame"