Closed PavelBal closed 1 year ago
From ospsuite-r, as this function is also used by the ParameterIdentification and should be also used by reporting engine?
ospsuite-r
# TODO: # # Depending on what is decided in issue # https://github.com/Open-Systems-Pharmacology/OSPSuite-R/issues/1091, change # defaults for `base` for `.log_safe`. #' @keywords internal #' @noRd .log_safe <- function(x, base = 10, epsilon = ospsuiteEnv$LOG_SAFE_EPSILON) { x <- sapply(X = x, function(element) { element <- ospsuite.utils::toMissingOfType(element, type = "double") if (is.na(element)) { return(NA_real_) } else if (element < epsilon) { return(log(epsilon, base = base)) } else { return(log(element, base = base)) } }) return(x) }
From
ospsuite-r
, as this function is also used by the ParameterIdentification and should be also used by reporting engine?