Skip to content

Commit

Permalink
fix sort_data global option
Browse files Browse the repository at this point in the history
  • Loading branch information
venpopov committed Mar 27, 2024
1 parent fa5cd13 commit 21706c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ configure_options <- function(opts, env = parent.frame()) {
list(
mc.cores = cores,
bmm.silent = opts$silent,
bmm.sort_data = opts$sort_data
bmm.sort_data = opts$sort_data %||% getOption('bmm.sort_data', 'check')
),
.local_envir = env)

Expand Down Expand Up @@ -662,3 +662,7 @@ deprecated_args <- function(...) {
'The "parallel" argument is deprecated. Please use cores instead.
See `help("brm")` for more information.')
}

`%||%` <- function(a, b) {
if (!is.null(a)) a else b
}

0 comments on commit 21706c5

Please sign in to comment.