From 2b4deda54a40179c70b02f5e4ccab262a8e656cf Mon Sep 17 00:00:00 2001 From: vedhav Date: Fri, 3 Nov 2023 18:40:38 +0530 Subject: [PATCH 1/9] fix: make join_keys related changes due to refactor --- R/FilteredData.R | 11 +++++------ tests/testthat/test-FilteredData.R | 18 +++++++++--------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/R/FilteredData.R b/R/FilteredData.R index 25ec85c4b..e8f06a0fa 100644 --- a/R/FilteredData.R +++ b/R/FilteredData.R @@ -87,7 +87,7 @@ FilteredData <- R6::R6Class( # nolint child_parent <- sapply( names(data_objects), - function(i) join_keys$get_parent(i), + function(i) teal.data::parent(join_keys, i), USE.NAMES = TRUE, simplify = FALSE ) @@ -333,24 +333,23 @@ FilteredData <- R6::R6Class( # nolint # the UI also uses `datanames` in ids, so no whitespaces allowed check_simple_name(dataname) - join_keys <- self$get_join_keys() - parent_dataname <- join_keys$get_parent(dataname) + parent_dataname <- teal.data::parent(private$join_keys, dataname) if (length(parent_dataname) == 0) { private$filtered_datasets[[dataname]] <- init_filtered_dataset( dataset = data, dataname = dataname, metadata = metadata, label = label, - keys = self$get_join_keys()$get(dataname, dataname) + keys = private$join_keys[dataname, dataname] ) } else { private$filtered_datasets[[dataname]] <- init_filtered_dataset( dataset = data, dataname = dataname, - keys = join_keys$get(dataname, dataname), + keys = private$join_keys[dataname, dataname], parent_name = parent_dataname, parent = reactive(self$get_data(parent_dataname, filtered = TRUE)), - join_keys = self$get_join_keys()$get(dataname, parent_dataname), + join_keys = private$join_keys[dataname, parent_dataname], label = label, metadata = metadata ) diff --git a/tests/testthat/test-FilteredData.R b/tests/testthat/test-FilteredData.R index e3c4f2ee4..89b63372e 100644 --- a/tests/testthat/test-FilteredData.R +++ b/tests/testthat/test-FilteredData.R @@ -71,9 +71,9 @@ testthat::test_that("FilteredData forbids cyclic graphs of datasets relationship teal.data::join_key("grandchild", "child", c("id" = "id")), teal.data::join_key("grandchild", "parent", c("id" = "id")) ) - jk$set_parents(list(child = "parent")) - jk$set_parents(list(grandchild = "child")) - jk$set_parents(list(parent = "grandchild")) + teal.data::parents(jk) <- list(child = "parent") + teal.data::parents(jk) <- list(grandchild = "child") + teal.data::parents(jk) <- list(parent = "grandchild") iris2 <- transform(iris, id = seq_len(nrow(iris))) testthat::expect_error( FilteredData$new( @@ -98,7 +98,7 @@ testthat::test_that("filtered_data$datanames returns character vector of dataset testthat::test_that("datanames are ordered topologically from parent to child", { jk <- teal.data::join_keys(teal.data::join_key("parent", "child", c("id" = "id"))) - jk$set_parents(list(child = "parent")) + teal.data::parents(jk) <- list(child = "parent") iris2 <- transform(iris, id = seq_len(nrow(iris))) filtered_data <- FilteredData$new( list( @@ -157,7 +157,7 @@ testthat::test_that("set_datasets creates FilteredDataset object linked with par ) ) jk <- teal.data::join_keys(teal.data::join_key("parent", "child", c("id" = "id"))) - jk$set_parents(list(child = "parent")) + teal.data::parents(jk) <- list(child = "parent") iris2 <- transform(iris, id = seq_len(nrow(iris))) filtered_data <- test_class$new(data_objects = list(), join_keys = jk) filtered_data$set_dataset(data = head(iris), dataname = "parent", label = NULL, metadata = NULL) @@ -374,8 +374,8 @@ testthat::test_that("get_data of the child is dependent on the ancestor filter", teal.data::join_key("child", "parent", c("id" = "id")), teal.data::join_key("grandchild", "child", c("id" = "id")) ) - jk$set_parents(list(child = "parent")) - jk$set_parents(list(grandchild = "child")) + teal.data::parents(jk) <- list(child = "parent") + teal.data::parents(jk) <- list(grandchild = "child") iris2 <- transform(iris, id = seq_len(nrow(iris))) filtered_data <- FilteredData$new( list( @@ -751,8 +751,8 @@ testthat::test_that("get_filter_overview return counts based on reactive filteri teal.data::join_key("child", "parent", c("id" = "id")), teal.data::join_key("grandchild", "child", c("id" = "id")) ) - jk$set_parents(list(child = "parent")) - jk$set_parents(list(grandchild = "child")) + teal.data::parents(jk) <- list(child = "parent") + teal.data::parents(jk) <- list(grandchild = "child") iris2 <- transform(iris, id = seq_len(nrow(iris))) filtered_data <- FilteredData$new( list( From f23884ddb75a44be90a55096bc440caaff75081b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:13:44 +0100 Subject: [PATCH 2/9] Rename JoinKeys class to join_keys from upstream (#487) Merges to #486 Updates `teal.slice` with latest change from `teal.data` class names --- NEWS.md | 1 + R/FilteredData-utils.R | 4 ++-- R/FilteredData.R | 15 +++++++-------- man/FilteredData.Rd | 8 ++++---- man/init_filtered_data.Rd | 2 +- tests/testthat/test-FilteredData.R | 6 +++--- tests/testthat/test-init_filtered_data.R | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/NEWS.md b/NEWS.md index eda1fbe61..1c661a597 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ * Specified minimal version of package dependencies. * Removed storing and restoring of `teal_slices` objects. +* Update documentation and code to reflect `teal.data::JoinKeys` class and logic change to `teal.data::join_keys`. # teal.slice 0.4.0 diff --git a/R/FilteredData-utils.R b/R/FilteredData-utils.R index 0b15fcd63..145077c80 100644 --- a/R/FilteredData-utils.R +++ b/R/FilteredData-utils.R @@ -8,7 +8,7 @@ #' - `keys` (optional) primary keys. #' - `datalabel` (optional) label describing the `dataset`. #' - `parent` (optional) which `dataset` is a parent of this one. -#' @param join_keys (`JoinKeys`) see [teal.data::join_keys()]. +#' @param join_keys (`join_keys`) see [teal.data::join_keys()]. #' @param code (`CodeClass`) see [`teal.data::CodeClass`]. #' @param check (`logical(1)`) whether data has been check against reproducibility. #' @examples @@ -63,7 +63,7 @@ init_filtered_data.TealData <- function(x, # nolint init_filtered_data.default <- function(x, join_keys = teal.data::join_keys(), code = NULL, check = FALSE) { # nolint checkmate::assert_list(x, any.missing = FALSE, names = "unique") checkmate::assert_class(code, "CodeClass", null.ok = TRUE) - checkmate::assert_class(join_keys, "JoinKeys") + checkmate::assert_class(join_keys, "join_keys") checkmate::assert_flag(check) FilteredData$new(x, join_keys = join_keys, code = code, check = check) } diff --git a/R/FilteredData.R b/R/FilteredData.R index e8f06a0fa..80b6b8316 100644 --- a/R/FilteredData.R +++ b/R/FilteredData.R @@ -67,14 +67,14 @@ FilteredData <- R6::R6Class( # nolint #' @param data_objects (`list`) #' should named elements containing `data.frame` or `MultiAssayExperiment`. #' Names of the list will serve as `dataname`. - #' @param join_keys (`JoinKeys` or NULL) see [`teal.data::join_keys()`]. + #' @param join_keys (`join_keys` or NULL) see [`teal.data::join_keys()`]. #' @param code (`CodeClass` or `NULL`) see [`teal.data::CodeClass`]. #' @param check (`logical(1)`) whether data has been check against reproducibility. #' initialize = function(data_objects, join_keys = teal.data::join_keys(), code = NULL, check = FALSE) { checkmate::assert_list(data_objects, any.missing = FALSE, min.len = 0, names = "unique") # Note the internals of data_objects are checked in set_dataset - checkmate::assert_class(join_keys, "JoinKeys") + checkmate::assert_class(join_keys, "join_keys") checkmate::assert_class(code, "CodeClass", null.ok = TRUE) checkmate::assert_flag(check) @@ -84,7 +84,6 @@ FilteredData <- R6::R6Class( # nolint } self$set_join_keys(join_keys) - child_parent <- sapply( names(data_objects), function(i) teal.data::parent(join_keys, i), @@ -266,7 +265,7 @@ FilteredData <- R6::R6Class( # nolint #' @description #' Get join keys between two datasets. #' - #' @return (`JoinKeys`) + #' @return (`join_keys`) #' get_join_keys = function() { return(private$join_keys) @@ -308,7 +307,7 @@ FilteredData <- R6::R6Class( # nolint #' #' @details #' `set_dataset` creates a `FilteredDataset` object which keeps `dataset` for the filtering purpose. - #' If this data has a parent specified in the `JoinKeys` object stored in `private$join_keys` + #' If this data has a parent specified in the `join_keys` object stored in `private$join_keys` #' then created `FilteredDataset` (child) gets linked with other `FilteredDataset` (parent). #' "Child" dataset return filtered data then dependent on the reactive filtered data of the #' "parent". See more in documentation of `parent` argument in `FilteredDatasetDefault` constructor. @@ -361,12 +360,12 @@ FilteredData <- R6::R6Class( # nolint #' @description #' Set the `join_keys`. #' - #' @param join_keys (`JoinKeys`) join_key (converted to a nested list) + #' @param join_keys (`join_keys`) join_key (converted to a nested list) #' #' @return (`self`) invisibly this `FilteredData` #' set_join_keys = function(join_keys) { - checkmate::assert_class(join_keys, "JoinKeys") + checkmate::assert_class(join_keys, "join_keys") private$join_keys <- join_keys invisible(self) }, @@ -1076,7 +1075,7 @@ FilteredData <- R6::R6Class( # nolint # `reactive` containing teal_slices that can be selected; only active in module-specific mode available_teal_slices = NULL, - # keys used for joining/filtering data a JoinKeys object (see teal.data) + # keys used for joining/filtering data a join_keys object (see teal.data) join_keys = NULL, # flag specifying whether the user may add filters diff --git a/man/FilteredData.Rd b/man/FilteredData.Rd index e4b6a91c1..a1aef21c4 100644 --- a/man/FilteredData.Rd +++ b/man/FilteredData.Rd @@ -162,7 +162,7 @@ Initialize a \code{FilteredData} object should named elements containing \code{data.frame} or \code{MultiAssayExperiment}. Names of the list will serve as \code{dataname}.} -\item{\code{join_keys}}{(\code{JoinKeys} or NULL) see \code{\link[teal.data:join_keys]{teal.data::join_keys()}}.} +\item{\code{join_keys}}{(\code{join_keys} or NULL) see \code{\link[teal.data:join_keys]{teal.data::join_keys()}}.} \item{\code{code}}{(\code{CodeClass} or \code{NULL}) see \code{\link[teal.data:CodeClass]{teal.data::CodeClass}}.} @@ -373,7 +373,7 @@ Get join keys between two datasets. } \subsection{Returns}{ -(\code{JoinKeys}) +(\code{join_keys}) } } \if{html}{\out{
}} @@ -453,7 +453,7 @@ Label to describe the dataset} } \subsection{Details}{ \code{set_dataset} creates a \code{FilteredDataset} object which keeps \code{dataset} for the filtering purpose. -If this data has a parent specified in the \code{JoinKeys} object stored in \code{private$join_keys} +If this data has a parent specified in the \code{join_keys} object stored in \code{private$join_keys} then created \code{FilteredDataset} (child) gets linked with other \code{FilteredDataset} (parent). "Child" dataset return filtered data then dependent on the reactive filtered data of the "parent". See more in documentation of \code{parent} argument in \code{FilteredDatasetDefault} constructor. @@ -475,7 +475,7 @@ Set the \code{join_keys}. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{join_keys}}{(\code{JoinKeys}) join_key (converted to a nested list)} +\item{\code{join_keys}}{(\code{join_keys}) join_key (converted to a nested list)} } \if{html}{\out{
}} } diff --git a/man/init_filtered_data.Rd b/man/init_filtered_data.Rd index 554b78b44..6bf3dacff 100644 --- a/man/init_filtered_data.Rd +++ b/man/init_filtered_data.Rd @@ -17,7 +17,7 @@ If the list is provided, it should contain \code{list}(s) containing following f \item \code{parent} (optional) which \code{dataset} is a parent of this one. }} -\item{join_keys}{(\code{JoinKeys}) see \code{\link[teal.data:join_keys]{teal.data::join_keys()}}.} +\item{join_keys}{(\code{join_keys}) see \code{\link[teal.data:join_keys]{teal.data::join_keys()}}.} \item{code}{(\code{CodeClass}) see \code{\link[teal.data:CodeClass]{teal.data::CodeClass}}.} diff --git a/tests/testthat/test-FilteredData.R b/tests/testthat/test-FilteredData.R index 89b63372e..b7aa8add4 100644 --- a/tests/testthat/test-FilteredData.R +++ b/tests/testthat/test-FilteredData.R @@ -10,7 +10,7 @@ testthat::test_that("constructor accepts call with only dataset specified", { testthat::expect_error(FilteredData$new(list(iris = dataset)), "Must inherit") }) -testthat::test_that("constructor accepts join_keys to be JoinKeys or NULL", { +testthat::test_that("constructor accepts join_keys to be join_keys or NULL", { testthat::expect_no_error( FilteredData$new(list(iris = list(dataset = iris)), join_keys = teal.data::join_keys()) ) @@ -170,9 +170,9 @@ testthat::test_that("set_datasets creates FilteredDataset object linked with par # get_keys ---- -testthat::test_that("get_join_keys returns empty JoinKeys object", { +testthat::test_that("get_join_keys returns empty join_keys object", { filtered_data <- FilteredData$new(list(iris = list(dataset = head(iris)))) - testthat::expect_s3_class(filtered_data$get_join_keys(), "JoinKeys") + testthat::expect_s3_class(filtered_data$get_join_keys(), "join_keys") }) testthat::test_that("get_keys returns keys of the dataset specified via join_keys", { diff --git a/tests/testthat/test-init_filtered_data.R b/tests/testthat/test-init_filtered_data.R index 91a92810b..f51cfb1b3 100644 --- a/tests/testthat/test-init_filtered_data.R +++ b/tests/testthat/test-init_filtered_data.R @@ -35,10 +35,10 @@ testthat::test_that("init_filtered_data.default accepts NULL passed to code", { testthat::expect_no_error(init_filtered_data(list("iris" = list(dataset = iris)), code = NULL)) }) -testthat::test_that("init_filtered_data.default asserts join_keys is `JoinKeys`", { +testthat::test_that("init_filtered_data.default asserts join_keys is `join_keys`", { testthat::expect_error( init_filtered_data(list("iris" = list(dataset = iris)), join_keys = "test"), - regexp = "Assertion on 'join_keys' failed: Must inherit from class 'JoinKeys', but has class 'character'." + regexp = "Assertion on 'join_keys' failed: Must inherit from class 'join_keys', but has class 'character'." ) }) From 368b5332871e2f647d6aa5f6865e2ae8caac574c Mon Sep 17 00:00:00 2001 From: vedhav Date: Fri, 10 Nov 2023 14:12:25 +0530 Subject: [PATCH 3/9] fix: expect NULL from join_keys when they are empty --- R/FilteredData.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/R/FilteredData.R b/R/FilteredData.R index 80b6b8316..4fcdf83d5 100644 --- a/R/FilteredData.R +++ b/R/FilteredData.R @@ -333,22 +333,27 @@ FilteredData <- R6::R6Class( # nolint check_simple_name(dataname) parent_dataname <- teal.data::parent(private$join_keys, dataname) + keys <- private$join_keys[[dataname]][[dataname]] + if (is.null(keys)) keys <- character(0) + if (length(parent_dataname) == 0) { private$filtered_datasets[[dataname]] <- init_filtered_dataset( dataset = data, dataname = dataname, metadata = metadata, label = label, - keys = private$join_keys[dataname, dataname] + keys = keys ) } else { + join_keys <- private$join_keys[[dataname]][[parent_dataname]] + if (is.null(join_keys)) join_keys <- character(0) private$filtered_datasets[[dataname]] <- init_filtered_dataset( dataset = data, dataname = dataname, - keys = private$join_keys[dataname, dataname], + keys = keys, parent_name = parent_dataname, parent = reactive(self$get_data(parent_dataname, filtered = TRUE)), - join_keys = private$join_keys[dataname, parent_dataname], + join_keys = join_keys, label = label, metadata = metadata ) From 2c6e59774efb6e54a9f391287f180ff7aa732785 Mon Sep 17 00:00:00 2001 From: vedhav Date: Wed, 15 Nov 2023 14:54:20 +0530 Subject: [PATCH 4/9] fix: fix broken tests --- tests/testthat/test-FilteredData.R | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/tests/testthat/test-FilteredData.R b/tests/testthat/test-FilteredData.R index b7aa8add4..2a460c478 100644 --- a/tests/testthat/test-FilteredData.R +++ b/tests/testthat/test-FilteredData.R @@ -65,29 +65,6 @@ testthat::test_that("FilteredData preserves the check field when check is TRUE", testthat::expect_true(filtered_data$get_check()) }) -testthat::test_that("FilteredData forbids cyclic graphs of datasets relationship", { - jk <- teal.data::join_keys( - teal.data::join_key("child", "parent", c("id" = "id")), - teal.data::join_key("grandchild", "child", c("id" = "id")), - teal.data::join_key("grandchild", "parent", c("id" = "id")) - ) - teal.data::parents(jk) <- list(child = "parent") - teal.data::parents(jk) <- list(grandchild = "child") - teal.data::parents(jk) <- list(parent = "grandchild") - iris2 <- transform(iris, id = seq_len(nrow(iris))) - testthat::expect_error( - FilteredData$new( - list( - grandchild = list(dataset = head(iris2)), - child = list(dataset = head(iris2)), - parent = list(dataset = head(iris2)) - ), - join_keys = jk - ), - "Graph is not a directed acyclic graph" - ) -}) - # datanames ---- testthat::test_that("filtered_data$datanames returns character vector of datasets names", { @@ -374,8 +351,7 @@ testthat::test_that("get_data of the child is dependent on the ancestor filter", teal.data::join_key("child", "parent", c("id" = "id")), teal.data::join_key("grandchild", "child", c("id" = "id")) ) - teal.data::parents(jk) <- list(child = "parent") - teal.data::parents(jk) <- list(grandchild = "child") + teal.data::parents(jk) <- list(child = "parent", grandchild = "child") iris2 <- transform(iris, id = seq_len(nrow(iris))) filtered_data <- FilteredData$new( list( @@ -751,8 +727,7 @@ testthat::test_that("get_filter_overview return counts based on reactive filteri teal.data::join_key("child", "parent", c("id" = "id")), teal.data::join_key("grandchild", "child", c("id" = "id")) ) - teal.data::parents(jk) <- list(child = "parent") - teal.data::parents(jk) <- list(grandchild = "child") + teal.data::parents(jk) <- list(child = "parent", grandchild = "child") iris2 <- transform(iris, id = seq_len(nrow(iris))) filtered_data <- FilteredData$new( list( From 7983add0c8d73bf118ffb0496dfe902f5835b309 Mon Sep 17 00:00:00 2001 From: Vedha Viyash <49812166+vedhav@users.noreply.github.com> Date: Fri, 17 Nov 2023 15:32:04 +0530 Subject: [PATCH 5/9] Update NEWS.md Signed-off-by: Vedha Viyash <49812166+vedhav@users.noreply.github.com> --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 1c661a597..32f4ffa8e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,7 +4,7 @@ * Specified minimal version of package dependencies. * Removed storing and restoring of `teal_slices` objects. -* Update documentation and code to reflect `teal.data::JoinKeys` class and logic change to `teal.data::join_keys`. +* Update documentation and code to reflect the changes due to the refactor of `teal.data::JoinKeys` into `teal.data::join_keys`. # teal.slice 0.4.0 From 1d4e4153a6b79cd354e48486b5c24f1c9c6c1769 Mon Sep 17 00:00:00 2001 From: Vedha Viyash <49812166+vedhav@users.noreply.github.com> Date: Fri, 17 Nov 2023 15:32:15 +0530 Subject: [PATCH 6/9] Update R/FilteredData.R Co-authored-by: kartikeya kirar Signed-off-by: Vedha Viyash <49812166+vedhav@users.noreply.github.com> --- R/FilteredData.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/FilteredData.R b/R/FilteredData.R index 4fcdf83d5..8b095132b 100644 --- a/R/FilteredData.R +++ b/R/FilteredData.R @@ -345,7 +345,7 @@ FilteredData <- R6::R6Class( # nolint keys = keys ) } else { - join_keys <- private$join_keys[[dataname]][[parent_dataname]] + join_keys <- private$join_keys[dataname, parent_dataname] if (is.null(join_keys)) join_keys <- character(0) private$filtered_datasets[[dataname]] <- init_filtered_dataset( dataset = data, From 03c337b7cce8444a69ca66e8c8f527a70dbbb60d Mon Sep 17 00:00:00 2001 From: Vedha Viyash <49812166+vedhav@users.noreply.github.com> Date: Fri, 17 Nov 2023 15:32:29 +0530 Subject: [PATCH 7/9] Update R/FilteredData.R Co-authored-by: kartikeya kirar Signed-off-by: Vedha Viyash <49812166+vedhav@users.noreply.github.com> --- R/FilteredData.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/FilteredData.R b/R/FilteredData.R index 8b095132b..3ff9d1231 100644 --- a/R/FilteredData.R +++ b/R/FilteredData.R @@ -333,7 +333,7 @@ FilteredData <- R6::R6Class( # nolint check_simple_name(dataname) parent_dataname <- teal.data::parent(private$join_keys, dataname) - keys <- private$join_keys[[dataname]][[dataname]] + keys <- private$join_keys[dataname, dataname] if (is.null(keys)) keys <- character(0) if (length(parent_dataname) == 0) { From d9c245704246c56213c624ecd7e6fa2d9f09770d Mon Sep 17 00:00:00 2001 From: vedhav Date: Fri, 17 Nov 2023 18:07:08 +0530 Subject: [PATCH 8/9] chore: replace `runApp` with `shinyApp` --- R/FilterState-utils.R | 2 +- R/FilterStates-utils.R | 2 +- R/FilteredDataset-utils.R | 4 ++-- R/count_labels.R | 2 +- man/countBars.Rd | 2 +- man/init_filter_state.Rd | 2 +- man/init_filter_states.Rd | 2 +- man/init_filtered_dataset.Rd | 4 ++-- vignettes/filter-panel-for-developers.Rmd | 2 +- vignettes/teal-slice.Rmd | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/R/FilterState-utils.R b/R/FilterState-utils.R index a53c7cebe..bfe2372ce 100644 --- a/R/FilterState-utils.R +++ b/R/FilterState-utils.R @@ -47,7 +47,7 @@ #' } #' ) #' if (interactive()) { -#' runApp(app) +#' shinyApp(app$ui, app$server) #' } #' @return `FilterState` object init_filter_state <- function(x, diff --git a/R/FilterStates-utils.R b/R/FilterStates-utils.R index ba5852518..27b33245b 100644 --- a/R/FilterStates-utils.R +++ b/R/FilterStates-utils.R @@ -48,7 +48,7 @@ #' } #' ) #' if (interactive()) { -#' runApp(app) +#' shinyApp(app$ui, app$server) #' } init_filter_states <- function(data, data_reactive = reactive(NULL), diff --git a/R/FilteredDataset-utils.R b/R/FilteredDataset-utils.R index af31ab037..c9baa83da 100644 --- a/R/FilteredDataset-utils.R +++ b/R/FilteredDataset-utils.R @@ -32,7 +32,7 @@ #' } #' ) #' if (interactive()) { -#' runApp(app) +#' shinyApp(app$ui, app$server) #' } #' #' # MAEFilteredDataset example @@ -61,7 +61,7 @@ #' } #' ) #' if (interactive()) { -#' runApp(app) +#' shinyApp(app$ui, app$server) #' } #' @param dataset (`data.frame` or `MultiAssayExperiment`)\cr #' @param dataname (`character`)\cr diff --git a/R/count_labels.R b/R/count_labels.R index 093f7b3a5..0eef2975f 100644 --- a/R/count_labels.R +++ b/R/count_labels.R @@ -52,7 +52,7 @@ #' } #' ) #' if (interactive()) { -#' runApp(app) +#' shinyApp(app$ui, app$server) #' } #' @keywords internal countBars <- function(inputId, choices, countsmax, countsnow = NULL) { # nolint diff --git a/man/countBars.Rd b/man/countBars.Rd index 46330582f..505acfbc6 100644 --- a/man/countBars.Rd +++ b/man/countBars.Rd @@ -77,7 +77,7 @@ app <- shinyApp( } ) if (interactive()) { - runApp(app) + shinyApp(app$ui, app$server) } } \keyword{internal} diff --git a/man/init_filter_state.Rd b/man/init_filter_state.Rd index 8ff1e3619..9b768466a 100644 --- a/man/init_filter_state.Rd +++ b/man/init_filter_state.Rd @@ -66,7 +66,7 @@ app <- shinyApp( } ) if (interactive()) { - runApp(app) + shinyApp(app$ui, app$server) } } \keyword{internal} diff --git a/man/init_filter_states.Rd b/man/init_filter_states.Rd index 743d66e73..7084d8a06 100644 --- a/man/init_filter_states.Rd +++ b/man/init_filter_states.Rd @@ -66,7 +66,7 @@ app <- shinyApp( } ) if (interactive()) { - runApp(app) + shinyApp(app$ui, app$server) } } \keyword{internal} diff --git a/man/init_filtered_dataset.Rd b/man/init_filtered_dataset.Rd index 1dec902e3..37cc1a9eb 100644 --- a/man/init_filtered_dataset.Rd +++ b/man/init_filtered_dataset.Rd @@ -82,7 +82,7 @@ app <- shinyApp( } ) if (interactive()) { - runApp(app) + shinyApp(app$ui, app$server) } # MAEFilteredDataset example @@ -111,7 +111,7 @@ app <- shinyApp( } ) if (interactive()) { - runApp(app) + shinyApp(app$ui, app$server) } } \keyword{internal} diff --git a/vignettes/filter-panel-for-developers.Rmd b/vignettes/filter-panel-for-developers.Rmd index 6807d62f7..b04ead7c9 100644 --- a/vignettes/filter-panel-for-developers.Rmd +++ b/vignettes/filter-panel-for-developers.Rmd @@ -252,6 +252,6 @@ app <- shinyApp( } ) if (interactive()) { - runApp(app) + shinyApp(app$ui, app$server) } ``` diff --git a/vignettes/teal-slice.Rmd b/vignettes/teal-slice.Rmd index 561498351..20fe6471c 100644 --- a/vignettes/teal-slice.Rmd +++ b/vignettes/teal-slice.Rmd @@ -115,6 +115,6 @@ app <- shinyApp( } ) if (interactive()) { - runApp(app) + shinyApp(app$ui, app$server) } ``` From fcec5e8c0d1c63b6f934afd990b3bf1267697620 Mon Sep 17 00:00:00 2001 From: vedhav Date: Mon, 20 Nov 2023 14:26:54 +0530 Subject: [PATCH 9/9] chore: vbump --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6180fca8f..9a4949557 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -45,7 +45,7 @@ Imports: shinycssloaders (>= 1.0.0), shinyjs, shinyWidgets (>= 0.6.2), - teal.data (>= 0.3.0), + teal.data (>= 0.3.0.9010), teal.logger (>= 0.1.1), teal.widgets (>= 0.4.0), utils