Dear R-devel, I have tested the code below on R v3.3.2 and v3.3.3 on
Mac and Windows.
x <- c("2017-01-01 05:00:02", "2017-01-02 03 :M:00") # note the ‘ :M’
in 2nd value
as.POSIXct(x)
# [1] "2017-01-01 GMT" "2017-01-02 GMT”
The time info is lost on the first index as well. And it happens *silently
Hello,
Following Dirk's post here: https://github.com/Rdatatable/data.table/issues/1619
we would like to clarify if this is the right behaviour, and if so,
the rationale behind it.
Here's the summary (thanks to Dirk and Joshua):
Sys.setenv("TZ"="America/Chicago")
dates = as.Date("2016-03-02") +
> Indeed. Interesting that nobody has noticed till now,
> even though that part has been world readable since at least 2008-08-25.
That was what made me a bit unsure :-).
> Note that the R source code is at
> http://svn.r-project.org/R/
> and the file in question at
> http://svn.r-pro
Have a look at the following, taken from base::rank:
...
if (!is.na(na.last) && any(nas)) {
yy <- integer(length(x)) # <~
storage.mode(yy) <- storage.mode(y) # <
yy <- NA
NAkeep <- (na.last == "keep")
if (NAkeep || na.last) {