diff --git a/R/multisurvival.b.R b/R/multisurvival.b.R index cd2ed20c..5518ee51 100644 --- a/R/multisurvival.b.R +++ b/R/multisurvival.b.R @@ -427,7 +427,7 @@ multisurvivalClass <- if (requireNamespace('jmvcore')) name2outcome <- myoutcome_labelled - if (self$options$tint) { + if (self$options$multievent) { name2outcome <- "CalculatedOutcome" } diff --git a/R/singlearm.b.R b/R/singlearm.b.R index 2aac7434..093d9e84 100644 --- a/R/singlearm.b.R +++ b/R/singlearm.b.R @@ -386,7 +386,7 @@ singlearmClass <- if (requireNamespace('jmvcore', quietly=TRUE)) R6::R6Class( name2outcome <- myoutcome_labelled - if (self$options$tint) { + if (self$options$multievent) { name2outcome <- "CalculatedOutcome" } @@ -507,14 +507,16 @@ singlearmClass <- if (requireNamespace('jmvcore', quietly=TRUE)) R6::R6Class( ## Add Calculated Time to Data ---- - # self$results$mydataview$setContent( - # list( - # results - # ) - # ) + self$results$mydataview$setContent( + list( + head(results$cleanData) + ) + ) - if (self$options$tint && self$options$calculatedtime && self$results$calculatedtime$isNotFilled()) { + if ( + # self$options$tint && + self$options$calculatedtime && self$results$calculatedtime$isNotFilled()) { self$results$calculatedtime$setRowNums(results$cleanData$row_names) self$results$calculatedtime$setValues(results$cleanData$CalculatedTime) } diff --git a/R/singlearm.h.R b/R/singlearm.h.R index f321da87..3fad8b1b 100644 --- a/R/singlearm.h.R +++ b/R/singlearm.h.R @@ -286,6 +286,7 @@ singlearmResults <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class( inherit = jmvcore::Group, active = list( todo = function() private$.items[["todo"]], + mydataview = function() private$.items[["mydataview"]], medianSummary = function() private$.items[["medianSummary"]], medianTable = function() private$.items[["medianTable"]], survTableSummary = function() private$.items[["survTableSummary"]], @@ -321,6 +322,10 @@ singlearmResults <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class( "dxdate", "tint", "multievent"))) + self$add(jmvcore::Preformatted$new( + options=options, + name="mydataview", + title="mydataview")) self$add(jmvcore::Preformatted$new( options=options, name="medianSummary", @@ -532,36 +537,23 @@ singlearmResults <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class( options=options, name="calculatedtime", title="Add Calculated Time to Data", - varTitle="`Calculated Time - from ${ dxdate } to { fudate }`", - varDescription="Calculated Time from given Dates in Single Arm Analysis", + varTitle="Calculated Time Single Arm", + varDescription="`Calculated Time from given Dates in Single Arm Analysis - from ${ dxdate } to { fudate }`", clearWith=list( "tint", "dxdate", - "fudate", - "outcome", - "outcomeLevel", - "overalltime", - "fudate", - "dxdate", - "tint", - "multievent"))) + "fudate"))) self$add(jmvcore::Output$new( options=options, name="outcomeredifened", title="Add Redefined Outcome to Data", - varTitle="`Redefined Outcome - from ${ outcome } for analysis { analysistype }`", - varDescription="Redefined Outcome from Outcome based on Analysis Type in Single Arm Analysis", + varTitle="Redefined Outcome Single Arm", + varDescription="`Redefined Outcome - from ${ outcome } for analysis { analysistype } in Single Arm Analysis`", clearWith=list( "outcome", "analysistype", "multievent", - "explanatory", - "outcomeLevel", - "overalltime", - "fudate", - "dxdate", - "tint", - "multievent")))})) + "outcomeLevel")))})) singlearmBase <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class( "singlearmBase", @@ -623,6 +615,7 @@ singlearmBase <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class( #' @return A results object containing: #' \tabular{llllll}{ #' \code{results$todo} \tab \tab \tab \tab \tab a html \cr +#' \code{results$mydataview} \tab \tab \tab \tab \tab a preformatted \cr #' \code{results$medianSummary} \tab \tab \tab \tab \tab a preformatted \cr #' \code{results$medianTable} \tab \tab \tab \tab \tab a table \cr #' \code{results$survTableSummary} \tab \tab \tab \tab \tab a preformatted \cr diff --git a/R/survival.b.R b/R/survival.b.R index 29d01b2d..647cbb23 100644 --- a/R/survival.b.R +++ b/R/survival.b.R @@ -419,7 +419,7 @@ survivalClass <- if (requireNamespace('jmvcore')) name2outcome <- myoutcome_labelled - if (self$options$tint) { + if (self$options$multievent) { name2outcome <- "CalculatedOutcome" } diff --git a/R/survivalcont.b.R b/R/survivalcont.b.R index 6ea07833..3bdbbca6 100644 --- a/R/survivalcont.b.R +++ b/R/survivalcont.b.R @@ -391,7 +391,7 @@ survivalcontClass <- if (requireNamespace("jmvcore")) { name2outcome <- myoutcome_labelled - if (self$options$tint) { + if (self$options$multievent) { name2outcome <- "CalculatedOutcome" } diff --git a/jamovi/singlearm.r.yaml b/jamovi/singlearm.r.yaml index 47835a83..2dd30ef4 100644 --- a/jamovi/singlearm.r.yaml +++ b/jamovi/singlearm.r.yaml @@ -18,9 +18,9 @@ items: - multievent - # - name: mydataview - # title: mydataview - # type: Preformatted + - name: mydataview + title: mydataview + type: Preformatted - name: medianSummary @@ -244,38 +244,24 @@ items: - name: calculatedtime title: Add Calculated Time to Data type: Output - varTitle: '`Calculated Time - from ${ dxdate } to { fudate }`' - varDescription: Calculated Time from given Dates in Single Arm Analysis + varTitle: 'Calculated Time Single Arm' + varDescription: '`Calculated Time from given Dates in Single Arm Analysis - from ${ dxdate } to { fudate }`' clearWith: - tint - dxdate - fudate - - outcome - - outcomeLevel - - overalltime - - fudate - - dxdate - - tint - - multievent - - name: outcomeredifened title: Add Redefined Outcome to Data type: Output - varTitle: '`Redefined Outcome - from ${ outcome } for analysis { analysistype }`' - varDescription: Redefined Outcome from Outcome based on Analysis Type in Single Arm Analysis + varTitle: 'Redefined Outcome Single Arm' + varDescription: '`Redefined Outcome - from ${ outcome } for analysis { analysistype } in Single Arm Analysis`' clearWith: - outcome - analysistype - multievent - - explanatory - outcomeLevel - - overalltime - - fudate - - dxdate - - tint - - multievent refs: - finalfit diff --git a/jamovi/singlearm.u.yaml b/jamovi/singlearm.u.yaml index bb60b894..c03e7537 100644 --- a/jamovi/singlearm.u.yaml +++ b/jamovi/singlearm.u.yaml @@ -106,6 +106,7 @@ children: children: - type: Output name: calculatedtime + enable: (tint) - type: CollapseBox label: Analysis with Multiple Outcomes collapsed: true @@ -142,6 +143,7 @@ children: children: - type: Output name: outcomeredifened + enable: (multievent) - type: CollapseBox label: Plots collapsed: true