Try this:
Lines <- "Sun, 14 Jun 2009 07:33:00 -0700 Sun, 14 Jun 2009 08:35:10 -0700 Sun, 14 Jun 2009 21:26:34 -0700 Mon, 15 Jun 2009 19:47:47 -0700 Wed, 17 Jun 2009 21:50:41 -0700" # L <- readLines("myfile.txt") L <- readLines(textConnection(Lines)) tt <- as.POSIXct(L, format = "%a, %d %b %Y %H:%M:%S") On Fri, Jun 19, 2009 at 6:06 PM, Thomas Levine<thomas.lev...@gmail.com> wrote: > I am analysing occurrences of a phenomenon by time, and each of these > timestamps taken from email headers represents one occurrence. (The last > number is the time zone.) I can easily change the format. > > Sun, 14 Jun 2009 07:33:00 -0700 > Sun, 14 Jun 2009 08:35:10 -0700 > Sun, 14 Jun 2009 21:26:34 -0700 > Mon, 15 Jun 2009 19:47:47 -0700 > Wed, 17 Jun 2009 21:50:41 -0700 > > I've found documentation for a plethora of ways of importing time data, but > I can't decide how to approach it. Any ideas on what may be the cleanest > way? The only special concern is that I'll want to plot these data by date > and time, meaning that I would rather not bin all of the occurrences from > one day. > > The time zone isn't important as these are all local times; the time zone > only changes as a function of daylight savings time, so I probably shouldn't > use it at all. > > Tom > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.