[Rd] Alternative to some recently changed parts of dates.R and datetime.R
Martin Maechler
m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Tue Nov 26 10:14:57 CET 2024
>>>>> Suharto Anggono Suharto Anggono via R-devel
>>>>> on Mon, 25 Nov 2024 16:38:09 +0000 (UTC) writes:
>>>>> Suharto Anggono Suharto Anggono via R-devel
>>>>> on Mon, 25 Nov 2024 16:38:09 +0000 (UTC) writes:
> In function 'Summary.Date' in dates.R ,
> ..1
> could be used instead of
> ...elt(1L)
yes, of course! (Note that till a few days ago, this was `list(...)[[1L]]` ..)
> In function 'format.POSIXlt' in datetime.R ,
> unlist(unclass(x)[1L:3L], use.names=FALSE)
> could be used instead of
> unlist(`names<-`(unclass(x)[1L:3L], NULL))
indeed, yes!
> Also, the fragment
> secs <- x$sec[f0]; secs <- secs[is.finite(secs)]
> could be put inside
> if(np >= 1L)
the current version of datetime.R does not contain that any
more .. and as you've noticed on Bugzilla, we are still
tweaking the behaviour of format.POSIXlt() ..
Thank you, very much, Suharto,
for the two small improvements above (committed as svn rev 87382) !!
Martin
More information about the R-devel
mailing list