@@ -2146,47 +2146,47 @@ setMethod("ifelse",
21462146
21472147# ##################### Window functions######################
21482148
2149- # ' cumeDist
2149+ # ' cume_dist
21502150# '
21512151# ' Window function: returns the cumulative distribution of values within a window partition,
21522152# ' i.e. the fraction of rows that are below the current row.
21532153# '
21542154# ' N = total number of rows in the partition
2155- # ' cumeDist (x) = number of values before (and including) x / N
2155+ # ' cume_dist (x) = number of values before (and including) x / N
21562156# '
21572157# ' This is equivalent to the CUME_DIST function in SQL.
21582158# '
2159- # ' @rdname cumeDist
2160- # ' @name cumeDist
2159+ # ' @rdname cume_dist
2160+ # ' @name cume_dist
21612161# ' @family window_funcs
21622162# ' @export
2163- # ' @examples \dontrun{cumeDist ()}
2164- setMethod ("cumeDist ",
2163+ # ' @examples \dontrun{cume_dist ()}
2164+ setMethod ("cume_dist ",
21652165 signature(x = " missing" ),
21662166 function () {
2167- jc <- callJStatic(" org.apache.spark.sql.functions" , " cumeDist " )
2167+ jc <- callJStatic(" org.apache.spark.sql.functions" , " cume_dist " )
21682168 column(jc )
21692169 })
21702170
2171- # ' denseRank
2171+ # ' dense_rank
21722172# '
21732173# ' Window function: returns the rank of rows within a window partition, without any gaps.
2174- # ' The difference between rank and denseRank is that denseRank leaves no gaps in ranking
2175- # ' sequence when there are ties. That is, if you were ranking a competition using denseRank
2174+ # ' The difference between rank and dense_rank is that dense_rank leaves no gaps in ranking
2175+ # ' sequence when there are ties. That is, if you were ranking a competition using dense_rank
21762176# ' and had three people tie for second place, you would say that all three were in second
21772177# ' place and that the next person came in third.
21782178# '
21792179# ' This is equivalent to the DENSE_RANK function in SQL.
21802180# '
2181- # ' @rdname denseRank
2182- # ' @name denseRank
2181+ # ' @rdname dense_rank
2182+ # ' @name dense_rank
21832183# ' @family window_funcs
21842184# ' @export
2185- # ' @examples \dontrun{denseRank ()}
2186- setMethod ("denseRank ",
2185+ # ' @examples \dontrun{dense_rank ()}
2186+ setMethod ("dense_rank ",
21872187 signature(x = " missing" ),
21882188 function () {
2189- jc <- callJStatic(" org.apache.spark.sql.functions" , " denseRank " )
2189+ jc <- callJStatic(" org.apache.spark.sql.functions" , " dense_rank " )
21902190 column(jc )
21912191 })
21922192
@@ -2264,7 +2264,7 @@ setMethod("ntile",
22642264 column(jc )
22652265 })
22662266
2267- # ' percentRank
2267+ # ' percent_rank
22682268# '
22692269# ' Window function: returns the relative rank (i.e. percentile) of rows within a window partition.
22702270# '
@@ -2274,15 +2274,15 @@ setMethod("ntile",
22742274# '
22752275# ' This is equivalent to the PERCENT_RANK function in SQL.
22762276# '
2277- # ' @rdname percentRank
2278- # ' @name percentRank
2277+ # ' @rdname percent_rank
2278+ # ' @name percent_rank
22792279# ' @family window_funcs
22802280# ' @export
2281- # ' @examples \dontrun{percentRank ()}
2282- setMethod ("percentRank ",
2281+ # ' @examples \dontrun{percent_rank ()}
2282+ setMethod ("percent_rank ",
22832283 signature(x = " missing" ),
22842284 function () {
2285- jc <- callJStatic(" org.apache.spark.sql.functions" , " percentRank " )
2285+ jc <- callJStatic(" org.apache.spark.sql.functions" , " percent_rank " )
22862286 column(jc )
22872287 })
22882288
@@ -2316,21 +2316,21 @@ setMethod("rank",
23162316 base :: rank(x , ... )
23172317 })
23182318
2319- # ' rowNumber
2319+ # ' row_number
23202320# '
23212321# ' Window function: returns a sequential number starting at 1 within a window partition.
23222322# '
23232323# ' This is equivalent to the ROW_NUMBER function in SQL.
23242324# '
2325- # ' @rdname rowNumber
2326- # ' @name rowNumber
2325+ # ' @rdname row_number
2326+ # ' @name row_number
23272327# ' @family window_funcs
23282328# ' @export
2329- # ' @examples \dontrun{rowNumber ()}
2330- setMethod ("rowNumber ",
2329+ # ' @examples \dontrun{row_number ()}
2330+ setMethod ("row_number ",
23312331 signature(x = " missing" ),
23322332 function () {
2333- jc <- callJStatic(" org.apache.spark.sql.functions" , " rowNumber " )
2333+ jc <- callJStatic(" org.apache.spark.sql.functions" , " row_number " )
23342334 column(jc )
23352335 })
23362336
0 commit comments