Skip to content

Commit

Permalink
Rename ignoreNAs to na.rm
Browse files Browse the repository at this point in the history
  • Loading branch information
yanboliang committed Feb 22, 2016
1 parent a30bd4a commit 6e78f7c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions R/pkg/R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,8 @@ setMethod("factorial",
#'
#' Aggregate function: returns the first value in a group.
#'
#' The function by default returns the first values it sees. It will return the first non-NA
#' value it sees when ignoreNAs is set to true. If all values are NA, then NA is returned.
#' The function by default returns the first values it sees. It will return the first non-missing
#' value it sees when na.rm is set to true. If all values are missing, then NA is returned.
#'
#' @rdname first
#' @name first
Expand All @@ -550,13 +550,13 @@ setMethod("factorial",
#' }
setMethod("first",
signature(x = "characterOrColumn"),
function(x, ignoreNAs = FALSE) {
function(x, na.rm = FALSE) {
col <- if (class(x) == "Column") {
x@jc
} else {
x
}
jc <- callJStatic("org.apache.spark.sql.functions", "first", col, ignoreNAs)
jc <- callJStatic("org.apache.spark.sql.functions", "first", col, na.rm)
column(jc)
})

Expand Down Expand Up @@ -675,8 +675,8 @@ setMethod("kurtosis",
#'
#' Aggregate function: returns the last value in a group.
#'
#' The function by default returns the last values it sees. It will return the last non-NA
#' value it sees when ignoreNAs is set to true. If all values are NA, then NA is returned.
#' The function by default returns the last values it sees. It will return the last non-missing
#' value it sees when na.rm is set to true. If all values are missing, then NA is returned.
#'
#' @rdname last
#' @name last
Expand All @@ -689,13 +689,13 @@ setMethod("kurtosis",
#' }
setMethod("last",
signature(x = "characterOrColumn"),
function(x, ignoreNAs = FALSE) {
function(x, na.rm = FALSE) {
col <- if (class(x) == "Column") {
x@jc
} else {
x
}
jc <- callJStatic("org.apache.spark.sql.functions", "last", col, ignoreNAs)
jc <- callJStatic("org.apache.spark.sql.functions", "last", col, na.rm)
column(jc)
})

Expand Down

0 comments on commit 6e78f7c

Please sign in to comment.