title: Run R script with Rscript vs spark-submit
body: <p>I don't understand the difference between running a R file using Rscript vs spark-submit.</p>
  
  <p>In the file I pass the options to connnect to the cluster so I don't know what is the adventage of using spark-submit.</p>
  
  <pre><code>sparkR.session(master = "spark://...", appName = "test", sparkConfig = list(spark.driver.memory = "1g", spark.driver.cores = 1L, spark.executor.memory = "2g", spark.cores.max = 2L))
  </code></pre>
  
  <p>What I do in the R program after creating the spark session is querying a parquet file stored in HDFS using SQL.</p>
  
  <p>I tried both ways of running my program  and they do exactly the same thing I think.</p>
  
  <p>Thanks in advance</p>