Learn R Programming

twitteR (version 0.99.19)

getTrends: Functions to view Twitter trends

Description

These functions will allow you to interact with the trend portion of the Twitter API

Usage

getTrends(period = c("daily", "weekly"), exclude = NULL, date = NULL)

Arguments

period
One ofdaily, or weekly, to describe the time period to acquire data for
exclude
If set to hashtags, will exclude hashtags
date
For periods daily and weekly, the date to use as a starting point, in the format YYYY-MM-DD. Note that going back too far (roughly 10-14 days) will result in an empty result

Value

Details

The daily period will return the top 20 trending topics per hour for the given date

The weekly period will return the top 30 trending topics for each day of the week starting with date

See Also

trend

Examples

Run this code
t1 <- getTrends()
   t2 <- getTrends('weekly', as.character(Sys.Date()-1))

Run the code above in your browser using DataLab