From 5ba284a20007daa32724354c33200bb0da8ea591 Mon Sep 17 00:00:00 2001 From: Matthew Kay Date: Fri, 18 Mar 2022 00:26:14 -0500 Subject: [PATCH] document --- man/probability_trans.Rd | 5 +++-- man/trans_new.Rd | 13 +++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/man/probability_trans.Rd b/man/probability_trans.Rd index 67ca1771..e0a4e82d 100644 --- a/man/probability_trans.Rd +++ b/man/probability_trans.Rd @@ -14,8 +14,9 @@ probit_trans() } \arguments{ \item{distribution}{probability distribution. Should be standard R -abbreviation so that "p" + distribution is a valid probability density -function, and "q" + distribution is a valid quantile function.} +abbreviation so that "p" + distribution is a valid cumulative distribution +function, "q" + distribution is a valid quantile function, and +"d" + distribution is a valid probability density function.} \item{...}{other arguments passed on to distribution and quantile functions} } diff --git a/man/trans_new.Rd b/man/trans_new.Rd index 1e6b8fa1..64ae23ad 100644 --- a/man/trans_new.Rd +++ b/man/trans_new.Rd @@ -11,6 +11,8 @@ trans_new( name, transform, inverse, + d_transform = NULL, + d_inverse = NULL, breaks = extended_breaks(), minor_breaks = regular_minor_breaks(), format = format_format(), @@ -30,6 +32,12 @@ transformation} \item{inverse}{function, or name of function, that performs the inverse of the transformation} +\item{d_transform}{Optional function, or name of function, that gives the +derivative of the transformation. May be \code{NULL}.} + +\item{d_inverse}{Optional function, or name of function, that gives the +derivative of the inverse of the transformation. May be \code{NULL}.} + \item{breaks}{default breaks function for this transformation. The breaks function is applied to the un-transformed data.} @@ -46,8 +54,9 @@ argument.} A transformation encapsulates a transformation and its inverse, as well as the information needed to create pleasing breaks and labels. The \code{breaks()} function is applied on the un-transformed range of the data, and the -\code{format()} function takes the output of the \code{breaks()} function and return -well-formatted labels. +\code{format()} function takes the output of the \code{breaks()} function and returns +well-formatted labels. Transformations may also include the derivatives of the +transformation and its inverse, but are not required to. } \seealso{ \Sexpr[results=rd,stage=build]{scales:::seealso_trans()}