aboutsummaryrefslogtreecommitdiff
path: root/docs/quick-start.md
diff options
context:
space:
mode:
authorDavies Liu <davies@databricks.com>2015-05-23 00:00:30 -0700
committerShivaram Venkataraman <shivaram@cs.berkeley.edu>2015-05-23 00:01:40 -0700
commit7af3818c6b2bf35bfa531ab7cc3a4a714385015e (patch)
treee7dcb33da71845eaed6808045725882d6ba07796 /docs/quick-start.md
parent4583cf4be17155c68178155acf6866d7cc8f7df0 (diff)
downloadspark-7af3818c6b2bf35bfa531ab7cc3a4a714385015e.tar.gz
spark-7af3818c6b2bf35bfa531ab7cc3a4a714385015e.tar.bz2
spark-7af3818c6b2bf35bfa531ab7cc3a4a714385015e.zip
[SPARK-6806] [SPARKR] [DOCS] Fill in SparkR examples in programming guide
sqlCtx -> sqlContext You can check the docs by: ``` $ cd docs $ SKIP_SCALADOC=1 jekyll serve ``` cc shivaram Author: Davies Liu <davies@databricks.com> Closes #5442 from davies/r_docs and squashes the following commits: 7a12ec6 [Davies Liu] remove rdd in R docs 8496b26 [Davies Liu] remove the docs related to RDD e23b9d6 [Davies Liu] delete R docs for RDD API 222e4ff [Davies Liu] Merge branch 'master' into r_docs 89684ce [Davies Liu] Merge branch 'r_docs' of github.com:davies/spark into r_docs f0a10e1 [Davies Liu] address comments from @shivaram f61de71 [Davies Liu] Update pairRDD.R 3ef7cf3 [Davies Liu] use + instead of function(a,b) a+b 2f10a77 [Davies Liu] address comments from @cafreeman 9c2a062 [Davies Liu] mention R api together with Python API 23f751a [Davies Liu] Fill in SparkR examples in programming guide
Diffstat (limited to 'docs/quick-start.md')
-rw-r--r--docs/quick-start.md18
1 files changed, 11 insertions, 7 deletions
diff --git a/docs/quick-start.md b/docs/quick-start.md
index 81143da865..bb39e4111f 100644
--- a/docs/quick-start.md
+++ b/docs/quick-start.md
@@ -184,10 +184,10 @@ scala> linesWithSpark.cache()
res7: spark.RDD[String] = spark.FilteredRDD@17e51082
scala> linesWithSpark.count()
-res8: Long = 15
+res8: Long = 19
scala> linesWithSpark.count()
-res9: Long = 15
+res9: Long = 19
{% endhighlight %}
It may seem silly to use Spark to explore and cache a 100-line text file. The interesting part is
@@ -202,10 +202,10 @@ a cluster, as described in the [programming guide](programming-guide.html#initia
>>> linesWithSpark.cache()
>>> linesWithSpark.count()
-15
+19
>>> linesWithSpark.count()
-15
+19
{% endhighlight %}
It may seem silly to use Spark to explore and cache a 100-line text file. The interesting part is
@@ -423,14 +423,14 @@ dependencies to `spark-submit` through its `--py-files` argument by packaging th
We can run this application using the `bin/spark-submit` script:
-{% highlight python %}
+{% highlight bash %}
# Use spark-submit to run your application
$ YOUR_SPARK_HOME/bin/spark-submit \
--master local[4] \
SimpleApp.py
...
Lines with a: 46, Lines with b: 23
-{% endhighlight python %}
+{% endhighlight %}
</div>
</div>
@@ -444,7 +444,8 @@ Congratulations on running your first Spark application!
* Finally, Spark includes several samples in the `examples` directory
([Scala]({{site.SPARK_GITHUB_URL}}/tree/master/examples/src/main/scala/org/apache/spark/examples),
[Java]({{site.SPARK_GITHUB_URL}}/tree/master/examples/src/main/java/org/apache/spark/examples),
- [Python]({{site.SPARK_GITHUB_URL}}/tree/master/examples/src/main/python)).
+ [Python]({{site.SPARK_GITHUB_URL}}/tree/master/examples/src/main/python),
+ [R]({{site.SPARK_GITHUB_URL}}/tree/master/examples/src/main/r)).
You can run them as follows:
{% highlight bash %}
@@ -453,4 +454,7 @@ You can run them as follows:
# For Python examples, use spark-submit directly:
./bin/spark-submit examples/src/main/python/pi.py
+
+# For R examples, use spark-submit directly:
+./bin/spark-submit examples/src/main/r/dataframe.R
{% endhighlight %}