Skip to content

Commit

Permalink
ifelse fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed May 4, 2024
1 parent 39c2f4f commit 63a1768
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -1149,8 +1149,8 @@ sample <- function(data = NULL,
show_messages = TRUE,
show_exceptions = TRUE,
diagnostics = c("divergences", "treedepth", "ebfmi"),
save_metric = ifelse(cmdstan_version() > "2.34.0", TRUE, NULL),
save_cmdstan_config = ifelse(cmdstan_version() > "2.34.0", TRUE, NULL),
save_metric = if (cmdstan_version() > "2.34.0") { TRUE } else { NULL },
save_cmdstan_config = if (cmdstan_version() > "2.34.0") { TRUE } else { NULL },
# deprecated
cores = NULL,
num_cores = NULL,
Expand Down Expand Up @@ -1361,7 +1361,7 @@ sample_mpi <- function(data = NULL,
show_messages = TRUE,
show_exceptions = TRUE,
diagnostics = c("divergences", "treedepth", "ebfmi"),
save_cmdstan_config = ifelse(cmdstan_version() > "2.34.0", TRUE, NULL),
save_cmdstan_config = if (cmdstan_version() > "2.34.0") { TRUE } else { NULL },
# deprecated
validate_csv = TRUE) {

Expand Down Expand Up @@ -1507,7 +1507,7 @@ optimize <- function(data = NULL,
history_size = NULL,
show_messages = TRUE,
show_exceptions = TRUE,
save_cmdstan_config = ifelse(cmdstan_version() > "2.34.0", TRUE, NULL)) {
save_cmdstan_config = if (cmdstan_version() > "2.34.0") { TRUE } else { NULL }) {
procs <- CmdStanProcs$new(
num_procs = 1,
show_stderr_messages = show_exceptions,
Expand Down Expand Up @@ -1641,7 +1641,7 @@ laplace <- function(data = NULL,
draws = NULL,
show_messages = TRUE,
show_exceptions = TRUE,
save_cmdstan_config = ifelse(cmdstan_version() > "2.34.0", TRUE, NULL)) {
save_cmdstan_config = if (cmdstan_version() > "2.34.0") { TRUE } else { NULL }) {
if (cmdstan_version() < "2.32") {
stop("This method is only available in cmdstan >= 2.32", call. = FALSE)
}
Expand Down Expand Up @@ -1797,7 +1797,7 @@ variational <- function(data = NULL,
draws = NULL,
show_messages = TRUE,
show_exceptions = TRUE,
save_cmdstan_config = ifelse(cmdstan_version() > "2.34.0", TRUE, NULL)) {
save_cmdstan_config = if (cmdstan_version() > "2.34.0") { TRUE } else { NULL }) {
procs <- CmdStanProcs$new(
num_procs = 1,
show_stderr_messages = show_exceptions,
Expand Down Expand Up @@ -1942,7 +1942,7 @@ pathfinder <- function(data = NULL,
calculate_lp = NULL,
show_messages = TRUE,
show_exceptions = TRUE,
save_cmdstan_config = ifelse(cmdstan_version() > "2.34.0", TRUE, NULL)) {
save_cmdstan_config = if (cmdstan_version() > "2.34.0") { TRUE } else { NULL }) {
procs <- CmdStanProcs$new(
num_procs = 1,
show_stderr_messages = show_exceptions,
Expand Down

0 comments on commit 63a1768

Please sign in to comment.