Skip to content
Prev 326518 / 398502 Next

"error setting certificate" issue in R-studio

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 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
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.
??? {
????? 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