Skip to content

Commit

Permalink
Fix R3.x compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Dec 18, 2023
1 parent 65e8cac commit 6310b5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,10 @@ unconstrain_draws <- function(files = NULL, draws = NULL, format = "draws_df") {
skeleton <- self$variable_skeleton(transformed_parameters = FALSE,
generated_quantities = FALSE)
par_columns <- !(names(draws) %in% c(".chain", ".iteration", ".draw"))
unconstrained <- apply(draws, 1, function(draw) {
unconstrained <- lapply(asplit(draws, 1), function(draw) {
par_list <- utils::relist(as.numeric(draw[par_columns]), skeleton)
self$unconstrain_variables(variables = par_list)
}, simplify = FALSE)
})

unconstrained <- do.call(rbind.data.frame, unconstrained)
uncon_names <- private$model_methods_env_$unconstrained_param_names(private$model_methods_env_$model_ptr_, FALSE, FALSE)
Expand Down

0 comments on commit 6310b5e

Please sign in to comment.