Skip to content

Commit 1cdf233

Browse files
committed
Clarify role of fun.data. Closes #929
1 parent d751281 commit 1cdf233

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

R/stat-summary.r

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#' Summarise y values at every unique x.
22
#'
33
#' \code{stat_summary} allows for tremendous flexibilty in the specification
4-
#' of summary functions. The summary function can either operate on a data
5-
#' frame (with argument name \code{fun.data}) or on a vector (\code{fun.y},
6-
#' \code{fun.ymax}, \code{fun.ymin}).
4+
#' of summary functions. The summary function can either supply individual
5+
#' summary functions for each of y, ymin and ymax (with \code{fun.y},
6+
#' \code{fun.ymax}, \code{fun.ymin}), or return a data frame containing any
7+
#' number of aesthetiics with with \code{fun.data}. All summary functions
8+
#' are called with a single vector of values, \code{x}.
79
#'
810
#' A simple vector function is easiest to work with as you can return a single
911
#' number, but is somewhat less flexible. If your summary function operates

man/stat_summary.Rd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ a data.frame with additional columns:
3636
}
3737
\description{
3838
\code{stat_summary} allows for tremendous flexibilty in the specification
39-
of summary functions. The summary function can either operate on a data
40-
frame (with argument name \code{fun.data}) or on a vector (\code{fun.y},
41-
\code{fun.ymax}, \code{fun.ymin}).
39+
of summary functions. The summary function can either supply individual
40+
summary functions for each of y, ymin and ymax (with \code{fun.y},
41+
\code{fun.ymax}, \code{fun.ymin}), or return a data frame containing any
42+
number of aesthetiics with with \code{fun.data}. All summary functions
43+
are called with a single vector of values, \code{x}.
4244
}
4345
\details{
4446
A simple vector function is easiest to work with as you can return a single

0 commit comments

Comments
 (0)