Q:

Error while retrieving data from Twitter using twitteR library in R

I am getting below error while retrieving data from twitter from R using library twitteR. Any help will be greatly appreciated. 
"Error in check_twitter_oauth() : OAuth authentication error:
This most likely means that you have incorrectly called setup_twitter_oauth()'"
library(twitteR)

library(ROAuth)

`options(httr_oauth_cache=T)` 

consumer_key <- '*************************'
consumer_secret <- '**************************************************'
access_token <- '**************************************************'
access_secret <- '*********************************************'
setup_twitter_oauth(consumer_key, consumer_secret, access_token, 
access_secret)

A:

Instead of giving those keys in separately, try this:
setup_twitter_oauth("your_consumer_key","your_consumer_secret",access_token = "your_access_token",access_secret ="your_access_secret")

