R connecting R to twitter for sentiment analysis -
i refered link given below doing sentiment analysis http://heuristically.wordpress.com/2011/04/08/text-data-mining-twitter-r/
and when ran code given below :`for (page in c(1:15)){ # search parameter twitter_q <- urlencode('#prolife or #prochoice') twitter_url =
# fetch remote url , parse mydata.xml <- xmlparsedoc(twitter_url, astext=f) # extract titles mydata.vector <- xpathsapply(mydata.xml, '//s:entry/s:title', xmlvalue, namespaces =c('s'='http://www.w3.org/2005/atom')) # aggregate new tweets previous tweets mydata.vectors <- c(mydata.vector, mydata.vectors)
}
after running code prompting me error error:error in usemethod("xpathapply") : no applicable method 'xpathapply' applied object of class "null" i/o warning : failed load http resource
i installed packages roath,stringr,xml,plyr required.and using r ver 3.0.3
kindly me out pleas how go . struggling . great if guides me in right direction.
Comments
Post a Comment