Skip to content

fix: use isTRUE() for compare_arms_option checks - #5

Merged
naimurashid merged 1 commit into
mainfrom
fix/compare-arms-option-isTRUE
Mar 7, 2026
Merged

fix: use isTRUE() for compare_arms_option checks#5
naimurashid merged 1 commit into
mainfrom
fix/compare-arms-option-isTRUE

Conversation

@naimurashid

Copy link
Copy Markdown
Owner

Summary

  • Replace bare if (compare_arms_option) with isTRUE(compare_arms_option) at three locations in R/simulation_driver.R (lines 549, 624, 645)
  • This fixes the crash when passing compare_arms_option = "none" as shown in the README single-arm example
  • Consistent with interim_logic.R:64 which already uses isTRUE()

Test plan

  • README example with compare_arms_option = "none" runs without error
  • compare_arms_option = FALSE (single-arm, logical) still works
  • compare_arms_option = TRUE (multi-arm) still works

Closes #4

🤖 Generated with Claude Code

Bare `if (compare_arms_option)` crashes when passed the string "none"
(as shown in the README single-arm example). Replace all three bare
conditionals with `isTRUE(compare_arms_option)`, consistent with
interim_logic.R:64 which already uses this pattern.

Closes #4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@naimurashid
naimurashid merged commit e648c95 into main Mar 7, 2026
1 of 6 checks passed
@naimurashid
naimurashid deleted the fix/compare-arms-option-isTRUE branch March 7, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README example crashes: compare_arms_option = "none" is not interpretable as logical

1 participant