Skip to content

Commit

Permalink
special case: zero rows
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Müller committed May 5, 2016
1 parent 28aff64 commit 9080359
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion R/utils-format.r
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ format_extra_cols <- function(x) {
} else {
vars <- ""
}
paste0(length(x$extra), " more variables", vars)
paste0(length(x$extra), " ",
if (!identical(x$rows_total, 0L)) "more ",
"variables", vars)
}
}

Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/output/trunc_mat/zero_rows--30.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
... with 0 rows total, and 2
more variables: a <chr>, b
<lgl>
variables: a <chr>, b <lgl>

0 comments on commit 9080359

Please sign in to comment.