berndbischl / BBmisc

Other
20 stars 7 forks source link

printHead sometimes shows "..." when all data is visible #84

Open mb706 opened 6 years ago

mb706 commented 6 years ago
> BBmisc::printHead(data.frame(as.list(1:10)), n = 5)
  X1L X2L X3L X4L X5L X6L X7L X8L X9L X10L
1   1   2   3   4   5   6   7   8   9   10
... (#elements: 10)

This is because the n argument is compared with the data.frame columns as well as the rows. Compare:

> BBmisc::printHead(data.frame(as.list(1:10)), n = 15)
  X1L X2L X3L X4L X5L X6L X7L X8L X9L X10L
1   1   2   3   4   5   6   7   8   9   10

The ... should indicate whether some data is missing, which it is not, in both cases.