Skip to content

Commit 59246a8

Browse files
committed
Format true/false to 1/0 in csv read
1 parent 1f4efad commit 59246a8

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

.github/workflows/R-CMD-check-wsl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- name: Install cmdstan
6262
run: |
6363
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
64-
cmdstanr::install_cmdstan(cores = 2, wsl = TRUE, overwrite = TRUE)
64+
cmdstanr::install_cmdstan(cores = 2, wsl = TRUE, overwrite = TRUE, version = "2.35.0-rc2")
6565
shell: Rscript {0}
6666

6767
- name: Session info

.github/workflows/R-CMD-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- name: Install cmdstan
6464
run: |
6565
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
66-
cmdstanr::install_cmdstan(cores = 2)
66+
cmdstanr::install_cmdstan(cores = 2, version = "2.35.0-rc2")
6767
shell: Rscript {0}
6868

6969
- name: Session info

.github/workflows/Test-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: Install cmdstan
5353
run: |
5454
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
55-
cmdstanr::install_cmdstan(cores = 2)
55+
cmdstanr::install_cmdstan(cores = 2, version = "2.35.0-rc2")
5656
shell: Rscript {0}
5757

5858
- name: Test coverage (Linux)

R/csv.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,14 @@ read_csv_metadata <- function(csv_file) {
840840
csv_file_info$fitted_params <- wsl_safe_path(csv_file_info$fitted_params,
841841
revert = TRUE)
842842
}
843+
csv_file_info <- lapply(csv_file_info, function(item) {
844+
if (is.character(item) && length(item) == 1) {
845+
if (item %in% c("true", "false")) {
846+
item <- as.integer(as.logical(item))
847+
}
848+
}
849+
item
850+
})
843851
csv_file_info
844852
}
845853

0 commit comments

Comments
 (0)