2

new R user here and I stuck on this exercise. So I am trying to get tweets from twitter using the rtweet package and then create a data frame. I have installed the rtweet deleted and re-installed tidyverse. Loaded the it in the library, still I keep getting permission denied. This what my code looks like:





install.packages("rtweet")
library(rtweet)
library(tidyverse)
# Randomly sample (approximately 1%) from the live stream of all tweets 
# for 10 secs
sample <- stream_tweets(
  q = "",
  timeout = 10
)`enter code here`




The result I get looks like this, please what could be the problem?




Warning in install.packages :
  package ‘rtweet’ is in use and will not be installed
> sample <- stream_tweets(
+   q = "",
+   timeout = 10
+ )
Streaming tweets for 10 seconds...
Finished streaming tweets!
Warning message:
In file.remove(file_name) :
  cannot remove file 'stream-20210913123849.json', reason 'Permission denied'




KECHY
  • 23
  • 3

0 Answers0