Print a checkmark with column breaks, as in v1.3.0

Using the latest version tibble, the output of wide caps is not displayed properly during installation width = Inf.

Based on my tests with previous versions, wide ties were well-printed before versions below 1.3.0. This is what I would like the output to be printed as follows:

tibble_ok

... but this is what seems like using the latest tibble version:

tibble_broken

I fiddled with old sources, but to no avail. I would like to include this in the package, so the solution must pass the R CMD check. When I just copied the function loading from tibblev1.3.0, I was able to restore the old behavior, but the test failed.

, , -, " " . ?

+4
1

:

print_width_inf <- function(df, n = 6) {
  df %>%
    head(n = n) %>%
    as.data.frame() %>%
    tibble:::shrink_mat(width = Inf, rows = NA, n = n, star = FALSE) %>%
    `[[`("table") %>%
    print()
}
+5

Source: https://habr.com/ru/post/1680435/


All Articles