You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by li...@apache.org on 2017/02/04 02:02:20 UTC
spark git commit: [SPARK-19386][SPARKR][FOLLOWUP] fix error in
vignettes
Repository: spark
Updated Branches:
refs/heads/master 48aafeda7 -> 050c20cc9
[SPARK-19386][SPARKR][FOLLOWUP] fix error in vignettes
## What changes were proposed in this pull request?
Current version has error in vignettes:
```
model <- spark.bisectingKmeans(df, Sepal_Length ~ Sepal_Width, k = 4)
summary(kmeansModel)
```
`kmeansModel` does not exist...
felixcheung wangmiao1981
Author: actuaryzhang <ac...@gmail.com>
Closes #16799 from actuaryzhang/sparkRVignettes.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/050c20cc
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/050c20cc
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/050c20cc
Branch: refs/heads/master
Commit: 050c20cc9084bd6ef738fd808dad43139250f316
Parents: 48aafed
Author: actuaryzhang <ac...@gmail.com>
Authored: Fri Feb 3 18:02:10 2017 -0800
Committer: gatorsmile <ga...@gmail.com>
Committed: Fri Feb 3 18:02:10 2017 -0800
----------------------------------------------------------------------
R/pkg/vignettes/sparkr-vignettes.Rmd | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/050c20cc/R/pkg/vignettes/sparkr-vignettes.Rmd
----------------------------------------------------------------------
diff --git a/R/pkg/vignettes/sparkr-vignettes.Rmd b/R/pkg/vignettes/sparkr-vignettes.Rmd
index a7cac2f..f13e0b3 100644
--- a/R/pkg/vignettes/sparkr-vignettes.Rmd
+++ b/R/pkg/vignettes/sparkr-vignettes.Rmd
@@ -744,10 +744,10 @@ predictions <- predict(rfModel, df)
`spark.bisectingKmeans` is a kind of [hierarchical clustering](https://en.wikipedia.org/wiki/Hierarchical_clustering) using a divisive (or "top-down") approach: all observations start in one cluster, and splits are performed recursively as one moves down the hierarchy.
-```{r}
+```{r, warning=FALSE}
df <- createDataFrame(iris)
model <- spark.bisectingKmeans(df, Sepal_Length ~ Sepal_Width, k = 4)
-summary(kmeansModel)
+summary(model)
fitted <- predict(model, df)
head(select(fitted, "Sepal_Length", "prediction"))
```
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org