Re: [R] strptime with +03:00 zone designator

2023-11-05 Thread Richard O'Keefe
Thanks to all who replied. On Mon, 6 Nov 2023 at 18:37, Richard O'Keefe wrote: > OK, so the consensus is > (1) One cannot make strptime accept ISO8601-compliant zone designators > (2) The lubridate package can > (3) Or one can hack away with regex. > Lubridate it is, then. > > But I do regard

Re: [R] strptime with +03:00 zone designator

2023-11-05 Thread Richard O'Keefe
OK, so the consensus is (1) One cannot make strptime accept ISO8601-compliant zone designators (2) The lubridate package can (3) Or one can hack away with regex. Lubridate it is, then. But I do regard strptime's inability to process ISO8601-compliant zone designators as a bug. On Mon, 6 Nov

Re: [R] strptime with +03:00 zone designator

2023-11-05 Thread jim holtman
try using 'lubridate' > library(lubridate)Attaching package: ‘lubridate’ The following objects are masked from ‘package:base’: date, intersect, setdiff, union > x <- "2017-02-28T13:35:00+03:00"> ymd_hms(x)[1] "2017-02-28 10:35:00 UTC" > Thanks Jim Holtman *Data Munger Guru* *What is

Re: [R] strptime with +03:00 zone designator

2023-11-05 Thread Jeff Newmiller via R-help
I usually just use a regex to strip the colon. On November 5, 2023 3:45:01 PM PST, Richard O'Keefe wrote: >I have some data that includes timestamps like this: >2017-02-28T13:35:00+03:00 >The documentation for strptime says that %z expects >an offset like 0300. I don't see any way in the

Re: [R] strptime with +03:00 zone designator

2023-11-05 Thread Roy Mendelssohn - NOAA Federal via R-help
what if you try lubridate::as_datetime('2017-02-28T13:35:00+03:00’) -Roy > On Nov 5, 2023, at 3:45 PM, Richard O'Keefe wrote: > > I have some data that includes timestamps like this: > 2017-02-28T13:35:00+03:00 > The documentation for strptime says that %z expects > an offset like 0300. I

[R] strptime with +03:00 zone designator

2023-11-05 Thread Richard O'Keefe
I have some data that includes timestamps like this: 2017-02-28T13:35:00+03:00 The documentation for strptime says that %z expects an offset like 0300. I don't see any way in the documentation to get it to accept +hh:mm with a colon separator, and everything I tried gave me NA as the answer.

Re: [R] I need to create new variables based on two numeric variables and one dichotomize conditional category variables.

2023-11-05 Thread CALUM POLWART
In this case I think I've made the labels the number and so a double is possible. But it wasn't what I actually set out to do! (I'm a tidy fab so would have to engage the brain in base too much) When I thought 'I think I might say that's a factor (sometimes in medical equations gender is shown