Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Doc fixes for R CMD check

  • Loading branch information...
commit 1eb435e1e8bc60f8c148ea65b03878ae4e71d244 1 parent 9f11946
@wch wch authored
View
1  R/labels.r
@@ -17,6 +17,7 @@ update_labels <- function(p, labels) {
#' Change axis labels and legend titles
#'
+#' @param label The text for the axis or plot title.
#' @param ... a list of new names in the form aesthetic = "new name"
#' @export
#' @examples
View
2  R/plot-construction.r
@@ -58,7 +58,7 @@
#' @export
#'
#' @seealso \code{\link{theme}}
-#' @method "+" gg
+#' @method + gg
#' @rdname gg-add
"+.gg" <- function(e1, e2) {
# Get the name of what was passed in as e2, and pass along so that it
View
1  R/plot.r
@@ -79,6 +79,7 @@ ggplot.default <- function(data = NULL, mapping = aes(), ...) {
}
#' Reports whether x is a ggplot object
+#' @param x An object to test
#' @export
is.ggplot <- function(x) inherits(x, "ggplot")
View
4 R/theme-elements.r
@@ -79,6 +79,7 @@ print.element <- function(x, ...) str(x)
#' Relative sizing for theme elements
#'
+#' @param x A number representing the relative size
#' @examples
#' qplot(1:3, 1:3) + theme(axis.title.x = element_text(size = rel(2.5)))
#' @export
@@ -90,6 +91,7 @@ rel <- function(x) {
print.rel <- function(x, ...) print(noquote(paste(x, " *", sep = "")))
#' Reports whether x is a rel object
+#' @param x An object to test
is.rel <- function(x) inherits(x, "rel")
@@ -97,6 +99,8 @@ is.rel <- function(x) inherits(x, "rel")
#'
#' The \code{theme_xx} functions have been deprecated. They are replaced
#' with the \code{element_xx} functions.
+#' @param ... Arguments to be passed to the appropriate \code{element_xx}
+#' function.
#'
#' @export
theme_blank <- function(...) {
View
15 R/theme.r
@@ -4,7 +4,7 @@
#' theme or use \code{theme_set} to completely override it.
#'
#' @param ... named list of theme settings
-#' @seealso \code{\link{\%+replace\%}} and \code{\link{+.theme}}
+#' @seealso \code{\link{\%+replace\%}} and \code{\link{+.gg}}
#' @export
#' @examples
#' qplot(mpg, wt, data = mtcars)
@@ -28,6 +28,7 @@ theme_update <- function(...) {
}
#' Reports whether x is a theme object
+#' @param x An object to test
#' @export
is.theme <- function(x) inherits(x, "theme")
@@ -312,6 +313,7 @@ theme <- function(..., complete = FALSE) {
#' Build a theme (or partial theme) from theme elements
#'
#' \code{opts} is deprecated. See the \code{\link{theme}} function.
+#' @param ... Arguments to be passed on to the \code{theme} function.
#'
#' @export
opts <- function(...) {
@@ -384,6 +386,11 @@ theme_set <- .theme$set
#' Modify properties of an element in a theme object
#'
+#' @param t1 A theme object
+#' @param t2 A theme object that is to be added to \code{t1}
+#' @param t2name A name of the t2 object. This is used for printing
+#' informative error messages.
+#'
#' @seealso +.gg
#'
add_theme <- function(t1, t2, t2name) {
@@ -474,13 +481,13 @@ update_theme <- function(oldtheme, newtheme) {
##' Update contents of a theme. (Deprecated)
##'
##' This function is deprecated. Use \code{\link{\%+replace\%}} or
-##' \code{\link{+.theme}} instead.
+##' \code{\link{+.gg}} instead.
##'
##' @title Update theme param
##' @param name name of a theme element
##' @param ... Pairs of name and value of theme parameters.
##' @return Updated theme element
-##' @seealso \code{\link{\%+replace\%}} and \code{\link{+.theme}}
+##' @seealso \code{\link{\%+replace\%}} and \code{\link{+.gg}}
##' @export
##' @examples
##' x <- element_text(size = 15)
@@ -499,7 +506,7 @@ update_theme <- function(oldtheme, newtheme) {
##' # Throws error if incorrectly named
##' \donttest{update_element("axis.text", colour = 20)}
update_element <- function(name, ...) {
- .Deprecated(new = "+.theme")
+ .Deprecated(new = "+.gg")
if (is.character(name)) {
ele <- theme_get()[[name]]
if (is.null(ele)) {
Please sign in to comment.
Something went wrong with that request. Please try again.