You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sh...@apache.org on 2015/11/18 07:13:20 UTC

spark git commit: [SPARK-11755][R] SparkR should export "predict"

Repository: spark
Updated Branches:
  refs/heads/master 91f4b6f2d -> 8fb775ba8


[SPARK-11755][R] SparkR should export "predict"

The bug described at [SPARK-11755](https://issues.apache.org/jira/browse/SPARK-11755), after exporting ```predict``` we can both get the help information from the SparkR and base R package like the following:
```Java
> help(predict)
Help on topic ‘predict’ was found in the following packages:

  Package               Library
  SparkR                /Users/yanboliang/data/trunk2/spark/R/lib
  stats                 /Library/Frameworks/R.framework/Versions/3.2/Resources/library

Choose one

1: Make predictions from a model {SparkR}
2: Model Predictions {stats}
```

Author: Yanbo Liang <yb...@gmail.com>

Closes #9732 from yanboliang/spark-11755.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/8fb775ba
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/8fb775ba
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/8fb775ba

Branch: refs/heads/master
Commit: 8fb775ba874dd0488667bf299a7b49760062dc00
Parents: 91f4b6f
Author: Yanbo Liang <yb...@gmail.com>
Authored: Tue Nov 17 22:13:15 2015 -0800
Committer: Shivaram Venkataraman <sh...@cs.berkeley.edu>
Committed: Tue Nov 17 22:13:15 2015 -0800

----------------------------------------------------------------------
 R/pkg/R/generics.R | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/8fb775ba/R/pkg/R/generics.R
----------------------------------------------------------------------
diff --git a/R/pkg/R/generics.R b/R/pkg/R/generics.R
index 612e639..afdeffc 100644
--- a/R/pkg/R/generics.R
+++ b/R/pkg/R/generics.R
@@ -1054,6 +1054,10 @@ setGeneric("year", function(x) { standardGeneric("year") })
 #' @export
 setGeneric("glm")
 
+#' @rdname predict
+#' @export
+setGeneric("predict", function(object, ...) { standardGeneric("predict") })
+
 #' @rdname rbind
 #' @export
 setGeneric("rbind", signature = "...")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org