2.4 Converting between base R data.frame
and tidyverse tibble
Some R functions will not work with tibbles. It is easy to convert to a data.frame
using as.data.frame()
.
## [1] "tbl_df" "tbl" "data.frame"
## [1] "data.frame"
Conversely, if you have a data.frame
but want to convert to a tibble
, use as_tibble()
.
## [1] "data.frame"
## [1] "tbl_df" "tbl" "data.frame"