From f8f1d6a499a6d04865fcfd087448288e0ca0db81 Mon Sep 17 00:00:00 2001 From: xihang-chen Date: Mon, 25 Nov 2024 10:47:10 +0000 Subject: [PATCH] to counter new release of visOmopResults --- R/plotTemporalSymmetry.R | 2 +- R/summariseTemporalSymmetry.R | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/R/plotTemporalSymmetry.R b/R/plotTemporalSymmetry.R index a7156fc..312ca08 100644 --- a/R/plotTemporalSymmetry.R +++ b/R/plotTemporalSymmetry.R @@ -44,7 +44,7 @@ plotTemporalSymmetry <- function(result, scales = scales) plot_data <- result |> - visOmopResults::splitNameLevel() |> + visOmopResults::splitGroup() |> dplyr::select(.data$index_name, .data$marker_name, .data$variable_name, .data$variable_level, .data$estimate_name, .data$estimate_value, .data$additional_level, .data$additional_name) |> dplyr::group_by(.data$estimate_name) |> dplyr::mutate(row = dplyr::row_number()) |> diff --git a/R/summariseTemporalSymmetry.R b/R/summariseTemporalSymmetry.R index 2e0a7f9..a90e04d 100644 --- a/R/summariseTemporalSymmetry.R +++ b/R/summariseTemporalSymmetry.R @@ -23,7 +23,7 @@ #' name = "joined_cohorts", #' indexTable = "cohort_1", #' markerTable = "cohort_2") -#' temporal_symmetry <- summariseTemporalSymmetry(cohort = cdm$joined_cohorts) +#' temporal_symmetry <- summariseTemporalSymmetry(cohort = cdm$joined_cohorts, minCellCount = 0) #' CDMConnector::cdmDisconnect(cdm) #' } #' @@ -45,8 +45,8 @@ summariseTemporalSymmetry <- function(cohort, cohort_settings <- omopgenerics::settings(cohort)|> dplyr::mutate(timescale = .env$timescale) |> dplyr::select(-c("index_id", "marker_id", "index_name", "marker_name")) - settings <- c("days_prior_observation", "washout_window", "index_marker_gap", - "combination_window", "timescale") + settings <- c("cohort_date_range", "days_prior_observation", "washout_window", "index_marker_gap", + "combination_window", "moving_average_restriction", "timescale") output <- cohort %>% dplyr::mutate(time = as.numeric(!!CDMConnector::datediff( @@ -89,7 +89,7 @@ summariseTemporalSymmetry <- function(cohort, dplyr::mutate(variable_name = "temporal_symmetry", variable_level = as.character(.data$variable_level), estimate_value = as.character(.data$estimate_value), - strata_name = "overall", #to change + strata_name = "overall", strata_level = "overall", additional_name = "overall", additional_level = "overall",