Skip to content

Commit

Permalink
refactor: simplify nested ifelse
Browse files Browse the repository at this point in the history
  • Loading branch information
m-muecke committed Jul 13, 2024
1 parent fbcc8a2 commit e0f9df0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/MeasureSurv.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ MeasureSurv = R6Class("MeasureSurv",
#' Printer.
print = function() {
super$print()
catf(str_indent("* Return type:", ifelse(is.null(private$.se), "Score",
ifelse(private$.se, "Standard Error", "Score"))))
catf(str_indent(
"* Return type:",
if (isTRUE(private$.se)) "Standard Error" else "Score",
))
}
)
)

0 comments on commit e0f9df0

Please sign in to comment.