Browse files

Update summarise.r

I believe the current description is somewhat misleading: summarise does not work like transform, more like mutate, when it comes to overwriting existing columns. A note should warn of potentially unexpected side-effects.
  • Loading branch information...
1 parent 4053c42 commit b048fff56b5808f04daf4201f353b50d1d042ed6 @baptiste baptiste committed Feb 6, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 R/summarise.r
@@ -1,6 +1,6 @@
#' Summarise a data frame.
-#' Summarise works in an analogous way to \code{\link{transform}}, except
+#' Summarise works in an analogous way to \code{\link{mutate}}, except
#' instead of adding columns to an existing data frame, it creates a new
#' data frame. This is particularly useful in conjunction with
#' \code{\link{ddply}} as it makes it easy to perform group-wise summaries.
@@ -10,6 +10,7 @@
#' @keywords manip
#' @aliases summarise summarize
#' @export summarise summarize
+#' @note Be careful when using existing variable names; the corresponding columns will be immediately updated with the new data and this can affect subsequent operations referring to those variables.
#' @examples
#' # Let's extract the number of teams and total period of time
#' # covered by the baseball dataframe

0 comments on commit b048fff

Please sign in to comment.