Hi all,
I'm a newbie to R and I can't figure out how to fix this error I keep
getting in R-studio:
> "error setting certificate verify locations:\n CAfile: \n CApath:
none\n"
Error in twInterfaceObj$doAPICall(cmd,params,"GET",...) :
Error: error setting certificate verify locations:
CAfile:
CApath: none
I'm trying to use the twitteR package to gather tweets from the below
function. It was working fine before, but I can't find a way to fix
the certificate issue.I tried using >download.file(url="curl.haxx.se/ca/cacert.pem",
destfile="cacert.pem") with>credential$handshake(cainfo =
system.file("CurlSSL", "cacert.pem", package =
"RCurl")) I saw
recommended on Stack Overflow but it didn't fix the issue.
>TweetFrame <- function(searchTerm, maxTweets)?
??? {
????? twtList<-searchTwitter(searchTerm,n=maxTweets)
????? #twtList is involved in ?variable? scoping so it only exists within the?
??????? function?
????? # searchTerm needs to be a string so use "#hashtag"
?
????? twtTempFrame<- do.call("rbind",
lapply(twtList,as.data.frame))
????? # as.data.frame() coerces each list element into a row
????? # lapply() applies this to all of the elements in twtList
????? # rbind() takes all the rows and puts them together
????? # do.call() gives rbind() all the rows as individual elements
?
????? return(twtTempFrame[order(as.integer(twtTempFrame$created)), ])
?
??? }
Thanks in advance for any help!
M