Skip to content

Commit

Permalink
Merge pull request #594 from stan-dev/bug_fix_for_or_condition
Browse files Browse the repository at this point in the history
Use | instead of || for or condition
  • Loading branch information
sambrilleman committed Jul 9, 2023
2 parents f9047a0 + f2d158d commit 3a41b19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/stan_surv.R
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ stan_surv <- function(formula,
if (any(is.na(status)))
stop2("Invalid status indicator in Surv object.")

if (any(status < 0 || status > 3))
if (any(status < 0 | status > 3))
stop2("Invalid status indicator in Surv object.")

# delayed entry indicator for each row of data
Expand Down Expand Up @@ -1793,7 +1793,7 @@ parse_formula_and_data <- function(formula, data) {
if (any(is.na(status)))
stop2("Invalid status indicator in Surv object.")

if (any(status < 0 || status > 3))
if (any(status < 0 | status > 3))
stop2("Invalid status indicator in Surv object.")

# deal with tve(x, ...)
Expand Down

0 comments on commit 3a41b19

Please sign in to comment.