Skip to content

Commit dcda17b

Browse files
committed
fix print.data.table
1 parent bfce3a8 commit dcda17b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/print.data.table.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ print.data.table = function(x, topn=getOption("datatable.print.topn"),
143143
}
144144
if (col.names == "none")
145145
colnames(toprint) = rep.int("", ncol(toprint))
146-
if (NROW(toprint)>20L && col.names == "auto")
146+
if (nrow(toprint)>20L && col.names == "auto")
147147
# repeat colnames at the bottom if over 20 rows so you don't have to scroll up to see them
148148
# option to shut this off per request of Oleg Bondar on SO, #1482
149149
toprint = rbind(
@@ -271,7 +271,7 @@ dt_width = function(x, nrow, class, row.names, col.names) {
271271
}
272272
# keeps the dim and dimnames attributes
273273
toprint_subset = function(x, cols_to_print) {
274-
if (NROW(x) == 1L){
274+
if (nrow(x) == 1L){
275275
atts = attributes(x)
276276
atts$dim = c(1L, sum(cols_to_print))
277277
atts$dimnames[[2L]] = atts$dimnames[[2L]][cols_to_print]

0 commit comments

Comments
 (0)