Option to print the number of columns
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start with data.table:::print.data.table and compare its existing nrows handling. Review the issue's proposed parameter, option, label, placement, zero-row behavior, and default as decisions to resolve before implementation. Done means the agreed option prints the column count consistently without changing output when disabled.
Written by the indexing model from the issue text.
Description
Could data.table:::print.data.table look to gain an option to print the number of columns?
Happy to put a PR in if so.
If yes, things to consider
- Parameter name (e.g.
ncolsto matchnrows?) - Option name (e.g.
getOption("datatable.print.ncols") - Label (e.g.
ncol) - Position (header vs footer?)
- Don't print if 0 rows (
print.data.tablealready communicates this) - On or off by default?
e.g.
> options("datatable.print.ncols" = TRUE)
> iris
Key: <Petal.Width>
ncol: 5
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
<num> <num> <num> <num> <char>
1: 4.9 3.1 1.5 0.1 setosa
2: 4.8 3.0 1.4 0.1 setosa
3: 4.3 3.0 1.1 0.1 setosa
4: 5.2 4.1 1.5 0.1 setosa
5: 4.9 3.6 1.4 0.1 setosa
---
146: 6.3 3.4 5.6 2.4 virginica
147: 6.7 3.1 5.6 2.4 virginica
148: 6.3 3.3 6.0 2.5 virginica
149: 7.2 3.6 6.1 2.5 virginica
150: 6.7 3.3 5.7 2.5 virginica
- Dominant language
- R
- Stars
- 3.9k
- Forks
- 1.1k
- Avg merge
- 14h 4m
- Merged PRs (30d)
- 4
Contributor guide
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 Rdatatable/data.table
-
as.data.table() recurses without end on a survival::Surv object (or any data.frame carrying one) Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Rdatatable/data.table#7887 ·
-
consistency tests
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Rdatatable/data.table#7853 · 3 comments ·
-
internals
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Rdatatable/data.table#6938 · 1 comment ·
-
encoding fread
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Rdatatable/data.table#5179 · 8 comments ·
-
documentation programming
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Rdatatable/data.table#3199 · 3 comments ·
All issues in Rdatatable/data.table
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 ·