Skip to content
Snippets Groups Projects
Commit 95cd06a0 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Move the description of the plot parameters to a \describe list rather than using @param.

CRAN requires that all parameters from the function signature (and only those parameters, no others!) are documented. If we want to document other parameters that are matched by ..., then one cannot use @param. So we simply created a nested list and explicitly list those params in a describe list.
parent 28fdc272
No related branches found
No related tags found
No related merge requests found
......@@ -8,14 +8,28 @@
#' death probabilities are scaled by the given reference table and the y-axis
#' shows the death rates as percentage of the reference table.
#'
#' @param x First life table to be plotted. Must be a \code{mortalityTable} object for the dispatcher to call this function
#' @param ... Additional life tables to be plotted (\code{mortalityTable} objects)
#' @param xlim,ylim Axes limitatation (as a two-element vectors)
#' @param xlab,ylab Axes labels (default for x-axis: "Alter", default for y-axis: "Sterbewahrscheinlichkeit q_x")
#' @param title The plot title
#' @param legend.position The position of the legend (default is \code{c(0.9,0.1)})
#' @param legend.key.width The keywith of the lines in the legend (default is \code{unit(25,"mm")})
#' @param reference The reference table that determines the 100\% values. If not given, the first argument of \code{data} is used as reference table.
#' @param x First life table to be plotted. Must be a \code{mortalityTable}
#' object for the dispatcher to call this function
#' @param ... Additional life tables to be plotted (\code{mortalityTable}
#' objects) as well as any of the following parameters (which are
#' passed on to \code{\link{plotMortalityTables}} or
#' \code{\link{plotMortalityTableComparisons}}):
#' \describe{
#' \item{\code{xlim,ylim}}{Axes limitatation (as a
#' two-element vectors)}
#' \item{\code{xlab,ylab}}{Axes labels (default for
#' x-axis: "Alter", default for y-axis:
#' "Sterbewahrscheinlichkeit q_x")}
#' \item{\code{title}}{The plot title}
#' \item{\code{legend.position}}{The position of
#' the legend (default is \code{c(0.9,0.1)})}
#' \item{\code{legend.key.width}}{The keywith of the
#' lines in the legend (default is
#' \code{unit(25,"mm")})}
#' }
#' @param reference The reference table that determines the 100\% values.
#' If not given, the absolute mortality values are
#' compared and plotted on a log-linear scale.
#'
#' @examples
#' # Load the Austrian census data
......
......@@ -7,21 +7,30 @@
\method{plot}{mortalityTable}(x, ..., reference = NULL)
}
\arguments{
\item{x}{First life table to be plotted. Must be a \code{mortalityTable} object for the dispatcher to call this function}
\item{x}{First life table to be plotted. Must be a \code{mortalityTable}
object for the dispatcher to call this function}
\item{...}{Additional life tables to be plotted (\code{mortalityTable} objects)}
\item{...}{Additional life tables to be plotted (\code{mortalityTable}
objects) as well as any of the following parameters (which are
passed on to \code{\link{plotMortalityTables}} or
\code{\link{plotMortalityTableComparisons}}):
\describe{
\item{\code{xlim,ylim}}{Axes limitatation (as a
two-element vectors)}
\item{\code{xlab,ylab}}{Axes labels (default for
x-axis: "Alter", default for y-axis:
"Sterbewahrscheinlichkeit q_x")}
\item{\code{title}}{The plot title}
\item{\code{legend.position}}{The position of
the legend (default is \code{c(0.9,0.1)})}
\item{\code{legend.key.width}}{The keywith of the
lines in the legend (default is
\code{unit(25,"mm")})}
}}
\item{reference}{The reference table that determines the 100\% values. If not given, the first argument of \code{data} is used as reference table.}
\item{xlim, ylim}{Axes limitatation (as a two-element vectors)}
\item{xlab, ylab}{Axes labels (default for x-axis: "Alter", default for y-axis: "Sterbewahrscheinlichkeit q_x")}
\item{title}{The plot title}
\item{legend.position}{The position of the legend (default is \code{c(0.9,0.1)})}
\item{legend.key.width}{The keywith of the lines in the legend (default is \code{unit(25,"mm")})}
\item{reference}{The reference table that determines the 100\% values.
If not given, the absolute mortality values are
compared and plotted on a log-linear scale.}
}
\description{
\code{plot.mortalityTable} displays multiple life tables (objects of child
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment