From 5d0a5d9a332e47a0a35411cb3f5390c538a4cdee Mon Sep 17 00:00:00 2001 From: Teun van den Brand <49372158+teunbrand@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:44:14 +0100 Subject: [PATCH] domain for log1p --- R/trans-numeric.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/trans-numeric.R b/R/trans-numeric.R index b3152479..dd718d2d 100644 --- a/R/trans-numeric.R +++ b/R/trans-numeric.R @@ -247,7 +247,10 @@ log2_trans <- function() { #' @rdname log_trans #' @export log1p_trans <- function() { - trans_new("log1p", "log1p", "expm1") + trans_new( + "log1p", "log1p", "expm1", + domain = c(-1 + .Machine$double.eps, Inf) + ) } #' @rdname log_trans