The new (2022-10-11 r83083 ucrt) as.Date function returns a date rather than an
error when called without "origin" specified.
# previous versions of R
as.Date(0)
# Error in as.Date.numeric(0) : 'origin' must be supplied
# new:
as.Date(0)
# [1] "1970-01-01"
This is at odds with the help file, wh
I've felt that "as.Date" should default to origin "1970-01-01", so I
added a modification to Ecfun:
Ecfun::as.Date1970(0)
If R-devel chose to change the default on this, I would happily
deprecate Ecfun::as.Date1970 in favor of base::as.Date ;-)
I would therefore support changing
I don't see a compelling rationale for changing the default behavior as.Date to
deviate from the wholly reasonable status quo of "as.Date will accept numeric
data (the number of days since an epoch), but only if origin is supplied." That
has been the expectation for a long, long time.
In any c
This is in R-devel, mind you, i.e., unreleased and quite possibly unfinished
work.
No released version of R does this. E.g.,
> as.Date(0)
Error in as.Date.numeric(0) : 'origin' must be supplied
> version
_
platform x86_64-apple-darwi
Of course. But the broken as.Date in R-devel breaks one of my packages, so I'm
getting threats of the package being removed from CRAN in a few days if the
breakage is not resolved.
DHD
--- Original Message ---
On Wednesday, November 2nd, 2022 at 8:30 AM, peter dalgaard
wrote:
>
Dear all,
I would throw in my vote to have origin = "1970-01-01" as a default in
as.Date(). Why? Well, in fact, the "converse" function as.numeric() does have
an implicit default:
> as.numeric(Sys.Date())
[1] 19298
In fact, as.numeric seems to not even have a method for class "Date", and so
Às 20:47 de 02/11/2022, Johannes Rauh escreveu:
Dear all,
I would throw in my vote to have origin = "1970-01-01" as a default in as.Date(). Why?
Well, in fact, the "converse" function as.numeric() does have an implicit default:
as.numeric(Sys.Date())
[1] 19298
In fact, as.numeric seems to
On 11/2/22 5:32 PM, Rui Barradas wrote:
Às 20:47 de 02/11/2022, Johannes Rauh escreveu:
Dear all,
I would throw in my vote to have origin = "1970-01-01" as a default in
as.Date(). Why? Well, in fact, the "converse" function as.numeric()
does have an implicit default:
as.numeric(Sys.Da