简体   繁体   中英

Hourly Time Series in R, conversione

this should look like a dumb question but: I am trying to plot a time series of tweets by hourly basis. My time cell looks something like:

Thu Dec 05 13:27:46 +0000 2013

I can't figure out the way of converting it in a numerical value so to plot the convient frequency value of the tweets, by hour.

I used: as.POSIXct and as.date but always returning NA

What's wrong in something like:

test <- as.Date('Thu Dec 05 13:27:16 +0000 2013', "%a %b %d %H:%M:%S %z %Y")

?

Thanks to everyone :)

Vincenzo

strptime('Thu Dec 05 13:27:16 +0000 2013', "%a %b %d %H:%M:%S %z %Y")

perhapse a little late, but I had exactly the same problem. Try:

Sys.setlocale("LC_TIME", "English")

and then re-run your code.

Best Simon

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM