7 Replies Latest reply on Jul 31, 2018 12:19 PM by Jacob DeJong

    Issues with R

    Sam Waters

      I am having a hard time connecting R to Tableau using RServe. I've installed and loaded the RServe package and have my settings correct within Tableau (local host 6311). However, I've written a new calculated field using SCRIPT_REAL and I get the following error when I try to use it:

       

      "An error occurred while communicating with the Rserve service. Tableau is unable to connect to the service. Verify that the service is running and that you have access privileges."

       

      The detail also states:

       

      "An error has occurred during connection to localhost:6311. No connection could be made because the target machine actively refused it."

       

      Is this an issue with my calculated field? Or is this some other issue? I'm not sure why the connection would be refused...

       

      Here is my calculated field as reference (I was using the Sample - Superstore data set to test):

       

      Script_real("

      Sales <- .arg1;

      Profit <- .arg2;

      Discount <- .arg3;

      Shipping Cost <- .arg4;

       

      fit <- lm(Sales ~ Profit + Discount + Shipping Cost)

       

      fit$fitted

      "

      ,

      Sum([Sales]),

      Sum([Profit]),

      Sum([Discount]),

      Sum([Shipping Cost])

      )

       

      Thank you to anyone who can help me!