Skip to content

Commit 9b72e82

Browse files
committed
reloo: also pass 'cores' to 'update'
1 parent 0d163dc commit 9b72e82

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

R/reloo.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,14 @@ reloo.brmsfit <- function(x, loo, k_threshold = 0.7, newdata = NULL,
9090
# split dots for use in log_lik and update
9191
dots <- list(...)
9292
ll_arg_names <- arg_names("log_lik")
93-
ll_args <- dots[intersect(names(dots), ll_arg_names)]
93+
ll_arg_names <- intersect(names(dots), ll_arg_names)
94+
ll_args <- dots[ll_arg_names]
9495
ll_args$allow_new_levels <- TRUE
9596
ll_args$resp <- resp
9697
ll_args$combine <- TRUE
97-
up_args <- dots[setdiff(names(dots), ll_arg_names)]
98+
# cores is used in both log_lik and update
99+
up_arg_names <- setdiff(names(dots), setdiff(ll_arg_names, "cores"))
100+
up_args <- dots[up_arg_names]
98101
up_args$refresh <- 0
99102

100103
.reloo <- function(j) {

0 commit comments

Comments
 (0)