Skip to content

Commit 9deb97b

Browse files
llrserictleung
andauthored
Describe what is ymin, ymax (#4215)
* Describe what is ymin, ymax * Restrict to 80 characters wide Co-authored-by: Eric Leung <eric@erictleung.com> * Fix documentation of mean_se Fixed also a tipo on stat_summary * Address latest comments Co-authored-by: Eric Leung <eric@erictleung.com>
1 parent 5d72f63 commit 9deb97b

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

R/stat-summary.r

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#' number, but is somewhat less flexible. If your summary function computes
3232
#' multiple values at once (e.g. min and max), use `fun.data`.
3333
#'
34-
#' `fun.data` will recieve data as if it was oriented along the x-axis and
34+
#' `fun.data` will receive data as if it was oriented along the x-axis and
3535
#' should return a data.frame that corresponds to that orientation. The layer
3636
#' will take care of flipping the input and output if it is oriented along the
3737
#' y-axis.
@@ -270,13 +270,18 @@ mean_sdl <- wrap_hmisc("smean.sdl")
270270
#' @rdname hmisc
271271
median_hilow <- wrap_hmisc("smedian.hilow")
272272

273-
#' Calculate mean and standard error
273+
#' Calculate mean and standard error of the mean
274274
#'
275275
#' For use with [stat_summary()]
276276
#'
277-
#' @param x numeric vector
278-
#' @param mult number of multiples of standard error
279-
#' @return A data frame with columns `y`, `ymin`, and `ymax`.
277+
#' @param x numeric vector.
278+
#' @param mult number of multiples of standard error.
279+
#' @return A data frame with three columns:
280+
#' \describe{
281+
#' \item{`y`}{ The mean.}
282+
#' \item{`ymin`}{ The mean minus the multiples of the standard error.}
283+
#' \item{`ymax`}{ The mean plus the multiples of the standard error.}
284+
#' }
280285
#' @export
281286
#' @examples
282287
#' x <- rnorm(100)

man/mean_se.Rd

Lines changed: 9 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/stat_summary.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)