Open szimmer opened 1 year ago
Thanks for this report. Can you clarify what you mean by printing "the same thing"?
sum_cut
and sum_cut_color
are both class
[1] "one_skim_df" "tbl_df" "tbl"
[4] "data.frame"
sum_cut has 5 rows while sum_cut_color is 35 rows. sum_cut has has 12 columns, sum_cut_color has 13.
So you wouldn't expect them to be identical when they print because they are not identical objects.
Can you clarify what you mean by expecting them to print the same thing?
One prints as a nice html table and one does not. The n parameter on print also seems to be ignored
I think it's the use of the print() function I don't see how they should be impacted by the value of n. When I use n=3 I get 3 rows so I think the parameter is not ignored. However it does seem like knit_print.skim_one_df() is not being used.
However, using knit_print()
instead of print() seems to solve that.
See:
https://rpubs.com/elinw/1024699
@michaelquinn32 It seems like something is going wrong with the print dispatch? Or is calling print explicitly essentially an override?
I did notice that things seemed to go a bit wild with several hundred variables all of the same type. Maybe we need to be thinking about pagination.
If I have a summary which is long, I sometimes want to add
print(n=bignumber)
to the end to get all of the summary to print but this doesn't behave as I would expect. Below, I would expect Example 1 and Example 2 to print the same thing but they don't. This is more important when I have even more rows as is true in example 3 and 4. It seems n is being ignored altogetherHere's a reprex to show:
Variable type: numeric
Variable type: numeric
Created on 2023-04-03 with reprex v2.0.2
Session info
``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.2.2 (2022-10-31 ucrt) #> os Windows 10 x64 (build 19045) #> system x86_64, mingw32 #> ui RTerm #> language (EN) #> collate English_United States.utf8 #> ctype English_United States.utf8 #> tz America/New_York #> date 2023-04-03 #> pandoc 2.19.2 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.2.2) #> backports 1.4.1 2021-12-13 [1] CRAN (R 4.2.0) #> base64enc 0.1-3 2015-07-28 [1] CRAN (R 4.2.0) #> broom 1.0.1 2022-08-29 [1] CRAN (R 4.2.2) #> cellranger 1.1.0 2016-07-27 [1] CRAN (R 4.2.2) #> cli 3.4.1 2022-09-23 [1] CRAN (R 4.2.2) #> colorspace 2.0-3 2022-02-21 [1] CRAN (R 4.2.2) #> crayon 1.5.2 2022-09-29 [1] CRAN (R 4.2.2) #> DBI 1.1.3 2022-06-18 [1] CRAN (R 4.2.2) #> dbplyr 2.2.1 2022-06-27 [1] CRAN (R 4.2.2) #> digest 0.6.30 2022-10-18 [1] CRAN (R 4.2.2) #> dplyr * 1.1.0 2023-01-29 [1] CRAN (R 4.2.2) #> ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.2.2) #> evaluate 0.18 2022-11-07 [1] CRAN (R 4.2.2) #> fansi 1.0.3 2022-03-24 [1] CRAN (R 4.2.2) #> fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.2.2) #> forcats * 0.5.2 2022-08-19 [1] CRAN (R 4.2.2) #> fs 1.5.2 2021-12-08 [1] CRAN (R 4.2.2) #> gargle 1.2.1 2022-09-08 [1] CRAN (R 4.2.2) #> generics 0.1.3 2022-07-05 [1] CRAN (R 4.2.2) #> ggplot2 * 3.4.0 2022-11-04 [1] CRAN (R 4.2.2) #> glue 1.6.2 2022-02-24 [1] CRAN (R 4.2.2) #> googledrive 2.0.0 2021-07-08 [1] CRAN (R 4.2.2) #> googlesheets4 1.0.1 2022-08-13 [1] CRAN (R 4.2.2) #> gtable 0.3.1 2022-09-01 [1] CRAN (R 4.2.2) #> haven 2.5.1 2022-08-22 [1] CRAN (R 4.2.2) #> highr 0.9 2021-04-16 [1] CRAN (R 4.2.2) #> hms 1.1.2 2022-08-19 [1] CRAN (R 4.2.2) #> htmltools 0.5.3 2022-07-18 [1] CRAN (R 4.2.2) #> httr 1.4.4 2022-08-17 [1] CRAN (R 4.2.2) #> jsonlite 1.8.4 2022-12-06 [1] CRAN (R 4.2.2) #> knitr 1.40 2022-08-24 [1] CRAN (R 4.2.2) #> lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.2.2) #> lubridate 1.9.0 2022-11-06 [1] CRAN (R 4.2.2) #> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.2.2) #> modelr 0.1.9 2022-08-19 [1] CRAN (R 4.2.2) #> munsell 0.5.0 2018-06-12 [1] CRAN (R 4.2.2) #> pillar 1.8.1 2022-08-19 [1] CRAN (R 4.2.2) #> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.2.2) #> purrr * 1.0.1 2023-01-10 [1] CRAN (R 4.2.2) #> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.2.2) #> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.2.0) #> R.oo 1.25.0 2022-06-12 [1] CRAN (R 4.2.0) #> R.utils 2.12.2 2022-11-11 [1] CRAN (R 4.2.2) #> R6 2.5.1 2021-08-19 [1] CRAN (R 4.2.2) #> readr * 2.1.3 2022-10-01 [1] CRAN (R 4.2.2) #> readxl 1.4.1 2022-08-17 [1] CRAN (R 4.2.2) #> repr 1.1.6 2023-01-26 [1] CRAN (R 4.2.3) #> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.2.2) #> rlang 1.0.6 2022-09-24 [1] CRAN (R 4.2.2) #> rmarkdown 2.17 2022-10-07 [1] CRAN (R 4.2.2) #> rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.2.2) #> rvest 1.0.3 2022-08-19 [1] CRAN (R 4.2.2) #> scales 1.2.1 2022-08-20 [1] CRAN (R 4.2.2) #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.2.2) #> skimr * 2.1.5 2022-12-23 [1] CRAN (R 4.2.3) #> stringi 1.7.8 2022-07-11 [1] CRAN (R 4.2.1) #> stringr * 1.5.0 2022-12-02 [1] CRAN (R 4.2.2) #> styler 1.8.1 2022-11-07 [1] CRAN (R 4.2.2) #> tibble * 3.1.8 2022-07-22 [1] CRAN (R 4.2.2) #> tidyr * 1.3.0 2023-01-24 [1] CRAN (R 4.2.2) #> tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.2.2) #> tidyverse * 1.3.2 2022-07-18 [1] CRAN (R 4.2.2) #> timechange 0.1.1 2022-11-04 [1] CRAN (R 4.2.2) #> tzdb 0.3.0 2022-03-28 [1] CRAN (R 4.2.2) #> utf8 1.2.2 2021-07-24 [1] CRAN (R 4.2.2) #> vctrs 0.5.2 2023-01-23 [1] CRAN (R 4.2.2) #> withr 2.5.0 2022-03-03 [1] CRAN (R 4.2.2) #> xfun 0.34 2022-10-18 [1] CRAN (R 4.2.2) #> xml2 1.3.3 2021-11-30 [1] CRAN (R 4.2.2) #> yaml 2.3.6 2022-10-18 [1] CRAN (R 4.2.1) #> #> [1] C:/Program Files/R/R-4.2.2/library #> #> ────────────────────────────────────────────────────────────────────────────── ```