Skip to content

Commit

Permalink
fixing testing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nhall6 committed Sep 20, 2024
1 parent b423a28 commit e996799
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ Suggests:
Remotes:
ohdsi/ReportGenerator,
ohdsi/ResultModelManager
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
4 changes: 2 additions & 2 deletions R/estimation-cohort-method-covariateBalance.R
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ plotCohortMethodCovariateBalanceScatterPlotNew <- function(
beforeLabel = "Before propensity score adjustment",
afterLabel = "After propensity score adjustment",
textsearch = shiny::reactiveVal(NULL),
maxSdmStatistic
maxSdmStatistic = NULL
){

if(is.null(textsearch())){
Expand Down Expand Up @@ -498,7 +498,7 @@ plotCohortMethodCovariateBalanceScatterPlotNew <- function(
) %>%
plotly::layout(
#shapes = list(xyline(limits)),
title = paste0("Max SDM Statistic = ", maxSdmStatistic),
title = ~paste0("Max SDM Statistic = ", maxSdmStatistic),
shapes = list(list(
type = "line",
x0 = 0,
Expand Down
2 changes: 1 addition & 1 deletion R/estimation-cohort-method-propensityModel.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ cohortMethodPropensityModelServer <- function(
databaseId = selectedRow()$databaseId,
analysisId = selectedRow()$analysisId
) %>%
dplyr::mutate(absBeta = abs(coefficient))
dplyr::mutate(absBeta = abs(.data$coefficient))
})

# ColorBrewer-inspired 3-color scale
Expand Down
2 changes: 1 addition & 1 deletion R/estimation-cohort-method-systematicError.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ getCohortMethodControlResults <- function(
}


plotCohortMethodScatter <- function(controlResults, ease) {
plotCohortMethodScatter <- function(controlResults, ease = NULL) {

if(nrow(controlResults)==0){
return(NULL)
Expand Down
Binary file added tests/testthat/Rplots.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/testthat/test-estimation-cohort-method-power.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ shiny::testServer(
comparatorDays = 1000
)
)
testthat::expect_true(!is.null(output$powerTable))
testthat::expect_true(!is.null(powerTable))
testthat::expect_true(!is.null(output$powerTableCaption))
testthat::expect_true(!is.null(output$timeAtRiskTableCaption))
testthat::expect_true(!is.null(output$timeAtRiskTable))
testthat::expect_true(!is.null(timeAtRiskTable))


})

0 comments on commit e996799

Please sign in to comment.