Follow the below steps:
1. Install R studio from here, https://www.rstudio.com/products/rstudio/download/
2. Click next to all and Click install.
![](https://www.edureka.co/community/?qa=blob&qa_blobid=7322776883585202491)
3. Run R Studio.
![](https://www.edureka.co/community/?qa=blob&qa_blobid=15344822168566196370)
4. Now type command and run.
install.packages("Rserve")
5. Type below command and run
library(Rserve)
6. Type below function and run.
Rserve()
![](https://www.edureka.co/community/?qa=blob&qa_blobid=2508451618581140958)
7. Now Go to Tableau and Open Manage External Service Connection.
![](https://www.edureka.co/community/?qa=blob&qa_blobid=14730315200266334202)
8. A window opens, Select Rserve and default port is set as 6311.
![](https://www.edureka.co/community/?qa=blob&qa_blobid=9312585442477215973)
9. To check connection, Click on test connection and click ok.
![](https://www.edureka.co/community/?qa=blob&qa_blobid=12674312570313637345)
10. Now tableau can use R to perform operations.
Hope it helps!