Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/21482#discussion_r192551752
--- Diff: R/pkg/R/functions.R ---
@@ -907,6 +907,30 @@ setMethod("initcap",
column(jc)
})
+#' @details
+#' \code{isinf}: Returns true if the column is Infinity.
+#' @rdname column_nonaggregate_functions
+#' @aliases isnan isnan,Column-method
+#' @note isinf since 2.4.0
+setMethod("isinf",
+ signature(x = "Column"),
+ function(x) {
+ jc <- callJStatic("org.apache.spark.sql.functions", "isinf",
x@jc)
+ column(jc)
+ })
+
+#' @details
+#' \code{isInf}: Returns true if the column is Infinity.
+#' @rdname column_nonaggregate_functions
+#' @aliases isnan isnan,Column-method
+#' @note isinf since 2.4.0
+setMethod("isInf",
--- End diff --
I like the idea, but we might not have a way to extend it (sort of)
```
> showMethods("is.finite")
Function: is.finite (package base)
> is.finite
function (x) .Primitive("is.finite")
```
It looks like S3 without a generic.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]