You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()
The text was updated successfully, but these errors were encountered:
I have not submitted a Pull Request. The amount of time that it will take to receive approval to submit code to an outside organization would be far to long for such a trivial change.
As far as data.frame -> tibble using the tibble() function, it seems as if the function works as expected.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
The text was updated successfully, but these errors were encountered: