Skip to content

Commit

Permalink
add derivatives in anticipation of new deriv capability
Browse files Browse the repository at this point in the history
  • Loading branch information
pearsonca committed Nov 2, 2023
1 parent b9003b7 commit 3b8e979
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/trans-numeric.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ atanh_trans <- function() {
#' @examples
#' plot(asinh_trans(), xlim = c(-1e2, 1e2))
asinh_trans <- function() {
trans_new("asinh", asinh, inverse = sinh)
trans_new(
"asinh",
transform = asinh,
inverse = sinh,
d_transform = function(x) 1 / sqrt(x^2 + 1),
d_inverse = cosh
)
}

#' Box-Cox & modulus transformations
Expand Down

0 comments on commit 3b8e979

Please sign in to comment.