Skip to content

Commit

Permalink
Moved setGeneric and other comments applied
Browse files Browse the repository at this point in the history
  • Loading branch information
falaki committed Jul 30, 2015
1 parent d9307f8 commit c1b88bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
27 changes: 11 additions & 16 deletions R/pkg/R/DataFrame.R
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ setMethod("ncol",
length(columns(x))
})

#' Returns the dimentions (number for rows and columns) of a DataFrame
#' Returns the dimentions (number of rows and columns) of a DataFrame
#' @param x a SparkSQL DataFrame
#'
#' @rdname dim
Expand Down Expand Up @@ -1296,23 +1296,18 @@ setMethod("unionAll",
dataFrame(unioned)
})

setGeneric("rbind", signature = "...")

rbind.SparkDataFrames <- function(x, ..., deparse.level = 1) {
allargs <- list(...)
if (nargs() == 3) {
unionAll(x, ...)
} else {
unionAll(x, Recall(..., deparse.level = 1))
}
}

#' @rdname rbind
#' @aliases unionAll
setMethod("rbind",
signature(... = "DataFrame"),
rbind.SparkDataFrames
)
setMethod("rbind",
signature(... = "DataFrame"),
function(x, ..., deparse.level = 1) {
allargs <- list(...)
if (nargs() == 3) {
unionAll(x, ...)
} else {
unionAll(x, Recall(..., deparse.level = 1))
}
})

#' Intersect
#'
Expand Down
4 changes: 4 additions & 0 deletions R/pkg/R/generics.R
Original file line number Diff line number Diff line change
Expand Up @@ -669,3 +669,7 @@ setGeneric("upper", function(x) { standardGeneric("upper") })
#' @rdname glm
#' @export
setGeneric("glm")

#' @rdname rbind
#' @export
setGeneric("rbind", signature = "...")

0 comments on commit c1b88bd

Please sign in to comment.