Carlos Guadián
Carlos Guadián

Reputation: 11

Error searching words with Ñ using twitterR in RStudio

After the last update of R (v. 3.0.0) I can't search keywords with Ñ, like España, using twitteR.

I suppose is a encoding problem but I can't find a solution. When I search for other words it works fine.

My search line is:

tweetList <- searchTwitter('españa', n=15, lang="es")

And I get the following:

[1] "Unauthorized"
Error en twInterfaceObj$doAPICall(cmd, params, "GET", ...) : 
  Error: Unauthorized

My sessionInfo() is:

R version 3.0.0 (2013-04-03)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] es_ES.UTF-8/es_ES.UTF-8/es_ES.UTF-8/C/es_ES.UTF-8/es_ES.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] twitteR_1.1.6  rjson_0.2.12   ROAuth_0.9.3   digest_0.6.3   RJSONIO_1.0-3  RCurl_1.95-4.1
[7] bitops_1.0-5  

loaded via a namespace (and not attached):
[1] tools_3.0.0

I've been updated the packages as you can see. I'm loaded correctly the credentials to use twitter api version 1.1, and I can make other searches without problems.

Upvotes: 1

Views: 270

Answers (1)

Seohyun Choi
Seohyun Choi

Reputation: 46

I know this question was asked 3 months ago, but I hope it can help someone who wants solution about this error like me.

After authorizing, I still have problems with the package twitteR. I don't know even if I got authorized actually. I had an error like you when I used searchTwitter(). I just found out how to run it successfully. Try it.

tweetList <- searchTwitter('españa', n=15, lang="es", cainfo="cacert.pem")

Upvotes: 3

Related Questions