Skip to content

Commit 4fd36b2

Browse files
authored
Merge pull request #121 from dajmcdon/km-improve_printing_epi_df
Improved printing of `epi_df`
2 parents c7749c8 + 5681e3f commit 4fd36b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/methods-epi_df.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ as_tsibble.epi_df = function(x, key, ...) {
2626
#' @method print epi_df
2727
#' @export
2828
print.epi_df = function(x, ...) {
29-
cat("An `epi_df` object, with metadata:\n")
29+
cat("An `epi_df` object,", prettyNum(nrow(x),","), "x",
30+
prettyNum(ncol(x),","), "with metadata:\n")
3031
cat(sprintf("* %-9s = %s\n", "geo_type", attributes(x)$metadata$geo_type))
3132
cat(sprintf("* %-9s = %s\n", "time_type", attributes(x)$metadata$time_type))
3233
cat(sprintf("* %-9s = %s\n", "as_of", attributes(x)$metadata$as_of))

0 commit comments

Comments
 (0)