diff --git a/R/find_transformation.R b/R/find_transformation.R index f82cfb9eb..63f45eb56 100644 --- a/R/find_transformation.R +++ b/R/find_transformation.R @@ -165,9 +165,9 @@ find_transformation.character <- function(x, ...) { # helper ----------------------------- .is_division <- function(x) { - any(grepl("(.*)/([0-9\\.]+)(\\)*)$", x)) && !any(grepl("(.*)(\\^|\\*\\*)\\((.*)/(.*)\\)", x)) + any(grepl("(.*)/([0-9\\.\\+\\-]+)(\\)*)$", x)) && !any(grepl("(.*)(\\^|\\*\\*)\\((.*)/(.*)\\)", x)) } .is_box_cox <- function(x) { - any(grepl("\\((.*)\\^[0-9\\.]+-1\\)", x)) + any(grepl("\\((.*)\\^[0-9\\.\\+\\-]+-1\\)", x)) }