简体   繁体   中英

How to connect R Studio to Tableau?

I'm trying to connect R Studio to Tableau Desktop to do some data analysis work, but an error has occurred during connection saying: localhost:6311: Connection refused

I'm using MacOS version 10.13.6

Coding on R:

install.packages("Rserve")
library(Rserve)
Rserve()

Try adding the following parameter to your Rserve() line which will hard-code the port:

Rserve(port = 6311)

If that doesn't work, it is worth troubleshooting the port with the following command in terminal (telnet might need to be installed as it is not installed by default):

telnet localhost 6311

the return from the telnet command should be

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Rsrv0103QAP1

More information on the above here

If the command returns a failure, the problem is certainly outside of Tableau.

Some thoughts from there would be to edit the R config file to explicitly accept remote connections.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM