Skip to content

Commit

Permalink
Added summary as an alias for describe for DataFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
falaki committed Jul 30, 2015
1 parent 1abf7dc commit 632693d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions R/pkg/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ exportMethods("arrange",
"show",
"showDF",
"summarize",
"summary",
"take",
"unionAll",
"unpersist",
Expand Down
9 changes: 9 additions & 0 deletions R/pkg/R/DataFrame.R
Original file line number Diff line number Diff line change
Expand Up @@ -1430,6 +1430,15 @@ setMethod("describe",
dataFrame(sdf)
})

#' @rdname summary.DataFrame
#' @aliases describe
setMethod("summary",
signature(x = "DataFrame"),
function(x) {
describe(x)
})


#' dropna
#'
#' Returns a new DataFrame omitting rows with null values.
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 @@ -531,6 +531,10 @@ setGeneric("showDF", function(x,...) { standardGeneric("showDF") })
#' @export
setGeneric("summarize", function(x,...) { standardGeneric("summarize") })

#' rdname summary
#' @export
setGeneric("summary", function(x, ...) { standardGeneric("summary") })

# @rdname tojson
# @export
setGeneric("toJSON", function(x) { standardGeneric("toJSON") })
Expand Down

0 comments on commit 632693d

Please sign in to comment.