diff options
Diffstat (limited to 'R')
-rw-r--r-- | R/mkinfit.R | 4 | ||||
-rw-r--r-- | R/nafta.R | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R index 2dec3a72..63455300 100644 --- a/R/mkinfit.R +++ b/R/mkinfit.R @@ -374,6 +374,10 @@ mkinfit <- function(mkinmod, observed, lower <- rep(-Inf, length(c(state.ini.optim, transparms.optim)))
upper <- rep(Inf, length(c(state.ini.optim, transparms.optim)))
names(lower) <- names(upper) <- c(names(state.ini.optim), names(transparms.optim))
+
+ # IORE exponentes are not transformed, but need a lower bound of zero
+ index_N <- grep("^N", names(lower))
+ lower[index_N] <- 0
if (!transform_rates) {
index_k <- grep("^k_", names(lower))
lower[index_k] <- 0
@@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License along with # this program. If not, see <http://www.gnu.org/licenses/> -nafta <- function(ds, title = NA, quiet = FALSE) { +nafta <- function(ds, title = NA, quiet = FALSE, ...) { if (length(levels(ds$name)) > 1) { stop("The NAFTA procedure is only defined for decline data for a single compound") } @@ -24,7 +24,7 @@ nafta <- function(ds, title = NA, quiet = FALSE) { models <- c("SFO", "IORE", "DFOP") result <- list(title = title, data = ds) - result$mmkin <- mmkin(models, list(ds), quiet = TRUE) + result$mmkin <- mmkin(models, list(ds), quiet = TRUE, ...) distimes <- lapply(result$mmkin, function(x) as.numeric(endpoints(x)$distimes["parent", ])) @@ -73,7 +73,7 @@ print.nafta <- function(x, quiet = TRUE, ...) { print(x$parameters) t_rep <- .evaluate_nafta_results(x$S, x$S_c, x$distimes, quiet = quiet) cat("\nDTx values:\n") - print(round((x$distimes), digits = 0)) + print(signif((x$distimes), 3)) cat("\nRepresentative half-life:\n") print(t_rep) } |