Skip to content

Commit 759e5f9

Browse files
committed
break up long error message line (doesn't matter, just easier to read)
1 parent 0f8f9b8 commit 759e5f9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

R/data.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ draws_to_csv <- function(draws, sampler_diagnostics = NULL) {
191191
process_fitted_params <- function(fitted_params) {
192192
if (is.character(fitted_params)) {
193193
paths <- absolute_path(fitted_params)
194-
} else if (checkmate::test_r6(fitted_params, classes = "CmdStanMCMC") &&
194+
} else if (checkmate::test_r6(fitted_params, classes = "CmdStanMCMC") &&
195195
all(file.exists(fitted_params$output_files()))) {
196196
paths <- absolute_path(fitted_params$output_files())
197197
} else if(checkmate::test_r6(fitted_params, classes = c("CmdStanMCMC"))) {
@@ -218,7 +218,10 @@ process_fitted_params <- function(fitted_params) {
218218
} else if (any(class(fitted_params) == "draws_matrix")){
219219
paths <- draws_to_csv(posterior::as_draws_array(fitted_params))
220220
} else {
221-
stop("'fitted_params' must be a list of paths to CSV files, a CmdStanMCMC/CmdStanVB object, a posterior::draws_array or a posterior::draws_matrix.", call. = FALSE)
221+
stop(
222+
"'fitted_params' must be a list of paths to CSV files, ",
223+
"a CmdStanMCMC/CmdStanVB object, ",
224+
"a posterior::draws_array or a posterior::draws_matrix.", call. = FALSE)
222225
}
223226
paths
224227
}

0 commit comments

Comments
 (0)