-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
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