From 992b88dc9340c6b2c477bc755941545f5ea98848 Mon Sep 17 00:00:00 2001 From: philchalmers Date: Mon, 8 Jul 2024 11:00:58 -0400 Subject: [PATCH] better formating --- R/PBA.R | 4 ++-- R/SimSolve.R | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/R/PBA.R b/R/PBA.R index 90770027..3a40c87a 100644 --- a/R/PBA.R +++ b/R/PBA.R @@ -214,8 +214,8 @@ PBA <- function(f, interval, ..., p = .6, } no_root <- (upper[1L] + lower[1L]) != 1L if(no_root){ - msg <- sprintf('supplied interval range appears to be %s the probable root. - Resulting root estimates were [%.3f, %.3f]', + msg <- sprintf(paste0('supplied interval range appears to be %s the probable root.', + '\nResulting root estimates were [%.3f, %.3f]'), ifelse(upper[1L] == 0, '*above*', '*below*'), lower[2L], upper[2L]) old.opts <- options() diff --git a/R/SimSolve.R b/R/SimSolve.R index e280a978..ffc45ef4 100644 --- a/R/SimSolve.R +++ b/R/SimSolve.R @@ -471,6 +471,9 @@ SimSolve <- function(design, interval, b, generate, analyse, summarise, predCI = .95, predCI.tol = NULL, ...){ # robust <- FALSE + org.opts <- options() + options(warn = 1) + on.exit(options(org.opts), add = TRUE) if(is.null(control$print_RAM)) control$print_RAM <- FALSE burnin.iter <- 15L if(is.list(replications)){