Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalci committed Dec 18, 2023
1 parent ece9a8d commit 1b3c59b
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 50 deletions.
2 changes: 1 addition & 1 deletion R/multisurvival.b.R
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ multisurvivalClass <- if (requireNamespace('jmvcore'))

name2outcome <- myoutcome_labelled

if (self$options$tint) {
if (self$options$multievent) {
name2outcome <- "CalculatedOutcome"
}

Expand Down
16 changes: 9 additions & 7 deletions R/singlearm.b.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down Expand Up @@ -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)
}
Expand Down
31 changes: 12 additions & 19 deletions R/singlearm.h.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"]],
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/survival.b.R
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ survivalClass <- if (requireNamespace('jmvcore'))

name2outcome <- myoutcome_labelled

if (self$options$tint) {
if (self$options$multievent) {
name2outcome <- "CalculatedOutcome"
}

Expand Down
2 changes: 1 addition & 1 deletion R/survivalcont.b.R
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ survivalcontClass <- if (requireNamespace("jmvcore")) {

name2outcome <- myoutcome_labelled

if (self$options$tint) {
if (self$options$multievent) {
name2outcome <- "CalculatedOutcome"
}

Expand Down
28 changes: 7 additions & 21 deletions jamovi/singlearm.r.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ items:
- multievent


# - name: mydataview
# title: mydataview
# type: Preformatted
- name: mydataview
title: mydataview
type: Preformatted


- name: medianSummary
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions jamovi/singlearm.u.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ children:
children:
- type: Output
name: calculatedtime
enable: (tint)
- type: CollapseBox
label: Analysis with Multiple Outcomes
collapsed: true
Expand Down Expand Up @@ -142,6 +143,7 @@ children:
children:
- type: Output
name: outcomeredifened
enable: (multievent)
- type: CollapseBox
label: Plots
collapsed: true
Expand Down

0 comments on commit 1b3c59b

Please sign in to comment.