6 Replies Latest reply on May 15, 2017 1:55 PM by Bora Beran

    sentiment analysis with R

    mark schukas

      I'm trying to follow Bora's post (I'm using 9.3)

      Sentiment analysis in Tableau with R « Bora Beran

       

      -I successfully tested  "Manage a R Connection"

      -I opened R and ran the following:

      install.packages("Rserve")

      library(Rserve)

      Rserve()

      library(tm)

      install.packages("Rstem_0.4-1.tar.gz", repos=NULL, type="source")

      download.file("http://cran.r-project.org/src/contrib/Archive/sentiment/sentiment_0.2.tar.gz", "sentiment.tar.gz")     

      install.packages("sentiment.tar.gz", repos=NULL, type="source")

      library(sentiment)

      -I created the following calc. expression

      SCRIPT_STR('classify_polarity(.arg1,algorithm="bayes",verbose=TRUE)[,4]', ATTR([Answer]))

       

      -I get the following error:

      • Error in eval(expr, envir, enclos) :
          could not find function "classify_polarity"

       

       

                classify_polarity(documents,algorithm="bayes",verbose=TRUE)          #in R I successfully ran

       

      ???

       

      thank you.                                          ^