Dear R-helpers,

We have recently upgraded from R-3.3.1 to R-3.5.2.

It seems there has been a change in behaviour of `lapply` and the `POSIXlt` 
class that I cannot find explicitly documented.


In R-3.3.1:

> lapply(as.POSIXlt(Sys.Date()), length)
$sec
[1] 1
$min
[1] 1
$hour
[1] 1
$mday
[1] 1
$mon
[1] 1
$year
[1] 1
$wday
[1] 1
$yday
[1] 1
$isdst
[1] 1


whereas, in R-3.5.2:

> lapply(as.POSIXlt(Sys.Date()), length)
[[1]]
[1] 1


Is this change in behaviour intentional?

Realistically, I cannot see anything documented to say that `lapply` should 
behave as per R-3.3.1 on a `POSIXlt` object, so it is/was perhaps unwise to 
rely on it.


Best wishes,
Paul Newell
______________________________________________
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