Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/17729#discussion_r112822000
--- Diff: R/pkg/R/functions.R ---
@@ -3745,3 +3745,55 @@ setMethod("collect_set",
jc <- callJStatic("org.apache.spark.sql.functions",
"collect_set", x@jc)
column(jc)
})
+
+#' split_string
+#'
+#' Splits string on regular expression.
+#'
+#' @param x Column to compute on
+#' @param pattern Java regular expression
+#'
+#' @rdname split_string
+#' @family string_funcs
+#' @aliases split_string,Column-method
+#' @export
+#' @examples \dontrun{
+#' df <- read.text("README.md")
+#'
+#' head(select(split_string(df$value, "\\s+")))
+#' }
+#' @note split_string 2.3.0
+#' @note equivalent to \code{split} SQL function
--- End diff --
Note is somewhat hard to discover on the generated doc page, if you want
this, you could put it as 2nd content paragraph like below and it will show up
as the details section like here
http://spark.apache.org/docs/latest/api/R/read.jdbc.html
```
#' split_string
#'
#' Splits string on regular expression.
#'
#' This is equivalent to \code{split} SQL function
```
(yes, through the magic of roxygen2)
Also, instead of `\code{split}` you might want to link to Spark Scala doc
too
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]