Permalink
Browse files

Doc tweaks

  • Loading branch information...
1 parent 6d18b30 commit 0f6c689bad3fe693fd9b233706151e5f2808aed2 @hadley hadley committed Dec 28, 2011
Showing with 35 additions and 9 deletions.
  1. +14 −3 R/stat-summary.r
  2. +1 −1 R/theme-elements.r
  3. +1 −0 R/theme.r
  4. +16 −4 man/{wrap_hmisc.Rd → hmisc.Rd}
  5. +1 −1 man/theme_line.Rd
  6. +2 −0 man/theme_update.Rd
View
@@ -148,15 +148,18 @@ summarise_by_x <- function(data, summary, ...) {
}
#' Wrap up a selection of summary functions from Hmisc to make it easy to use
-#' with \code{\link{stat_summary}}
+#' with \code{\link{stat_summary}}.
#'
#' See the Hmisc documentation for details of their options.
#'
+#' @param x a numeric vector
+#' @param ... other arguments passed on to the respective Hmisc function.
#' @seealso \code{\link[Hmisc]{smean.cl.boot}},
#' \code{\link[Hmisc]{smean.cl.normal}}, \code{\link[Hmisc]{smean.sdl}},
#' \code{\link[Hmisc]{smedian.hilow}}
-#' @aliases mean_cl_boot mean_cl_normal mean_sdl median_hilow
-#' @export mean_cl_boot mean_cl_normal mean_sdl median_hilow
+#' @name hmisc
+NULL
+
wrap_hmisc <- function(fun) {
function(x, ...) {
try_require("Hmisc")
@@ -168,9 +171,17 @@ wrap_hmisc <- function(fun) {
)
}
}
+#' @export
+#' @rdname hmisc
mean_cl_boot <- wrap_hmisc("smean.cl.boot")
+#' @export
+#' @rdname hmisc
mean_cl_normal <- wrap_hmisc("smean.cl.normal")
+#' @export
+#' @rdname hmisc
mean_sdl <- wrap_hmisc("smean.sdl")
+#' @export
+#' @rdname hmisc
median_hilow <- wrap_hmisc("smedian.hilow")
#' Calculate mean and standard errors on either side.
View
@@ -45,7 +45,7 @@ theme_rect <- function(fill = NA, colour = "black", size = 0.5, linetype = 1) {
#' \code{link{theme_segment}}
#' @param colour line color
#' @param size line size
-#' @param type line type
+#' @param linetype line type
#' @keywords dplot
#' @export
theme_line <- function(colour = "black", size = 0.5, linetype = 1) {
View
@@ -55,6 +55,7 @@ theme_update <- function(...) {
#' @export
theme_get <- .theme$get
#' @rdname theme_update
+#' @param new new theme (a list of theme elements)
#' @export
theme_set <- .theme$set
@@ -1,13 +1,25 @@
-\name{wrap_hmisc}
+\name{hmisc}
+\alias{hmisc}
\alias{mean_cl_boot}
\alias{mean_cl_normal}
\alias{mean_sdl}
\alias{median_hilow}
-\alias{wrap_hmisc}
\title{Wrap up a selection of summary functions from Hmisc to make it easy to use
-with \code{\link{stat_summary}}}
+with \code{\link{stat_summary}}.}
\usage{
- wrap_hmisc(fun)
+ mean_cl_boot(x, ...)
+
+ mean_cl_normal(x, ...)
+
+ mean_sdl(x, ...)
+
+ median_hilow(x, ...)
+}
+\arguments{
+ \item{x}{a numeric vector}
+
+ \item{...}{other arguments passed on to the respective
+ Hmisc function.}
}
\description{
See the Hmisc documentation for details of their options.
View
@@ -9,7 +9,7 @@
\item{size}{line size}
- \item{type}{line type}
+ \item{linetype}{line type}
}
\description{
This element draws a line between two (or more) points
View
@@ -12,6 +12,8 @@
}
\arguments{
\item{...}{named list of theme settings}
+
+ \item{new}{new theme (a list of theme elements)}
}
\description{
Use \code{theme_update} to modify a small number of

0 comments on commit 0f6c689

Please sign in to comment.