On Thu, 01 Jul 2021, Jeremie Juste writes:
> Hello
>
> On Thursday, 1 Jul 2021 at 08:25, PIKAL Petr wrote:
>> Hm.
>>
>> Seems to me, that both your codes are wrong but printing in Linux is
>> different from Windows.
>>
>> With
>> as.Date("20-12-2020","%Y-%m-%d")
>> you say that 20 is year
Juste
> Sent: Thursday, July 1, 2021 11:00 AM
> To: PIKAL Petr
> Cc: r-help
> Subject: Re: [R] Unexpected date format coercion
>
> Hello
>
> On Thursday, 1 Jul 2021 at 08:25, PIKAL Petr wrote:
> > Hm.
> >
> > Seems to me, that both your codes are wrong but
Hello
On Thursday, 1 Jul 2021 at 08:25, PIKAL Petr wrote:
> Hm.
>
> Seems to me, that both your codes are wrong but printing in Linux is
> different from Windows.
>
> With
> as.Date("20-12-2020","%Y-%m-%d")
> you say that 20 is year (actually year 20) and 2020 is day and only first
> two values
I can confirm 4.0.3 in Windows behaves this way too.
> as.Date("20-12-2020","%Y-%m-%d")
[1] "0020-12-20"
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Jeremie Juste
> Sent: Thursday, July 1, 2021 10:06 AM
> To: r-help
> Subje
Hi Jeremie,
Try:
as.Date("20-12-2020","%y-%m-%d")
[1] "2020-12-20"
Jim
On Thu, Jul 1, 2021 at 6:16 PM Jeremie Juste wrote:
>
> Hello,
>
> I have been surprised when converting a character string to a date with the
> following
> format,
>
> in R 4.1.0 (linux debian 10)
>
>
On 01.07.2021 10:06, Jeremie Juste wrote:
Hello,
I have been surprised when converting a character string to a date with the
following
format,
in R 4.1.0 (linux debian 10)
as.Date("20-12-2020","%Y-%m-%d")
[1] "20-12-20"
in R 4.0.5 (window 10)
as.Date("20-12-2020","%Y-%m-%d")
[1]
Hello,
I have been surprised when converting a character string to a date with the
following
format,
in R 4.1.0 (linux debian 10)
as.Date("20-12-2020","%Y-%m-%d")
[1] "20-12-20"
in R 4.0.5 (window 10)
as.Date("20-12-2020","%Y-%m-%d")
[1] "0020-12-20"
Here I was expecting a blunt and sharp
7 matches
Mail list logo