Hi Jim,
Thanks for the hint, that makes sense and I'll arrange accordingly.
Best regards,
Abdoulaye
On Thu, Aug 13, 2020 at 8:38 AM Jim Lemon wrote:
> Hi Abdoulaye,
> It looks to me as though your offsets are in hours, not days. You can
> get a rough date like this:
>
> time<-c(1569072,1569096,
Hi Abdoulaye,
It looks to me as though your offsets are in hours, not days. You can
get a rough date like this:
time<-c(1569072,1569096,1569120,1569144,
1569168,1569192,1569216,1569240)
time_d<-as.Date("1800-01-01")+time/24
time_d
[1] "1979-01-01" "1979-01-02" "1979-01-03" "1979-01-04" "1979-01-0
nice
On Wed, Aug 12, 2020 at 6:18 PM Bert Gunter wrote:
> Extra packages are not needed.
>
> My question is: why change the character representation at all? See the
> format argument of ?as.Date.
>
> > as.Date("20010102",format="%Y%m%d")
> [1] "2001-01-02" ## the default format for the print me
Extra packages are not needed.
My question is: why change the character representation at all? See the
format argument of ?as.Date.
> as.Date("20010102",format="%Y%m%d")
[1] "2001-01-02" ## the default format for the print method for Date objects
Bert Gunter
"The trouble with having an open m
library(lubridate)
a <- "20200403"
lubridate::ymd(a)
# 2020-04-03
HTH,
Eric
On Wed, Aug 12, 2020 at 5:57 PM Stephen P. Molnar
wrote:
> i have written an R script which allow me to plot the number of Covid-10
> cases reported by he state of Ohio. In that se t of data the date format
> is in the
as.Date('17/02/2005','%d/%m/%Y')
[1] "2005-02-17"
(Read the documentation more carefully to distinguish between %y and
%Y; I guess you tried lots of combinations but never tried the
correct one, so just be more careful at matching what your data is
with the format string you create.)
-D
6 matches
Mail list logo