I have a data frame with dates as integers:

> summary(persons[, c("foddat", "doddat")])
     foddat             doddat
 Min.   :16790000   Min.   :18000000
 1st Qu.:18760904   1st Qu.:18810924
 Median :19030426   Median :19091227
 Mean   :18946659   Mean   :19027233
 3rd Qu.:19220911   3rd Qu.:19310526
 Max.   :19660124   Max.   :19691228
 NA's   :624        NA's   :207570

After converting the dates to Date format ('as.Date') I get:

> summary(per[, c("foddat", "doddat")])
    foddat               doddat
 Min.   :1679-07-01   Min.   :1800-01-26
 1st Qu.:1876-09-04   1st Qu.:1881-09-24
 Median :1903-04-26   Median :1909-12-27
 Mean   :1895-02-04   Mean   :1903-02-22
 3rd Qu.:1922-09-10   3rd Qu.:1931-05-26
 Max.   :1966-01-24   Max.   :1969-12-28

My question is: Why are the numbers of missing values not printed in the second case? 'is.na' gives the correct (same) numbers.

Can I somehow force 'summary' to print NA's? I found no clues in the documentation.

> sessionInfo()
R version 3.2.3 Patched (2016-01-19 r69960)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10

Göran Broström

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to