Intercept the final abbreviated tibble printout (with column shortening)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
Research direction
Start by tracing the pillar codebase from the final abbreviated tibble printout and the column-shortening path. Determine whether an existing entry point exposes the final rendered column widths before rendering, then document or test the result using the shown custom-header and dashed-row scenario.
Written by the indexing model from the issue text.
Description
Hello, @zhanchen is trying to add a middle dashed row (but this above problem arises also in a custom header we want to do) in https://github.com/tidyomics/tidyprint
se_airway %>% print(design = "tidyprint_1")
#> # A SummarizedExperiment-tibble abstraction:
#> # Features=38694 | Samples=8 | Assays=counts
#> .features .samples | counts | | dex celltype geo_id
#> <chr> <chr> | <chr> | | <chr> <chr> <chr>
#> 1 ENSG00000000003 SRR1039508 | 723 | | control N61311 GSM1275862
#> 2 ENSG00000000005 SRR1039508 | 0 | | control N61311 GSM1275862
#> 3 ENSG00000000419 SRR1039508 | 467 | | control N61311 GSM1275862
#> 4 ENSG00000000457 SRR1039508 | 347 | | control N61311 GSM1275862
#> 5 ENSG00000000460 SRR1039508 | 96 | | control N61311 GSM1275862
#> --------- -------- - ------ - - --- -------- ------
#> 309548 ENSG00000283115 SRR1039521 | 0 | | treated N061011 GSM1275875
#> 309549 ENSG00000283116 SRR1039521 | 0 | | treated N061011 GSM1275875
#> 309550 ENSG00000283119 SRR1039521 | 0 | | treated N061011 GSM1275875
#> 309551 ENSG00000283120 SRR1039521 | 0 | | treated N061011 GSM1275875
#> 309552 ENSG00000283123 SRR1039521 | 0 | | treated N061011 GSM1275875
The problem is that we cannot predict how wide a column is, as pillar will shorten the columns depending on the context. With which function can we access the columns nchar of the final rendered table, before it is rendered?
We have looked at the pillar codebase, but it is not clear to us
Tagging
Thanks.
- Dominant language
- R
- Stars
- 182
- Forks
- 42
- Avg merge
- 11h 50m
- Merged PRs (30d)
- 7
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from r-lib/pillar
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
beginners blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enviPathR OpenBuild Error Build OK Build Warning policies-accepted pre-review precheck-passed
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Bioconductor/BiocContributions#207 · 6 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
datacarpentry/semester-biology#1255 ·