dongjoon-hyun commented on a change in pull request #29905:
URL: https://github.com/apache/spark/pull/29905#discussion_r498582542
##########
File path: R/pkg/R/functions.R
##########
@@ -3298,6 +3298,42 @@ setMethod("lead",
column(jc)
})
+#' @details
+#' \code{nth_value}: Window function: returns the value that is the
\code{offset}th
+#' row of the window frame# (counting from 1), and \code{null} if the size of
window
+#' frame is less than \code{offset} rows.
+#'
+#' @param offset a numeric indicating number of row to use as the value
+#' @param na.rm a logical which indicates that the Nth value should skip null
in the
+#' determination of which row to use
+#'
+#' @rdname column_window_functions
+#' @aliases nth_value nth_value,characterOrColumn-method
+#' @examples
+#' \dontrun{
+#' nth_value(df$mpg, 3)
+#' nth_value(df$mpg, 3, TRUE)
+#' }
Review comment:
Shall we remove this examples because this is insufficient in any way?
And, for me, it seems that all the other `column_window_functions` around here
also doesn't provide example because it's difficult to give a reproducible
short example here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]