diff options
author | actuaryzhang <actuaryzhang10@gmail.com> | 2017-02-03 18:02:10 -0800 |
---|---|---|
committer | gatorsmile <gatorsmile@gmail.com> | 2017-02-03 18:02:10 -0800 |
commit | 050c20cc9084bd6ef738fd808dad43139250f316 (patch) | |
tree | 3437213d09ff6201a1c38f1e1af4a2487e5478db | |
parent | 48aafeda7db879491ed36fff89d59ca7ec3136fa (diff) | |
download | spark-050c20cc9084bd6ef738fd808dad43139250f316.tar.gz spark-050c20cc9084bd6ef738fd808dad43139250f316.tar.bz2 spark-050c20cc9084bd6ef738fd808dad43139250f316.zip |
[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 <actuaryzhang10@gmail.com>
Closes #16799 from actuaryzhang/sparkRVignettes.
-rw-r--r-- | R/pkg/vignettes/sparkr-vignettes.Rmd | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/R/pkg/vignettes/sparkr-vignettes.Rmd b/R/pkg/vignettes/sparkr-vignettes.Rmd index a7cac2f503..f13e0b3a18 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")) ``` |