File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -412,9 +412,13 @@ read_csv_metadata <- function(csv_file) {
412
412
if (! startsWith(line , " #" ) && is.null(csv_file_info [[" model_params" ]])) {
413
413
# if no # at the start of line, the line is the CSV header
414
414
all_names <- strsplit(line , " ," )[[1 ]]
415
- csv_file_info [[" sampler_diagnostics" ]] <- all_names [endsWith(all_names , " __" )]
416
- csv_file_info [[" sampler_diagnostics" ]] <- csv_file_info [[" sampler_diagnostics" ]][! (csv_file_info [[" sampler_diagnostics" ]] %in% c(" lp__" , " log_p__" , " log_g__" ))]
417
- csv_file_info [[" model_params" ]] <- all_names [! (all_names %in% csv_file_info [[" sampler_diagnostics" ]])]
415
+ if (all(csv_file_info $ algorithm != " fixed_param" )) {
416
+ csv_file_info [[" sampler_diagnostics" ]] <- all_names [endsWith(all_names , " __" )]
417
+ csv_file_info [[" sampler_diagnostics" ]] <- csv_file_info [[" sampler_diagnostics" ]][! (csv_file_info [[" sampler_diagnostics" ]] %in% c(" lp__" , " log_p__" , " log_g__" ))]
418
+ csv_file_info [[" model_params" ]] <- all_names [! (all_names %in% csv_file_info [[" sampler_diagnostics" ]])]
419
+ } else {
420
+ csv_file_info [[" model_params" ]] <- all_names [! endsWith(all_names , " __" )]
421
+ }
418
422
} else {
419
423
parse_key_val <- TRUE
420
424
if (regexpr(" # Diagonal elements of inverse mass matrix:" , line , perl = TRUE ) > 0
You can’t perform that action at this time.
0 commit comments