title: How to connect remote Spark cluster from Local Windows Rstudio
body: <p>I have Spark cluster in my <strong>remote centos nodes</strong> and i want to connect that <strong>remote Spark cluster from my local windows R studio</strong>  (I am using <strong>Rstudio Desktop</strong> in my local windows)</p>
  
  <pre><code>  if (nchar(Sys.getenv("SPARK_HOME")) &lt; 1) {
    Sys.setenv(SPARK_HOME = "/home/remoteclusterpath/spark-1.6.0-bin-hadoop2.6")
    .libPaths(c(file.path(Sys.getenv("SPARK_HOME"), "R", "lib"), .libPaths()))
  }
  library(SparkR, lib.loc = "/home/remoteclusterpath/spark-1.6.0-bin-hadoop2.6/R/lib")
  
  sc &lt;- sparkR.init(master = "spark://&lt;IP-Address&gt;:7077", sparkEnvir = list(spark.driver.memory="2g"))
  </code></pre>
  
  <p>I am getting this below error</p>
  
  <pre><code>Error in library(SparkR) : there is no package called ‘SparkR’
  </code></pre>
  
  <p>please anyone provide me the solution thanks in advance </p>