I found some bewilderment. Given a list of 50 dates:
structure(c("15513", "12830", "16503", "-3628", "15833", "13553",
"473", "17126", "7916", "74", "4736", "7712", "12726", "8684",
"16217", "14725", "11836", "7061", "4687", "8733", "17176", "17175",
"16155", "14005", "14635", "-1793", "4296", "15316", "4746",
"6865", "14228", "5177", "4543", "1936", "10372", "-1393", "13648",
"17267", "9177", "10380", "9427", "9527", "-1375", "2133", "13966",
"336", "1925", "9611", "15601", "9218"), class = "Date")
I ran this:
head(sort(b), 1) ## prints "1960-01-26"
tail(sort(b), 1) ## prints "2017-04-11"
max(b) ## prints "1996-04-25"
min(b) ## prints "1966-03-28"
But it really bothers me when all the printed values are in the same list max
and min
return the expected result.
dc = as.Date(c("1960-01-26", "2017-04-11", "1996-04-25", "1966-03-28"))
max(dc)
min(dc)
Why is this?