I am using searchtwitter function in R to extract tweets. I have also used the write.csv function to create a csv that contains a timestamp variable called "created". This is the code I used to extract time from the timestamp variable:
datetime<-strftime(tweets$created, "%Y-%m-%d %H:%M:$S")
time<-strftime(datetime, format="%H:%M:%S")
The csv file also contains a variable called "text" that contains the tweets. How do I extract the hour from the time variable so that I can plot the hourly frequency of tweets? This is what I've tried:
hour=hour(time)
plot(count(hour),xlab="Hour", ylab="No. of Tweets")
and:
plot(count(time),xlab="Hour", ylab="No. of Tweets")
lastly,
plot(time, count(text),xlab="Time", ylab="No. of Tweets")