Using R in Tableau

Requirements: Tableau Professional Edition R Studio or R Console Setting Up Tableau Desktop with R: Install following packages in R: install.packages(RServe) Once it is installed then start R Server by entering following command in the console: > library(RServe) > RServe() Configuring Rserve Connection: In Tableau go to following menu setting: Help -> Settings and Performance …

Clustering in R

help(kmeans) set.seed(1) x=matrix(rnorm(50*2), ncol=2) plot(x) x[1:25,1]=x[1:25,1]+3 x[1:25,2]=x[1:25,2]-4 plot(x) km.out=kmeans(x,2,nstart=20) km.out K-means clustering with 2 clusters of sizes 25, 25 Cluster means: [,1] [,2] 1 0.03223135 0.06924384 2 3.16866521 -3.83459093 Clustering vector: [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 …