Re: [R] Help with strftime error "character string is not in a standard unambiguous format"

2016-09-12 Thread Jeff Newmiller
Perhaps use the correct function. (Just one little letter off...) -- Sent from my phone. Please excuse my brevity. On September 11, 2016 10:57:39 PM PDT, Chris Evans wrote: >I am trying to read activity data created by Garmin. It outputs dates >like this: > >"Thu, 25 Aug

Re: [R] Help with strftime error "character string is not in a standard unambiguous format"

2016-09-12 Thread jeremiah rounds
Not sure what the issue is with the provided code but note: library(lubridate) lubridate::dmy_hm("Thu, 25 Aug 2016 6:34 PM") [1] "2016-08-25 18:34:00 UTC" Though if you go that route: set the TZ because on the timestamp it is ambiguous. On Sun, Sep 11, 2016 at 10:57 PM, Chris Evans

Re: [R] Help with strftime error "character string is not in a standard unambiguous format"

2016-09-12 Thread peter dalgaard
On 12 Sep 2016, at 12:33 , Chris Evans wrote: > OK. I'm an idiot (not for the first time and, sadly, no doubt not for the > last). strptime() was all that was needed: just that one pesky character and > I can't remember now why I went astray there, but thanks to all who

Re: [R] Help with strftime error "character string is not in a standard unambiguous format"

2016-09-12 Thread Daniel Nordlund
On 9/11/2016 10:57 PM, Chris Evans wrote: I am trying to read activity data created by Garmin. It outputs dates like this: "Thu, 25 Aug 2016 6:34 PM" The problem that has stumped me is this: strftime("Thu, 25 Aug 2016 6:34 PM",format="%a, %d %b %Y %I:%M %p") Error in as.POSIXlt.character(x,

Re: [R] Help with strftime error "character string is not in a standard unambiguous format"

2016-09-12 Thread Ismail SEZEN
It should be strptime for character vectors. strptime("Thu, 25 Aug 2016 6:34 PM",format="%a, %d %b %Y %I:%M %p”) > On 12 Sep 2016, at 08:57, Chris Evans wrote: > >> strftime("Thu, 25 Aug 2016 6:34 PM",format="%a, %d %b %Y %I:%M %p") [[alternative HTML version

Re: [R] Help with strftime error "character string is not in a standard unambiguous format"

2016-09-12 Thread peter dalgaard
> On 12 Sep 2016, at 07:57 , Chris Evans wrote: > >> strftime("Thu, 25 Aug 2016 6:34 PM",format="%a, %d %b %Y %I:%M %p") strptime, not strftime... -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg,

Re: [R] Help with strftime error "character string is not in a standard unambiguous format"

2016-09-12 Thread Enrico Schumann
On Mon, 12 Sep 2016, Chris Evans writes: > I am trying to read activity data created by Garmin. It outputs dates like > this: > > "Thu, 25 Aug 2016 6:34 PM" > > The problem that has stumped me is this: > >> strftime("Thu, 25 Aug 2016 6:34 PM",format="%a, %d %b %Y %I:%M

Re: [R] Help with strftime error "character string is not in a standard unambiguous format"

2016-09-12 Thread Chris Evans
. As ever, deeply indebted to the R and R-help communities, Chris > From: "Ismail SEZEN" <sezenism...@gmail.com> > To: "Chris Evans" <chrish...@psyctc.org> > Cc: "r-help" <r-help@r-project.org> > Sent: Monday, 12 September, 2016 10:36:51 &

[R] Help with strftime error "character string is not in a standard unambiguous format"

2016-09-12 Thread Chris Evans
I am trying to read activity data created by Garmin. It outputs dates like this: "Thu, 25 Aug 2016 6:34 PM" The problem that has stumped me is this: > strftime("Thu, 25 Aug 2016 6:34 PM",format="%a, %d %b %Y %I:%M %p") Error in as.POSIXlt.character(x, tz = tz) : character string is not in a