A transformation encapsulates a transformation and its inverse, as well
as the information needed to create pleasing breaks and labels. The breaks()
function is applied on the un-transformed range of the data, and the
format()
function takes the output of the breaks()
function and returns
well-formatted labels. Transformations may also include the derivatives of the
transformation and its inverse, but are not required to.
new_transform(
name,
transform,
inverse,
d_transform = NULL,
d_inverse = NULL,
breaks = extended_breaks(),
minor_breaks = regular_minor_breaks(),
format = format_format(),
domain = c(-Inf, Inf)
)trans_new(
name,
transform,
inverse,
d_transform = NULL,
d_inverse = NULL,
breaks = extended_breaks(),
minor_breaks = regular_minor_breaks(),
format = format_format(),
domain = c(-Inf, Inf)
)
is.transform(x)
is.trans(x)
as.transform(x, arg = deparse(substitute(x)))
as.trans(x, arg = deparse(substitute(x)))
transformation name
function, or name of function, that performs the transformation
function, or name of function, that performs the inverse of the transformation
Optional function, or name of function, that gives the
derivative of the transformation. May be NULL
.
Optional function, or name of function, that gives the
derivative of the inverse of the transformation. May be NULL
.
default breaks function for this transformation. The breaks function is applied to the un-transformed data.
default minor breaks function for this transformation.
default format for this transformation. The format is applied to breaks generated on the un-transformed data.
the allowed range of the data to be transformed. The function
in the transform
argument is expected to be able to transform the domain
argument.
scales:::seealso_transform()