Skip to content

Commit 528dbc6

Browse files
committed
Add R examples to ML programming guide.
1 parent d9eb4c7 commit 528dbc6

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

docs/ml-classification-regression.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,14 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.classificat
389389

390390
{% include_example python/ml/naive_bayes_example.py %}
391391
</div>
392+
393+
<div data-lang="r" markdown="1">
394+
395+
Refer to the [R API docs](api/R/spark.naiveBayes.html) for more details.
396+
397+
{% include_example naiveBayes r/ml.R %}
398+
</div>
399+
392400
</div>
393401

394402

@@ -566,6 +574,13 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.regression.
566574
{% include_example python/ml/generalized_linear_regression_example.py %}
567575
</div>
568576

577+
<div data-lang="r" markdown="1">
578+
579+
Refer to the [R API docs](api/R/spark.glm.html) for more details.
580+
581+
{% include_example glm r/ml.R %}
582+
</div>
583+
569584
</div>
570585

571586

@@ -755,6 +770,13 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.regression.
755770
{% include_example python/ml/aft_survival_regression.py %}
756771
</div>
757772

773+
<div data-lang="r" markdown="1">
774+
775+
Refer to the [R API docs](api/R/spark.survreg.html) for more details.
776+
777+
{% include_example survreg r/ml.R %}
778+
</div>
779+
758780
</div>
759781

760782

docs/ml-clustering.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ Refer to the [Python API docs](api/python/pyspark.ml.html#pyspark.ml.clustering.
8686

8787
{% include_example python/ml/kmeans_example.py %}
8888
</div>
89+
90+
<div data-lang="r" markdown="1">
91+
92+
Refer to the [R API docs](api/R/spark.kmeans.html) for more details.
93+
94+
{% include_example kmeans r/ml.R %}
95+
</div>
96+
8997
</div>
9098

9199
## Latent Dirichlet allocation (LDA)

0 commit comments

Comments
 (0)