Skip to content

Commit

Permalink
#44 Slighly adapt the tornado plot item.
Browse files Browse the repository at this point in the history
  • Loading branch information
luyckxn committed Sep 12, 2024
1 parent 2532d25 commit 8b769e7
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/sensitivity_analysis_item.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ setMethod("getLabel", signature=c("sensitivity_analysis_item"), definition=funct
parameterLabel <- parameterName
}
if (change@up_down_as_factor) {
return(paste0(parameterLabel, " (\U00D7", change@up, ",", "\U00F7", change@down, ")"))
return(paste0(parameterLabel, " (\U00F7", change@down, ", ", "\U00D7", change@up, ")"))
} else {
return(paste0(parameterLabel, " (", change@up, ",", change@down, ")"))
return(paste0(parameterLabel, " (", change@down, ", ", change@up, ")"))
}
})

Expand Down
Binary file modified README_files/figure-gfm/sensibility_analysis_auc_example-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-gfm/sensibility_analysis_cmax_example-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/testthat/testSensitivityAnalysisItem.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ context("Test all methods from the sensitivity analysis item class")

test_that("Method getLabel is working as expected", {
labeledParameters <- LabeledParameters(c(DUR="Infusion duration"))
item <- SensitivityAnalysisItem(Change("DUR", up=2, down=3))
item <- SensitivityAnalysisItem(Change("DUR", down=3, up=2))

expect_equal(item %>% getLabel(labeled_parameters=labeledParameters), "Infusion duration (×2,÷3)")
expect_equal(item %>% getLabel(labeled_parameters=labeledParameters), "Infusion duration (÷3, ×2)")
})

0 comments on commit 8b769e7

Please sign in to comment.