Skip to content

Commit

Permalink
tanh is already in base R
Browse files Browse the repository at this point in the history
  • Loading branch information
liao961120 committed Jul 18, 2024
1 parent aa9157a commit ddd3135
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 16 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export(stan)
export(standardize)
export(svg2pdf)
export(svg2png)
export(tanh)
export(test_cmdstanr)
export(to_gitbash_path)
export(to_unix_path)
Expand Down
8 changes: 0 additions & 8 deletions R/links.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ erf = function(x) 2 * pnorm(x * sqrt(2)) - 1
#' @export
inv_erf = function (x) qnorm((1 + x)/2)/sqrt(2)

#' @rdname erf
#' @export
tanh = function(x) {
ex = exp(x)
enx = exp(-x)
(ex - enx) / (ex + enx)
}

#' @rdname erf
#' @export
inv_tanh = function(x) .5 * (log(1 + x) - log(1 - x))
Expand Down
2 changes: 0 additions & 2 deletions docs/reference/erf.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions man/erf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ddd3135

Please # to comment.