Skip to content

Commit

Permalink
FIXed test on existence of javastics path in model_options in case pa…
Browse files Browse the repository at this point in the history
…ram_values is specified.

The test was crashing in case javastics==NULL, (which is possible if not given to stics_wrapper_options when initializing model_options, for example).
The case javastics=="unknown" is not possible at this step since it is already captured above in do.call(stics_wrapper_options, model_options).
  • Loading branch information
sbuis committed Sep 12, 2023
1 parent 3a250b1 commit 7eca236
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/stics_wrapper.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,10 @@ stics_wrapper <- function(model_options,
javastics <- model_options$javastics

# Checking if javastics path is set when forcing parameters
if (!is.null(param_values) && javastics == "unknown")
if (!is.null(param_values) && is.null(javastics))
stop(paste0("When parameters values are to be forced,",
" a JavaStics path must be set in model_options list !"))
" a JavaStics path must be set in model_options list",
" (see javastics argument of stics_wrapper_options function)."))

# In case of successive USMs, disable parallel run
if (!is.null(successive_usms)) parallel <- FALSE
Expand Down

0 comments on commit 7eca236

Please sign in to comment.