Repository: spark Updated Branches: refs/heads/master 922338812 -> 6fcee906d
[SPARK-10760] [SPARKR] SparkR glm: the documentation in examples - family argument is missing Hi everyone, Since the family argument is required for the glm function, the execution of: model <- glm(Sepal_Length ~ Sepal_Width, df) is failing. I've fixed the documentation by adding the family argument and also added the summay(model) which will show the coefficients for the model. Thanks, Narine Author: Narine Kokhlikyan <narine.kokhlik...@gmail.com> Closes #8870 from NarineK/sparkrml. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/6fcee906 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/6fcee906 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/6fcee906 Branch: refs/heads/master Commit: 6fcee906d2afb5d5c3c49e0a669637a87e82b910 Parents: 9223388 Author: Narine Kokhlikyan <narine.kokhlik...@gmail.com> Authored: Fri Sep 25 11:55:08 2015 -0700 Committer: Shivaram Venkataraman <shiva...@cs.berkeley.edu> Committed: Fri Sep 25 11:55:08 2015 -0700 ---------------------------------------------------------------------- R/pkg/R/mllib.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/6fcee906/R/pkg/R/mllib.R ---------------------------------------------------------------------- diff --git a/R/pkg/R/mllib.R b/R/pkg/R/mllib.R index 474ada5..cd00bbb 100644 --- a/R/pkg/R/mllib.R +++ b/R/pkg/R/mllib.R @@ -41,7 +41,8 @@ setClass("PipelineModel", representation(model = "jobj")) #' sqlContext <- sparkRSQL.init(sc) #' data(iris) #' df <- createDataFrame(sqlContext, iris) -#' model <- glm(Sepal_Length ~ Sepal_Width, df) +#' model <- glm(Sepal_Length ~ Sepal_Width, df, family="gaussian") +#' summary(model) #'} setMethod("glm", signature(formula = "formula", family = "ANY", data = "DataFrame"), function(formula, family = c("gaussian", "binomial"), data, lambda = 0, alpha = 0) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org