Description Usage Arguments Author(s) Examples
Converts from Twitter date format to R date format
| 1 | formatTwDate(datestring, format = "datetime")
 | 
| datestring | Date string in Twitter format | 
| output | Either "date", for Date format; or "datetime" for POSIX. | 
Pablo Barbera pablo.barbera@nyu.edu
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run: 
## connect to the Mongo database
 mongo <- mongo.create("SMAPP_HOST:PORT", db="DATABASE")
 mongo.authenticate(mongo, username="USERNAME", password="PASSWORD", db="DATABASE")
 set <- "DATABASE.COLLECTION"
## extract all tweets that mention 'occupygezi' and do a quick plot
 tweets <- extract.tweets(set, string="occupygezi", fields="created_at")
## convert dates to R format
 dates <- formatTwDate(tweets$created_at, format="date")
## see number of tweets per day
 table(dates)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.