library(magrittr)
library(tibble)
cat("Tibble's reference documentation states that it works similarly to
base::data.frame() but it actually has different behaviour for matrices")
cat ("\n\nCan tibble::tibble() take matries as inputs? Yes it can but the
resulting tibble is much different than what is expected, here are the
dimensions of installed.packages() when converted to a tibble using
tibble()\n")
installed.packages() %>% tibble() %>% dim() %>% cat()
cat("\n\nNotice how the number of dimensions is different than when calling
base::data.frame()
\n")
installed.packages() %>% data.frame() %>% dim() %>% cat()
cat("\n\nI think that the correct way to convert maticies to a tibble is by
using the as_tibble() function but the tibble reference documentation
(?tibble::tibble) does not mention this. If tibble() behaves differently
for matrices than base::data.frame() then the tibble reference doc should
explictedly say so and it should direct users to use as_tibble() instead.
\n")
installed.packages() %>% as_tibble() %>% dim() %>% cat()