From 3a7281a3bce8050d17d4d8b9fb4496d7e6bcbf41 Mon Sep 17 00:00:00 2001 From: sl-eeper Date: Wed, 11 Dec 2024 08:17:42 +0000 Subject: [PATCH] fix parenthesis err --- R/kaplan.R | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/R/kaplan.R b/R/kaplan.R index 8f63f7e6..cb63b1f8 100644 --- a/R/kaplan.R +++ b/R/kaplan.R @@ -691,16 +691,26 @@ kaplanModule <- function(input, output, session, data, data_label, data_varStruc status_cmprsk <- 'cmp' } if (is.null(id.cluster)) { - if(input$cmp_risk_check){ + return( + jskm::jskm(res.km, + pval = input$pval, marks = input$marks, table = input$table, ylab = ylab, ystrataname = yst.name, ystratalabs = yst.lab, ci = input$ci, timeby = input$timeby, xlims = input$xlims, ylims = input$ylims, + cumhaz = input$cumhaz, cluster.option = "None", cluster.var = NULL, data = data.km, pval.coord = pval.coord, legendposition = legend.p, linecols = pal, xlabs = text.x, dashed = dashed, cut.landmark = cut.landmark, + showpercent = input$showpercent, surv.scale = surv.scale, status.cmprsk = status_cmprsk + ) + ) + } + else{ return( - jskm::jskm(res.km, - pval = input$pval, marks = input$marks, table = input$table, ylab = ylab, ystrataname = yst.name, ystratalabs = yst.lab, ci = input$ci, timeby = input$timeby, xlims = input$xlims, ylims = input$ylims, - cumhaz = input$cumhaz, cluster.option = "None", cluster.var = NULL, data = data.km, pval.coord = pval.coord, legendposition = legend.p, linecols = pal, xlabs = text.x, dashed = dashed, cut.landmark = cut.landmark, - showpercent = input$showpercent, surv.scale = surv.scale, status.cmprsk = status_cmprsk - )) - - } else { + jskm::jskm(res.km, + pval = input$pval, marks = input$marks, table = input$table, ylab = ylab, ystrataname = yst.name, ystratalabs = yst.lab, ci = input$ci, timeby = input$timeby, xlims = input$xlims, ylims = input$ylims, + cumhaz = input$cumhaz, cluster.option = "None", cluster.var = NULL, data = data.km, pval.coord = pval.coord, legendposition = legend.p, linecols = pal, xlabs = text.x, dashed = dashed, cut.landmark = cut.landmark, + showpercent = input$showpercent, surv.scale = surv.scale, status.cmprsk = status_cmprsk + ) + ) + } + } + else { return( jskm::jskm(res.km, pval = input$pval, marks = input$marks, table = input$table, ylab = ylab, ystrataname = yst.name, ystratalabs = yst.lab, ci = input$ci, timeby = input$timeby, xlims = input$xlims, ylims = input$ylims,