From e0f9df046f875e48f6bf772349ccdd066bf803d5 Mon Sep 17 00:00:00 2001 From: Maximilian Muecke Date: Sat, 13 Jul 2024 12:18:29 +0200 Subject: [PATCH] refactor: simplify nested ifelse --- R/MeasureSurv.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/MeasureSurv.R b/R/MeasureSurv.R index 9c14b5604..6e630866c 100644 --- a/R/MeasureSurv.R +++ b/R/MeasureSurv.R @@ -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", + )) } ) )