diff --git a/1079_pre-release-cleanup@main/coverage-report/index.html b/1079_pre-release-cleanup@main/coverage-report/index.html index b8dcbfbcf2..43e4f54b4c 100644 --- a/1079_pre-release-cleanup@main/coverage-report/index.html +++ b/1079_pre-release-cleanup@main/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -445,42 +444,48 @@

teal coverage - 67.06%

48 - 34x + 34x +
  lifecycle::deprecate_soft(
49 - 34x + 34x +
    when = "0.99.0",
50 - 34x + 34x +
    what = "tdata()",
51 - 34x + 34x +
    details = paste(
52 - 34x + 34x +
      "tdata is deprecated and will be removed in the next release. Use `teal_data` instead.\n",
53 - 34x + 34x +
      "Please follow migration instructions https://github.com/insightsengineering/teal/discussions/987."
@@ -501,28 +506,32 @@

teal coverage - 67.06%

56 - 34x + 34x +
  checkmate::assert_list(
57 - 34x + 34x +
    data,
58 - 34x + 34x +
    any.missing = FALSE, names = "unique",
59 - 34x + 34x +
    types = c("data.frame", "reactive", "MultiAssayExperiment")
@@ -536,14 +545,16 @@

teal coverage - 67.06%

61 - 30x + 30x +
  checkmate::assert_class(join_keys, "join_keys", null.ok = TRUE)
62 - 29x + 29x +
  checkmate::assert_multi_class(code, c("character", "reactive"))
@@ -557,14 +568,16 @@

teal coverage - 67.06%

64 - 28x + 28x +
  checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
65 - 26x + 26x +
  checkmate::assert_subset(names(metadata), names(data))
@@ -578,14 +591,16 @@

teal coverage - 67.06%

67 - 25x + 25x +
  if (is.reactive(code)) {
68 - 9x + 9x +
    isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
@@ -613,21 +628,24 @@

teal coverage - 67.06%

72 - 24x + 24x +
  for (x in names(data)) {
73 - 47x + 47x +
    if (!is.reactive(data[[x]])) {
74 - 31x + 31x +
      data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
@@ -662,21 +680,24 @@

teal coverage - 67.06%

79 - 24x + 24x +
  attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
80 - 24x + 24x +
  attr(data, "join_keys") <- join_keys
81 - 24x + 24x +
  attr(data, "metadata") <- metadata
@@ -697,14 +718,16 @@

teal coverage - 67.06%

84 - 24x + 24x +
  class(data) <- c("tdata", class(data))
85 - 24x + 24x +
  data
@@ -844,14 +867,16 @@

teal coverage - 67.06%

105 - 2x + 2x +
  checkmate::assert_class(data, "tdata")
106 - 1x + 1x +
  list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
@@ -942,14 +967,16 @@

teal coverage - 67.06%

119 - 7x + 7x +
  checkmate::assert_class(data, "tdata")
120 - 5x + 5x +
  attr(data, "code")()
@@ -1005,7 +1032,8 @@

teal coverage - 67.06%

128 - 2x + 2x +
  attr(data, "join_keys")
@@ -1068,14 +1096,16 @@

teal coverage - 67.06%

137 - 4x + 4x +
  checkmate::assert_string(dataname)
138 - 4x + 4x +
  UseMethod("get_metadata", data)
@@ -1117,21 +1147,24 @@

teal coverage - 67.06%

144 - 4x + 4x +
  metadata <- attr(data, "metadata")
145 - 4x + 4x +
  if (is.null(metadata)) {
146 - 1x + 1x +
    return(NULL)
@@ -1145,7 +1178,8 @@

teal coverage - 67.06%

148 - 3x + 3x +
  metadata[[dataname]]
@@ -1390,14 +1424,16 @@

teal coverage - 67.06%

183 - 8x + 8x +
  if (inherits(x, "tdata")) {
184 - 2x + 2x +
    return(x)
@@ -1411,77 +1447,88 @@

teal coverage - 67.06%

186 - 6x + 6x +
  if (is.reactive(x)) {
187 - 1x + 1x +
    checkmate::assert_class(isolate(x()), "teal_data")
188 - 1x + 1x +
    datanames <- isolate(teal_data_datanames(x()))
189 - 1x + 1x +
    datasets <- sapply(datanames, function(dataname) reactive(x()[[dataname]]), simplify = FALSE)
190 - 1x + 1x +
    code <- reactive(teal.code::get_code(x()))
191 - 1x + 1x +
    join_keys <- isolate(teal.data::join_keys(x()))
192 - 5x + 5x +
  } else if (inherits(x, "teal_data")) {
193 - 5x + 5x +
    datanames <- teal_data_datanames(x)
194 - 5x + 5x +
    datasets <- sapply(datanames, function(dataname) reactive(x[[dataname]]), simplify = FALSE)
195 - 5x + 5x +
    code <- reactive(teal.code::get_code(x))
196 - 5x + 5x +
    join_keys <- isolate(teal.data::join_keys(x))
@@ -1502,7 +1549,8 @@

teal coverage - 67.06%

199 - 6x + 6x +
  new_tdata(data = datasets, code = code, join_keys = join_keys)
@@ -1655,21 +1703,24 @@

teal coverage - 67.06%

20 - 4x + 4x +
  checkmate::assert_string(label)
21 - 2x + 2x +
  checkmate::assert_list(server_args, names = "named")
22 - 2x + 2x +
  checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
@@ -1683,7 +1734,8 @@

teal coverage - 67.06%

24 - 2x + 2x +
  logger::log_info("Initializing reporter_previewer_module")
@@ -1697,7 +1749,8 @@

teal coverage - 67.06%

26 - 2x + 2x +
  srv <- function(id, reporter, ...) {
@@ -1725,7 +1778,8 @@

teal coverage - 67.06%

30 - 2x + 2x +
  ui <- function(id, ...) {
@@ -1753,28 +1807,32 @@

teal coverage - 67.06%

34 - 2x + 2x +
  module <- module(
35 - 2x + 2x +
    label = "temporary label",
36 - 2x + 2x +
    server = srv, ui = ui,
37 - 2x + 2x +
    server_args = server_args, ui_args = list(), datanames = NULL
@@ -1802,21 +1860,24 @@

teal coverage - 67.06%

41 - 2x + 2x +
  class(module) <- c("teal_module_previewer", class(module))
42 - 2x + 2x +
  module$label <- label
43 - 2x + 2x +
  module
@@ -2459,14 +2520,16 @@

teal coverage - 67.06%

90 - 3x + 3x +
  moduleServer(id, function(input, output, session) {
91 - 3x + 3x +
    observeEvent(input$show, {
@@ -2550,7 +2613,8 @@

teal coverage - 67.06%

103 - 3x + 3x +
    filter_manager_srv("filter_manager", filtered_data_list, filter)
@@ -2662,14 +2726,16 @@

teal coverage - 67.06%

119 - 5x + 5x +
  moduleServer(id, function(input, output, session) {
120 - 5x + 5x +
    logger::log_trace("filter_manager_srv initializing for: { paste(names(filtered_data_list), collapse = ', ')}.")
@@ -2683,7 +2749,8 @@

teal coverage - 67.06%

122 - 5x + 5x +
    is_module_specific <- isTRUE(attr(filter, "module_specific"))
@@ -2725,7 +2792,8 @@

teal coverage - 67.06%

128 - 5x + 5x +
    slices_global <- reactiveVal(filter)
@@ -2739,14 +2807,16 @@

teal coverage - 67.06%

130 - 5x + 5x +
    filtered_data_list <-
131 - 5x + 5x +
      if (!is_module_specific) {
@@ -2767,7 +2837,8 @@

teal coverage - 67.06%

134 - 4x + 4x +
        list(global_filters = unlist(filtered_data_list)[[1]])
@@ -2795,21 +2866,24 @@

teal coverage - 67.06%

138 - 1x + 1x +
        flatten_nested <- function(x, name = NULL) {
139 - 5x + 5x +
          if (inherits(x, "FilteredData")) {
140 - 3x + 3x +
            setNames(list(x), name)
@@ -2823,7 +2897,8 @@

teal coverage - 67.06%

142 - 2x + 2x +
            unlist(lapply(names(x), function(name) flatten_nested(x[[name]], name)))
@@ -2844,7 +2919,8 @@

teal coverage - 67.06%

145 - 1x + 1x +
        flatten_nested(filtered_data_list)
@@ -2879,49 +2955,56 @@

teal coverage - 67.06%

150 - 5x + 5x +
    mapping_matrix <- reactive({
151 - 5x + 5x +
      state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
152 - 5x + 5x +
      mapping_smooth <- lapply(filtered_data_list, function(x) {
153 - 7x + 7x +
        state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
154 - 7x + 7x +
        state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
155 - 7x + 7x +
        states_active <- state_ids_global %in% state_ids_local
156 - 7x + 7x +
        ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
@@ -2942,7 +3025,8 @@

teal coverage - 67.06%

159 - 5x + 5x +
      as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
@@ -2963,14 +3047,16 @@

teal coverage - 67.06%

162 - 5x + 5x +
    output$slices_table <- renderTable(
163 - 5x + 5x +
      expr = {
@@ -2984,28 +3070,32 @@

teal coverage - 67.06%

165 - 2x + 2x +
        mm <- mapping_matrix()
166 - 2x + 2x +
        mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
167 - 2x + 2x +
        mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
168 - 2x + 2x +
        if (!is_module_specific) colnames(mm) <- "Global Filters"
@@ -3026,21 +3116,24 @@

teal coverage - 67.06%

171 - 2x + 2x +
        if (nrow(mm) == 0L) {
172 - 2x + 2x +
          mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
173 - 2x + 2x +
          rownames(mm) <- ""
@@ -3068,7 +3161,8 @@

teal coverage - 67.06%

177 - 2x + 2x +
        mm[names(mm) != "Report previewer"]
@@ -3082,14 +3176,16 @@

teal coverage - 67.06%

179 - 5x + 5x +
      align = paste(c("l", rep("c", sum(names(filtered_data_list) != "Report previewer"))), collapse = ""),
180 - 5x + 5x +
      rownames = TRUE
@@ -3117,35 +3213,40 @@

teal coverage - 67.06%

184 - 5x + 5x +
    modules_out <- lapply(names(filtered_data_list), function(module_name) {
185 - 7x + 7x +
      filter_manager_module_srv(
186 - 7x + 7x +
        id = module_name,
187 - 7x + 7x +
        module_fd = filtered_data_list[[module_name]],
188 - 7x + 7x +
        slices_global = slices_global
@@ -3180,7 +3281,8 @@

teal coverage - 67.06%

193 - 5x + 5x +
    snapshot_manager_srv("snapshot_manager", slices_global, mapping_matrix, filtered_data_list)
@@ -3194,7 +3296,8 @@

teal coverage - 67.06%

195 - 5x + 5x +
    modules_out # returned for testing purpose
@@ -3383,7 +3486,8 @@

teal coverage - 67.06%

222 - 7x + 7x +
  moduleServer(id, function(input, output, session) {
@@ -3397,7 +3501,8 @@

teal coverage - 67.06%

224 - 7x + 7x +
    module_fd$set_available_teal_slices(reactive(slices_global()))
@@ -3418,7 +3523,8 @@

teal coverage - 67.06%

227 - 7x + 7x +
    slices_module <- reactive(module_fd$get_filter_state())
@@ -3439,14 +3545,16 @@

teal coverage - 67.06%

230 - 7x + 7x +
    previous_slices <- reactiveVal(isolate(slices_module()))
231 - 7x + 7x +
    slices_added <- reactiveVal(NULL)
@@ -3467,21 +3575,24 @@

teal coverage - 67.06%

234 - 7x + 7x +
    observeEvent(slices_module(), ignoreNULL = FALSE, {
235 - 2x + 2x +
      logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
236 - 2x + 2x +
      added <- setdiff_teal_slices(slices_module(), slices_global())
@@ -3495,7 +3606,8 @@

teal coverage - 67.06%

238 - 2x + 2x +
      previous_slices(slices_module())
@@ -3516,7 +3628,8 @@

teal coverage - 67.06%

241 - 7x + 7x +
    observeEvent(slices_added(), ignoreNULL = TRUE, {
@@ -3635,7 +3748,8 @@

teal coverage - 67.06%

258 - 7x + 7x +
    slices_module # returned for testing purpose
@@ -4075,42 +4189,48 @@

teal coverage - 67.06%

60 - 7x + 7x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
61 - 7x + 7x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
62 - 7x + 7x +
  checkmate::assert(
63 - 7x + 7x +
    .var.name = "title",
64 - 7x + 7x +
    checkmate::check_string(title),
65 - 7x + 7x +
    checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
@@ -4124,28 +4244,32 @@

teal coverage - 67.06%

67 - 7x + 7x +
  checkmate::assert(
68 - 7x + 7x +
    .var.name = "header",
69 - 7x + 7x +
    checkmate::check_string(header),
70 - 7x + 7x +
    checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
@@ -4159,28 +4283,32 @@

teal coverage - 67.06%

72 - 7x + 7x +
  checkmate::assert(
73 - 7x + 7x +
    .var.name = "footer",
74 - 7x + 7x +
    checkmate::check_string(footer),
75 - 7x + 7x +
    checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
@@ -4201,7 +4329,8 @@

teal coverage - 67.06%

78 - 7x + 7x +
  ns <- NS(id)
@@ -4243,28 +4372,32 @@

teal coverage - 67.06%

84 - 7x + 7x +
  splash_ui <- if (inherits(data, "teal_data_module")) {
85 - 1x + 1x +
    data$ui(ns("teal_data_module"))
86 - 7x + 7x +
  } else if (inherits(data, "teal_data")) {
87 - 6x + 6x +
    div()
@@ -4278,42 +4411,48 @@

teal coverage - 67.06%

89 - 7x + 7x +
  ui_teal(
90 - 7x + 7x +
    id = ns("teal"),
91 - 7x + 7x +
    splash_ui = div(splash_ui, uiOutput(ns("error"))),
92 - 7x + 7x +
    title = title,
93 - 7x + 7x +
    header = header,
94 - 7x + 7x +
    footer = footer
@@ -4362,28 +4501,32 @@

teal coverage - 67.06%

101 - 15x + 15x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
102 - 15x + 15x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
103 - 15x + 15x +
  checkmate::assert_class(modules, "teal_modules")
104 - 15x + 15x +
  checkmate::assert_class(filter, "teal_slices")
@@ -4397,14 +4540,16 @@

teal coverage - 67.06%

106 - 15x + 15x +
  moduleServer(id, function(input, output, session) {
107 - 15x + 15x +
    logger::log_trace("srv_teal_with_splash initializing module with data.")
@@ -4418,7 +4563,8 @@

teal coverage - 67.06%

109 - 15x + 15x +
    if (getOption("teal.show_js_log", default = FALSE)) {
@@ -4460,28 +4606,32 @@

teal coverage - 67.06%

115 - 15x + 15x +
    teal_data_rv <- if (inherits(data, "teal_data_module")) {
116 - 10x + 10x +
      data <- data$server(id = "teal_data_module")
117 - 10x + 10x +
      if (!is.reactive(data)) {
118 - 1x + 1x +
        stop("The `teal_data_module` passed to `data` must return a reactive expression.", call. = FALSE)
@@ -4495,21 +4645,24 @@

teal coverage - 67.06%

120 - 9x + 9x +
      data
121 - 15x + 15x +
    } else if (inherits(data, "teal_data")) {
122 - 5x + 5x +
      reactiveVal(data)
@@ -4530,7 +4683,8 @@

teal coverage - 67.06%

125 - 14x + 14x +
    teal_data_rv_validate <- reactive({
@@ -4544,7 +4698,8 @@

teal coverage - 67.06%

127 - 11x + 11x +
      data <- tryCatch(teal_data_rv(), error = function(e) e)
@@ -4565,7 +4720,8 @@

teal coverage - 67.06%

130 - 11x + 11x +
      if (inherits(data, "shiny.silent.error") && identical(data$message, "")) {
@@ -4600,56 +4756,64 @@

teal coverage - 67.06%

135 - 11x + 11x +
      if (inherits(data, "qenv.error")) {
136 - 2x + 2x +
        validate(
137 - 2x + 2x +
          need(
138 - 2x + 2x +
            FALSE,
139 - 2x + 2x +
            paste(
140 - 2x + 2x +
              "Error when executing `teal_data_module` passed to `data`:\n ",
141 - 2x + 2x +
              paste(data$message, collapse = "\n"),
142 - 2x + 2x +
              "\n Check your inputs or contact app developer if error persists."
@@ -4698,56 +4862,64 @@

teal coverage - 67.06%

149 - 9x + 9x +
      if (inherits(data, "error")) {
150 - 1x + 1x +
        validate(
151 - 1x + 1x +
          need(
152 - 1x + 1x +
            FALSE,
153 - 1x + 1x +
            paste(
154 - 1x + 1x +
              "Error when executing `teal_data_module` passed to `data`:\n ",
155 - 1x + 1x +
              paste(data$message, collpase = "\n"),
156 - 1x + 1x +
              "\n Check your inputs or contact app developer if error persists."
@@ -4789,56 +4961,64 @@

teal coverage - 67.06%

162 - 8x + 8x +
      validate(
163 - 8x + 8x +
        need(
164 - 8x + 8x +
          inherits(data, "teal_data"),
165 - 8x + 8x +
          paste(
166 - 8x + 8x +
            "Error: `teal_data_module` passed to `data` failed to return `teal_data` object, returned",
167 - 8x + 8x +
            toString(sQuote(class(data))),
168 - 8x + 8x +
            "instead.",
169 - 8x + 8x +
            "\n Check your inputs or contact app developer if error persists."
@@ -4873,14 +5053,16 @@

teal coverage - 67.06%

174 - 5x + 5x +
      if (!length(teal.data::datanames(data))) {
175 - 1x + 1x +
        warning("`data` object has no datanames. Default datanames are set using `teal_data`'s environment.")
@@ -4901,21 +5083,24 @@

teal coverage - 67.06%

178 - 5x + 5x +
      is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
179 - 5x + 5x +
      if (!isTRUE(is_modules_ok)) {
180 - 1x + 1x +
        validate(need(isTRUE(is_modules_ok), sprintf("%s. Contact app developer.", is_modules_ok)))
@@ -4936,42 +5121,48 @@

teal coverage - 67.06%

183 - 4x + 4x +
      is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
184 - 4x + 4x +
      if (!isTRUE(is_filter_ok)) {
185 - 1x + 1x +
        showNotification(
186 - 1x + 1x +
          "Some filters were not applied because of incompatibility with data. Contact app developer.",
187 - 1x + 1x +
          type = "warning",
188 - 1x + 1x +
          duration = 10
@@ -4985,7 +5176,8 @@

teal coverage - 67.06%

190 - 1x + 1x +
        warning(is_filter_ok)
@@ -5006,7 +5198,8 @@

teal coverage - 67.06%

193 - 4x + 4x +
      teal_data_rv()
@@ -5027,7 +5220,8 @@

teal coverage - 67.06%

196 - 14x + 14x +
    output$error <- renderUI({
@@ -5069,21 +5263,24 @@

teal coverage - 67.06%

202 - 14x + 14x +
    res <- srv_teal(id = "teal", modules = modules, teal_data_rv = teal_data_rv_validate, filter = filter)
203 - 14x + 14x +
    logger::log_trace("srv_teal_with_splash initialized module with data.")
204 - 14x + 14x +
    return(res)
@@ -6370,21 +6567,24 @@

teal coverage - 67.06%

181 - 50x + 50x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
182 - 50x + 50x +
  checkmate::assert_class(reporter, "Reporter")
183 - 49x + 49x +
  UseMethod("srv_nested_tabs", modules)
@@ -6482,7 +6682,8 @@

teal coverage - 67.06%

197 - 22x + 22x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
@@ -6496,14 +6697,16 @@

teal coverage - 67.06%

199 - 22x + 22x +
  moduleServer(id = id, module = function(input, output, session) {
200 - 22x + 22x +
    logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
@@ -6517,70 +6720,80 @@

teal coverage - 67.06%

202 - 22x + 22x +
    labels <- vapply(modules$children, `[[`, character(1), "label")
203 - 22x + 22x +
    modules_reactive <- sapply(
204 - 22x + 22x +
      names(modules$children),
205 - 22x + 22x +
      function(module_id) {
206 - 33x + 33x +
        srv_nested_tabs(
207 - 33x + 33x +
          id = module_id,
208 - 33x + 33x +
          datasets = datasets[[labels[module_id]]],
209 - 33x + 33x +
          modules = modules$children[[module_id]],
210 - 33x + 33x +
          is_module_specific = is_module_specific,
211 - 33x + 33x +
          reporter = reporter
@@ -6601,7 +6814,8 @@

teal coverage - 67.06%

214 - 22x + 22x +
      simplify = FALSE
@@ -6629,21 +6843,24 @@

teal coverage - 67.06%

218 - 22x + 22x +
    input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
219 - 22x + 22x +
    get_active_module <- reactive({
220 - 12x + 12x +
      if (length(modules$children) == 1L) {
@@ -6657,7 +6874,8 @@

teal coverage - 67.06%

222 - 1x + 1x +
        modules_reactive[[1]]()
@@ -6678,7 +6896,8 @@

teal coverage - 67.06%

225 - 11x + 11x +
        modules_reactive[[input_validated()]]()
@@ -6706,7 +6925,8 @@

teal coverage - 67.06%

229 - 22x + 22x +
    get_active_module
@@ -6762,14 +6982,16 @@

teal coverage - 67.06%

237 - 27x + 27x +
  checkmate::assert_class(datasets, "FilteredData")
238 - 27x + 27x +
  logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
@@ -6783,14 +7005,16 @@

teal coverage - 67.06%

240 - 27x + 27x +
  moduleServer(id = id, module = function(input, output, session) {
241 - 27x + 27x +
    if (!is.null(modules$datanames) && is_module_specific) {
@@ -6846,35 +7070,40 @@

teal coverage - 67.06%

249 - 27x + 27x +
    trigger_data <- reactiveVal(1L)
250 - 27x + 27x +
    trigger_module <- reactiveVal(NULL)
251 - 27x + 27x +
    output$data_reactive <- renderUI({
252 - 17x + 17x +
      lapply(datasets$datanames(), function(x) {
253 - 21x + 21x +
        datasets$get_data(x, filtered = TRUE)
@@ -6888,14 +7117,16 @@

teal coverage - 67.06%

255 - 17x + 17x +
      isolate(trigger_data(trigger_data() + 1))
256 - 17x + 17x +
      isolate(trigger_module(TRUE))
@@ -6909,7 +7140,8 @@

teal coverage - 67.06%

258 - 17x + 17x +
      NULL
@@ -6937,14 +7169,16 @@

teal coverage - 67.06%

262 - 27x + 27x +
    args <- c(list(id = "module"), modules$server_args)
263 - 27x + 27x +
    if (is_arg_used(modules$server, "reporter")) {
@@ -6972,14 +7206,16 @@

teal coverage - 67.06%

267 - 27x + 27x +
    if (is_arg_used(modules$server, "datasets")) {
268 - 1x + 1x +
      args <- c(args, datasets = datasets)
@@ -7000,21 +7236,24 @@

teal coverage - 67.06%

271 - 27x + 27x +
    if (is_arg_used(modules$server, "data")) {
272 - 7x + 7x +
      data <- eventReactive(trigger_data(), .datasets_to_data(modules, datasets))
273 - 7x + 7x +
      args <- c(args, data = list(data))
@@ -7035,21 +7274,24 @@

teal coverage - 67.06%

276 - 27x + 27x +
    if (is_arg_used(modules$server, "filter_panel_api")) {
277 - 2x + 2x +
      filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
278 - 2x + 2x +
      args <- c(args, filter_panel_api = filter_panel_api)
@@ -7077,49 +7319,56 @@

teal coverage - 67.06%

282 - 27x + 27x +
    observeEvent(
283 - 27x + 27x +
      ignoreNULL = TRUE,
284 - 27x + 27x +
      once = TRUE,
285 - 27x + 27x +
      eventExpr = trigger_module(),
286 - 27x + 27x +
      handlerExpr = {
287 - 17x + 17x +
        module_output <- if (is_arg_used(modules$server, "id")) {
288 - 17x + 17x +
          do.call(modules$server, args)
@@ -7168,7 +7417,8 @@

teal coverage - 67.06%

295 - 27x + 27x +
    reactive(modules)
@@ -7287,14 +7537,16 @@

teal coverage - 67.06%

312 - 4x + 4x +
  checkmate::assert_class(module, "teal_module")
313 - 4x + 4x +
  checkmate::assert_class(datasets, "FilteredData")
@@ -7308,14 +7560,16 @@

teal coverage - 67.06%

315 - 4x + 4x +
  datanames <- if (is.null(module$datanames) || identical(module$datanames, "all")) {
316 - 1x + 1x +
    datasets$datanames()
@@ -7329,21 +7583,24 @@

teal coverage - 67.06%

318 - 3x + 3x +
    include_parent_datanames(
319 - 3x + 3x +
      module$datanames,
320 - 3x + 3x +
      datasets$get_join_keys()
@@ -7378,7 +7635,8 @@

teal coverage - 67.06%

325 - 4x + 4x +
  data <- sapply(datanames, function(x) datasets$get_data(x, filtered = TRUE), simplify = FALSE)
@@ -7392,7 +7650,8 @@

teal coverage - 67.06%

327 - 4x + 4x +
  hashes <- calculate_hashes(datanames, datasets)
@@ -7406,28 +7665,32 @@

teal coverage - 67.06%

329 - 4x + 4x +
  code <- c(
330 - 4x + 4x +
    get_rcode_str_install(),
331 - 4x + 4x +
    get_rcode_libraries(),
332 - 4x + 4x +
    get_datasets_code(datanames, datasets, hashes)
@@ -7455,21 +7718,24 @@

teal coverage - 67.06%

336 - 4x + 4x +
  data <- do.call(
337 - 4x + 4x +
    teal.data::teal_data,
338 - 4x + 4x +
    args = c(data, code = list(code), join_keys = list(datasets$get_join_keys()[datanames]))
@@ -7490,14 +7756,16 @@

teal coverage - 67.06%

341 - 4x + 4x +
  data@verified <- attr(datasets, "verification_status")
342 - 4x + 4x +
  data
@@ -7581,7 +7849,8 @@

teal coverage - 67.06%

354 - 7x + 7x +
  sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
@@ -7769,56 +8038,64 @@

teal coverage - 67.06%

25 - 4x + 4x +
      checkmate::assert_character(src, min.len = 0, max.len = 1)
26 - 4x + 4x +
      params <- list(...)
27 - 4x + 4x +
      params$eval <- FALSE
28 - 4x + 4x +
      rblock <- RcodeBlock$new(src)
29 - 4x + 4x +
      rblock$set_params(params)
30 - 4x + 4x +
      self$append_content(rblock)
31 - 4x + 4x +
      self$append_metadata("SRC", src)
32 - 4x + 4x +
      invisible(self)
@@ -7888,28 +8165,32 @@

teal coverage - 67.06%

42 - 5x + 5x +
      checkmate::assert_class(fs, "teal_slices")
43 - 4x + 4x +
      self$append_text("Filter State", "header3")
44 - 4x + 4x +
      self$append_content(TealSlicesBlock$new(fs))
45 - 4x + 4x +
      invisible(self)
@@ -7986,56 +8267,64 @@

teal coverage - 67.06%

56 - 4x + 4x +
      checkmate::assert_list(encodings)
57 - 4x + 4x +
      self$append_text("Selected Options", "header3")
58 - 4x + 4x +
      if (requireNamespace("yaml", quietly = TRUE)) {
59 - 4x + 4x +
        self$append_text(yaml::as.yaml(encodings, handlers = list(
60 - 4x + 4x +
          POSIXct = function(x) format(x, "%Y-%m-%d"),
61 - 4x + 4x +
          POSIXlt = function(x) format(x, "%Y-%m-%d"),
62 - 4x + 4x +
          Date = function(x) format(x, "%Y-%m-%d")
63 - 4x + 4x +
        )), "verbatim")
@@ -8063,14 +8352,16 @@

teal coverage - 67.06%

67 - 4x + 4x +
      self$append_metadata("Encodings", encodings)
68 - 4x + 4x +
      invisible(self)
@@ -8224,21 +8515,24 @@

teal coverage - 67.06%

90 - 10x + 10x +
      self$set_content(content)
91 - 9x + 9x +
      self$set_style(style)
92 - 9x + 9x +
      invisible(self)
@@ -8329,56 +8623,64 @@

teal coverage - 67.06%

105 - 11x + 11x +
      checkmate::assert_class(content, "teal_slices")
106 - 10x + 10x +
      if (length(content) != 0) {
107 - 7x + 7x +
        states_list <- lapply(content, function(x) {
108 - 7x + 7x +
          x_list <- shiny::isolate(as.list(x))
109 - 7x + 7x +
          if (
110 - 7x + 7x +
            inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
111 - 7x + 7x +
              length(x_list$choices) == 2 &&
112 - 7x + 7x +
              length(x_list$selected) == 2
@@ -8413,7 +8715,8 @@

teal coverage - 67.06%

117 - 7x + 7x +
          if (!is.null(x_list$arg)) {
@@ -8441,14 +8744,16 @@

teal coverage - 67.06%

121 - 7x + 7x +
          x_list <- x_list[
122 - 7x + 7x +
            c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
@@ -8462,21 +8767,24 @@

teal coverage - 67.06%

124 - 7x + 7x +
          names(x_list) <- c(
125 - 7x + 7x +
            "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
126 - 7x + 7x +
            "Selected Values", "Selected range", "Include NA values", "Include Inf values"
@@ -8497,7 +8805,8 @@

teal coverage - 67.06%

129 - 7x + 7x +
          Filter(Negate(is.null), x_list)
@@ -8518,14 +8827,16 @@

teal coverage - 67.06%

132 - 7x + 7x +
        if (requireNamespace("yaml", quietly = TRUE)) {
133 - 7x + 7x +
          super$set_content(yaml::as.yaml(states_list))
@@ -8560,14 +8871,16 @@

teal coverage - 67.06%

138 - 10x + 10x +
      private$teal_slices <- content
139 - 10x + 10x +
      invisible(self)
@@ -8616,28 +8929,32 @@

teal coverage - 67.06%

146 - 1x + 1x +
      checkmate::assert_list(x)
147 - 1x + 1x +
      checkmate::assert_names(names(x), must.include = c("teal_slices"))
148 - 1x + 1x +
      self$set_content(x$teal_slices)
149 - 1x + 1x +
      invisible(self)
@@ -8679,7 +8996,8 @@

teal coverage - 67.06%

155 - 2x + 2x +
      list(teal_slices = private$teal_slices)
@@ -9462,14 +9780,16 @@

teal coverage - 67.06%

104 - 36x + 36x +
  dots <- list(...)
105 - 2x + 2x +
  if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
@@ -9483,21 +9803,24 @@

teal coverage - 67.06%

107 - 34x + 34x +
  messages <- extract_validator(dots, header)
108 - 34x + 34x +
  failings <- if (!any_names(dots)) {
109 - 29x + 29x +
    add_header(messages, header)
@@ -9511,7 +9834,8 @@

teal coverage - 67.06%

111 - 5x + 5x +
    unlist(messages)
@@ -9532,7 +9856,8 @@

teal coverage - 67.06%

114 - 34x + 34x +
  shiny::validate(shiny::need(is.null(failings), failings))
@@ -9602,7 +9927,8 @@

teal coverage - 67.06%

124 - 118x + 118x +
  all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
@@ -9665,7 +9991,8 @@

teal coverage - 67.06%

133 - 49x + 49x +
  x$.__enclos_env__$private$enabled
@@ -9721,14 +10048,16 @@

teal coverage - 67.06%

141 - 113x + 113x +
  if (inherits(iv, "InputValidator")) {
142 - 49x + 49x +
    add_header(gather_messages(iv), header)
@@ -9742,14 +10071,16 @@

teal coverage - 67.06%

144 - 58x + 58x +
    if (is.null(names(iv))) names(iv) <- rep("", length(iv))
145 - 64x + 64x +
    mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
@@ -9805,28 +10136,32 @@

teal coverage - 67.06%

153 - 49x + 49x +
  if (validator_enabled(iv)) {
154 - 46x + 46x +
    status <- iv$validate()
155 - 46x + 46x +
    failing_inputs <- Filter(Negate(is.null), status)
156 - 46x + 46x +
    unique(lapply(failing_inputs, function(x) x[["message"]]))
@@ -9840,14 +10175,16 @@

teal coverage - 67.06%

158 - 3x + 3x +
    warning("Validator is disabled and will be omitted.")
159 - 3x + 3x +
    list()
@@ -9903,21 +10240,24 @@

teal coverage - 67.06%

167 - 78x + 78x +
  ans <- unlist(messages)
168 - 78x + 78x +
  if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
169 - 31x + 31x +
    ans <- c(paste0(header, "\n"), ans, "\n")
@@ -9931,7 +10271,8 @@

teal coverage - 67.06%

171 - 78x + 78x +
  ans
@@ -9980,21 +10321,24 @@

teal coverage - 67.06%

178 - 103x + 103x +
  any(
179 - 103x + 103x +
    if (is.list(x)) {
180 - 58x + 58x +
      if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
@@ -10008,7 +10352,8 @@

teal coverage - 67.06%

182 - 40x + 40x +
      FALSE
@@ -10336,14 +10681,16 @@

teal coverage - 67.06%

43 - 9x + 9x +
  checkmate::assert_class(tss, "teal_slices")
44 - 9x + 9x +
  checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
@@ -10357,7 +10704,8 @@

teal coverage - 67.06%

46 - 9x + 9x +
  cat(format(tss, trim_lines = FALSE), "\n", file = file)
@@ -10462,7 +10810,8 @@

teal coverage - 67.06%

61 - 9x + 9x +
  checkmate::assert_file_exists(file, access = "r", extension = "json")
@@ -10476,56 +10825,64 @@

teal coverage - 67.06%

63 - 9x + 9x +
  tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
64 - 9x + 9x +
  tss_json$slices <-
65 - 9x + 9x +
    lapply(tss_json$slices, function(slice) {
66 - 9x + 9x +
      for (field in c("selected", "choices")) {
67 - 18x + 18x +
        if (!is.null(slice[[field]])) {
68 - 12x + 12x +
          if (length(slice[[field]]) > 0) {
69 - 9x + 9x +
            date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
70 - 9x + 9x +
            time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
@@ -10539,35 +10896,40 @@

teal coverage - 67.06%

72 - 9x + 9x +
            slice[[field]] <-
73 - 9x + 9x +
              if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
74 - 3x + 3x +
                as.Date(slice[[field]])
75 - 9x + 9x +
              } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
76 - 3x + 3x +
                as.POSIXct(slice[[field]], tz = "UTC")
@@ -10581,7 +10943,8 @@

teal coverage - 67.06%

78 - 3x + 3x +
                slice[[field]]
@@ -10602,7 +10965,8 @@

teal coverage - 67.06%

81 - 3x + 3x +
            slice[[field]] <- character(0)
@@ -10630,7 +10994,8 @@

teal coverage - 67.06%

85 - 9x + 9x +
      slice
@@ -10651,7 +11016,8 @@

teal coverage - 67.06%

88 - 9x + 9x +
  tss_elements <- lapply(tss_json$slices, as.teal_slice)
@@ -10665,7 +11031,8 @@

teal coverage - 67.06%

90 - 9x + 9x +
  do.call(teal_slices, c(tss_elements, tss_json$attributes))
@@ -11420,42 +11787,48 @@

teal coverage - 67.06%

106 - 6x + 6x +
  checkmate::assert_character(id)
107 - 6x + 6x +
  checkmate::assert_true(is.reactive(slices_global))
108 - 6x + 6x +
  checkmate::assert_class(isolate(slices_global()), "teal_slices")
109 - 6x + 6x +
  checkmate::assert_true(is.reactive(mapping_matrix))
110 - 6x + 6x +
  checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
111 - 6x + 6x +
  checkmate::assert_list(filtered_data_list, types = "FilteredData", any.missing = FALSE, names = "named")
@@ -11469,14 +11842,16 @@

teal coverage - 67.06%

113 - 6x + 6x +
  moduleServer(id, function(input, output, session) {
114 - 6x + 6x +
    ns <- session$ns
@@ -11497,28 +11872,32 @@

teal coverage - 67.06%

117 - 6x + 6x +
    filter <- isolate(slices_global())
118 - 6x + 6x +
    snapshot_history <- reactiveVal({
119 - 6x + 6x +
      list(
120 - 6x + 6x +
        "Initial application state" = as.list(filter, recursive = TRUE)
@@ -11560,7 +11939,8 @@

teal coverage - 67.06%

126 - 6x + 6x +
    observeEvent(input$snapshot_add, {
@@ -11651,7 +12031,8 @@

teal coverage - 67.06%

139 - 6x + 6x +
    observeEvent(input$snapshot_name_accept, {
@@ -11847,7 +12228,8 @@

teal coverage - 67.06%

167 - 6x + 6x +
    observeEvent(input$snapshot_load, {
@@ -11973,7 +12355,8 @@

teal coverage - 67.06%

185 - 6x + 6x +
    observeEvent(input$snaphot_file_accept, {
@@ -12323,7 +12706,8 @@

teal coverage - 67.06%

235 - 6x + 6x +
    observeEvent(input$snapshot_reset, {
@@ -12491,21 +12875,24 @@

teal coverage - 67.06%

259 - 6x + 6x +
    observers <- reactiveValues()
260 - 6x + 6x +
    handlers <- reactiveValues()
261 - 6x + 6x +
    divs <- reactiveValues()
@@ -12519,14 +12906,16 @@

teal coverage - 67.06%

263 - 6x + 6x +
    observeEvent(snapshot_history(), {
264 - 2x + 2x +
      lapply(names(snapshot_history())[-1L], function(s) {
@@ -12897,42 +13286,48 @@

teal coverage - 67.06%

317 - 6x + 6x +
    output$snapshot_list <- renderUI({
318 - 2x + 2x +
      rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
319 - 2x + 2x +
      if (length(rows) == 0L) {
320 - 2x + 2x +
        div(
321 - 2x + 2x +
          class = "snapshot_manager_placeholder",
322 - 2x + 2x +
          "Snapshots will appear here."
@@ -13582,56 +13977,64 @@

teal coverage - 67.06%

47 - 17x + 17x +
  checkmate::assert_string(msg, null.ok = TRUE)
48 - 15x + 15x +
  checkmate::assert_data_frame(x)
49 - 15x + 15x +
  if (!is.null(min_nrow)) {
50 - 15x + 15x +
    if (complete) {
51 - 5x + 5x +
      complete_index <- stats::complete.cases(x)
52 - 5x + 5x +
      validate(need(
53 - 5x + 5x +
        sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
54 - 5x + 5x +
        paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
@@ -13652,35 +14055,40 @@

teal coverage - 67.06%

57 - 10x + 10x +
      validate(need(
58 - 10x + 10x +
        nrow(x) >= min_nrow,
59 - 10x + 10x +
        paste(
60 - 10x + 10x +
          c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
61 - 10x + 10x +
          collapse = "\n"
@@ -13715,28 +14123,32 @@

teal coverage - 67.06%

66 - 10x + 10x +
    if (!allow_inf) {
67 - 6x + 6x +
      validate(need(
68 - 6x + 6x +
        all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
69 - 6x + 6x +
        "Dataframe contains Inf values which is not allowed."
@@ -16437,42 +16849,48 @@

teal coverage - 67.06%

74 - 91x + 91x +
  checkmate::assert_string(label)
75 - 89x + 89x +
  submodules <- list(...)
76 - 89x + 89x +
  if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
77 - 2x + 2x +
    stop(
78 - 2x + 2x +
      "The only character argument to modules() must be 'label' and it must be named, ",
79 - 2x + 2x +
      "change modules('lab', ...) to modules(label = 'lab', ...)"
@@ -16500,7 +16918,8 @@

teal coverage - 67.06%

83 - 87x + 87x +
  checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
@@ -16521,42 +16940,48 @@

teal coverage - 67.06%

86 - 84x + 84x +
  labels <- vapply(submodules, function(submodule) submodule$label, character(1))
87 - 84x + 84x +
  names(submodules) <- make.unique(gsub("[^[:alnum:]]+", "_", labels), sep = "_")
88 - 84x + 84x +
  structure(
89 - 84x + 84x +
    list(
90 - 84x + 84x +
      label = label,
91 - 84x + 84x +
      children = submodules
@@ -16570,7 +16995,8 @@

teal coverage - 67.06%

93 - 84x + 84x +
    class = "teal_modules"
@@ -16640,42 +17066,48 @@

teal coverage - 67.06%

103 - 8x + 8x +
  checkmate::assert_class(modules, "teal_modules")
104 - 6x + 6x +
  checkmate::assert_class(module, "teal_module")
105 - 4x + 4x +
  modules$children <- c(modules$children, list(module))
106 - 4x + 4x +
  labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
107 - 4x + 4x +
  names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
108 - 4x + 4x +
  modules
@@ -16780,7 +17212,8 @@

teal coverage - 67.06%

123 - 20x + 20x +
  if (inherits(modules, class)) {
@@ -16794,28 +17227,32 @@

teal coverage - 67.06%

125 - 20x + 20x +
  } else if (inherits(modules, "teal_module")) {
126 - 11x + 11x +
    NULL
127 - 9x + 9x +
  } else if (inherits(modules, "teal_modules")) {
128 - 9x + 9x +
    Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
@@ -17011,49 +17448,56 @@

teal coverage - 67.06%

156 - 286x + 286x +
  checkmate::assert_string(arg)
157 - 283x + 283x +
  if (inherits(modules, "teal_modules")) {
158 - 29x + 29x +
    any(unlist(lapply(modules$children, is_arg_used, arg)))
159 - 254x + 254x +
  } else if (inherits(modules, "teal_module")) {
160 - 43x + 43x +
    is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
161 - 211x + 211x +
  } else if (is.function(modules)) {
162 - 209x + 209x +
    isTRUE(arg %in% names(formals(modules)))
@@ -17067,7 +17511,8 @@

teal coverage - 67.06%

164 - 2x + 2x +
    stop("is_arg_used function not implemented for this object")
@@ -17606,42 +18051,48 @@

teal coverage - 67.06%

241 - 133x + 133x +
  checkmate::assert_string(label)
242 - 130x + 130x +
  if (label == "global_filters") {
243 - 1x + 1x +
    stop(
244 - 1x + 1x +
      sprintf("module(label = \"%s\", ...\n  ", label),
245 - 1x + 1x +
      "Label 'global_filters' is reserved in teal. Please change to something else.",
246 - 1x + 1x +
      call. = FALSE
@@ -17662,7 +18113,8 @@

teal coverage - 67.06%

249 - 129x + 129x +
  if (label == "Report previewer") {
@@ -17725,35 +18177,40 @@

teal coverage - 67.06%

258 - 129x + 129x +
  checkmate::assert_function(server)
259 - 129x + 129x +
  server_formals <- names(formals(server))
260 - 129x + 129x +
  if (!(
261 - 129x + 129x +
    "id" %in% server_formals ||
262 - 129x + 129x +
      all(c("input", "output", "session") %in% server_formals)
@@ -17767,70 +18224,80 @@

teal coverage - 67.06%

264 - 2x + 2x +
    stop(
265 - 2x + 2x +
      "\nmodule() `server` argument requires a function with following arguments:",
266 - 2x + 2x +
      "\n - id - `teal` will set proper `shiny` namespace for this module.",
267 - 2x + 2x +
      "\n - input, output, session (not recommended) - then `shiny::callModule` will be used to call a module.",
268 - 2x + 2x +
      "\n\nFollowing arguments can be used optionaly:",
269 - 2x + 2x +
      "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
270 - 2x + 2x +
      "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
271 - 2x + 2x +
      "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
272 - 2x + 2x +
      "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
273 - 2x + 2x +
      "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
@@ -17851,42 +18318,48 @@

teal coverage - 67.06%

276 - 127x + 127x +
  if ("datasets" %in% server_formals) {
277 - 2x + 2x +
    warning(
278 - 2x + 2x +
      sprintf("Called from module(label = \"%s\", ...)\n  ", label),
279 - 2x + 2x +
      "`datasets` argument in the server is deprecated and will be removed in the next release. ",
280 - 2x + 2x +
      "Please use `data` instead.",
281 - 2x + 2x +
      call. = FALSE
@@ -17928,56 +18401,64 @@

teal coverage - 67.06%

287 - 127x + 127x +
  checkmate::assert_function(ui)
288 - 127x + 127x +
  ui_formals <- names(formals(ui))
289 - 127x + 127x +
  if (!"id" %in% ui_formals) {
290 - 1x + 1x +
    stop(
291 - 1x + 1x +
      "\nmodule() `ui` argument requires a function with following arguments:",
292 - 1x + 1x +
      "\n - id - `teal` will set proper `shiny` namespace for this module.",
293 - 1x + 1x +
      "\n\nFollowing arguments can be used optionally:",
294 - 1x + 1x +
      "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
@@ -17998,42 +18479,48 @@

teal coverage - 67.06%

297 - 126x + 126x +
  if (any(c("data", "datasets") %in% ui_formals)) {
298 - 2x + 2x +
    stop(
299 - 2x + 2x +
      sprintf("Called from module(label = \"%s\", ...)\n  ", label),
300 - 2x + 2x +
      "UI with `data` or `datasets` argument is no longer accepted.\n  ",
301 - 2x + 2x +
      "If some UI inputs depend on data, please move the logic to your server instead.\n  ",
302 - 2x + 2x +
      "Possible solutions are renderUI() or updateXyzInput() functions."
@@ -18075,7 +18562,8 @@

teal coverage - 67.06%

308 - 124x + 124x +
  if (!missing(filters)) {
@@ -18145,21 +18633,24 @@

teal coverage - 67.06%

318 - 124x + 124x +
  if (!is.element("data", server_formals) && !is.null(datanames)) {
319 - 50x + 50x +
    message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
320 - 50x + 50x +
    datanames <- NULL
@@ -18173,7 +18664,8 @@

teal coverage - 67.06%

322 - 124x + 124x +
  checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
@@ -18194,49 +18686,56 @@

teal coverage - 67.06%

325 - 123x + 123x +
  checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
326 - 121x + 121x +
  srv_extra_args <- setdiff(names(server_args), server_formals)
327 - 121x + 121x +
  if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
328 - 1x + 1x +
    stop(
329 - 1x + 1x +
      "\nFollowing `server_args` elements have no equivalent in the formals of the server:\n",
330 - 1x + 1x +
      paste(paste(" -", srv_extra_args), collapse = "\n"),
331 - 1x + 1x +
      "\n\nUpdate the server arguments by including above or add `...`"
@@ -18271,49 +18770,56 @@

teal coverage - 67.06%

336 - 120x + 120x +
  checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
337 - 118x + 118x +
  ui_extra_args <- setdiff(names(ui_args), ui_formals)
338 - 118x + 118x +
  if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
339 - 1x + 1x +
    stop(
340 - 1x + 1x +
      "\nFollowing `ui_args` elements have no equivalent in the formals of UI:\n",
341 - 1x + 1x +
      paste(paste(" -", ui_extra_args), collapse = "\n"),
342 - 1x + 1x +
      "\n\nUpdate the UI arguments by including above or add `...`"
@@ -18341,35 +18847,40 @@

teal coverage - 67.06%

346 - 117x + 117x +
  structure(
347 - 117x + 117x +
    list(
348 - 117x + 117x +
      label = label,
349 - 117x + 117x +
      server = server, ui = ui, datanames = unique(datanames),
350 - 117x + 117x +
      server_args = server_args, ui_args = ui_args
@@ -18383,7 +18894,8 @@

teal coverage - 67.06%

352 - 117x + 117x +
    class = "teal_module"
@@ -18677,28 +19189,32 @@

teal coverage - 67.06%

394 - 12x + 12x +
  checkmate::assert_multi_class(modules, c("teal_module", "teal_modules"))
395 - 12x + 12x +
  checkmate::assert_int(depth, lower = 0)
396 - 11x + 11x +
  if (inherits(modules, "teal_modules")) {
397 - 4x + 4x +
    max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
@@ -18712,7 +19228,8 @@

teal coverage - 67.06%

399 - 7x + 7x +
    depth
@@ -18908,28 +19425,32 @@

teal coverage - 67.06%

427 - 1x + 1x +
  paste(c(
428 - 1x + 1x +
    paste0(rep(" ", indent), "+ ", x$label),
429 - 1x + 1x +
    unlist(lapply(x$children, format, indent = indent + 1, ...))
430 - 1x + 1x +
  ), collapse = "\n")
@@ -18999,7 +19520,8 @@

teal coverage - 67.06%

440 - 3x + 3x +
  paste0(paste(rep(" ", indent), collapse = ""), "+ ", x$label, collapse = "")
@@ -19229,21 +19751,24 @@

teal coverage - 67.06%

15 - 18x + 18x +
  script <- sprintf(
16 - 18x + 18x +
    "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
17 - 18x + 18x +
    ns("timezone")
@@ -19257,14 +19782,16 @@

teal coverage - 67.06%

19 - 18x + 18x +
  shinyjs::runjs(script) # function does not return anything
20 - 18x + 18x +
  return(invisible(NULL))
@@ -19313,42 +19840,48 @@

teal coverage - 67.06%

27 - 11x + 11x +
  bs_theme <- getOption("teal.bs_theme")
28 - 11x + 11x +
  if (is.null(bs_theme)) {
29 - 8x + 8x +
    NULL
30 - 3x + 3x +
  } else if (!inherits(bs_theme, "bs_theme")) {
31 - 2x + 2x +
    warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
32 - 2x + 2x +
    NULL
@@ -19362,7 +19895,8 @@

teal coverage - 67.06%

34 - 1x + 1x +
    bs_theme
@@ -19418,42 +19952,48 @@

teal coverage - 67.06%

42 - 11x + 11x +
  parents <- character(0)
43 - 11x + 11x +
  for (i in dataname) {
44 - 16x + 16x +
    while (length(i) > 0) {
45 - 18x + 18x +
      parent_i <- teal.data::parent(join_keys, i)
46 - 18x + 18x +
      parents <- c(parent_i, parents)
47 - 18x + 18x +
      i <- parent_i
@@ -19481,7 +20021,8 @@

teal coverage - 67.06%

51 - 11x + 11x +
  unique(c(parents, dataname))
@@ -19565,14 +20106,16 @@

teal coverage - 67.06%

63 - 13x + 13x +
  checkmate::assert_class(x, "teal_data")
64 - 13x + 13x +
  checkmate::assert_character(datanames, min.chars = 1L, any.missing = FALSE)
@@ -19586,21 +20129,24 @@

teal coverage - 67.06%

66 - 13x + 13x +
  ans <- teal.slice::init_filtered_data(
67 - 13x + 13x +
    x = sapply(datanames, function(dn) x[[dn]], simplify = FALSE),
68 - 13x + 13x +
    join_keys = teal.data::join_keys(x)
@@ -19621,21 +20167,24 @@

teal coverage - 67.06%

71 - 13x + 13x +
  attr(ans, "preprocessing_code") <- teal.code::get_code(x)
72 - 13x + 13x +
  attr(ans, "verification_status") <- x@verified
73 - 13x + 13x +
  ans
@@ -19768,35 +20317,40 @@

teal coverage - 67.06%

92 - 2x + 2x +
  checkmate::assert_string(title)
93 - 2x + 2x +
  checkmate::assert_string(label)
94 - 2x + 2x +
  checkmate::assert_string(description, null.ok = TRUE)
95 - 2x + 2x +
  checkmate::assert_flag(with_filter)
96 - 2x + 2x +
  checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
@@ -19810,49 +20364,56 @@

teal coverage - 67.06%

98 - 2x + 2x +
  card <- teal::TealReportCard$new()
99 - 2x + 2x +
  title <- if (label == "") title else label
100 - 2x + 2x +
  card$set_name(title)
101 - 2x + 2x +
  card$append_text(title, "header2")
102 - 1x + 1x +
  if (!is.null(description)) card$append_text(description, "header3")
103 - 1x + 1x +
  if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
104 - 2x + 2x +
  card
@@ -20237,14 +20798,16 @@

teal coverage - 67.06%

159 - 12x + 12x +
  checkmate::assert_class(modules, "teal_modules")
160 - 12x + 12x +
  checkmate::assert_character(datanames)
@@ -20258,7 +20821,8 @@

teal coverage - 67.06%

162 - 12x + 12x +
  recursive_check_datanames <- function(modules, datanames) {
@@ -20272,14 +20836,16 @@

teal coverage - 67.06%

164 - 26x + 26x +
    if (inherits(modules, "teal_modules")) {
165 - 12x + 12x +
      sapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
@@ -20293,49 +20859,56 @@

teal coverage - 67.06%

167 - 14x + 14x +
      extra_datanames <- setdiff(modules$datanames, c("all", datanames))
168 - 14x + 14x +
      if (length(extra_datanames)) {
169 - 2x + 2x +
        sprintf(
170 - 2x + 2x +
          "- Module '%s' uses datanames not available in 'data': (%s) not in (%s)",
171 - 2x + 2x +
          modules$label,
172 - 2x + 2x +
          toString(dQuote(extra_datanames, q = FALSE)),
173 - 2x + 2x +
          toString(dQuote(datanames, q = FALSE))
@@ -20370,21 +20943,24 @@

teal coverage - 67.06%

178 - 12x + 12x +
  check_datanames <- unlist(recursive_check_datanames(modules, datanames))
179 - 12x + 12x +
  if (length(check_datanames)) {
180 - 2x + 2x +
    paste(check_datanames, collapse = "\n")
@@ -20398,7 +20974,8 @@

teal coverage - 67.06%

182 - 10x + 10x +
    TRUE
@@ -20503,14 +21080,16 @@

teal coverage - 67.06%

197 - 10x + 10x +
  checkmate::assert_class(filters, "teal_slices")
198 - 10x + 10x +
  checkmate::assert_character(datanames)
@@ -20531,63 +21110,72 @@

teal coverage - 67.06%

201 - 10x + 10x +
  out <- unlist(sapply(
202 - 10x + 10x +
    filters, function(filter) {
203 - 3x + 3x +
      dataname <- shiny::isolate(filter$dataname)
204 - 3x + 3x +
      if (!dataname %in% datanames) {
205 - 2x + 2x +
        sprintf(
206 - 2x + 2x +
          "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
207 - 2x + 2x +
          shiny::isolate(filter$id),
208 - 2x + 2x +
          dQuote(dataname, q = FALSE),
209 - 2x + 2x +
          toString(dQuote(datanames, q = FALSE))
@@ -20636,14 +21224,16 @@

teal coverage - 67.06%

216 - 10x + 10x +
  if (length(out)) {
217 - 2x + 2x +
    paste(out, collapse = "\n")
@@ -20657,7 +21247,8 @@

teal coverage - 67.06%

219 - 8x + 8x +
    TRUE
@@ -20741,21 +21332,24 @@

teal coverage - 67.06%

231 - 51x + 51x +
  checkmate::assert_class(data, "teal_data")
232 - 51x + 51x +
  if (length(teal.data::datanames(data))) {
233 - 47x + 47x +
    teal.data::datanames(data)
@@ -20769,7 +21363,8 @@

teal coverage - 67.06%

235 - 4x + 4x +
    ls(teal.code::get_env(data), all.names = TRUE)
@@ -20839,70 +21434,80 @@

teal coverage - 67.06%

245 - 14x + 14x +
  checkmate::assert_class(shiny_tag, "shiny.tag")
246 - 14x + 14x +
  checkmate::assert_true(shiny_tag$name == "head")
247 - 13x + 13x +
  child_names <- vapply(shiny_tag$children, `[[`, character(1L), "name")
248 - 13x + 13x +
  checkmate::assert_subset(c("title", "link"), child_names, .var.name = "child tags")
249 - 11x + 11x +
  rel_attr <- shiny_tag$children[[which(child_names == "link")]]$attribs$rel
250 - 11x + 11x +
  checkmate::assert_subset(
251 - 11x + 11x +
    rel_attr,
252 - 11x + 11x +
    c("icon", "shortcut icon"),
253 - 11x + 11x +
    .var.name = "Link tag's rel attribute",
254 - 11x + 11x +
    empty.ok = FALSE
@@ -21007,56 +21612,64 @@

teal coverage - 67.06%

269 - 11x + 11x +
  checkmate::assert_string(title, null.ok = TRUE)
270 - 11x + 11x +
  checkmate::assert_string(favicon, null.ok = TRUE)
271 - 11x + 11x +
  tags$head(
272 - 11x + 11x +
    tags$title(title),
273 - 11x + 11x +
    tags$link(
274 - 11x + 11x +
      rel = "icon",
275 - 11x + 11x +
      href = favicon,
276 - 11x + 11x +
      sizes = "any"
@@ -21196,14 +21809,16 @@

teal coverage - 67.06%

296 - 9x + 9x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
297 - 9x + 9x +
  checkmate::assert_class(modules, "teal_modules")
@@ -21217,28 +21832,32 @@

teal coverage - 67.06%

299 - 9x + 9x +
  data <- if (inherits(data, "teal_data")) {
300 - 8x + 8x +
    as.list(data@env)
301 - 9x + 9x +
  } else if (inherits(data, "teal_data_module")) {
302 - 1x + 1x +
    body(data$server)
@@ -21252,7 +21871,8 @@

teal coverage - 67.06%

304 - 9x + 9x +
  rlang::hash(list(data = data, modules = modules))
@@ -21349,21 +21969,24 @@

teal coverage - 67.06%

12 - 7x + 7x +
  css_files <- list.files(
13 - 7x + 7x +
    system.file("css", package = "teal", mustWork = TRUE),
14 - 7x + 7x +
    pattern = pattern, full.names = TRUE
@@ -21377,21 +22000,24 @@

teal coverage - 67.06%

16 - 7x + 7x +
  return(
17 - 7x + 7x +
    shiny::singleton(
18 - 7x + 7x +
      shiny::tags$head(lapply(css_files, shiny::includeCSS))
@@ -21510,21 +22136,24 @@

teal coverage - 67.06%

35 - 7x + 7x +
  checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
36 - 7x + 7x +
  js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
37 - 7x + 7x +
  js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
@@ -21538,7 +22167,8 @@

teal coverage - 67.06%

39 - 7x + 7x +
  return(singleton(lapply(js_files, includeScript)))
@@ -21657,21 +22287,24 @@

teal coverage - 67.06%

56 - 18x + 18x +
  checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
57 - 18x + 18x +
  lapply(files, function(file) {
58 - 18x + 18x +
    shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
@@ -21685,7 +22318,8 @@

teal coverage - 67.06%

60 - 18x + 18x +
  return(invisible(NULL))
@@ -21846,21 +22480,24 @@

teal coverage - 67.06%

83 - 7x + 7x +
  tagList(
84 - 7x + 7x +
    shinyjs::useShinyjs(),
85 - 7x + 7x +
    include_css_files(),
@@ -21874,14 +22511,16 @@

teal coverage - 67.06%

87 - 7x + 7x +
    include_js_files(except = "init.js"),
88 - 7x + 7x +
    shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
@@ -22433,7 +23072,8 @@

teal coverage - 67.06%

76 - 7x + 7x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
@@ -22447,7 +23087,8 @@

teal coverage - 67.06%

78 - 7x + 7x +
  checkmate::assert_multi_class(splash_ui, c("shiny.tag", "shiny.tag.list", "html"))
@@ -22461,7 +23102,8 @@

teal coverage - 67.06%

80 - 7x + 7x +
  if (is.character(title)) {
@@ -22482,7 +23124,8 @@

teal coverage - 67.06%

83 - 7x + 7x +
    validate_app_title_tag(title)
@@ -22503,28 +23146,32 @@

teal coverage - 67.06%

86 - 7x + 7x +
  checkmate::assert(
87 - 7x + 7x +
    .var.name = "header",
88 - 7x + 7x +
    checkmate::check_string(header),
89 - 7x + 7x +
    checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
@@ -22538,7 +23185,8 @@

teal coverage - 67.06%

91 - 7x + 7x +
  if (checkmate::test_string(header)) {
@@ -22566,28 +23214,32 @@

teal coverage - 67.06%

95 - 7x + 7x +
  checkmate::assert(
96 - 7x + 7x +
    .var.name = "footer",
97 - 7x + 7x +
    checkmate::check_string(footer),
98 - 7x + 7x +
    checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
@@ -22601,7 +23253,8 @@

teal coverage - 67.06%

100 - 7x + 7x +
  if (checkmate::test_string(footer)) {
@@ -22629,7 +23282,8 @@

teal coverage - 67.06%

104 - 7x + 7x +
  ns <- NS(id)
@@ -22650,7 +23304,8 @@

teal coverage - 67.06%

107 - 7x + 7x +
  splash_ui <- div(
@@ -22664,7 +23319,8 @@

teal coverage - 67.06%

109 - 7x + 7x +
    id = ns("main_ui_container"),
@@ -22685,7 +23341,8 @@

teal coverage - 67.06%

112 - 7x + 7x +
    div(splash_ui)
@@ -22720,35 +23377,40 @@

teal coverage - 67.06%

117 - 7x + 7x +
  shiny_busy_message_panel <- conditionalPanel(
118 - 7x + 7x +
    condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint
119 - 7x + 7x +
    div(
120 - 7x + 7x +
      icon("arrows-rotate", "spin fa-spin"),
121 - 7x + 7x +
      "Computing ...",
@@ -22762,7 +23424,8 @@

teal coverage - 67.06%

123 - 7x + 7x +
      class = "shinybusymessage"
@@ -22790,98 +23453,112 @@

teal coverage - 67.06%

127 - 7x + 7x +
  res <- fluidPage(
128 - 7x + 7x +
    title = title,
129 - 7x + 7x +
    theme = get_teal_bs_theme(),
130 - 7x + 7x +
    include_teal_css_js(),
131 - 7x + 7x +
    tags$header(header),
132 - 7x + 7x +
    tags$hr(class = "my-2"),
133 - 7x + 7x +
    shiny_busy_message_panel,
134 - 7x + 7x +
    splash_ui,
135 - 7x + 7x +
    tags$hr(),
136 - 7x + 7x +
    tags$footer(
137 - 7x + 7x +
      div(
138 - 7x + 7x +
        footer,
139 - 7x + 7x +
        teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
140 - 7x + 7x +
        textOutput(ns("identifier"))
@@ -22909,7 +23586,8 @@

teal coverage - 67.06%

144 - 7x + 7x +
  return(res)
@@ -22951,21 +23629,24 @@

teal coverage - 67.06%

150 - 19x + 19x +
  stopifnot(is.reactive(teal_data_rv))
151 - 18x + 18x +
  moduleServer(id, function(input, output, session) {
152 - 18x + 18x +
    logger::log_trace("srv_teal initializing the module.")
@@ -22979,14 +23660,16 @@

teal coverage - 67.06%

154 - 18x + 18x +
    output$identifier <- renderText(
155 - 18x + 18x +
      paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
@@ -23007,28 +23690,32 @@

teal coverage - 67.06%

158 - 18x + 18x +
    teal.widgets::verbatim_popup_srv(
159 - 18x + 18x +
      "sessionInfo",
160 - 18x + 18x +
      verbatim_content = utils::capture.output(utils::sessionInfo()),
161 - 18x + 18x +
      title = "SessionInfo"
@@ -23056,7 +23743,8 @@

teal coverage - 67.06%

165 - 18x + 18x +
    run_js_files(files = "init.js")
@@ -23091,35 +23779,40 @@

teal coverage - 67.06%

170 - 18x + 18x +
    get_client_timezone(session$ns)
171 - 18x + 18x +
    observeEvent(
172 - 18x + 18x +
      eventExpr = input$timezone,
173 - 18x + 18x +
      once = TRUE,
174 - 18x + 18x +
      handlerExpr = {
@@ -23161,14 +23854,16 @@

teal coverage - 67.06%

180 - 18x + 18x +
    reporter <- teal.reporter::Reporter$new()
181 - 18x + 18x +
    if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
@@ -23196,28 +23891,32 @@

teal coverage - 67.06%

185 - 18x + 18x +
    env <- environment()
186 - 18x + 18x +
    datasets_reactive <- eventReactive(teal_data_rv(), {
187 - 4x + 4x +
      env$progress <- shiny::Progress$new(session)
188 - 4x + 4x +
      env$progress$set(0.25, message = "Setting data")
@@ -23245,7 +23944,8 @@

teal coverage - 67.06%

192 - 4x + 4x +
      datasets_singleton <- teal_data_to_filtered_data(teal_data_rv())
@@ -23266,14 +23966,16 @@

teal coverage - 67.06%

195 - 4x + 4x +
      filter_global <- Filter(function(x) x$id %in% attr(filter, "mapping")$global_filters, filter)
196 - 4x + 4x +
      datasets_singleton$set_filter_state(filter_global)
@@ -23287,49 +23989,56 @@

teal coverage - 67.06%

198 - 4x + 4x +
      module_datasets <- function(modules) {
199 - 18x + 18x +
        if (inherits(modules, "teal_modules")) {
200 - 7x + 7x +
          datasets <- lapply(modules$children, module_datasets)
201 - 7x + 7x +
          labels <- vapply(modules$children, `[[`, character(1), "label")
202 - 7x + 7x +
          names(datasets) <- labels
203 - 7x + 7x +
          datasets
204 - 11x + 11x +
        } else if (isTRUE(attr(filter, "module_specific"))) {
@@ -23350,28 +24059,32 @@

teal coverage - 67.06%

207 - 3x + 3x +
          datanames <- if (is.null(modules$datanames) || modules$datanames == "all") {
208 - 3x + 3x +
            include_parent_datanames(
209 - 3x + 3x +
              teal_data_datanames(teal_data_rv()),
210 - 3x + 3x +
              teal.data::join_keys(teal_data_rv())
@@ -23413,7 +24126,8 @@

teal coverage - 67.06%

216 - 3x + 3x +
          datasets_module <- teal_data_to_filtered_data(teal_data_rv(), datanames = datanames)
@@ -23441,7 +24155,8 @@

teal coverage - 67.06%

220 - 3x + 3x +
          slices <- Filter(x = filter, f = function(x) {
@@ -23469,42 +24184,48 @@

teal coverage - 67.06%

224 - 3x + 3x +
          include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
225 - 3x + 3x +
          exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
226 - 3x + 3x +
          slices$include_varnames <- include_varnames
227 - 3x + 3x +
          slices$exclude_varnames <- exclude_varnames
228 - 3x + 3x +
          datasets_module$set_filter_state(slices)
229 - 3x + 3x +
          datasets_module
@@ -23518,7 +24239,8 @@

teal coverage - 67.06%

231 - 8x + 8x +
          datasets_singleton
@@ -23539,7 +24261,8 @@

teal coverage - 67.06%

234 - 4x + 4x +
      module_datasets(modules)
@@ -23602,7 +24325,8 @@

teal coverage - 67.06%

243 - 18x + 18x +
    observeEvent(datasets_reactive(), once = TRUE, {
@@ -24581,7 +25305,8 @@

teal coverage - 67.06%

103 - 10x + 10x +
  logger::log_trace("init initializing teal app with: data ('{ class(data) }').")
@@ -24609,7 +25334,8 @@

teal coverage - 67.06%

107 - 10x + 10x +
  if (inherits(data, "TealData")) {
@@ -24679,7 +25405,8 @@

teal coverage - 67.06%

117 - 10x + 10x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
@@ -24700,28 +25427,32 @@

teal coverage - 67.06%

120 - 10x + 10x +
  checkmate::assert(
121 - 10x + 10x +
    .var.name = "modules",
122 - 10x + 10x +
    checkmate::check_multi_class(modules, c("teal_modules", "teal_module")),
123 - 10x + 10x +
    checkmate::check_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
@@ -24735,14 +25466,16 @@

teal coverage - 67.06%

125 - 10x + 10x +
  if (inherits(modules, "teal_module")) {
126 - 1x + 1x +
    modules <- list(modules)
@@ -24756,14 +25489,16 @@

teal coverage - 67.06%

128 - 10x + 10x +
  if (checkmate::test_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))) {
129 - 4x + 4x +
    modules <- do.call(teal::modules, modules)
@@ -24791,7 +25526,8 @@

teal coverage - 67.06%

133 - 10x + 10x +
  checkmate::assert_class(filter, "teal_slices")
@@ -24812,28 +25548,32 @@

teal coverage - 67.06%

136 - 9x + 9x +
  checkmate::assert(
137 - 9x + 9x +
    .var.name = "title",
138 - 9x + 9x +
    checkmate::check_string(title),
139 - 9x + 9x +
    checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
@@ -24847,28 +25587,32 @@

teal coverage - 67.06%

141 - 9x + 9x +
  checkmate::assert(
142 - 9x + 9x +
    .var.name = "header",
143 - 9x + 9x +
    checkmate::check_string(header),
144 - 9x + 9x +
    checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
@@ -24882,28 +25626,32 @@

teal coverage - 67.06%

146 - 9x + 9x +
  checkmate::assert(
147 - 9x + 9x +
    .var.name = "footer",
148 - 9x + 9x +
    checkmate::check_string(footer),
149 - 9x + 9x +
    checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
@@ -24917,7 +25665,8 @@

teal coverage - 67.06%

151 - 9x + 9x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
@@ -24938,7 +25687,8 @@

teal coverage - 67.06%

154 - 9x + 9x +
  teal.logger::log_system_info()
@@ -24966,21 +25716,24 @@

teal coverage - 67.06%

158 - 9x + 9x +
  landing <- extract_module(modules, "teal_module_landing")
159 - 9x + 9x +
  landing_module <- NULL
160 - 9x + 9x +
  if (length(landing) == 1L) {
@@ -25001,7 +25754,8 @@

teal coverage - 67.06%

163 - 9x + 9x +
  } else if (length(landing) > 1L) {
@@ -25036,7 +25790,8 @@

teal coverage - 67.06%

168 - 9x + 9x +
  attr(filter, "app_id") <- create_app_id(data, modules)
@@ -25057,7 +25812,8 @@

teal coverage - 67.06%

171 - 9x + 9x +
  filter <- as.teal_slices(as.list(filter))
@@ -25085,7 +25841,8 @@

teal coverage - 67.06%

175 - 9x + 9x +
  if (isTRUE(attr(filter, "module_specific"))) {
@@ -25274,21 +26031,24 @@

teal coverage - 67.06%

202 - 9x + 9x +
  if (inherits(data, "teal_data")) {
203 - 8x + 8x +
    if (length(teal_data_datanames(data)) == 0) {
204 - 1x + 1x +
      stop("The environment of `data` is empty.")
@@ -25309,28 +26069,32 @@

teal coverage - 67.06%

207 - 7x + 7x +
    is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
208 - 7x + 7x +
    if (!isTRUE(is_modules_ok)) {
209 - 1x + 1x +
      logger::log_error(is_modules_ok)
210 - 1x + 1x +
      checkmate::assert(is_modules_ok, .var.name = "modules")
@@ -25351,21 +26115,24 @@

teal coverage - 67.06%

213 - 6x + 6x +
    is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
214 - 6x + 6x +
    if (!isTRUE(is_filter_ok)) {
215 - 1x + 1x +
      warning(is_filter_ok)
@@ -25428,21 +26195,24 @@

teal coverage - 67.06%

224 - 7x + 7x +
  res <- list(
225 - 7x + 7x +
    ui = ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
226 - 7x + 7x +
    server = function(input, output, session) {
@@ -25498,7 +26268,8 @@

teal coverage - 67.06%

234 - 7x + 7x +
  logger::log_trace("init teal app has been initialized.")
@@ -25512,7 +26283,8 @@

teal coverage - 67.06%

236 - 7x + 7x +
  return(res)
@@ -25924,35 +26696,40 @@

teal coverage - 67.06%

57 - 35x + 35x +
  checkmate::assert_function(ui, args = "id", nargs = 1)
58 - 34x + 34x +
  checkmate::assert_function(server, args = "id", nargs = 1)
59 - 33x + 33x +
  structure(
60 - 33x + 33x +
    list(ui = ui, server = server),
61 - 33x + 33x +
    class = "teal_data_module"
@@ -26175,28 +26952,32 @@

teal coverage - 67.06%

29 - 13x + 13x +
  teal_data_module(
30 - 13x + 13x +
    ui = function(id) {
31 - 1x + 1x +
      ns <- NS(id)
32 - 1x + 1x +
      object$ui(ns("mutate_inner"))
@@ -26210,21 +26991,24 @@

teal coverage - 67.06%

34 - 13x + 13x +
    server = function(id) {
35 - 11x + 11x +
      moduleServer(id, function(input, output, session) {
36 - 11x + 11x +
        teal_data_rv <- object$server("mutate_inner")
@@ -26238,14 +27022,16 @@

teal coverage - 67.06%

38 - 11x + 11x +
        if (!is.reactive(teal_data_rv)) {
39 - 1x + 1x +
          stop("The `teal_data_module` must return a reactive expression.", call. = FALSE)
@@ -26266,7 +27052,8 @@

teal coverage - 67.06%

42 - 10x + 10x +
        td <- eventReactive(teal_data_rv(),
@@ -26280,14 +27067,16 @@

teal coverage - 67.06%

44 - 10x + 10x +
            if (inherits(teal_data_rv(), c("teal_data", "qenv.error"))) {
45 - 6x + 6x +
              eval_code(teal_data_rv(), code)
@@ -26301,7 +27090,8 @@

teal coverage - 67.06%

47 - 4x + 4x +
              teal_data_rv()
@@ -26322,7 +27112,8 @@

teal coverage - 67.06%

50 - 10x + 10x +
          ignoreNULL = FALSE
@@ -26336,7 +27127,8 @@

teal coverage - 67.06%

52 - 10x + 10x +
        td
@@ -26385,7 +27177,8 @@

teal coverage - 67.06%

59 - 1x + 1x +
  eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
@@ -26413,7 +27206,8 @@

teal coverage - 67.06%

63 - 6x + 6x +
  eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
@@ -27181,14 +27975,16 @@

teal coverage - 67.06%

18 - 2x + 2x +
  packageStartupMessage(
19 - 2x + 2x +
    "\nYou are using teal version ",
@@ -27209,7 +28005,8 @@

teal coverage - 67.06%

22 - 2x + 2x +
    read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
@@ -28265,28 +29062,32 @@

teal coverage - 67.06%

137 - 5x + 5x +
  checkmate::assert_class(modules, "teal_modules")
138 - 5x + 5x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
139 - 5x + 5x +
  checkmate::assert_class(reporter, "Reporter")
140 - 3x + 3x +
  checkmate::assert_class(filter, "teal_slices")
@@ -28300,14 +29101,16 @@

teal coverage - 67.06%

142 - 3x + 3x +
  moduleServer(id, function(input, output, session) {
143 - 3x + 3x +
    logger::log_trace("srv_tabs_with_filters initializing the module.")
@@ -28321,14 +29124,16 @@

teal coverage - 67.06%

145 - 3x + 3x +
    is_module_specific <- isTRUE(attr(filter, "module_specific"))
146 - 3x + 3x +
    manager_out <- filter_manager_modal_srv("filter_manager", filtered_data_list = datasets, filter = filter)
@@ -28342,42 +29147,48 @@

teal coverage - 67.06%

148 - 3x + 3x +
    active_module <- srv_nested_tabs(
149 - 3x + 3x +
      id = "root",
150 - 3x + 3x +
      datasets = datasets,
151 - 3x + 3x +
      modules = modules,
152 - 3x + 3x +
      reporter = reporter,
153 - 3x + 3x +
      is_module_specific = is_module_specific
@@ -28398,21 +29209,24 @@

teal coverage - 67.06%

156 - 3x + 3x +
    if (!is_module_specific) {
157 - 3x + 3x +
      active_datanames <- reactive({
158 - 6x + 6x +
        if (identical(active_module()$datanames, "all")) {
@@ -28433,21 +29247,24 @@

teal coverage - 67.06%

161 - 5x + 5x +
          include_parent_datanames(
162 - 5x + 5x +
            active_module()$datanames,
163 - 5x + 5x +
            singleton$get_join_keys()
@@ -28475,14 +29292,16 @@

teal coverage - 67.06%

167 - 3x + 3x +
      singleton <- unlist(datasets)[[1]]
168 - 3x + 3x +
      singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
@@ -28496,28 +29315,32 @@

teal coverage - 67.06%

170 - 3x + 3x +
      observeEvent(
171 - 3x + 3x +
        eventExpr = active_datanames(),
172 - 3x + 3x +
        handlerExpr = {
173 - 4x + 4x +
          script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
@@ -28552,7 +29375,8 @@

teal coverage - 67.06%

178 - 4x + 4x +
            "handleActiveDatasetsPresent();"
@@ -28566,7 +29390,8 @@

teal coverage - 67.06%

180 - 4x + 4x +
          shinyjs::runjs(script)
@@ -28580,7 +29405,8 @@

teal coverage - 67.06%

182 - 3x + 3x +
        ignoreNULL = FALSE
@@ -28608,21 +29434,24 @@

teal coverage - 67.06%

186 - 3x + 3x +
    showNotification("Data loaded - App fully started up")
187 - 3x + 3x +
    logger::log_trace("srv_tabs_with_filters initialized the module")
188 - 3x + 3x +
    return(active_module)
@@ -29110,28 +29939,32 @@

teal coverage - 67.06%

17 - 39x + 39x +
  checkmate::assert_string(label)
18 - 39x + 39x +
  module(
19 - 39x + 39x +
    label,
20 - 39x + 39x +
    server = function(id, data) {
@@ -29236,7 +30069,8 @@

teal coverage - 67.06%

35 - 39x + 39x +
    ui = function(id) {
@@ -29306,7 +30140,8 @@

teal coverage - 67.06%

45 - 39x + 39x +
    datanames = datanames
@@ -29865,35 +30700,40 @@

teal coverage - 67.06%

77 - 78x + 78x +
  shiny::isolate({
78 - 78x + 78x +
    checkmate::assert_flag(allow_add)
79 - 78x + 78x +
    checkmate::assert_flag(module_specific)
80 - 32x + 32x +
    if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
81 - 75x + 75x +
    checkmate::assert_string(app_id, null.ok = TRUE)
@@ -29907,14 +30747,16 @@

teal coverage - 67.06%

83 - 75x + 75x +
    slices <- list(...)
84 - 75x + 75x +
    all_slice_id <- vapply(slices, `[[`, character(1L), "id")
@@ -29928,14 +30770,16 @@

teal coverage - 67.06%

86 - 75x + 75x +
    if (missing(mapping)) {
87 - 46x + 46x +
      mapping <- list(global_filters = all_slice_id)
@@ -29949,14 +30793,16 @@

teal coverage - 67.06%

89 - 75x + 75x +
    if (!module_specific) {
90 - 71x + 71x +
      mapping[setdiff(names(mapping), "global_filters")] <- NULL
@@ -29977,42 +30823,48 @@

teal coverage - 67.06%

93 - 75x + 75x +
    failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
94 - 75x + 75x +
    if (length(failed_slice_id)) {
95 - 1x + 1x +
      stop(sprintf(
96 - 1x + 1x +
        "Filters in mapping don't match any available filter.\n %s not in %s",
97 - 1x + 1x +
        toString(failed_slice_id),
98 - 1x + 1x +
        toString(all_slice_id)
@@ -30040,7 +30892,8 @@

teal coverage - 67.06%

102 - 74x + 74x +
    tss <- teal.slice::teal_slices(
@@ -30054,28 +30907,32 @@

teal coverage - 67.06%

104 - 74x + 74x +
      exclude_varnames = exclude_varnames,
105 - 74x + 74x +
      include_varnames = include_varnames,
106 - 74x + 74x +
      count_type = count_type,
107 - 74x + 74x +
      allow_add = allow_add
@@ -30089,35 +30946,40 @@

teal coverage - 67.06%

109 - 74x + 74x +
    attr(tss, "mapping") <- mapping
110 - 74x + 74x +
    attr(tss, "module_specific") <- module_specific
111 - 74x + 74x +
    attr(tss, "app_id") <- app_id
112 - 74x + 74x +
    class(tss) <- c("modules_teal_slices", class(tss))
113 - 74x + 74x +
    tss
@@ -30187,14 +31049,16 @@

teal coverage - 67.06%

123 - 10x + 10x +
  checkmate::assert_list(x)
124 - 10x + 10x +
  lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
@@ -30208,21 +31072,24 @@

teal coverage - 67.06%

126 - 10x + 10x +
  attrs <- attributes(unclass(x))
127 - 10x + 10x +
  ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
128 - 10x + 10x +
  do.call(teal_slices, c(ans, attrs))
@@ -30474,28 +31341,32 @@

teal coverage - 67.06%

164 - 1x + 1x +
  checkmate::assert_class(filter, "teal_slices")
165 - 1x + 1x +
  shiny::isolate({
166 - 1x + 1x +
    filter_copy <- lapply(filter, function(slice) {
167 - 2x + 2x +
      teal.slice::as.teal_slice(as.list(slice))
@@ -30509,14 +31380,16 @@

teal coverage - 67.06%

169 - 1x + 1x +
    attributes(filter_copy) <- attributes(filter)
170 - 1x + 1x +
    filter_copy
@@ -30592,28 +31465,32 @@

teal coverage - 67.06%

8 - 6x + 6x +
  vapply(
9 - 6x + 6x +
    utils::sessionInfo()$otherPkgs,
10 - 6x + 6x +
    function(x) {
11 - 36x + 36x +
      paste0("library(", x$Package, ")")
@@ -30627,7 +31504,8 @@

teal coverage - 67.06%

13 - 6x + 6x +
    character(1)
@@ -30648,21 +31526,24 @@

teal coverage - 67.06%

16 - 6x + 6x +
    rev() %>%
17 - 6x + 6x +
    paste0(sep = "\n") %>%
18 - 6x + 6x +
    paste0(collapse = "")
@@ -30704,7 +31585,8 @@

teal coverage - 67.06%

24 - 10x + 10x +
  code_string <- getOption("teal.load_nest_code")
@@ -30718,14 +31600,16 @@

teal coverage - 67.06%

26 - 10x + 10x +
  if (!is.null(code_string) && is.character(code_string)) {
27 - 2x + 2x +
    return(code_string)
@@ -30746,7 +31630,8 @@

teal coverage - 67.06%

30 - 8x + 8x +
  return("# Add any code to install/load your NEST environment here\n")
@@ -30879,21 +31764,24 @@

teal coverage - 67.06%

49 - 4x + 4x +
  str_prepro <-
50 - 4x + 4x +
    teal.data:::get_code_dependency(attr(datasets, "preprocessing_code"), names = datanames, check_names = FALSE)
51 - 4x + 4x +
  if (length(str_prepro) == 0) {
@@ -30914,7 +31802,8 @@

teal coverage - 67.06%

54 - 4x + 4x +
    str_prepro <- paste(str_prepro, collapse = "\n")
@@ -30942,35 +31831,40 @@

teal coverage - 67.06%

58 - 4x + 4x +
  str_hash <- vapply(datanames, function(dataname) {
59 - 6x + 6x +
    sprintf(
60 - 6x + 6x +
      "stopifnot(%s == %s)",
61 - 6x + 6x +
      deparse1(bquote(rlang::hash(.(as.name(dataname))))),
62 - 6x + 6x +
      deparse1(hashes[[dataname]])
@@ -30984,14 +31878,16 @@

teal coverage - 67.06%

64 - 4x + 4x +
  }, character(1))
65 - 4x + 4x +
  str_hash <- paste(str_hash, collapse = "\n")
@@ -31012,21 +31908,24 @@

teal coverage - 67.06%

68 - 4x + 4x +
  str_filter <- teal.slice::get_filter_expr(datasets, datanames)
69 - 4x + 4x +
  if (str_filter == "") {
70 - 2x + 2x +
    str_filter <- character(0)
@@ -31054,14 +31953,16 @@

teal coverage - 67.06%

74 - 4x + 4x +
  str_code <- paste(c(str_prepro, str_hash, str_filter), collapse = "\n\n")
75 - 4x + 4x +
  sprintf("%s\n", str_code)
@@ -31549,14 +32450,16 @@

teal coverage - 67.06%

28 - 6x + 6x +
  expr <- substitute(expr)
29 - 6x + 6x +
  extras <- list(...)
@@ -31577,14 +32480,16 @@

teal coverage - 67.06%

32 - 6x + 6x +
  if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
33 - 6x + 6x +
    expr <- call("{", expr)
@@ -31605,7 +32510,8 @@

teal coverage - 67.06%

36 - 6x + 6x +
  calls <- as.list(expr)[-1]
@@ -31626,7 +32532,8 @@

teal coverage - 67.06%

39 - 6x + 6x +
  calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
@@ -31640,7 +32547,8 @@

teal coverage - 67.06%

41 - 6x + 6x +
  eval_code(object = data, code = as.expression(calls))
diff --git a/198_card_labels@main/coverage-report/index.html b/198_card_labels@main/coverage-report/index.html index 32232598c2..86a8780983 100644 --- a/198_card_labels@main/coverage-report/index.html +++ b/198_card_labels@main/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -529,28 +528,32 @@

teal coverage - 72.73%

60 - 91x + 91x +
  shiny::isolate({
61 - 91x + 91x +
    checkmate::assert_flag(allow_add)
62 - 91x + 91x +
    checkmate::assert_flag(module_specific)
63 - 45x + 45x +
    if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
@@ -564,14 +567,16 @@

teal coverage - 72.73%

65 - 88x + 88x +
    slices <- list(...)
66 - 88x + 88x +
    all_slice_id <- vapply(slices, `[[`, character(1L), "id")
@@ -585,14 +590,16 @@

teal coverage - 72.73%

68 - 88x + 88x +
    if (missing(mapping)) {
69 - 46x + 46x +
      mapping <- list(global_filters = all_slice_id)
@@ -606,14 +613,16 @@

teal coverage - 72.73%

71 - 88x + 88x +
    if (!module_specific) {
72 - 84x + 84x +
      mapping[setdiff(names(mapping), "global_filters")] <- NULL
@@ -634,42 +643,48 @@

teal coverage - 72.73%

75 - 88x + 88x +
    failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
76 - 88x + 88x +
    if (length(failed_slice_id)) {
77 - 1x + 1x +
      stop(sprintf(
78 - 1x + 1x +
        "Filters in mapping don't match any available filter.\n %s not in %s",
79 - 1x + 1x +
        toString(failed_slice_id),
80 - 1x + 1x +
        toString(all_slice_id)
@@ -697,7 +712,8 @@

teal coverage - 72.73%

84 - 87x + 87x +
    tss <- teal.slice::teal_slices(
@@ -711,28 +727,32 @@

teal coverage - 72.73%

86 - 87x + 87x +
      exclude_varnames = exclude_varnames,
87 - 87x + 87x +
      include_varnames = include_varnames,
88 - 87x + 87x +
      count_type = count_type,
89 - 87x + 87x +
      allow_add = allow_add
@@ -746,28 +766,32 @@

teal coverage - 72.73%

91 - 87x + 87x +
    attr(tss, "mapping") <- mapping
92 - 87x + 87x +
    attr(tss, "module_specific") <- module_specific
93 - 87x + 87x +
    class(tss) <- c("modules_teal_slices", class(tss))
94 - 87x + 87x +
    tss
@@ -837,14 +861,16 @@

teal coverage - 72.73%

104 - 33x + 33x +
  checkmate::assert_list(x)
105 - 33x + 33x +
  lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
@@ -858,21 +884,24 @@

teal coverage - 72.73%

107 - 33x + 33x +
  attrs <- attributes(unclass(x))
108 - 33x + 33x +
  ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
109 - 33x + 33x +
  do.call(teal_slices, c(ans, attrs))
@@ -1124,28 +1153,32 @@

teal coverage - 72.73%

145 - 1x + 1x +
  checkmate::assert_class(filter, "teal_slices")
146 - 1x + 1x +
  shiny::isolate({
147 - 1x + 1x +
    filter_copy <- lapply(filter, function(slice) {
148 - 2x + 2x +
      teal.slice::as.teal_slice(as.list(slice))
@@ -1159,14 +1192,16 @@

teal coverage - 72.73%

150 - 1x + 1x +
    attributes(filter_copy) <- attributes(filter)
151 - 1x + 1x +
    filter_copy
@@ -1655,7 +1690,8 @@

teal coverage - 72.73%

67 - 32x + 32x +
  if (checkmate::test_string(header)) {
@@ -1676,7 +1712,8 @@

teal coverage - 72.73%

70 - 32x + 32x +
  if (checkmate::test_string(footer)) {
@@ -1697,28 +1734,32 @@

teal coverage - 72.73%

73 - 32x + 32x +
  checkmate::assert(
74 - 32x + 32x +
    checkmate::check_class(splash_ui, "shiny.tag"),
75 - 32x + 32x +
    checkmate::check_class(splash_ui, "shiny.tag.list"),
76 - 32x + 32x +
    checkmate::check_class(splash_ui, "html")
@@ -1732,28 +1773,32 @@

teal coverage - 72.73%

78 - 32x + 32x +
  checkmate::assert(
79 - 32x + 32x +
    checkmate::check_class(header, "shiny.tag"),
80 - 32x + 32x +
    checkmate::check_class(header, "shiny.tag.list"),
81 - 32x + 32x +
    checkmate::check_class(header, "html")
@@ -1767,28 +1812,32 @@

teal coverage - 72.73%

83 - 32x + 32x +
  checkmate::assert(
84 - 32x + 32x +
    checkmate::check_class(footer, "shiny.tag"),
85 - 32x + 32x +
    checkmate::check_class(footer, "shiny.tag.list"),
86 - 32x + 32x +
    checkmate::check_class(footer, "html")
@@ -1809,7 +1858,8 @@

teal coverage - 72.73%

89 - 32x + 32x +
  ns <- NS(id)
@@ -1823,7 +1873,8 @@

teal coverage - 72.73%

91 - 32x + 32x +
  splash_ui <- div(
@@ -1837,7 +1888,8 @@

teal coverage - 72.73%

93 - 32x + 32x +
    id = ns("main_ui_container"),
@@ -1858,7 +1910,8 @@

teal coverage - 72.73%

96 - 32x + 32x +
    div(splash_ui)
@@ -1893,35 +1946,40 @@

teal coverage - 72.73%

101 - 32x + 32x +
  shiny_busy_message_panel <- conditionalPanel(
102 - 32x + 32x +
    condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint
103 - 32x + 32x +
    div(
104 - 32x + 32x +
      icon("arrows-rotate", "spin fa-spin"),
105 - 32x + 32x +
      "Computing ...",
@@ -1935,7 +1993,8 @@

teal coverage - 72.73%

107 - 32x + 32x +
      class = "shinybusymessage"
@@ -1963,98 +2022,112 @@

teal coverage - 72.73%

111 - 32x + 32x +
  res <- fluidPage(
112 - 32x + 32x +
    title = title,
113 - 32x + 32x +
    theme = get_teal_bs_theme(),
114 - 32x + 32x +
    include_teal_css_js(),
115 - 32x + 32x +
    tags$header(header),
116 - 32x + 32x +
    tags$hr(class = "my-2"),
117 - 32x + 32x +
    shiny_busy_message_panel,
118 - 32x + 32x +
    splash_ui,
119 - 32x + 32x +
    tags$hr(),
120 - 32x + 32x +
    tags$footer(
121 - 32x + 32x +
      div(
122 - 32x + 32x +
        footer,
123 - 32x + 32x +
        teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
124 - 32x + 32x +
        textOutput(ns("identifier"))
@@ -2082,7 +2155,8 @@

teal coverage - 72.73%

128 - 32x + 32x +
  return(res)
@@ -2124,21 +2198,24 @@

teal coverage - 72.73%

134 - 9x + 9x +
  stopifnot(is.reactive(raw_data))
135 - 8x + 8x +
  moduleServer(id, function(input, output, session) {
136 - 8x + 8x +
    logger::log_trace("srv_teal initializing the module.")
@@ -2152,14 +2229,16 @@

teal coverage - 72.73%

138 - 8x + 8x +
    output$identifier <- renderText(
139 - 8x + 8x +
      paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
@@ -2180,28 +2259,32 @@

teal coverage - 72.73%

142 - 8x + 8x +
    teal.widgets::verbatim_popup_srv(
143 - 8x + 8x +
      "sessionInfo",
144 - 8x + 8x +
      verbatim_content = utils::capture.output(utils::sessionInfo()),
145 - 8x + 8x +
      title = "SessionInfo"
@@ -2229,7 +2312,8 @@

teal coverage - 72.73%

149 - 8x + 8x +
    run_js_files(files = "init.js") # `JavaScript` code to make the clipboard accessible
@@ -2257,35 +2341,40 @@

teal coverage - 72.73%

153 - 8x + 8x +
    get_client_timezone(session$ns)
154 - 8x + 8x +
    observeEvent(
155 - 8x + 8x +
      eventExpr = input$timezone,
156 - 8x + 8x +
      once = TRUE,
157 - 8x + 8x +
      handlerExpr = {
@@ -2334,28 +2423,32 @@

teal coverage - 72.73%

164 - 8x + 8x +
    env <- environment()
165 - 8x + 8x +
    datasets_reactive <- reactive({
166 - 6x + 6x +
      if (is.null(raw_data())) {
167 - 1x + 1x +
        return(NULL)
@@ -2369,14 +2462,16 @@

teal coverage - 72.73%

169 - 5x + 5x +
      env$progress <- shiny::Progress$new(session)
170 - 5x + 5x +
      env$progress$set(0.25, message = "Setting data")
@@ -2404,7 +2499,8 @@

teal coverage - 72.73%

174 - 5x + 5x +
      datasets_singleton <- teal.slice::init_filtered_data(raw_data())
@@ -2418,63 +2514,72 @@

teal coverage - 72.73%

176 - 5x + 5x +
      filter_global <- Filter(function(x) x$id %in% attr(filter, "mapping")$global_filters, filter)
177 - 5x + 5x +
      datasets_singleton$set_filter_state(filter_global)
178 - 5x + 5x +
      module_datasets <- function(modules) {
179 - 19x + 19x +
        if (inherits(modules, "teal_modules")) {
180 - 8x + 8x +
          datasets <- lapply(modules$children, module_datasets)
181 - 8x + 8x +
          labels <- vapply(modules$children, `[[`, character(1), "label")
182 - 8x + 8x +
          names(datasets) <- labels
183 - 8x + 8x +
          datasets
184 - 11x + 11x +
        } else if (isTRUE(attr(filter, "module_specific"))) {
@@ -2495,63 +2600,72 @@

teal coverage - 72.73%

187 - 3x + 3x +
          datanames <- if (is.null(modules$datanames)) raw_data()$get_datanames() else modules$datanames
188 - 3x + 3x +
          data_objects <- sapply(
189 - 3x + 3x +
            datanames,
190 - 3x + 3x +
            function(dataname) {
191 - 6x + 6x +
              dataset <- raw_data()$get_dataset(dataname)
192 - 6x + 6x +
              list(
193 - 6x + 6x +
                dataset = dataset$get_raw_data(),
194 - 6x + 6x +
                metadata = dataset$get_metadata(),
195 - 6x + 6x +
                label = dataset$get_dataset_label()
@@ -2572,7 +2686,8 @@

teal coverage - 72.73%

198 - 3x + 3x +
            simplify = FALSE
@@ -2586,35 +2701,40 @@

teal coverage - 72.73%

200 - 3x + 3x +
          datasets_module <- teal.slice::init_filtered_data(
201 - 3x + 3x +
            data_objects,
202 - 3x + 3x +
            join_keys = raw_data()$get_join_keys(),
203 - 3x + 3x +
            code = raw_data()$get_code_class(),
204 - 3x + 3x +
            check = raw_data()$get_check()
@@ -2642,7 +2762,8 @@

teal coverage - 72.73%

208 - 3x + 3x +
          slices <- Filter(x = filter, f = function(x) {
@@ -2670,42 +2791,48 @@

teal coverage - 72.73%

212 - 3x + 3x +
          include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
213 - 3x + 3x +
          exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
214 - 3x + 3x +
          slices$include_varnames <- include_varnames
215 - 3x + 3x +
          slices$exclude_varnames <- exclude_varnames
216 - 3x + 3x +
          datasets_module$set_filter_state(slices)
217 - 3x + 3x +
          datasets_module
@@ -2719,7 +2846,8 @@

teal coverage - 72.73%

219 - 8x + 8x +
          datasets_singleton
@@ -2740,7 +2868,8 @@

teal coverage - 72.73%

222 - 5x + 5x +
      datasets <- module_datasets(modules)
@@ -2754,14 +2883,16 @@

teal coverage - 72.73%

224 - 5x + 5x +
      logger::log_trace("srv_teal@4 Raw Data transferred to FilteredData.")
225 - 5x + 5x +
      datasets
@@ -2782,14 +2913,16 @@

teal coverage - 72.73%

228 - 8x + 8x +
    reporter <- teal.reporter::Reporter$new()
229 - 8x + 8x +
    is_any_previewer <- function(modules) {
@@ -2852,7 +2985,8 @@

teal coverage - 72.73%

238 - 8x + 8x +
    if (is_arg_used(modules, "reporter") && !is_any_previewer(modules)) {
@@ -2915,28 +3049,32 @@

teal coverage - 72.73%

247 - 8x + 8x +
    observeEvent(datasets_reactive(), ignoreNULL = TRUE, once = TRUE, {
248 - 1x + 1x +
      logger::log_trace("srv_teal@5 setting main ui after data was pulled")
249 - 1x + 1x +
      env$progress$set(0.5, message = "Setting up main UI")
250 - 1x + 1x +
      on.exit(env$progress$close())
@@ -2957,28 +3095,32 @@

teal coverage - 72.73%

253 - 1x + 1x +
      removeUI(sprintf("#%s:first-child", session$ns("main_ui_container")))
254 - 1x + 1x +
      insertUI(
255 - 1x + 1x +
        selector = paste0("#", session$ns("main_ui_container")),
256 - 1x + 1x +
        where = "beforeEnd",
@@ -2999,35 +3141,40 @@

teal coverage - 72.73%

259 - 1x + 1x +
        ui = div(ui_tabs_with_filters(
260 - 1x + 1x +
          session$ns("main_ui"),
261 - 1x + 1x +
          modules = modules,
262 - 1x + 1x +
          datasets = datasets_reactive(),
263 - 1x + 1x +
          filter = filter
@@ -3055,7 +3202,8 @@

teal coverage - 72.73%

267 - 1x + 1x +
        immediate = TRUE
@@ -3090,42 +3238,48 @@

teal coverage - 72.73%

272 - 1x + 1x +
      active_module <- srv_tabs_with_filters(
273 - 1x + 1x +
        id = "main_ui",
274 - 1x + 1x +
        datasets = datasets_reactive(),
275 - 1x + 1x +
        modules = modules,
276 - 1x + 1x +
        reporter = reporter,
277 - 1x + 1x +
        filter = filter
@@ -3139,7 +3293,8 @@

teal coverage - 72.73%

279 - 1x + 1x +
      return(active_module)
@@ -3474,28 +3629,32 @@

teal coverage - 72.73%

44 - 40x + 40x +
  checkmate::assert_list(
45 - 40x + 40x +
    data,
46 - 40x + 40x +
    any.missing = FALSE, names = "unique",
47 - 40x + 40x +
    types = c("data.frame", "reactive", "MultiAssayExperiment")
@@ -3509,14 +3668,16 @@

teal coverage - 72.73%

49 - 36x + 36x +
  checkmate::assert_class(join_keys, "JoinKeys", null.ok = TRUE)
50 - 35x + 35x +
  checkmate::assert_multi_class(code, c("character", "reactive"))
@@ -3530,21 +3691,24 @@

teal coverage - 72.73%

52 - 34x + 34x +
  checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
53 - 32x + 32x +
  checkmate::assert_subset(names(metadata), names(data))
54 - 20x + 20x +
  for (m in metadata) teal.data::validate_metadata(m)
@@ -3558,14 +3722,16 @@

teal coverage - 72.73%

56 - 31x + 31x +
  if (is.reactive(code)) {
57 - 15x + 15x +
    isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
@@ -3593,21 +3759,24 @@

teal coverage - 72.73%

61 - 30x + 30x +
  for (x in names(data)) {
62 - 49x + 49x +
    if (!is.reactive(data[[x]])) {
63 - 29x + 29x +
      data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
@@ -3621,28 +3790,32 @@

teal coverage - 72.73%

65 - 20x + 20x +
      isolate(
66 - 20x + 20x +
        checkmate::assert_multi_class(
67 - 20x + 20x +
          data[[x]](), c("data.frame", "MultiAssayExperiment"),
68 - 20x + 20x +
          .var.name = "data"
@@ -3691,21 +3864,24 @@

teal coverage - 72.73%

75 - 29x + 29x +
  attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
76 - 29x + 29x +
  attr(data, "join_keys") <- join_keys
77 - 29x + 29x +
  attr(data, "metadata") <- metadata
@@ -3726,14 +3902,16 @@

teal coverage - 72.73%

80 - 29x + 29x +
  class(data) <- c("tdata", class(data))
81 - 29x + 29x +
  data
@@ -3866,14 +4044,16 @@

teal coverage - 72.73%

100 - 2x + 2x +
  checkmate::assert_class(data, "tdata")
101 - 1x + 1x +
  list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
@@ -3936,7 +4116,8 @@

teal coverage - 72.73%

110 - 6x + 6x +
  attr(x, "code")()
@@ -4020,14 +4201,16 @@

teal coverage - 72.73%

122 - 4x + 4x +
  checkmate::assert_class(data, "tdata")
123 - 2x + 2x +
  get_code(data)
@@ -4090,7 +4273,8 @@

teal coverage - 72.73%

132 - 3x + 3x +
  UseMethod("get_join_keys", data)
@@ -4139,7 +4323,8 @@

teal coverage - 72.73%

139 - 3x + 3x +
  attr(data, "join_keys")
@@ -4251,14 +4436,16 @@

teal coverage - 72.73%

155 - 6x + 6x +
  checkmate::assert_string(dataname)
156 - 6x + 6x +
  UseMethod("get_metadata", data)
@@ -4300,21 +4487,24 @@

teal coverage - 72.73%

162 - 6x + 6x +
  metadata <- attr(data, "metadata")
163 - 6x + 6x +
  if (is.null(metadata)) {
164 - 1x + 1x +
    return(NULL)
@@ -4328,7 +4518,8 @@

teal coverage - 72.73%

166 - 5x + 5x +
  metadata[[dataname]]
@@ -4467,21 +4658,24 @@

teal coverage - 72.73%

12 - 32x + 32x +
  css_files <- list.files(
13 - 32x + 32x +
    system.file("css", package = "teal", mustWork = TRUE),
14 - 32x + 32x +
    pattern = pattern, full.names = TRUE
@@ -4495,21 +4689,24 @@

teal coverage - 72.73%

16 - 32x + 32x +
  return(
17 - 32x + 32x +
    shiny::singleton(
18 - 32x + 32x +
      shiny::tags$head(lapply(css_files, shiny::includeCSS))
@@ -4628,21 +4825,24 @@

teal coverage - 72.73%

35 - 32x + 32x +
  checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
36 - 32x + 32x +
  js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
37 - 32x + 32x +
  js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
@@ -4656,7 +4856,8 @@

teal coverage - 72.73%

39 - 32x + 32x +
  return(singleton(lapply(js_files, includeScript)))
@@ -4775,21 +4976,24 @@

teal coverage - 72.73%

56 - 8x + 8x +
  checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
57 - 8x + 8x +
  lapply(files, function(file) {
58 - 8x + 8x +
    shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
@@ -4803,7 +5007,8 @@

teal coverage - 72.73%

60 - 8x + 8x +
  return(invisible(NULL))
@@ -4936,21 +5141,24 @@

teal coverage - 72.73%

79 - 32x + 32x +
  tagList(
80 - 32x + 32x +
    shinyjs::useShinyjs(),
81 - 32x + 32x +
    include_css_files(),
@@ -4964,14 +5172,16 @@

teal coverage - 72.73%

83 - 32x + 32x +
    include_js_files(except = "init.js"),
84 - 32x + 32x +
    shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
@@ -5166,21 +5376,24 @@

teal coverage - 72.73%

25 - 32x + 32x +
  checkmate::assert_class(data, "TealDataAbstract")
26 - 32x + 32x +
  is_pulled_data <- teal.data::is_pulled(data)
27 - 32x + 32x +
  ns <- NS(id)
@@ -5222,7 +5435,8 @@

teal coverage - 72.73%

33 - 32x + 32x +
  splash_ui <- if (is_pulled_data) {
@@ -5236,7 +5450,8 @@

teal coverage - 72.73%

35 - 28x + 28x +
    div()
@@ -5250,14 +5465,16 @@

teal coverage - 72.73%

37 - 4x + 4x +
    message("App was initialized with delayed data loading.")
38 - 4x + 4x +
    data$get_ui(ns("startapp_module"))
@@ -5278,7 +5495,8 @@

teal coverage - 72.73%

41 - 32x + 32x +
  ui_teal(id = ns("teal"), splash_ui = splash_ui, title = title, header = header, footer = footer)
@@ -5397,28 +5615,32 @@

teal coverage - 72.73%

58 - 4x + 4x +
  checkmate::assert_class(data, "TealDataAbstract")
59 - 4x + 4x +
  moduleServer(id, function(input, output, session) {
60 - 4x + 4x +
    logger::log_trace(
61 - 4x + 4x +
      "srv_teal_with_splash initializing module with data { paste(data$get_datanames(), collapse = ' ')}."
@@ -5439,7 +5661,8 @@

teal coverage - 72.73%

64 - 4x + 4x +
    if (getOption("teal.show_js_log", default = FALSE)) {
@@ -5467,7 +5690,8 @@

teal coverage - 72.73%

68 - 4x + 4x +
    is_pulled_data <- teal.data::is_pulled(data)
@@ -5495,14 +5719,16 @@

teal coverage - 72.73%

72 - 4x + 4x +
    if (is_pulled_data) {
73 - 2x + 2x +
      raw_data <- reactiveVal(data) # will trigger by setting it
@@ -5516,14 +5742,16 @@

teal coverage - 72.73%

75 - 2x + 2x +
      raw_data <- data$get_server()(id = "startapp_module")
76 - 2x + 2x +
      if (!is.reactive(raw_data)) {
@@ -5558,21 +5786,24 @@

teal coverage - 72.73%

81 - 4x + 4x +
    res <- srv_teal(id = "teal", modules = modules, raw_data = raw_data, filter = filter)
82 - 4x + 4x +
    logger::log_trace(
83 - 4x + 4x +
      "srv_teal_with_splash initialized the module with data { paste(data$get_datanames(), collapse = ' ') }."
@@ -5586,7 +5817,8 @@

teal coverage - 72.73%

85 - 4x + 4x +
    return(res)
@@ -6229,42 +6461,48 @@

teal coverage - 72.73%

89 - 7x + 7x +
  checkmate::assert_character(id)
90 - 7x + 7x +
  checkmate::assert_true(is.reactive(slices_global))
91 - 7x + 7x +
  checkmate::assert_class(isolate(slices_global()), "teal_slices")
92 - 7x + 7x +
  checkmate::assert_true(is.reactive(mapping_matrix))
93 - 7x + 7x +
  checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
94 - 7x + 7x +
  checkmate::assert_list(filtered_data_list, types = "FilteredData", any.missing = FALSE, names = "named")
@@ -6278,14 +6516,16 @@

teal coverage - 72.73%

96 - 7x + 7x +
  moduleServer(id, function(input, output, session) {
97 - 7x + 7x +
    ns <- session$ns
@@ -6306,28 +6546,32 @@

teal coverage - 72.73%

100 - 7x + 7x +
    filter <- isolate(slices_global())
101 - 7x + 7x +
    snapshot_history <- reactiveVal({
102 - 7x + 7x +
      list(
103 - 7x + 7x +
        "Initial application state" = as.list(filter, recursive = TRUE)
@@ -6362,7 +6606,8 @@

teal coverage - 72.73%

108 - 7x + 7x +
    observeEvent(input$snapshot_add, {
@@ -6453,7 +6698,8 @@

teal coverage - 72.73%

121 - 7x + 7x +
    observeEvent(input$snapshot_name_accept, {
@@ -6642,7 +6888,8 @@

teal coverage - 72.73%

148 - 7x + 7x +
    observeEvent(input$snapshot_reset, {
@@ -6803,21 +7050,24 @@

teal coverage - 72.73%

171 - 7x + 7x +
    observers <- reactiveValues()
172 - 7x + 7x +
    handlers <- reactiveValues()
173 - 7x + 7x +
    divs <- reactiveValues()
@@ -6831,14 +7081,16 @@

teal coverage - 72.73%

175 - 7x + 7x +
    observeEvent(snapshot_history(), {
176 - 3x + 3x +
      lapply(names(snapshot_history())[-1L], function(s) {
@@ -7209,42 +7461,48 @@

teal coverage - 72.73%

229 - 7x + 7x +
    output$snapshot_list <- renderUI({
230 - 3x + 3x +
      rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
231 - 3x + 3x +
      if (length(rows) == 0L) {
232 - 3x + 3x +
        div(
233 - 3x + 3x +
          class = "snapshot_manager_placeholder",
234 - 3x + 3x +
          "Snapshots will appear here."
@@ -8034,21 +8292,24 @@

teal coverage - 72.73%

64 - 2x + 2x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
65 - 2x + 2x +
  checkmate::assert_count(depth)
66 - 2x + 2x +
  UseMethod("ui_nested_tabs", modules)
@@ -8132,35 +8393,40 @@

teal coverage - 72.73%

78 - 1x + 1x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
79 - 1x + 1x +
  ns <- NS(id)
80 - 1x + 1x +
  do.call(
81 - 1x + 1x +
    tabsetPanel,
82 - 1x + 1x +
    c(
@@ -8174,21 +8440,24 @@

teal coverage - 72.73%

84 - 1x + 1x +
      list(
85 - 1x + 1x +
        id = ns("active_tab"),
86 - 1x + 1x +
        type = if (modules$label == "root") "pills" else "tabs"
@@ -8202,91 +8471,104 @@

teal coverage - 72.73%

88 - 1x + 1x +
      lapply(
89 - 1x + 1x +
        names(modules$children),
90 - 1x + 1x +
        function(module_id) {
91 - 1x + 1x +
          module_label <- modules$children[[module_id]]$label
92 - 1x + 1x +
          tabPanel(
93 - 1x + 1x +
            title = module_label,
94 - 1x + 1x +
            value = module_id, # when clicked this tab value changes input$<tabset panel id>
95 - 1x + 1x +
            ui_nested_tabs(
96 - 1x + 1x +
              id = ns(module_id),
97 - 1x + 1x +
              modules = modules$children[[module_id]],
98 - 1x + 1x +
              datasets = datasets[[module_label]],
99 - 1x + 1x +
              depth = depth + 1L,
100 - 1x + 1x +
              is_module_specific = is_module_specific
@@ -8370,14 +8652,16 @@

teal coverage - 72.73%

112 - 1x + 1x +
  checkmate::assert_class(datasets, class = "FilteredData")
113 - 1x + 1x +
  ns <- NS(id)
@@ -8391,14 +8675,16 @@

teal coverage - 72.73%

115 - 1x + 1x +
  args <- isolate(teal.transform::resolve_delayed(modules$ui_args, datasets))
116 - 1x + 1x +
  args <- c(list(id = ns("module")), args)
@@ -8412,7 +8698,8 @@

teal coverage - 72.73%

118 - 1x + 1x +
  if (is_arg_used(modules$ui, "datasets")) {
@@ -8440,7 +8727,8 @@

teal coverage - 72.73%

122 - 1x + 1x +
  if (is_arg_used(modules$ui, "data")) {
@@ -8475,49 +8763,56 @@

teal coverage - 72.73%

127 - 1x + 1x +
  teal_ui <- tags$div(
128 - 1x + 1x +
    id = id,
129 - 1x + 1x +
    class = "teal_module",
130 - 1x + 1x +
    uiOutput(ns("data_reactive"), inline = TRUE),
131 - 1x + 1x +
    tagList(
132 - 1x + 1x +
      if (depth >= 2L) div(style = "mt-6"),
133 - 1x + 1x +
      do.call(modules$ui, args)
@@ -8545,7 +8840,8 @@

teal coverage - 72.73%

137 - 1x + 1x +
  if (!is.null(modules$datanames) && is_module_specific) {
@@ -8615,7 +8911,8 @@

teal coverage - 72.73%

147 - 1x + 1x +
    teal_ui
@@ -8664,21 +8961,24 @@

teal coverage - 72.73%

154 - 54x + 54x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
155 - 54x + 54x +
  checkmate::assert_class(reporter, "Reporter")
156 - 53x + 53x +
  UseMethod("srv_nested_tabs", modules)
@@ -8776,7 +9076,8 @@

teal coverage - 72.73%

170 - 24x + 24x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
@@ -8790,14 +9091,16 @@

teal coverage - 72.73%

172 - 24x + 24x +
  moduleServer(id = id, module = function(input, output, session) {
173 - 24x + 24x +
    logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
@@ -8811,70 +9114,80 @@

teal coverage - 72.73%

175 - 24x + 24x +
    labels <- vapply(modules$children, `[[`, character(1), "label")
176 - 24x + 24x +
    modules_reactive <- sapply(
177 - 24x + 24x +
      names(modules$children),
178 - 24x + 24x +
      function(module_id) {
179 - 35x + 35x +
        srv_nested_tabs(
180 - 35x + 35x +
          id = module_id,
181 - 35x + 35x +
          datasets = datasets[[labels[module_id]]],
182 - 35x + 35x +
          modules = modules$children[[module_id]],
183 - 35x + 35x +
          is_module_specific = is_module_specific,
184 - 35x + 35x +
          reporter = reporter
@@ -8895,7 +9208,8 @@

teal coverage - 72.73%

187 - 24x + 24x +
      simplify = FALSE
@@ -8923,21 +9237,24 @@

teal coverage - 72.73%

191 - 24x + 24x +
    input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
192 - 24x + 24x +
    get_active_module <- reactive({
193 - 13x + 13x +
      if (length(modules$children) == 1L) {
@@ -8951,7 +9268,8 @@

teal coverage - 72.73%

195 - 2x + 2x +
        modules_reactive[[1]]()
@@ -8972,7 +9290,8 @@

teal coverage - 72.73%

198 - 11x + 11x +
        modules_reactive[[input_validated()]]()
@@ -9000,7 +9319,8 @@

teal coverage - 72.73%

202 - 24x + 24x +
    get_active_module
@@ -9056,14 +9376,16 @@

teal coverage - 72.73%

210 - 29x + 29x +
  checkmate::assert_class(datasets, "FilteredData")
211 - 29x + 29x +
  logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
@@ -9077,21 +9399,24 @@

teal coverage - 72.73%

213 - 29x + 29x +
  moduleServer(id = id, module = function(input, output, session) {
214 - 29x + 29x +
    modules$server_args <- teal.transform::resolve_delayed(modules$server_args, datasets)
215 - 29x + 29x +
    if (!is.null(modules$datanames) && is_module_specific) {
@@ -9147,35 +9472,40 @@

teal coverage - 72.73%

223 - 29x + 29x +
    trigger_data <- reactiveVal(1L)
224 - 29x + 29x +
    trigger_module <- reactiveVal(NULL)
225 - 29x + 29x +
    output$data_reactive <- renderUI({
226 - 18x + 18x +
      lapply(datasets$datanames(), function(x) {
227 - 22x + 22x +
        datasets$get_data(x, filtered = TRUE)
@@ -9189,14 +9519,16 @@

teal coverage - 72.73%

229 - 18x + 18x +
      isolate(trigger_data(trigger_data() + 1))
230 - 18x + 18x +
      isolate(trigger_module(TRUE))
@@ -9210,7 +9542,8 @@

teal coverage - 72.73%

232 - 18x + 18x +
      NULL
@@ -9238,14 +9571,16 @@

teal coverage - 72.73%

236 - 29x + 29x +
    args <- c(list(id = "module"), modules$server_args)
237 - 29x + 29x +
    if (is_arg_used(modules$server, "reporter")) {
@@ -9273,14 +9608,16 @@

teal coverage - 72.73%

241 - 29x + 29x +
    if (is_arg_used(modules$server, "datasets")) {
242 - 2x + 2x +
      args <- c(args, datasets = datasets)
@@ -9301,21 +9638,24 @@

teal coverage - 72.73%

245 - 29x + 29x +
    if (is_arg_used(modules$server, "data")) {
246 - 8x + 8x +
      data <- .datasets_to_data(modules, datasets, trigger_data)
247 - 8x + 8x +
      args <- c(args, data = list(data))
@@ -9336,21 +9676,24 @@

teal coverage - 72.73%

250 - 29x + 29x +
    if (is_arg_used(modules$server, "filter_panel_api")) {
251 - 2x + 2x +
      filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
252 - 2x + 2x +
      args <- c(args, filter_panel_api = filter_panel_api)
@@ -9371,28 +9714,32 @@

teal coverage - 72.73%

255 - 29x + 29x +
    if (is_arg_used(modules$server, "datasets") && is_arg_used(modules$server, "data")) {
256 - 1x + 1x +
      warning(
257 - 1x + 1x +
        "Module '", modules$label, "' has `data` and `datasets` arguments in the formals.",
258 - 1x + 1x +
        "\nIt's recommended to use `data` to work with filtered objects."
@@ -9427,49 +9774,56 @@

teal coverage - 72.73%

263 - 29x + 29x +
    observeEvent(
264 - 29x + 29x +
      ignoreNULL = TRUE,
265 - 29x + 29x +
      once = TRUE,
266 - 29x + 29x +
      eventExpr = trigger_module(),
267 - 29x + 29x +
      handlerExpr = {
268 - 18x + 18x +
        module_output <- if (is_arg_used(modules$server, "id")) {
269 - 18x + 18x +
          do.call(modules$server, args)
@@ -9518,7 +9872,8 @@

teal coverage - 72.73%

276 - 29x + 29x +
    reactive(modules)
@@ -9658,21 +10013,24 @@

teal coverage - 72.73%

296 - 13x + 13x +
  checkmate::assert_class(module, "teal_module")
297 - 13x + 13x +
  checkmate::assert_class(datasets, "FilteredData")
298 - 13x + 13x +
  checkmate::assert_class(trigger_data, "reactiveVal")
@@ -9686,7 +10044,8 @@

teal coverage - 72.73%

300 - 12x + 12x +
  datanames <- if (is.null(module$datanames)) datasets$datanames() else module$datanames
@@ -9707,28 +10066,32 @@

teal coverage - 72.73%

303 - 12x + 12x +
  data <- sapply(
304 - 12x + 12x +
    datanames,
305 - 12x + 12x +
    function(x) eventReactive(trigger_data(), datasets$get_data(x, filtered = TRUE)),
306 - 12x + 12x +
    simplify = FALSE
@@ -9749,21 +10112,24 @@

teal coverage - 72.73%

309 - 12x + 12x +
  hashes <- calculate_hashes(datanames, datasets)
310 - 12x + 12x +
  metadata <- lapply(datanames, datasets$get_metadata)
311 - 12x + 12x +
  names(metadata) <- datanames
@@ -9777,63 +10143,72 @@

teal coverage - 72.73%

313 - 12x + 12x +
  new_tdata(
314 - 12x + 12x +
    data,
315 - 12x + 12x +
    eventReactive(
316 - 12x + 12x +
      trigger_data(),
317 - 12x + 12x +
      c(
318 - 12x + 12x +
        get_rcode_str_install(),
319 - 12x + 12x +
        get_rcode_libraries(),
320 - 12x + 12x +
        get_datasets_code(datanames, datasets, hashes),
321 - 12x + 12x +
        teal.slice::get_filter_expr(datasets, datanames)
@@ -9854,14 +10229,16 @@

teal coverage - 72.73%

324 - 12x + 12x +
    datasets$get_join_keys(),
325 - 12x + 12x +
    metadata
@@ -9952,7 +10329,8 @@

teal coverage - 72.73%

338 - 16x + 16x +
  sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
@@ -10385,21 +10763,24 @@

teal coverage - 72.73%

60 - 1x + 1x +
  checkmate::assert_class(modules, "teal_modules")
61 - 1x + 1x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
62 - 1x + 1x +
  checkmate::assert_class(filter, "teal_slices")
@@ -10413,14 +10794,16 @@

teal coverage - 72.73%

64 - 1x + 1x +
  ns <- NS(id)
65 - 1x + 1x +
  is_module_specific <- isTRUE(attr(filter, "module_specific"))
@@ -10434,63 +10817,72 @@

teal coverage - 72.73%

67 - 1x + 1x +
  teal_ui <- ui_nested_tabs(ns("root"), modules = modules, datasets, is_module_specific = is_module_specific)
68 - 1x + 1x +
  filter_panel_btns <- tags$li(
69 - 1x + 1x +
    class = "flex-grow",
70 - 1x + 1x +
    tags$button(
71 - 1x + 1x +
      class = "btn action-button filter_hamburger", # see sidebar.css for style filter_hamburger
72 - 1x + 1x +
      href = "javascript:void(0)",
73 - 1x + 1x +
      onclick = "toggleFilterPanel();", # see sidebar.js
74 - 1x + 1x +
      title = "Toggle filter panels",
75 - 1x + 1x +
      icon("fas fa-bars")
@@ -10504,7 +10896,8 @@

teal coverage - 72.73%

77 - 1x + 1x +
    filter_manager_modal_ui(ns("filter_manager"))
@@ -10518,7 +10911,8 @@

teal coverage - 72.73%

79 - 1x + 1x +
  teal_ui$children[[1]] <- tagAppendChild(teal_ui$children[[1]], filter_panel_btns)
@@ -10532,7 +10926,8 @@

teal coverage - 72.73%

81 - 1x + 1x +
  if (!is_module_specific) {
@@ -10546,63 +10941,72 @@

teal coverage - 72.73%

83 - 1x + 1x +
    tabset_bar <- teal_ui$children[[1]]
84 - 1x + 1x +
    teal_modules <- teal_ui$children[[2]]
85 - 1x + 1x +
    filter_ui <- unlist(datasets)[[1]]$ui_filter_panel(ns("filter_panel"))
86 - 1x + 1x +
    list(
87 - 1x + 1x +
      tabset_bar,
88 - 1x + 1x +
      tags$hr(class = "my-2"),
89 - 1x + 1x +
      fluidRow(
90 - 1x + 1x +
        column(width = 9, teal_modules, class = "teal_primary_col"),
91 - 1x + 1x +
        column(width = 3, filter_ui, class = "teal_secondary_col")
@@ -10700,28 +11104,32 @@

teal coverage - 72.73%

105 - 6x + 6x +
  checkmate::assert_class(modules, "teal_modules")
106 - 6x + 6x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
107 - 6x + 6x +
  checkmate::assert_class(reporter, "Reporter")
108 - 4x + 4x +
  checkmate::assert_class(filter, "teal_slices")
@@ -10735,14 +11143,16 @@

teal coverage - 72.73%

110 - 4x + 4x +
  moduleServer(id, function(input, output, session) {
111 - 4x + 4x +
    logger::log_trace("srv_tabs_with_filters initializing the module.")
@@ -10756,14 +11166,16 @@

teal coverage - 72.73%

113 - 4x + 4x +
    is_module_specific <- isTRUE(attr(filter, "module_specific"))
114 - 4x + 4x +
    manager_out <- filter_manager_modal_srv("filter_manager", filtered_data_list = datasets, filter = filter)
@@ -10777,42 +11189,48 @@

teal coverage - 72.73%

116 - 4x + 4x +
    active_module <- srv_nested_tabs(
117 - 4x + 4x +
      id = "root",
118 - 4x + 4x +
      datasets = datasets,
119 - 4x + 4x +
      modules = modules,
120 - 4x + 4x +
      reporter = reporter,
121 - 4x + 4x +
      is_module_specific = is_module_specific
@@ -10833,28 +11251,32 @@

teal coverage - 72.73%

124 - 4x + 4x +
    if (!is_module_specific) {
125 - 4x + 4x +
      active_datanames <- reactive(active_module()$datanames)
126 - 4x + 4x +
      singleton <- unlist(datasets)[[1]]
127 - 4x + 4x +
      singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
@@ -10868,28 +11290,32 @@

teal coverage - 72.73%

129 - 4x + 4x +
      observeEvent(
130 - 4x + 4x +
        eventExpr = active_datanames(),
131 - 4x + 4x +
        handlerExpr = {
132 - 5x + 5x +
          script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
@@ -10903,7 +11329,8 @@

teal coverage - 72.73%

134 - 1x + 1x +
            "handleNoActiveDatasets();"
@@ -10924,7 +11351,8 @@

teal coverage - 72.73%

137 - 4x + 4x +
            "handleActiveDatasetsPresent();"
@@ -10938,7 +11366,8 @@

teal coverage - 72.73%

139 - 5x + 5x +
          shinyjs::runjs(script)
@@ -10952,7 +11381,8 @@

teal coverage - 72.73%

141 - 4x + 4x +
        ignoreNULL = FALSE
@@ -10980,21 +11410,24 @@

teal coverage - 72.73%

145 - 4x + 4x +
    showNotification("Data loaded - App fully started up")
146 - 4x + 4x +
    logger::log_trace("srv_tabs_with_filters initialized the module")
147 - 4x + 4x +
    return(active_module)
@@ -11497,42 +11930,48 @@

teal coverage - 72.73%

69 - 79x + 79x +
  checkmate::assert_string(label)
70 - 77x + 77x +
  submodules <- list(...)
71 - 77x + 77x +
  if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
72 - 2x + 2x +
    stop(
73 - 2x + 2x +
      "The only character argument to modules() must be 'label' and it must be named, ",
74 - 2x + 2x +
      "change modules('lab', ...) to modules(label = 'lab', ...)"
@@ -11560,7 +11999,8 @@

teal coverage - 72.73%

78 - 75x + 75x +
  checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
@@ -11581,42 +12021,48 @@

teal coverage - 72.73%

81 - 72x + 72x +
  labels <- vapply(submodules, function(submodule) submodule$label, character(1))
82 - 72x + 72x +
  names(submodules) <- make.unique(gsub("[^[:alnum:]]+", "_", labels), sep = "_")
83 - 72x + 72x +
  structure(
84 - 72x + 72x +
    list(
85 - 72x + 72x +
      label = label,
86 - 72x + 72x +
      children = submodules
@@ -11630,7 +12076,8 @@

teal coverage - 72.73%

88 - 72x + 72x +
    class = "teal_modules"
@@ -11700,42 +12147,48 @@

teal coverage - 72.73%

98 - 7x + 7x +
  checkmate::assert_class(modules, "teal_modules")
99 - 5x + 5x +
  checkmate::assert_class(module, "teal_module")
100 - 3x + 3x +
  modules$children <- c(modules$children, list(module))
101 - 3x + 3x +
  labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
102 - 3x + 3x +
  names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
103 - 3x + 3x +
  modules
@@ -11812,49 +12265,56 @@

teal coverage - 72.73%

114 - 285x + 285x +
  checkmate::assert_string(arg)
115 - 282x + 282x +
  if (inherits(modules, "teal_modules")) {
116 - 19x + 19x +
    any(unlist(lapply(modules$children, is_arg_used, arg)))
117 - 263x + 263x +
  } else if (inherits(modules, "teal_module")) {
118 - 32x + 32x +
    is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
119 - 231x + 231x +
  } else if (is.function(modules)) {
120 - 229x + 229x +
    isTRUE(arg %in% names(formals(modules)))
@@ -11868,7 +12328,8 @@

teal coverage - 72.73%

122 - 2x + 2x +
    stop("is_arg_used function not implemented for this object")
@@ -12337,7 +12798,8 @@

teal coverage - 72.73%

189 - 1x + 1x +
                     moduleServer(id, function(input, output, session) {}) # nolint
@@ -12358,7 +12820,8 @@

teal coverage - 72.73%

192 - 1x + 1x +
                     tags$p(paste0("This module has no UI (id: ", id, " )"))
@@ -12400,42 +12863,48 @@

teal coverage - 72.73%

198 - 109x + 109x +
  checkmate::assert_string(label)
199 - 106x + 106x +
  checkmate::assert_function(server)
200 - 106x + 106x +
  checkmate::assert_function(ui)
201 - 106x + 106x +
  checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
202 - 105x + 105x +
  checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
203 - 103x + 103x +
  checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
@@ -12449,7 +12918,8 @@

teal coverage - 72.73%

205 - 101x + 101x +
  if (!missing(filters)) {
@@ -12512,35 +12982,40 @@

teal coverage - 72.73%

214 - 101x + 101x +
  if (label == "global_filters") {
215 - 1x + 1x +
    stop(
216 - 1x + 1x +
      sprintf("module(label = \"%s\", ...\n  ", label),
217 - 1x + 1x +
      "Label 'global_filters' is reserved in teal. Please change to something else.",
218 - 1x + 1x +
      call. = FALSE
@@ -12561,7 +13036,8 @@

teal coverage - 72.73%

221 - 100x + 100x +
  if (label == "Report previewer") {
@@ -12610,28 +13086,32 @@

teal coverage - 72.73%

228 - 100x + 100x +
  server_formals <- names(formals(server))
229 - 100x + 100x +
  if (!(
230 - 100x + 100x +
    "id" %in% server_formals ||
231 - 100x + 100x +
      all(c("input", "output", "session") %in% server_formals)
@@ -12645,70 +13125,80 @@

teal coverage - 72.73%

233 - 2x + 2x +
    stop(
234 - 2x + 2x +
      "\nmodule() `server` argument requires a function with following arguments:",
235 - 2x + 2x +
      "\n - id - teal will set proper shiny namespace for this module.",
236 - 2x + 2x +
      "\n - input, output, session (not recommended) - then shiny::callModule will be used to call a module.",
237 - 2x + 2x +
      "\n\nFollowing arguments can be used optionaly:",
238 - 2x + 2x +
      "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
239 - 2x + 2x +
      "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
240 - 2x + 2x +
      "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
241 - 2x + 2x +
      "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
242 - 2x + 2x +
      "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
@@ -12736,21 +13226,24 @@

teal coverage - 72.73%

246 - 98x + 98x +
  if (!is.element("data", server_formals) && !is.null(datanames)) {
247 - 64x + 64x +
    message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
248 - 64x + 64x +
    datanames <- NULL
@@ -12771,42 +13264,48 @@

teal coverage - 72.73%

251 - 98x + 98x +
  srv_extra_args <- setdiff(names(server_args), server_formals)
252 - 98x + 98x +
  if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
253 - 1x + 1x +
    stop(
254 - 1x + 1x +
      "\nFollowing `server_args` elements have no equivalent in the formals of the `server`:\n",
255 - 1x + 1x +
      paste(paste(" -", srv_extra_args), collapse = "\n"),
256 - 1x + 1x +
      "\n\nUpdate the `server` arguments by including above or add `...`"
@@ -12834,63 +13333,72 @@

teal coverage - 72.73%

260 - 97x + 97x +
  ui_formals <- names(formals(ui))
261 - 97x + 97x +
  if (!"id" %in% ui_formals) {
262 - 1x + 1x +
    stop(
263 - 1x + 1x +
      "\nmodule() `ui` argument requires a function with following arguments:",
264 - 1x + 1x +
      "\n - id - teal will set proper shiny namespace for this module.",
265 - 1x + 1x +
      "\n\nFollowing arguments can be used optionaly:",
266 - 1x + 1x +
      "\n - `data` - module will receive list of reactive (filtered) data specied in the `filters` argument",
267 - 1x + 1x +
      "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
268 - 1x + 1x +
      "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
@@ -12918,42 +13426,48 @@

teal coverage - 72.73%

272 - 96x + 96x +
  ui_extra_args <- setdiff(names(ui_args), ui_formals)
273 - 96x + 96x +
  if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
274 - 1x + 1x +
    stop(
275 - 1x + 1x +
      "\nFollowing `ui_args` elements have no equivalent in the formals of `ui`:\n",
276 - 1x + 1x +
      paste(paste(" -", ui_extra_args), collapse = "\n"),
277 - 1x + 1x +
      "\n\nUpdate the `ui` arguments by including above or add `...`"
@@ -12981,35 +13495,40 @@

teal coverage - 72.73%

281 - 95x + 95x +
  structure(
282 - 95x + 95x +
    list(
283 - 95x + 95x +
      label = label,
284 - 95x + 95x +
      server = server, ui = ui, datanames = datanames,
285 - 95x + 95x +
      server_args = server_args, ui_args = ui_args
@@ -13023,7 +13542,8 @@

teal coverage - 72.73%

287 - 95x + 95x +
    class = "teal_module"
@@ -13303,21 +13823,24 @@

teal coverage - 72.73%

327 - 12x + 12x +
  checkmate::assert(
328 - 12x + 12x +
    checkmate::check_class(modules, "teal_module"),
329 - 12x + 12x +
    checkmate::check_class(modules, "teal_modules")
@@ -13331,21 +13854,24 @@

teal coverage - 72.73%

331 - 12x + 12x +
  checkmate::assert_int(depth, lower = 0)
332 - 11x + 11x +
  if (inherits(modules, "teal_modules")) {
333 - 4x + 4x +
    max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
@@ -13359,7 +13885,8 @@

teal coverage - 72.73%

335 - 7x + 7x +
    depth
@@ -14107,42 +14634,48 @@

teal coverage - 72.73%

49 - 1x + 1x +
  ns <- NS(id)
50 - 1x + 1x +
  tags$button(
51 - 1x + 1x +
    id = ns("show"),
52 - 1x + 1x +
    class = "btn action-button filter_manager_button",
53 - 1x + 1x +
    title = "Show filters manager modal",
54 - 1x + 1x +
    icon("gear")
@@ -14184,14 +14717,16 @@

teal coverage - 72.73%

60 - 4x + 4x +
  moduleServer(id, function(input, output, session) {
61 - 4x + 4x +
    observeEvent(input$show, {
@@ -14275,7 +14810,8 @@

teal coverage - 72.73%

73 - 4x + 4x +
    filter_manager_srv("filter_manager", filtered_data_list, filter)
@@ -14534,14 +15070,16 @@

teal coverage - 72.73%

110 - 6x + 6x +
  moduleServer(id, function(input, output, session) {
111 - 6x + 6x +
    logger::log_trace("filter_manager_srv initializing for: { paste(names(filtered_data_list), collapse = ', ')}.")
@@ -14555,7 +15093,8 @@

teal coverage - 72.73%

113 - 6x + 6x +
    is_module_specific <- isTRUE(attr(filter, "module_specific"))
@@ -14597,7 +15136,8 @@

teal coverage - 72.73%

119 - 6x + 6x +
    slices_global <- reactiveVal(filter)
@@ -14611,14 +15151,16 @@

teal coverage - 72.73%

121 - 6x + 6x +
    filtered_data_list <-
122 - 6x + 6x +
      if (!is_module_specific) {
@@ -14639,7 +15181,8 @@

teal coverage - 72.73%

125 - 5x + 5x +
        list(global_filters = unlist(filtered_data_list)[[1]])
@@ -14667,21 +15210,24 @@

teal coverage - 72.73%

129 - 1x + 1x +
        flatten_nested <- function(x, name = NULL) {
130 - 5x + 5x +
          if (inherits(x, "FilteredData")) {
131 - 3x + 3x +
            setNames(list(x), name)
@@ -14695,7 +15241,8 @@

teal coverage - 72.73%

133 - 2x + 2x +
            unlist(lapply(names(x), function(name) flatten_nested(x[[name]], name)))
@@ -14716,7 +15263,8 @@

teal coverage - 72.73%

136 - 1x + 1x +
        flatten_nested(filtered_data_list)
@@ -14751,49 +15299,56 @@

teal coverage - 72.73%

141 - 6x + 6x +
    mapping_matrix <- reactive({
142 - 6x + 6x +
      state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
143 - 6x + 6x +
      mapping_smooth <- lapply(filtered_data_list, function(x) {
144 - 8x + 8x +
        state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
145 - 8x + 8x +
        state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
146 - 8x + 8x +
        states_active <- state_ids_global %in% state_ids_local
147 - 8x + 8x +
        ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
@@ -14814,7 +15369,8 @@

teal coverage - 72.73%

150 - 6x + 6x +
      as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
@@ -14835,14 +15391,16 @@

teal coverage - 72.73%

153 - 6x + 6x +
    output$slices_table <- renderTable(
154 - 6x + 6x +
      expr = {
@@ -14856,28 +15414,32 @@

teal coverage - 72.73%

156 - 3x + 3x +
        mm <- mapping_matrix()
157 - 3x + 3x +
        mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
158 - 3x + 3x +
        mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
159 - 3x + 3x +
        if (!is_module_specific) colnames(mm) <- "Global Filters"
@@ -14898,21 +15460,24 @@

teal coverage - 72.73%

162 - 3x + 3x +
        if (nrow(mm) == 0L) {
163 - 3x + 3x +
          mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
164 - 3x + 3x +
          rownames(mm) <- ""
@@ -14940,7 +15505,8 @@

teal coverage - 72.73%

168 - 3x + 3x +
        mm[names(mm) != "Report previewer"]
@@ -14954,14 +15520,16 @@

teal coverage - 72.73%

170 - 6x + 6x +
      align = paste(c("l", rep("c", sum(names(filtered_data_list) != "Report previewer"))), collapse = ""),
171 - 6x + 6x +
      rownames = TRUE
@@ -14989,35 +15557,40 @@

teal coverage - 72.73%

175 - 6x + 6x +
    modules_out <- lapply(names(filtered_data_list), function(module_name) {
176 - 8x + 8x +
      filter_manager_module_srv(
177 - 8x + 8x +
        id = module_name,
178 - 8x + 8x +
        module_fd = filtered_data_list[[module_name]],
179 - 8x + 8x +
        slices_global = slices_global
@@ -15052,7 +15625,8 @@

teal coverage - 72.73%

184 - 6x + 6x +
    snapshot_manager_srv("snapshot_manager", slices_global, mapping_matrix, filtered_data_list)
@@ -15066,7 +15640,8 @@

teal coverage - 72.73%

186 - 6x + 6x +
    modules_out # returned for testing purpose
@@ -15255,7 +15830,8 @@

teal coverage - 72.73%

213 - 8x + 8x +
  moduleServer(id, function(input, output, session) {
@@ -15269,7 +15845,8 @@

teal coverage - 72.73%

215 - 8x + 8x +
    module_fd$set_available_teal_slices(reactive(slices_global()))
@@ -15290,7 +15867,8 @@

teal coverage - 72.73%

218 - 8x + 8x +
    slices_module <- reactive(module_fd$get_filter_state())
@@ -15311,14 +15889,16 @@

teal coverage - 72.73%

221 - 8x + 8x +
    previous_slices <- reactiveVal(isolate(slices_module()))
222 - 8x + 8x +
    slices_added <- reactiveVal(NULL)
@@ -15339,21 +15919,24 @@

teal coverage - 72.73%

225 - 8x + 8x +
    observeEvent(slices_module(), ignoreNULL = FALSE, {
226 - 3x + 3x +
      logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
227 - 3x + 3x +
      added <- setdiff_teal_slices(slices_module(), slices_global())
@@ -15367,7 +15950,8 @@

teal coverage - 72.73%

229 - 3x + 3x +
      previous_slices(slices_module())
@@ -15388,7 +15972,8 @@

teal coverage - 72.73%

232 - 8x + 8x +
    observeEvent(slices_added(), ignoreNULL = TRUE, {
@@ -15507,7 +16092,8 @@

teal coverage - 72.73%

249 - 8x + 8x +
    slices_module # returned for testing purpose
@@ -16660,14 +17246,16 @@

teal coverage - 72.73%

116 - 38x + 38x +
  logger::log_trace("init initializing teal app with: data ({ class(data)[1] }).")
117 - 38x + 38x +
  data <- teal.data::to_relational_data(data = data)
@@ -16681,42 +17269,48 @@

teal coverage - 72.73%

119 - 33x + 33x +
  checkmate::assert_class(data, "TealData")
120 - 33x + 33x +
  checkmate::assert_multi_class(modules, c("teal_module", "list", "teal_modules"))
121 - 33x + 33x +
  checkmate::assert_string(title, null.ok = TRUE)
122 - 33x + 33x +
  checkmate::assert(
123 - 33x + 33x +
    checkmate::check_class(filter, "teal_slices"),
124 - 33x + 33x +
    checkmate::check_list(filter, names = "named")
@@ -16730,21 +17324,24 @@

teal coverage - 72.73%

126 - 32x + 32x +
  checkmate::assert_multi_class(header, c("shiny.tag", "character"))
127 - 32x + 32x +
  checkmate::assert_multi_class(footer, c("shiny.tag", "character"))
128 - 32x + 32x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
@@ -16758,7 +17355,8 @@

teal coverage - 72.73%

130 - 32x + 32x +
  teal.logger::log_system_info()
@@ -16772,14 +17370,16 @@

teal coverage - 72.73%

132 - 32x + 32x +
  if (inherits(modules, "teal_module")) {
133 - 1x + 1x +
    modules <- list(modules)
@@ -16793,14 +17393,16 @@

teal coverage - 72.73%

135 - 32x + 32x +
  if (inherits(modules, "list")) {
136 - 2x + 2x +
    modules <- do.call(teal::modules, modules)
@@ -16828,42 +17430,48 @@

teal coverage - 72.73%

140 - 32x + 32x +
  datanames <- teal.data::get_dataname(data)
141 - 32x + 32x +
  join_keys <- data$get_join_keys()
142 - 32x + 32x +
  resolve_modules_datanames <- function(modules) {
143 - 240x + 240x +
    if (inherits(modules, "teal_modules")) {
144 - 90x + 90x +
      modules$children <- sapply(modules$children, resolve_modules_datanames, simplify = FALSE)
145 - 90x + 90x +
      modules
@@ -16877,35 +17485,40 @@

teal coverage - 72.73%

147 - 150x + 150x +
      modules$datanames <- if (identical(modules$datanames, "all")) {
148 - 5x + 5x +
        datanames
149 - 150x + 150x +
      } else if (is.character(modules$datanames)) {
150 - 145x + 145x +
        datanames_adjusted <- intersect(modules$datanames, datanames)
151 - 145x + 145x +
        include_parent_datanames(dataname = datanames_adjusted, join_keys = join_keys)
@@ -16919,7 +17532,8 @@

teal coverage - 72.73%

153 - 150x + 150x +
      modules
@@ -16940,7 +17554,8 @@

teal coverage - 72.73%

156 - 32x + 32x +
  modules <- resolve_modules_datanames(modules = modules)
@@ -16954,14 +17569,16 @@

teal coverage - 72.73%

158 - 32x + 32x +
  if (!inherits(filter, "teal_slices")) {
159 - 1x + 1x +
    checkmate::assert_subset(names(filter), choices = datanames)
@@ -16982,7 +17599,8 @@

teal coverage - 72.73%

162 - 1x + 1x +
    filter <- list_to_teal_slices(filter)
@@ -17003,7 +17621,8 @@

teal coverage - 72.73%

165 - 32x + 32x +
  filter <- as.teal_slices(as.list(filter))
@@ -17024,21 +17643,24 @@

teal coverage - 72.73%

168 - 32x + 32x +
  for (i in seq_along(filter)) {
169 - 2x + 2x +
    dataname_i <- shiny::isolate(filter[[i]]$dataname)
170 - 2x + 2x +
    if (!dataname_i %in% datanames) {
@@ -17122,7 +17744,8 @@

teal coverage - 72.73%

182 - 32x + 32x +
  if (isTRUE(attr(filter, "module_specific"))) {
@@ -17332,21 +17955,24 @@

teal coverage - 72.73%

212 - 32x + 32x +
  res <- list(
213 - 32x + 32x +
    ui = ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
214 - 32x + 32x +
    server = function(input, output, session) {
@@ -17395,14 +18021,16 @@

teal coverage - 72.73%

221 - 32x + 32x +
  logger::log_trace("init teal app has been initialized.")
222 - 32x + 32x +
  return(res)
@@ -18143,14 +18771,16 @@

teal coverage - 72.73%

104 - 36x + 36x +
  dots <- list(...)
105 - 2x + 2x +
  if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
@@ -18164,21 +18794,24 @@

teal coverage - 72.73%

107 - 34x + 34x +
  messages <- extract_validator(dots, header)
108 - 34x + 34x +
  failings <- if (!any_names(dots)) {
109 - 29x + 29x +
    add_header(messages, header)
@@ -18192,7 +18825,8 @@

teal coverage - 72.73%

111 - 5x + 5x +
    unlist(messages)
@@ -18213,7 +18847,8 @@

teal coverage - 72.73%

114 - 34x + 34x +
  shiny::validate(shiny::need(is.null(failings), failings))
@@ -18276,7 +18911,8 @@

teal coverage - 72.73%

123 - 118x + 118x +
  all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
@@ -18332,7 +18968,8 @@

teal coverage - 72.73%

131 - 49x + 49x +
  x$.__enclos_env__$private$enabled
@@ -18381,14 +19018,16 @@

teal coverage - 72.73%

138 - 113x + 113x +
  if (inherits(iv, "InputValidator")) {
139 - 49x + 49x +
    add_header(gather_messages(iv), header)
@@ -18402,14 +19041,16 @@

teal coverage - 72.73%

141 - 58x + 58x +
    if (is.null(names(iv))) names(iv) <- rep("", length(iv))
142 - 64x + 64x +
    mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
@@ -18465,28 +19106,32 @@

teal coverage - 72.73%

150 - 49x + 49x +
  if (validator_enabled(iv)) {
151 - 46x + 46x +
    status <- iv$validate()
152 - 46x + 46x +
    failing_inputs <- Filter(Negate(is.null), status)
153 - 46x + 46x +
    unique(lapply(failing_inputs, function(x) x[["message"]]))
@@ -18500,14 +19145,16 @@

teal coverage - 72.73%

155 - 3x + 3x +
    logger::log_warn("Validator is disabled and will be omitted.")
156 - 3x + 3x +
    list()
@@ -18556,21 +19203,24 @@

teal coverage - 72.73%

163 - 78x + 78x +
  ans <- unlist(messages)
164 - 78x + 78x +
  if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
165 - 31x + 31x +
    ans <- c(paste0(header, "\n"), ans, "\n")
@@ -18584,7 +19234,8 @@

teal coverage - 72.73%

167 - 78x + 78x +
  ans
@@ -18626,21 +19277,24 @@

teal coverage - 72.73%

173 - 103x + 103x +
  any(
174 - 103x + 103x +
    if (is.list(x)) {
175 - 58x + 58x +
      if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
@@ -18654,7 +19308,8 @@

teal coverage - 72.73%

177 - 40x + 40x +
      FALSE
@@ -19360,28 +20015,32 @@

teal coverage - 72.73%

97 - 15x + 15x +
  checkmate::assert_string(label)
98 - 15x + 15x +
  module(
99 - 15x + 15x +
    label,
100 - 15x + 15x +
    server = function(id, data) {
@@ -19423,7 +20082,8 @@

teal coverage - 72.73%

106 - 15x + 15x +
    ui = function(id, data) {
@@ -19472,7 +20132,8 @@

teal coverage - 72.73%

113 - 15x + 15x +
    datanames = datanames
@@ -19563,70 +20224,80 @@

teal coverage - 72.73%

126 - 2x + 2x +
  checkmate::assert_subset(datanames, c("ADSL", "ADTTE"))
127 - 2x + 2x +
  mods <- modules(
128 - 2x + 2x +
    label = "d1",
129 - 2x + 2x +
    modules(
130 - 2x + 2x +
      label = "d2",
131 - 2x + 2x +
      modules(
132 - 2x + 2x +
        label = "d3",
133 - 2x + 2x +
        example_module(label = "aaa1", datanames = datanames),
134 - 2x + 2x +
        example_module(label = "aaa2", datanames = datanames),
135 - 2x + 2x +
        example_module(label = "aaa3", datanames = datanames)
@@ -19640,7 +20311,8 @@

teal coverage - 72.73%

137 - 2x + 2x +
      example_module(label = "bbb", datanames = datanames)
@@ -19654,7 +20326,8 @@

teal coverage - 72.73%

139 - 2x + 2x +
    example_module(label = "ccc", datanames = datanames)
@@ -19668,7 +20341,8 @@

teal coverage - 72.73%

141 - 2x + 2x +
  return(mods)
@@ -19737,28 +20411,32 @@

teal coverage - 72.73%

8 - 14x + 14x +
  vapply(
9 - 14x + 14x +
    utils::sessionInfo()$otherPkgs,
10 - 14x + 14x +
    function(x) {
11 - 238x + 238x +
      paste0("library(", x$Package, ")")
@@ -19772,7 +20450,8 @@

teal coverage - 72.73%

13 - 14x + 14x +
    character(1)
@@ -19793,21 +20472,24 @@

teal coverage - 72.73%

16 - 14x + 14x +
    rev() %>%
17 - 14x + 14x +
    paste0(sep = "\n") %>%
18 - 14x + 14x +
    paste0(collapse = "")
@@ -19849,7 +20531,8 @@

teal coverage - 72.73%

24 - 18x + 18x +
  code_string <- getOption("teal.load_nest_code")
@@ -19863,14 +20546,16 @@

teal coverage - 72.73%

26 - 18x + 18x +
  if (!is.null(code_string) && is.character(code_string)) {
27 - 2x + 2x +
    return(code_string)
@@ -19891,7 +20576,8 @@

teal coverage - 72.73%

30 - 16x + 16x +
  return("# Add any code to install/load your NEST environment here\n")
@@ -20010,14 +20696,16 @@

teal coverage - 72.73%

47 - 14x + 14x +
  str_code <- datasets$get_code(datanames)
48 - 14x + 14x +
  if (length(str_code) == 0 || (length(str_code) == 1 && str_code == "")) {
@@ -20031,14 +20719,16 @@

teal coverage - 72.73%

50 - 14x + 14x +
  } else if (length(str_code) > 0) {
51 - 14x + 14x +
    str_code <- paste0(str_code, "\n\n")
@@ -20059,35 +20749,40 @@

teal coverage - 72.73%

54 - 14x + 14x +
  if (!datasets$get_check()) {
55 - 10x + 10x +
    check_note_string <- paste0(
56 - 10x + 10x +
      c(
57 - 10x + 10x +
        "message(paste(\"Reproducibility of data import and preprocessing was not explicitly checked\",",
58 - 10x + 10x +
        "   \" ('check = FALSE' is set). Contact app developer if this is an issue.\n\"))"
@@ -20101,7 +20796,8 @@

teal coverage - 72.73%

60 - 10x + 10x +
      collapse = "\n"
@@ -20115,7 +20811,8 @@

teal coverage - 72.73%

62 - 10x + 10x +
    str_code <- paste0(str_code, "\n\n", check_note_string)
@@ -20136,63 +20833,72 @@

teal coverage - 72.73%

65 - 14x + 14x +
  str_hash <- paste(
66 - 14x + 14x +
    paste0(
67 - 14x + 14x +
      vapply(
68 - 14x + 14x +
        datanames,
69 - 14x + 14x +
        function(dataname) {
70 - 17x + 17x +
          sprintf(
71 - 17x + 17x +
            "stopifnot(%s == %s)",
72 - 17x + 17x +
            deparse1(bquote(rlang::hash(.(as.name(dataname))))),
73 - 17x + 17x +
            deparse1(hashes[[dataname]])
@@ -20213,7 +20919,8 @@

teal coverage - 72.73%

76 - 14x + 14x +
        character(1)
@@ -20227,7 +20934,8 @@

teal coverage - 72.73%

78 - 14x + 14x +
      collapse = "\n"
@@ -20241,7 +20949,8 @@

teal coverage - 72.73%

80 - 14x + 14x +
    "\n\n"
@@ -20262,7 +20971,8 @@

teal coverage - 72.73%

83 - 14x + 14x +
  c(str_code, str_hash)
@@ -20401,21 +21111,24 @@

teal coverage - 72.73%

18 - 4x + 4x +
  checkmate::assert_string(label)
19 - 2x + 2x +
  checkmate::assert_list(server_args, names = "named")
20 - 2x + 2x +
  checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
@@ -20429,7 +21142,8 @@

teal coverage - 72.73%

22 - 2x + 2x +
  srv <- function(id, reporter, ...) {
@@ -20457,7 +21171,8 @@

teal coverage - 72.73%

26 - 2x + 2x +
  ui <- function(id, ...) {
@@ -20485,28 +21200,32 @@

teal coverage - 72.73%

30 - 2x + 2x +
  module <- module(
31 - 2x + 2x +
    label = "temporary label",
32 - 2x + 2x +
    server = srv, ui = ui,
33 - 2x + 2x +
    server_args = server_args, ui_args = list(), datanames = NULL
@@ -20520,21 +21239,24 @@

teal coverage - 72.73%

35 - 2x + 2x +
  class(module) <- c("teal_module_previewer", class(module))
36 - 2x + 2x +
  module$label <- label
37 - 2x + 2x +
  module
@@ -20722,56 +21444,64 @@

teal coverage - 72.73%

25 - 4x + 4x +
      checkmate::assert_character(src, min.len = 0, max.len = 1)
26 - 4x + 4x +
      params <- list(...)
27 - 4x + 4x +
      params$eval <- FALSE
28 - 4x + 4x +
      rblock <- RcodeBlock$new(src)
29 - 4x + 4x +
      rblock$set_params(params)
30 - 4x + 4x +
      self$append_content(rblock)
31 - 4x + 4x +
      self$append_metadata("SRC", src)
32 - 4x + 4x +
      invisible(self)
@@ -20841,28 +21571,32 @@

teal coverage - 72.73%

42 - 5x + 5x +
      checkmate::assert_class(fs, "teal_slices")
43 - 4x + 4x +
      self$append_text("Filter State", "header3")
44 - 4x + 4x +
      self$append_content(TealSlicesBlock$new(fs))
45 - 4x + 4x +
      invisible(self)
@@ -20939,56 +21673,64 @@

teal coverage - 72.73%

56 - 4x + 4x +
      checkmate::assert_list(encodings)
57 - 4x + 4x +
      self$append_text("Selected Options", "header3")
58 - 4x + 4x +
      if (requireNamespace("yaml", quietly = TRUE)) {
59 - 4x + 4x +
        self$append_text(yaml::as.yaml(encodings, handlers = list(
60 - 4x + 4x +
          POSIXct = function(x) format(x, "%Y-%m-%d"),
61 - 4x + 4x +
          POSIXlt = function(x) format(x, "%Y-%m-%d"),
62 - 4x + 4x +
          Date = function(x) format(x, "%Y-%m-%d")
63 - 4x + 4x +
        )), "verbatim")
@@ -21016,14 +21758,16 @@

teal coverage - 72.73%

67 - 4x + 4x +
      self$append_metadata("Encodings", encodings)
68 - 4x + 4x +
      invisible(self)
@@ -21191,21 +21935,24 @@

teal coverage - 72.73%

92 - 10x + 10x +
      self$set_content(content)
93 - 9x + 9x +
      self$set_style(style)
94 - 9x + 9x +
      invisible(self)
@@ -21296,56 +22043,64 @@

teal coverage - 72.73%

107 - 11x + 11x +
      checkmate::assert_class(content, "teal_slices")
108 - 10x + 10x +
      if (length(content) != 0) {
109 - 7x + 7x +
        states_list <- lapply(content, function(x) {
110 - 7x + 7x +
          x_list <- shiny::isolate(as.list(x))
111 - 7x + 7x +
          if (
112 - 7x + 7x +
            inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
113 - 7x + 7x +
              length(x_list$choices) == 2 &&
114 - 7x + 7x +
              length(x_list$selected) == 2
@@ -21380,7 +22135,8 @@

teal coverage - 72.73%

119 - 7x + 7x +
          if (!is.null(x_list$arg)) {
@@ -21408,14 +22164,16 @@

teal coverage - 72.73%

123 - 7x + 7x +
          x_list <- x_list[
124 - 7x + 7x +
            c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
@@ -21429,21 +22187,24 @@

teal coverage - 72.73%

126 - 7x + 7x +
          names(x_list) <- c(
127 - 7x + 7x +
            "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
128 - 7x + 7x +
            "Selected Values", "Selected range", "Include NA values", "Include Inf values"
@@ -21464,7 +22225,8 @@

teal coverage - 72.73%

131 - 7x + 7x +
          Filter(Negate(is.null), x_list)
@@ -21485,14 +22247,16 @@

teal coverage - 72.73%

134 - 7x + 7x +
        if (requireNamespace("yaml", quietly = TRUE)) {
135 - 7x + 7x +
          super$set_content(yaml::as.yaml(states_list))
@@ -21527,14 +22291,16 @@

teal coverage - 72.73%

140 - 10x + 10x +
      private$teal_slices <- content
141 - 10x + 10x +
      invisible(self)
@@ -21583,28 +22349,32 @@

teal coverage - 72.73%

148 - 1x + 1x +
      checkmate::assert_list(x)
149 - 1x + 1x +
      checkmate::assert_names(names(x), must.include = c("teal_slices"))
150 - 1x + 1x +
      self$set_content(x$teal_slices)
151 - 1x + 1x +
      invisible(self)
@@ -21646,7 +22416,8 @@

teal coverage - 72.73%

157 - 2x + 2x +
      list(teal_slices = private$teal_slices)
@@ -22023,14 +22794,16 @@

teal coverage - 72.73%

46 - 17x + 17x +
  stopifnot(
47 - 17x + 17x +
    "Please provide a character vector in msg argument of validate_has_data." = is.character(msg) || is.null(msg)
@@ -22044,49 +22817,56 @@

teal coverage - 72.73%

49 - 15x + 15x +
  validate(need(!is.null(x) && is.data.frame(x), "No data left."))
50 - 15x + 15x +
  if (!is.null(min_nrow)) {
51 - 15x + 15x +
    if (complete) {
52 - 5x + 5x +
      complete_index <- stats::complete.cases(x)
53 - 5x + 5x +
      validate(need(
54 - 5x + 5x +
        sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
55 - 5x + 5x +
        paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
@@ -22107,35 +22887,40 @@

teal coverage - 72.73%

58 - 10x + 10x +
      validate(need(
59 - 10x + 10x +
        nrow(x) >= min_nrow,
60 - 10x + 10x +
        paste(
61 - 10x + 10x +
          c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
62 - 10x + 10x +
          collapse = "\n"
@@ -22170,28 +22955,32 @@

teal coverage - 72.73%

67 - 10x + 10x +
    if (!allow_inf) {
68 - 6x + 6x +
      validate(need(
69 - 6x + 6x +
        all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
70 - 6x + 6x +
        "Dataframe contains Inf values which is not allowed."
@@ -24437,21 +25226,24 @@

teal coverage - 72.73%

15 - 8x + 8x +
  script <- sprintf(
16 - 8x + 8x +
    "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
17 - 8x + 8x +
    ns("timezone")
@@ -24465,14 +25257,16 @@

teal coverage - 72.73%

19 - 8x + 8x +
  shinyjs::runjs(script) # function does not return anything
20 - 8x + 8x +
  return(invisible(NULL))
@@ -24514,42 +25308,48 @@

teal coverage - 72.73%

26 - 36x + 36x +
  bs_theme <- getOption("teal.bs_theme")
27 - 36x + 36x +
  if (is.null(bs_theme)) {
28 - 33x + 33x +
    NULL
29 - 3x + 3x +
  } else if (!inherits(bs_theme, "bs_theme")) {
30 - 2x + 2x +
    warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
31 - 2x + 2x +
    NULL
@@ -24563,7 +25363,8 @@

teal coverage - 72.73%

33 - 1x + 1x +
    bs_theme
@@ -24598,42 +25399,48 @@

teal coverage - 72.73%

38 - 145x + 145x +
  parents <- character(0)
39 - 145x + 145x +
  for (i in dataname) {
40 - 25x + 25x +
    while (length(i) > 0) {
41 - 25x + 25x +
      parent_i <- join_keys$get_parent(i)
42 - 25x + 25x +
      parents <- c(parent_i, parents)
43 - 25x + 25x +
      i <- parent_i
@@ -24661,7 +25468,8 @@

teal coverage - 72.73%

47 - 145x + 145x +
  return(unique(c(parents, dataname)))
@@ -24794,35 +25602,40 @@

teal coverage - 72.73%

66 - 2x + 2x +
  checkmate::assert_string(title)
67 - 2x + 2x +
  checkmate::assert_string(label)
68 - 2x + 2x +
  checkmate::assert_string(description, null.ok = TRUE)
69 - 2x + 2x +
  checkmate::assert_flag(with_filter)
70 - 2x + 2x +
  checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
@@ -24836,49 +25649,56 @@

teal coverage - 72.73%

72 - 2x + 2x +
  card <- teal::TealReportCard$new()
73 - 2x + 2x +
  title <- if (label == "") title else label
74 - 2x + 2x +
  card$set_name(title)
75 - 2x + 2x +
  card$append_text(title, "header2")
76 - 1x + 1x +
  if (!is.null(description)) card$append_text(description, "header3")
77 - 1x + 1x +
  if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
78 - 2x + 2x +
  card
@@ -25017,14 +25837,16 @@

teal coverage - 72.73%

18 - 2x + 2x +
  packageStartupMessage(
19 - 2x + 2x +
    "\nYou are using teal version ",
@@ -25045,7 +25867,8 @@

teal coverage - 72.73%

22 - 2x + 2x +
    read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
diff --git a/503-snapshot@898_save_app_state3@main/coverage-report/index.html b/503-snapshot@898_save_app_state3@main/coverage-report/index.html index 7396a8d9f4..bdf4daf7ec 100644 --- a/503-snapshot@898_save_app_state3@main/coverage-report/index.html +++ b/503-snapshot@898_save_app_state3@main/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -529,42 +528,48 @@

teal coverage - 80.55%

60 - 5x + 5x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
61 - 5x + 5x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
62 - 5x + 5x +
  checkmate::assert(
63 - 5x + 5x +
    .var.name = "title",
64 - 5x + 5x +
    checkmate::check_string(title),
65 - 5x + 5x +
    checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
@@ -578,28 +583,32 @@

teal coverage - 80.55%

67 - 5x + 5x +
  checkmate::assert(
68 - 5x + 5x +
    .var.name = "header",
69 - 5x + 5x +
    checkmate::check_string(header),
70 - 5x + 5x +
    checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
@@ -613,28 +622,32 @@

teal coverage - 80.55%

72 - 5x + 5x +
  checkmate::assert(
73 - 5x + 5x +
    .var.name = "footer",
74 - 5x + 5x +
    checkmate::check_string(footer),
75 - 5x + 5x +
    checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
@@ -655,7 +668,8 @@

teal coverage - 80.55%

78 - 5x + 5x +
  ns <- NS(id)
@@ -697,7 +711,8 @@

teal coverage - 80.55%

84 - 5x + 5x +
  splash_ui <- if (inherits(data, "teal_data_module")) {
@@ -711,14 +726,16 @@

teal coverage - 80.55%

86 - 5x + 5x +
  } else if (inherits(data, "teal_data")) {
87 - 5x + 5x +
    tags$div()
@@ -732,42 +749,48 @@

teal coverage - 80.55%

89 - 5x + 5x +
  ui_teal(
90 - 5x + 5x +
    id = ns("teal"),
91 - 5x + 5x +
    splash_ui = tags$div(splash_ui, uiOutput(ns("error"))),
92 - 5x + 5x +
    title = title,
93 - 5x + 5x +
    header = header,
94 - 5x + 5x +
    footer = footer
@@ -816,28 +839,32 @@

teal coverage - 80.55%

101 - 20x + 20x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
102 - 20x + 20x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
103 - 20x + 20x +
  checkmate::assert_class(modules, "teal_modules")
104 - 20x + 20x +
  checkmate::assert_class(filter, "teal_slices")
@@ -851,14 +878,16 @@

teal coverage - 80.55%

106 - 20x + 20x +
  moduleServer(id, function(input, output, session) {
107 - 20x + 20x +
    logger::log_trace("srv_teal_with_splash initializing module with data.")
@@ -872,7 +901,8 @@

teal coverage - 80.55%

109 - 20x + 20x +
    if (getOption("teal.show_js_log", default = FALSE)) {
@@ -914,28 +944,32 @@

teal coverage - 80.55%

115 - 20x + 20x +
    teal_data_rv <- if (inherits(data, "teal_data_module")) {
116 - 10x + 10x +
      data <- data$server(id = "teal_data_module")
117 - 10x + 10x +
      if (!is.reactive(data)) {
118 - 1x + 1x +
        stop("The `teal_data_module` passed to `data` must return a reactive expression.", call. = FALSE)
@@ -949,21 +983,24 @@

teal coverage - 80.55%

120 - 9x + 9x +
      data
121 - 20x + 20x +
    } else if (inherits(data, "teal_data")) {
122 - 10x + 10x +
      reactiveVal(data)
@@ -984,7 +1021,8 @@

teal coverage - 80.55%

125 - 19x + 19x +
    teal_data_rv_validate <- reactive({
@@ -998,7 +1036,8 @@

teal coverage - 80.55%

127 - 16x + 16x +
      data <- tryCatch(teal_data_rv(), error = function(e) e)
@@ -1019,7 +1058,8 @@

teal coverage - 80.55%

130 - 16x + 16x +
      if (inherits(data, "shiny.silent.error") && identical(data$message, "")) {
@@ -1054,56 +1094,64 @@

teal coverage - 80.55%

135 - 16x + 16x +
      if (inherits(data, "qenv.error")) {
136 - 2x + 2x +
        validate(
137 - 2x + 2x +
          need(
138 - 2x + 2x +
            FALSE,
139 - 2x + 2x +
            paste(
140 - 2x + 2x +
              "Error when executing `teal_data_module` passed to `data`:\n ",
141 - 2x + 2x +
              paste(data$message, collapse = "\n"),
142 - 2x + 2x +
              "\n Check your inputs or contact app developer if error persists."
@@ -1152,56 +1200,64 @@

teal coverage - 80.55%

149 - 14x + 14x +
      if (inherits(data, "error")) {
150 - 1x + 1x +
        validate(
151 - 1x + 1x +
          need(
152 - 1x + 1x +
            FALSE,
153 - 1x + 1x +
            paste(
154 - 1x + 1x +
              "Error when executing `teal_data_module` passed to `data`:\n ",
155 - 1x + 1x +
              paste(data$message, collpase = "\n"),
156 - 1x + 1x +
              "\n Check your inputs or contact app developer if error persists."
@@ -1243,56 +1299,64 @@

teal coverage - 80.55%

162 - 13x + 13x +
      validate(
163 - 13x + 13x +
        need(
164 - 13x + 13x +
          inherits(data, "teal_data"),
165 - 13x + 13x +
          paste(
166 - 13x + 13x +
            "Error: `teal_data_module` passed to `data` failed to return `teal_data` object, returned",
167 - 13x + 13x +
            toString(sQuote(class(data))),
168 - 13x + 13x +
            "instead.",
169 - 13x + 13x +
            "\n Check your inputs or contact app developer if error persists."
@@ -1327,14 +1391,16 @@

teal coverage - 80.55%

174 - 10x + 10x +
      if (!length(teal.data::datanames(data))) {
175 - 1x + 1x +
        warning("`data` object has no datanames. Default datanames are set using `teal_data`'s environment.")
@@ -1355,21 +1421,24 @@

teal coverage - 80.55%

178 - 10x + 10x +
      is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
179 - 10x + 10x +
      if (!isTRUE(is_modules_ok)) {
180 - 1x + 1x +
        validate(need(isTRUE(is_modules_ok), sprintf("%s. Contact app developer.", is_modules_ok)))
@@ -1390,42 +1459,48 @@

teal coverage - 80.55%

183 - 9x + 9x +
      is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
184 - 9x + 9x +
      if (!isTRUE(is_filter_ok)) {
185 - 1x + 1x +
        showNotification(
186 - 1x + 1x +
          "Some filters were not applied because of incompatibility with data. Contact app developer.",
187 - 1x + 1x +
          type = "warning",
188 - 1x + 1x +
          duration = 10
@@ -1439,7 +1514,8 @@

teal coverage - 80.55%

190 - 1x + 1x +
        warning(is_filter_ok)
@@ -1460,7 +1536,8 @@

teal coverage - 80.55%

193 - 9x + 9x +
      teal_data_rv()
@@ -1481,21 +1558,24 @@

teal coverage - 80.55%

196 - 19x + 19x +
    output$error <- renderUI({
197 - 5x + 5x +
      teal_data_rv_validate()
198 - 5x + 5x +
      NULL
@@ -1523,14 +1603,16 @@

teal coverage - 80.55%

202 - 19x + 19x +
    res <- srv_teal(id = "teal", modules = modules, teal_data_rv = teal_data_rv_validate, filter = filter)
203 - 19x + 19x +
    logger::log_trace("srv_teal_with_splash initialized module with data.")
@@ -1544,7 +1626,8 @@

teal coverage - 80.55%

205 - 19x + 19x +
    res
@@ -2187,70 +2270,80 @@

teal coverage - 80.55%

89 - 8x + 8x +
  ns <- NS(id)
90 - 8x + 8x +
  tags$div(
91 - 8x + 8x +
    class = "manager_content",
92 - 8x + 8x +
    tags$div(
93 - 8x + 8x +
      class = "manager_table_row",
94 - 8x + 8x +
      tags$span(tags$b("Snapshot manager")),
95 - 8x + 8x +
      actionLink(ns("snapshot_add"), label = NULL, icon = icon("camera"), title = "add snapshot"),
96 - 8x + 8x +
      actionLink(ns("snapshot_load"), label = NULL, icon = icon("upload"), title = "upload snapshot"),
97 - 8x + 8x +
      actionLink(ns("snapshot_reset"), label = NULL, icon = icon("undo"), title = "reset initial state"),
98 - 8x + 8x +
      NULL
@@ -2264,7 +2357,8 @@

teal coverage - 80.55%

100 - 8x + 8x +
    uiOutput(ns("snapshot_list"))
@@ -2320,42 +2414,48 @@

teal coverage - 80.55%

108 - 10x + 10x +
  checkmate::assert_character(id)
109 - 10x + 10x +
  checkmate::assert_true(is.reactive(slices_global))
110 - 10x + 10x +
  checkmate::assert_class(isolate(slices_global()), "teal_slices")
111 - 10x + 10x +
  checkmate::assert_true(is.reactive(mapping_matrix))
112 - 10x + 10x +
  checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
113 - 10x + 10x +
  checkmate::assert_list(datasets, types = "FilteredData", any.missing = FALSE, names = "named")
@@ -2369,14 +2469,16 @@

teal coverage - 80.55%

115 - 10x + 10x +
  moduleServer(id, function(input, output, session) {
116 - 10x + 10x +
    logger::log_trace("snapshot_manager_srv initializing")
@@ -2390,7 +2492,8 @@

teal coverage - 80.55%

118 - 10x + 10x +
    ns <- session$ns
@@ -2411,28 +2514,32 @@

teal coverage - 80.55%

121 - 10x + 10x +
    filter <- isolate(slices_global())
122 - 10x + 10x +
    snapshot_history <- reactiveVal({
123 - 10x + 10x +
      list(
124 - 10x + 10x +
        "Initial application state" = as.list(filter, recursive = TRUE)
@@ -2474,56 +2581,64 @@

teal coverage - 80.55%

130 - 10x + 10x +
    observeEvent(input$snapshot_add, {
131 - 3x + 3x +
      logger::log_trace("snapshot_manager_srv: snapshot_add button clicked")
132 - 3x + 3x +
      showModal(
133 - 3x + 3x +
        modalDialog(
134 - 3x + 3x +
          textInput(ns("snapshot_name"), "Name the snapshot", width = "100%", placeholder = "Meaningful, unique name"),
135 - 3x + 3x +
          footer = tagList(
136 - 3x + 3x +
            actionButton(ns("snapshot_name_accept"), "Accept", icon = icon("thumbs-up")),
137 - 3x + 3x +
            modalButton(label = "Cancel", icon = icon("thumbs-down"))
@@ -2537,7 +2652,8 @@

teal coverage - 80.55%

139 - 3x + 3x +
          size = "s"
@@ -2572,28 +2688,32 @@

teal coverage - 80.55%

144 - 10x + 10x +
    observeEvent(input$snapshot_name_accept, {
145 - 3x + 3x +
      logger::log_trace("snapshot_manager_srv: snapshot_name_accept button clicked")
146 - 3x + 3x +
      snapshot_name <- trimws(input$snapshot_name)
147 - 3x + 3x +
      if (identical(snapshot_name, "")) {
@@ -2642,7 +2762,8 @@

teal coverage - 80.55%

154 - 3x + 3x +
      } else if (is.element(make.names(snapshot_name), make.names(names(snapshot_history())))) {
@@ -2698,49 +2819,56 @@

teal coverage - 80.55%

162 - 3x + 3x +
        logger::log_trace("snapshot_manager_srv: snapshot name accepted, adding snapshot")
163 - 3x + 3x +
        snapshot <- as.list(slices_global(), recursive = TRUE)
164 - 3x + 3x +
        attr(snapshot, "mapping") <- matrix_to_mapping(mapping_matrix())
165 - 3x + 3x +
        snapshot_update <- c(snapshot_history(), list(snapshot))
166 - 3x + 3x +
        names(snapshot_update)[length(snapshot_update)] <- snapshot_name
167 - 3x + 3x +
        snapshot_history(snapshot_update)
168 - 3x + 3x +
        removeModal()
@@ -2754,7 +2882,8 @@

teal coverage - 80.55%

170 - 3x + 3x +
        shinyjs::click(id = "teal-main_ui-wunder_bar-show_snapshot_manager", asis = TRUE)
@@ -2796,70 +2925,80 @@

teal coverage - 80.55%

176 - 10x + 10x +
    observeEvent(input$snapshot_load, {
177 - 1x + 1x +
      logger::log_trace("snapshot_manager_srv: snapshot_load button clicked")
178 - 1x + 1x +
      showModal(
179 - 1x + 1x +
        modalDialog(
180 - 1x + 1x +
          fileInput(ns("snapshot_file"), "Choose snapshot file", accept = ".json", width = "100%"),
181 - 1x + 1x +
          textInput(
182 - 1x + 1x +
            ns("snapshot_name"),
183 - 1x + 1x +
            "Name the snapshot (optional)",
184 - 1x + 1x +
            width = "100%",
185 - 1x + 1x +
            placeholder = "Meaningful, unique name"
@@ -2873,21 +3012,24 @@

teal coverage - 80.55%

187 - 1x + 1x +
          footer = tagList(
188 - 1x + 1x +
            actionButton(ns("snaphot_file_accept"), "Accept", icon = icon("thumbs-up")),
189 - 1x + 1x +
            modalButton(label = "Cancel", icon = icon("thumbs-down"))
@@ -2929,42 +3071,48 @@

teal coverage - 80.55%

195 - 10x + 10x +
    observeEvent(input$snaphot_file_accept, {
196 - 1x + 1x +
      logger::log_trace("snapshot_manager_srv: snapshot_file_accept button clicked")
197 - 1x + 1x +
      snapshot_name <- trimws(input$snapshot_name)
198 - 1x + 1x +
      if (identical(snapshot_name, "")) {
199 - 1x + 1x +
        logger::log_trace("snapshot_manager_srv: no snapshot name provided, naming after file")
200 - 1x + 1x +
        snapshot_name <- tools::file_path_sans_ext(input$snapshot_file$name)
@@ -2978,7 +3126,8 @@

teal coverage - 80.55%

202 - 1x + 1x +
      if (is.element(make.names(snapshot_name), make.names(names(snapshot_history())))) {
@@ -3041,21 +3190,24 @@

teal coverage - 80.55%

211 - 1x + 1x +
        logger::log_trace("snapshot_manager_srv: snapshot name accepted, loading snapshot")
212 - 1x + 1x +
        snapshot_state <- try(slices_restore(input$snapshot_file$datapath))
213 - 1x + 1x +
        if (!inherits(snapshot_state, "modules_teal_slices")) {
@@ -3097,7 +3249,8 @@

teal coverage - 80.55%

219 - 1x + 1x +
        } else if (!identical(attr(snapshot_state, "app_id"), attr(slices_global(), "app_id"))) {
@@ -3153,35 +3306,40 @@

teal coverage - 80.55%

227 - 1x + 1x +
          logger::log_trace("snapshot_manager_srv: snapshot loaded, adding to history")
228 - 1x + 1x +
          snapshot <- as.list(snapshot_state, recursive = TRUE)
229 - 1x + 1x +
          snapshot_update <- c(snapshot_history(), list(snapshot))
230 - 1x + 1x +
          names(snapshot_update)[length(snapshot_update)] <- snapshot_name
231 - 1x + 1x +
          snapshot_history(snapshot_update)
@@ -3195,49 +3353,56 @@

teal coverage - 80.55%

233 - 1x + 1x +
          logger::log_trace("snapshot_manager_srv: restoring snapshot")
234 - 1x + 1x +
          mapping_unfolded <- unfold_mapping(attr(snapshot_state, "mapping"), names(datasets))
235 - 1x + 1x +
          mapply(
236 - 1x + 1x +
            function(filtered_data, filter_ids) {
237 - 1x + 1x +
              filtered_data$clear_filter_states(force = TRUE)
238 - 1x + 1x +
              slices <- Filter(function(x) x$id %in% filter_ids, snapshot_state)
239 - 1x + 1x +
              filtered_data$set_filter_state(slices)
@@ -3251,14 +3416,16 @@

teal coverage - 80.55%

241 - 1x + 1x +
            filtered_data = datasets,
242 - 1x + 1x +
            filter_ids = mapping_unfolded
@@ -3272,14 +3439,16 @@

teal coverage - 80.55%

244 - 1x + 1x +
          slices_global(snapshot_state)
245 - 1x + 1x +
          removeModal()
@@ -3335,21 +3504,24 @@

teal coverage - 80.55%

253 - 10x + 10x +
    observeEvent(input$snapshot_reset, {
254 - 1x + 1x +
      logger::log_trace("snapshot_manager_srv: snapshot_reset button clicked, restoring snapshot")
255 - 1x + 1x +
      s <- "Initial application state"
@@ -3363,56 +3535,64 @@

teal coverage - 80.55%

257 - 1x + 1x +
      snapshot <- snapshot_history()[[s]]
258 - 1x + 1x +
      snapshot_state <- as.teal_slices(snapshot)
259 - 1x + 1x +
      mapping_unfolded <- unfold_mapping(attr(snapshot_state, "mapping"), names(datasets))
260 - 1x + 1x +
      mapply(
261 - 1x + 1x +
        function(filtered_data, filter_ids) {
262 - 1x + 1x +
          filtered_data$clear_filter_states(force = TRUE)
263 - 1x + 1x +
          slices <- Filter(function(x) x$id %in% filter_ids, snapshot_state)
264 - 1x + 1x +
          filtered_data$set_filter_state(slices)
@@ -3426,14 +3606,16 @@

teal coverage - 80.55%

266 - 1x + 1x +
        filtered_data = datasets,
267 - 1x + 1x +
        filter_ids = mapping_unfolded
@@ -3447,14 +3629,16 @@

teal coverage - 80.55%

269 - 1x + 1x +
      slices_global(snapshot_state)
270 - 1x + 1x +
      removeModal()
@@ -3510,21 +3694,24 @@

teal coverage - 80.55%

278 - 10x + 10x +
    observers <- reactiveValues()
279 - 10x + 10x +
    handlers <- reactiveValues()
280 - 10x + 10x +
    divs <- reactiveValues()
@@ -3538,42 +3725,48 @@

teal coverage - 80.55%

282 - 10x + 10x +
    observeEvent(snapshot_history(), {
283 - 11x + 11x +
      logger::log_trace("snapshot_manager_srv: snapshot history modified, updating snapshot list")
284 - 11x + 11x +
      lapply(names(snapshot_history())[-1L], function(s) {
285 - 4x + 4x +
        id_pickme <- sprintf("pickme_%s", make.names(s))
286 - 4x + 4x +
        id_saveme <- sprintf("saveme_%s", make.names(s))
287 - 4x + 4x +
        id_rowme <- sprintf("rowme_%s", make.names(s))
@@ -3594,14 +3787,16 @@

teal coverage - 80.55%

290 - 4x + 4x +
        if (!is.element(id_pickme, names(observers))) {
291 - 4x + 4x +
          observers[[id_pickme]] <- observeEvent(input[[id_pickme]], {
@@ -3741,28 +3936,32 @@

teal coverage - 80.55%

311 - 4x + 4x +
        if (!is.element(id_saveme, names(handlers))) {
312 - 4x + 4x +
          output[[id_saveme]] <- downloadHandler(
313 - 4x + 4x +
            filename = function() {
314 - 2x + 2x +
              sprintf("teal_snapshot_%s_%s.json", s, Sys.Date())
@@ -3776,28 +3975,32 @@

teal coverage - 80.55%

316 - 4x + 4x +
            content = function(file) {
317 - 2x + 2x +
              snapshot <- snapshot_history()[[s]]
318 - 2x + 2x +
              snapshot_state <- as.teal_slices(snapshot)
319 - 2x + 2x +
              slices_store(tss = snapshot_state, file = file)
@@ -3818,7 +4021,8 @@

teal coverage - 80.55%

322 - 4x + 4x +
          handlers[[id_saveme]] <- id_saveme
@@ -3839,42 +4043,48 @@

teal coverage - 80.55%

325 - 4x + 4x +
        if (!is.element(id_rowme, names(divs))) {
326 - 4x + 4x +
          divs[[id_rowme]] <- tags$div(
327 - 4x + 4x +
            class = "manager_table_row",
328 - 4x + 4x +
            tags$span(tags$h5(s)),
329 - 4x + 4x +
            actionLink(inputId = ns(id_pickme), label = icon("circle-check"), title = "select"),
330 - 4x + 4x +
            downloadLink(outputId = ns(id_saveme), label = icon("save"), title = "save to file")
@@ -3923,42 +4133,48 @@

teal coverage - 80.55%

337 - 10x + 10x +
    output$snapshot_list <- renderUI({
338 - 10x + 10x +
      rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
339 - 10x + 10x +
      if (length(rows) == 0L) {
340 - 7x + 7x +
        tags$div(
341 - 7x + 7x +
          class = "manager_placeholder",
342 - 7x + 7x +
          "Snapshots will appear here."
@@ -3979,7 +4195,8 @@

teal coverage - 80.55%

345 - 3x + 3x +
        rows
@@ -4007,7 +4224,8 @@

teal coverage - 80.55%

349 - 10x + 10x +
    snapshot_history
@@ -4126,14 +4344,16 @@

teal coverage - 80.55%

366 - 2x + 2x +
  module_names <- structure(module_names, names = module_names)
367 - 2x + 2x +
  lapply(module_names, function(x) c(mapping[[x]], mapping[["global_filters"]]))
@@ -4252,28 +4472,32 @@

teal coverage - 80.55%

384 - 3x + 3x +
  mapping_matrix[] <- lapply(mapping_matrix, function(x) x | is.na(x))
385 - 3x + 3x +
  global <- vapply(as.data.frame(t(mapping_matrix)), all, logical(1L))
386 - 3x + 3x +
  global_filters <- names(global[global])
387 - 3x + 3x +
  local_filters <- mapping_matrix[!rownames(mapping_matrix) %in% global_filters, ]
@@ -4287,14 +4511,16 @@

teal coverage - 80.55%

389 - 3x + 3x +
  mapping <- c(lapply(local_filters, function(x) rownames(local_filters)[x]), list(global_filters = global_filters))
390 - 3x + 3x +
  Filter(function(x) length(x) != 0L, mapping)
@@ -4510,70 +4736,80 @@

teal coverage - 80.55%

29 - 5x + 5x +
      private$data <- data
30 - 5x + 5x +
      private$modules <- modules
31 - 5x + 5x +
      private$filter <- filter
32 - 5x + 5x +
      app <- init(
33 - 5x + 5x +
        data = data,
34 - 5x + 5x +
        modules = modules,
35 - 5x + 5x +
        filter = filter,
36 - 5x + 5x +
        title = title,
37 - 5x + 5x +
        header = header,
38 - 5x + 5x +
        footer = footer
@@ -4587,35 +4823,40 @@

teal coverage - 80.55%

40 - 5x + 5x +
      suppressWarnings(
41 - 5x + 5x +
        super$initialize(
42 - 5x + 5x +
          shinyApp(app$ui, app$server),
43 - 5x + 5x +
          name = "teal",
44 - 5x + 5x +
          variant = platform_variant(),
@@ -4650,7 +4891,8 @@

teal coverage - 80.55%

49 - 5x + 5x +
      private$set_active_ns()
@@ -4923,21 +5165,24 @@

teal coverage - 80.55%

88 - 7x + 7x +
      do.call(
89 - 7x + 7x +
        self$set_inputs,
90 - 7x + 7x +
        c(setNames(list(value), input_id), list(...))
@@ -4951,7 +5196,8 @@

teal coverage - 80.55%

92 - 7x + 7x +
      invisible(self)
@@ -5455,7 +5701,8 @@

teal coverage - 80.55%

164 - 22x + 22x +
      if (identical(private$ns$filter_panel, character(0))) {
@@ -5476,7 +5723,8 @@

teal coverage - 80.55%

167 - 22x + 22x +
      private$ns$filter_panel
@@ -5546,28 +5794,32 @@

teal coverage - 80.55%

177 - 10x + 10x +
      checkmate::assert_string(id, null.ok = TRUE)
178 - 10x + 10x +
      full_id <- "wunder_bar"
179 - 10x + 10x +
      if (!is.null(id)) full_id <- shiny::NS(full_id, id = id)
180 - 10x + 10x +
      shiny::NS(private$base_ns, id = full_id)
@@ -5875,49 +6127,56 @@

teal coverage - 80.55%

224 - 3x + 3x +
      displayed_datasets_index <- unlist(
225 - 3x + 3x +
        self$get_js(
226 - 3x + 3x +
          sprintf(
227 - 3x + 3x +
            "Array.from(
228 - 3x + 3x +
                document.querySelectorAll(\"#%s-active-filter_active_vars_contents > span\")
229 - 3x + 3x +
            ).map((el) => window.getComputedStyle(el).display != \"none\");",
230 - 3x + 3x +
            self$active_filters_ns()
@@ -5952,28 +6211,32 @@

teal coverage - 80.55%

235 - 3x + 3x +
      available_datasets <- self$get_text(
236 - 3x + 3x +
        sprintf(
237 - 3x + 3x +
          "#%s-active-filter_active_vars_contents .filter_panel_dataname",
238 - 3x + 3x +
          self$active_filters_ns()
@@ -5994,7 +6257,8 @@

teal coverage - 80.55%

241 - 3x + 3x +
      available_datasets[displayed_datasets_index]
@@ -6050,77 +6314,88 @@

teal coverage - 80.55%

249 - 3x + 3x +
      checkmate::check_string(dataset_name, null.ok = TRUE)
250 - 3x + 3x +
      datasets <- self$get_active_filter_vars()
251 - 3x + 3x +
      checkmate::assert_subset(dataset_name, datasets)
252 - 3x + 3x +
      active_filters <- lapply(
253 - 3x + 3x +
        datasets,
254 - 3x + 3x +
        function(x) {
255 - 6x + 6x +
          var_names <- self$get_text(
256 - 6x + 6x +
            sprintf(
257 - 6x + 6x +
              "#%s-active-%s-filters .filter-card-varname",
258 - 6x + 6x +
              self$active_filters_ns(),
259 - 6x + 6x +
              x
@@ -6141,28 +6416,32 @@

teal coverage - 80.55%

262 - 6x + 6x +
            gsub(pattern = "\\s", replacement = "")
263 - 6x + 6x +
          structure(
264 - 6x + 6x +
            lapply(var_names, private$get_active_filter_selection, dataset_name = x),
265 - 6x + 6x +
            names = var_names
@@ -6190,14 +6469,16 @@

teal coverage - 80.55%

269 - 3x + 3x +
      names(active_filters) <- datasets
270 - 3x + 3x +
      if (is.null(dataset_name)) {
@@ -6218,7 +6499,8 @@

teal coverage - 80.55%

273 - 3x + 3x +
      active_filters[[dataset_name]]
@@ -6288,49 +6570,56 @@

teal coverage - 80.55%

283 - 2x + 2x +
      checkmate::check_string(dataset_name)
284 - 2x + 2x +
      checkmate::check_string(var_name)
285 - 2x + 2x +
      self$set_input(
286 - 2x + 2x +
        sprintf(
287 - 2x + 2x +
          "%s-add-%s-filter-var_to_add",
288 - 2x + 2x +
          self$active_filters_ns(),
289 - 2x + 2x +
          dataset_name
@@ -6344,7 +6633,8 @@

teal coverage - 80.55%

291 - 2x + 2x +
        var_name
@@ -6358,7 +6648,8 @@

teal coverage - 80.55%

293 - 2x + 2x +
      invisible(self)
@@ -6701,21 +6992,24 @@

teal coverage - 80.55%

342 - 2x + 2x +
      checkmate::check_string(dataset_name)
343 - 2x + 2x +
      checkmate::check_string(var_name)
344 - 2x + 2x +
      checkmate::check_string(input)
@@ -6729,42 +7023,48 @@

teal coverage - 80.55%

346 - 2x + 2x +
      input_id_prefix <- sprintf(
347 - 2x + 2x +
        "%s-active-%s-filter-%s_%s-inputs",
348 - 2x + 2x +
        self$active_filters_ns(),
349 - 2x + 2x +
        dataset_name,
350 - 2x + 2x +
        dataset_name,
351 - 2x + 2x +
        var_name
@@ -6792,56 +7092,64 @@

teal coverage - 80.55%

355 - 2x + 2x +
      supported_suffix <- c("selection", "selection_manual")
356 - 2x + 2x +
      slices_suffix <- supported_suffix[
357 - 2x + 2x +
        match(
358 - 2x + 2x +
          TRUE,
359 - 2x + 2x +
          vapply(
360 - 2x + 2x +
            supported_suffix,
361 - 2x + 2x +
            function(suffix) {
362 - 4x + 4x +
              !is.null(self$get_html(sprintf("#%s-%s", input_id_prefix, suffix)))
@@ -6855,7 +7163,8 @@

teal coverage - 80.55%

364 - 2x + 2x +
            logical(1)
@@ -6897,49 +7206,56 @@

teal coverage - 80.55%

370 - 2x + 2x +
      slices_input_id <- sprintf(
371 - 2x + 2x +
        "%s-active-%s-filter-%s_%s-inputs-%s",
372 - 2x + 2x +
        self$active_filters_ns(),
373 - 2x + 2x +
        dataset_name,
374 - 2x + 2x +
        dataset_name,
375 - 2x + 2x +
        var_name,
376 - 2x + 2x +
        slices_suffix
@@ -6960,7 +7276,8 @@

teal coverage - 80.55%

379 - 2x + 2x +
      if (identical(slices_suffix, "selection_manual")) {
@@ -7030,14 +7347,16 @@

teal coverage - 80.55%

389 - 2x + 2x +
      } else if (identical(slices_suffix, "selection")) {
390 - 2x + 2x +
        self$set_input(slices_input_id, input)
@@ -7072,7 +7391,8 @@

teal coverage - 80.55%

395 - 2x + 2x +
      invisible(self)
@@ -7121,21 +7441,24 @@

teal coverage - 80.55%

402 - 5x + 5x +
      self$click(self$wunder_bar_ns("show_snapshot_manager"))
403 - 5x + 5x +
      self$wait_for_idle()
404 - 5x + 5x +
      invisible(self)
@@ -7450,14 +7773,16 @@

teal coverage - 80.55%

449 - 5x + 5x +
      all_inputs <- self$get_values()$input
450 - 5x + 5x +
      active_tab_inputs <- all_inputs[grepl("-active_tab$", names(all_inputs))]
@@ -7471,35 +7796,40 @@

teal coverage - 80.55%

452 - 5x + 5x +
      tab_ns <- lapply(names(active_tab_inputs), function(name) {
453 - 5x + 5x +
        gsub(
454 - 5x + 5x +
          pattern = "-active_tab$",
455 - 5x + 5x +
          replacement = sprintf("-%s", active_tab_inputs[[name]]),
456 - 5x + 5x +
          name
@@ -7520,21 +7850,24 @@

teal coverage - 80.55%

459 - 5x + 5x +
        unlist()
460 - 5x + 5x +
      active_ns <- tab_ns[1]
461 - 5x + 5x +
      if (length(tab_ns) > 1) {
@@ -7590,7 +7923,8 @@

teal coverage - 80.55%

469 - 5x + 5x +
      private$ns$module <- sprintf("%s-%s", active_ns, "module")
@@ -7604,28 +7938,32 @@

teal coverage - 80.55%

471 - 5x + 5x +
      component <- "filter_panel"
472 - 5x + 5x +
      component_id <- sprintf("%s-%s", private$base_ns, component)
473 - 5x + 5x +
      if (!is.null(self$get_html(sprintf("#%s", component_id)))) {
474 - 5x + 5x +
        private$ns[[component]] <- component_id
@@ -7716,56 +8054,64 @@

teal coverage - 80.55%

487 - 4x + 4x +
      checkmate::check_string(dataset_name)
488 - 4x + 4x +
      checkmate::check_string(var_name)
489 - 4x + 4x +
      input_id_prefix <- sprintf(
490 - 4x + 4x +
        "%s-active-%s-filter-%s_%s-inputs",
491 - 4x + 4x +
        self$active_filters_ns(),
492 - 4x + 4x +
        dataset_name,
493 - 4x + 4x +
        dataset_name,
494 - 4x + 4x +
        var_name
@@ -7793,28 +8139,32 @@

teal coverage - 80.55%

498 - 4x + 4x +
      supported_suffix <- c("selection", "selection_manual")
499 - 4x + 4x +
      for (suffix in supported_suffix) {
500 - 7x + 7x +
        if (!is.null(self$get_html(sprintf("#%s-%s", input_id_prefix, suffix)))) {
501 - 2x + 2x +
          return(self$get_value(input = sprintf("%s-%s", input_id_prefix, suffix)))
@@ -7842,7 +8192,8 @@

teal coverage - 80.55%

505 - 2x + 2x +
      NULL # If there are not any supported filters
@@ -8590,7 +8941,8 @@

teal coverage - 80.55%

103 - 15x + 15x +
  logger::log_trace("init initializing teal app with: data ('{ class(data) }').")
@@ -8618,7 +8970,8 @@

teal coverage - 80.55%

107 - 15x + 15x +
  if (inherits(data, "TealData")) {
@@ -8688,7 +9041,8 @@

teal coverage - 80.55%

117 - 15x + 15x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
@@ -8709,28 +9063,32 @@

teal coverage - 80.55%

120 - 15x + 15x +
  checkmate::assert(
121 - 15x + 15x +
    .var.name = "modules",
122 - 15x + 15x +
    checkmate::check_multi_class(modules, c("teal_modules", "teal_module")),
123 - 15x + 15x +
    checkmate::check_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
@@ -8744,14 +9102,16 @@

teal coverage - 80.55%

125 - 15x + 15x +
  if (inherits(modules, "teal_module")) {
126 - 6x + 6x +
    modules <- list(modules)
@@ -8765,14 +9125,16 @@

teal coverage - 80.55%

128 - 15x + 15x +
  if (checkmate::test_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))) {
129 - 9x + 9x +
    modules <- do.call(teal::modules, modules)
@@ -8800,7 +9162,8 @@

teal coverage - 80.55%

133 - 15x + 15x +
  checkmate::assert_class(filter, "teal_slices")
@@ -8821,28 +9184,32 @@

teal coverage - 80.55%

136 - 14x + 14x +
  checkmate::assert(
137 - 14x + 14x +
    .var.name = "title",
138 - 14x + 14x +
    checkmate::check_string(title),
139 - 14x + 14x +
    checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
@@ -8856,28 +9223,32 @@

teal coverage - 80.55%

141 - 14x + 14x +
  checkmate::assert(
142 - 14x + 14x +
    .var.name = "header",
143 - 14x + 14x +
    checkmate::check_string(header),
144 - 14x + 14x +
    checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
@@ -8891,28 +9262,32 @@

teal coverage - 80.55%

146 - 14x + 14x +
  checkmate::assert(
147 - 14x + 14x +
    .var.name = "footer",
148 - 14x + 14x +
    checkmate::check_string(footer),
149 - 14x + 14x +
    checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
@@ -8926,7 +9301,8 @@

teal coverage - 80.55%

151 - 14x + 14x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
@@ -8947,7 +9323,8 @@

teal coverage - 80.55%

154 - 14x + 14x +
  teal.logger::log_system_info()
@@ -8975,21 +9352,24 @@

teal coverage - 80.55%

158 - 14x + 14x +
  landing <- extract_module(modules, "teal_module_landing")
159 - 14x + 14x +
  landing_module <- NULL
160 - 14x + 14x +
  if (length(landing) == 1L) {
@@ -9010,7 +9390,8 @@

teal coverage - 80.55%

163 - 14x + 14x +
  } else if (length(landing) > 1L) {
@@ -9045,7 +9426,8 @@

teal coverage - 80.55%

168 - 14x + 14x +
  attr(filter, "app_id") <- create_app_id(data, modules)
@@ -9066,7 +9448,8 @@

teal coverage - 80.55%

171 - 14x + 14x +
  filter <- as.teal_slices(as.list(filter))
@@ -9094,7 +9477,8 @@

teal coverage - 80.55%

175 - 14x + 14x +
  if (isTRUE(attr(filter, "module_specific"))) {
@@ -9283,21 +9667,24 @@

teal coverage - 80.55%

202 - 14x + 14x +
  if (inherits(data, "teal_data")) {
203 - 13x + 13x +
    if (length(teal_data_datanames(data)) == 0) {
204 - 1x + 1x +
      stop("The environment of `data` is empty.")
@@ -9318,28 +9705,32 @@

teal coverage - 80.55%

207 - 12x + 12x +
    is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
208 - 12x + 12x +
    if (!isTRUE(is_modules_ok)) {
209 - 1x + 1x +
      logger::log_error(is_modules_ok)
210 - 1x + 1x +
      checkmate::assert(is_modules_ok, .var.name = "modules")
@@ -9360,21 +9751,24 @@

teal coverage - 80.55%

213 - 11x + 11x +
    is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
214 - 11x + 11x +
    if (!isTRUE(is_filter_ok)) {
215 - 1x + 1x +
      warning(is_filter_ok)
@@ -9444,28 +9838,32 @@

teal coverage - 80.55%

225 - 12x + 12x +
  res <- list(
226 - 12x + 12x +
    ui = function(request) ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
227 - 12x + 12x +
    server = function(input, output, session) {
228 - 5x + 5x +
      if (!is.null(landing_module)) {
@@ -9486,7 +9884,8 @@

teal coverage - 80.55%

231 - 5x + 5x +
      srv_teal_with_splash(id = id, data = data, modules = modules, filter = deep_copy_filter(filter))
@@ -9514,7 +9913,8 @@

teal coverage - 80.55%

235 - 12x + 12x +
  logger::log_trace("init teal app has been initialized.")
@@ -9528,7 +9928,8 @@

teal coverage - 80.55%

237 - 12x + 12x +
  res
@@ -9877,42 +10278,48 @@

teal coverage - 80.55%

48 - 34x + 34x +
  lifecycle::deprecate_soft(
49 - 34x + 34x +
    when = "0.15.0",
50 - 34x + 34x +
    what = "tdata()",
51 - 34x + 34x +
    details = paste(
52 - 34x + 34x +
      "tdata is deprecated and will be removed in the next release. Use `teal_data` instead.\n",
53 - 34x + 34x +
      "Please follow migration instructions https://github.com/insightsengineering/teal/discussions/987."
@@ -9933,28 +10340,32 @@

teal coverage - 80.55%

56 - 34x + 34x +
  checkmate::assert_list(
57 - 34x + 34x +
    data,
58 - 34x + 34x +
    any.missing = FALSE, names = "unique",
59 - 34x + 34x +
    types = c("data.frame", "reactive", "MultiAssayExperiment")
@@ -9968,14 +10379,16 @@

teal coverage - 80.55%

61 - 30x + 30x +
  checkmate::assert_class(join_keys, "join_keys", null.ok = TRUE)
62 - 29x + 29x +
  checkmate::assert_multi_class(code, c("character", "reactive"))
@@ -9989,14 +10402,16 @@

teal coverage - 80.55%

64 - 28x + 28x +
  checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
65 - 26x + 26x +
  checkmate::assert_subset(names(metadata), names(data))
@@ -10010,14 +10425,16 @@

teal coverage - 80.55%

67 - 25x + 25x +
  if (is.reactive(code)) {
68 - 9x + 9x +
    isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
@@ -10045,21 +10462,24 @@

teal coverage - 80.55%

72 - 24x + 24x +
  for (x in names(data)) {
73 - 47x + 47x +
    if (!is.reactive(data[[x]])) {
74 - 31x + 31x +
      data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
@@ -10094,21 +10514,24 @@

teal coverage - 80.55%

79 - 24x + 24x +
  attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
80 - 24x + 24x +
  attr(data, "join_keys") <- join_keys
81 - 24x + 24x +
  attr(data, "metadata") <- metadata
@@ -10129,14 +10552,16 @@

teal coverage - 80.55%

84 - 24x + 24x +
  class(data) <- c("tdata", class(data))
85 - 24x + 24x +
  data
@@ -10276,14 +10701,16 @@

teal coverage - 80.55%

105 - 2x + 2x +
  checkmate::assert_class(data, "tdata")
106 - 1x + 1x +
  list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
@@ -10374,14 +10801,16 @@

teal coverage - 80.55%

119 - 7x + 7x +
  checkmate::assert_class(data, "tdata")
120 - 5x + 5x +
  attr(data, "code")()
@@ -10437,7 +10866,8 @@

teal coverage - 80.55%

128 - 2x + 2x +
  attr(data, "join_keys")
@@ -10500,14 +10930,16 @@

teal coverage - 80.55%

137 - 4x + 4x +
  checkmate::assert_string(dataname)
138 - 4x + 4x +
  UseMethod("get_metadata", data)
@@ -10549,21 +10981,24 @@

teal coverage - 80.55%

144 - 4x + 4x +
  metadata <- attr(data, "metadata")
145 - 4x + 4x +
  if (is.null(metadata)) {
146 - 1x + 1x +
    return(NULL)
@@ -10577,7 +11012,8 @@

teal coverage - 80.55%

148 - 3x + 3x +
  metadata[[dataname]]
@@ -10822,14 +11258,16 @@

teal coverage - 80.55%

183 - 8x + 8x +
  if (inherits(x, "tdata")) {
184 - 2x + 2x +
    return(x)
@@ -10843,77 +11281,88 @@

teal coverage - 80.55%

186 - 6x + 6x +
  if (is.reactive(x)) {
187 - 1x + 1x +
    checkmate::assert_class(isolate(x()), "teal_data")
188 - 1x + 1x +
    datanames <- isolate(teal_data_datanames(x()))
189 - 1x + 1x +
    datasets <- sapply(datanames, function(dataname) reactive(x()[[dataname]]), simplify = FALSE)
190 - 1x + 1x +
    code <- reactive(teal.code::get_code(x()))
191 - 1x + 1x +
    join_keys <- isolate(teal.data::join_keys(x()))
192 - 5x + 5x +
  } else if (inherits(x, "teal_data")) {
193 - 5x + 5x +
    datanames <- teal_data_datanames(x)
194 - 5x + 5x +
    datasets <- sapply(datanames, function(dataname) reactive(x[[dataname]]), simplify = FALSE)
195 - 5x + 5x +
    code <- reactive(teal.code::get_code(x))
196 - 5x + 5x +
    join_keys <- isolate(teal.data::join_keys(x))
@@ -10934,7 +11383,8 @@

teal coverage - 80.55%

199 - 6x + 6x +
  new_tdata(data = datasets, code = code, join_keys = join_keys)
@@ -11913,42 +12363,48 @@

teal coverage - 80.55%

138 - 152x + 152x +
  checkmate::assert_string(label)
139 - 149x + 149x +
  if (label == "global_filters") {
140 - 1x + 1x +
    stop(
141 - 1x + 1x +
      sprintf("module(label = \"%s\", ...\n  ", label),
142 - 1x + 1x +
      "Label 'global_filters' is reserved in teal. Please change to something else.",
143 - 1x + 1x +
      call. = FALSE
@@ -11969,7 +12425,8 @@

teal coverage - 80.55%

146 - 148x + 148x +
  if (label == "Report previewer") {
@@ -12032,35 +12489,40 @@

teal coverage - 80.55%

155 - 148x + 148x +
  checkmate::assert_function(server)
156 - 148x + 148x +
  server_formals <- names(formals(server))
157 - 148x + 148x +
  if (!(
158 - 148x + 148x +
    "id" %in% server_formals ||
159 - 148x + 148x +
      all(c("input", "output", "session") %in% server_formals)
@@ -12074,70 +12536,80 @@

teal coverage - 80.55%

161 - 2x + 2x +
    stop(
162 - 2x + 2x +
      "\nmodule() `server` argument requires a function with following arguments:",
163 - 2x + 2x +
      "\n - id - `teal` will set proper `shiny` namespace for this module.",
164 - 2x + 2x +
      "\n - input, output, session (not recommended) - then `shiny::callModule` will be used to call a module.",
165 - 2x + 2x +
      "\n\nFollowing arguments can be used optionaly:",
166 - 2x + 2x +
      "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
167 - 2x + 2x +
      "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
168 - 2x + 2x +
      "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
169 - 2x + 2x +
      "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
170 - 2x + 2x +
      "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
@@ -12158,42 +12630,48 @@

teal coverage - 80.55%

173 - 146x + 146x +
  if ("datasets" %in% server_formals) {
174 - 2x + 2x +
    warning(
175 - 2x + 2x +
      sprintf("Called from module(label = \"%s\", ...)\n  ", label),
176 - 2x + 2x +
      "`datasets` argument in the server is deprecated and will be removed in the next release. ",
177 - 2x + 2x +
      "Please use `data` instead.",
178 - 2x + 2x +
      call. = FALSE
@@ -12235,56 +12713,64 @@

teal coverage - 80.55%

184 - 146x + 146x +
  checkmate::assert_function(ui)
185 - 146x + 146x +
  ui_formals <- names(formals(ui))
186 - 146x + 146x +
  if (!"id" %in% ui_formals) {
187 - 1x + 1x +
    stop(
188 - 1x + 1x +
      "\nmodule() `ui` argument requires a function with following arguments:",
189 - 1x + 1x +
      "\n - id - `teal` will set proper `shiny` namespace for this module.",
190 - 1x + 1x +
      "\n\nFollowing arguments can be used optionally:",
191 - 1x + 1x +
      "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
@@ -12305,42 +12791,48 @@

teal coverage - 80.55%

194 - 145x + 145x +
  if (any(c("data", "datasets") %in% ui_formals)) {
195 - 2x + 2x +
    stop(
196 - 2x + 2x +
      sprintf("Called from module(label = \"%s\", ...)\n  ", label),
197 - 2x + 2x +
      "UI with `data` or `datasets` argument is no longer accepted.\n  ",
198 - 2x + 2x +
      "If some UI inputs depend on data, please move the logic to your server instead.\n  ",
199 - 2x + 2x +
      "Possible solutions are renderUI() or updateXyzInput() functions."
@@ -12382,7 +12874,8 @@

teal coverage - 80.55%

205 - 143x + 143x +
  if (!missing(filters)) {
@@ -12445,21 +12938,24 @@

teal coverage - 80.55%

214 - 143x + 143x +
  if (!is.element("data", server_formals) && !is.null(datanames)) {
215 - 50x + 50x +
    message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
216 - 50x + 50x +
    datanames <- NULL
@@ -12473,7 +12969,8 @@

teal coverage - 80.55%

218 - 143x + 143x +
  checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
@@ -12494,49 +12991,56 @@

teal coverage - 80.55%

221 - 142x + 142x +
  checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
222 - 140x + 140x +
  srv_extra_args <- setdiff(names(server_args), server_formals)
223 - 140x + 140x +
  if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
224 - 1x + 1x +
    stop(
225 - 1x + 1x +
      "\nFollowing `server_args` elements have no equivalent in the formals of the server:\n",
226 - 1x + 1x +
      paste(paste(" -", srv_extra_args), collapse = "\n"),
227 - 1x + 1x +
      "\n\nUpdate the server arguments by including above or add `...`"
@@ -12571,49 +13075,56 @@

teal coverage - 80.55%

232 - 139x + 139x +
  checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
233 - 137x + 137x +
  ui_extra_args <- setdiff(names(ui_args), ui_formals)
234 - 137x + 137x +
  if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
235 - 1x + 1x +
    stop(
236 - 1x + 1x +
      "\nFollowing `ui_args` elements have no equivalent in the formals of UI:\n",
237 - 1x + 1x +
      paste(paste(" -", ui_extra_args), collapse = "\n"),
238 - 1x + 1x +
      "\n\nUpdate the UI arguments by including above or add `...`"
@@ -12641,35 +13152,40 @@

teal coverage - 80.55%

242 - 136x + 136x +
  structure(
243 - 136x + 136x +
    list(
244 - 136x + 136x +
      label = label,
245 - 136x + 136x +
      server = server, ui = ui, datanames = unique(datanames),
246 - 136x + 136x +
      server_args = server_args, ui_args = ui_args
@@ -12683,7 +13199,8 @@

teal coverage - 80.55%

248 - 136x + 136x +
    class = "teal_module"
@@ -12739,42 +13256,48 @@

teal coverage - 80.55%

256 - 108x + 108x +
  checkmate::assert_string(label)
257 - 106x + 106x +
  submodules <- list(...)
258 - 106x + 106x +
  if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
259 - 2x + 2x +
    stop(
260 - 2x + 2x +
      "The only character argument to modules() must be 'label' and it must be named, ",
261 - 2x + 2x +
      "change modules('lab', ...) to modules(label = 'lab', ...)"
@@ -12802,7 +13325,8 @@

teal coverage - 80.55%

265 - 104x + 104x +
  checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
@@ -12823,42 +13347,48 @@

teal coverage - 80.55%

268 - 101x + 101x +
  labels <- vapply(submodules, function(submodule) submodule$label, character(1))
269 - 101x + 101x +
  names(submodules) <- get_unique_labels(labels)
270 - 101x + 101x +
  structure(
271 - 101x + 101x +
    list(
272 - 101x + 101x +
      label = label,
273 - 101x + 101x +
      children = submodules
@@ -12872,7 +13402,8 @@

teal coverage - 80.55%

275 - 101x + 101x +
    class = "teal_modules"
@@ -12935,7 +13466,8 @@

teal coverage - 80.55%

284 - 3x + 3x +
  paste0(paste(rep(" ", indent), collapse = ""), "+ ", x$label, "\n", collapse = "")
@@ -13040,28 +13572,32 @@

teal coverage - 80.55%

299 - 1x + 1x +
  paste(
300 - 1x + 1x +
    c(
301 - 1x + 1x +
      paste0(rep(" ", indent), "+ ", x$label, "\n"),
302 - 1x + 1x +
      unlist(lapply(x$children, format, indent = indent + 1, ...))
@@ -13075,7 +13611,8 @@

teal coverage - 80.55%

304 - 1x + 1x +
    collapse = ""
@@ -13208,42 +13745,48 @@

teal coverage - 80.55%

323 - 8x + 8x +
  checkmate::assert_class(modules, "teal_modules")
324 - 6x + 6x +
  checkmate::assert_class(module, "teal_module")
325 - 4x + 4x +
  modules$children <- c(modules$children, list(module))
326 - 4x + 4x +
  labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
327 - 4x + 4x +
  names(modules$children) <- get_unique_labels(labels)
328 - 4x + 4x +
  modules
@@ -13348,7 +13891,8 @@

teal coverage - 80.55%

343 - 30x + 30x +
  if (inherits(modules, class)) {
@@ -13362,28 +13906,32 @@

teal coverage - 80.55%

345 - 30x + 30x +
  } else if (inherits(modules, "teal_module")) {
346 - 16x + 16x +
    NULL
347 - 14x + 14x +
  } else if (inherits(modules, "teal_modules")) {
348 - 14x + 14x +
    Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
@@ -13593,49 +14141,56 @@

teal coverage - 80.55%

378 - 331x + 331x +
  checkmate::assert_string(arg)
379 - 328x + 328x +
  if (inherits(modules, "teal_modules")) {
380 - 34x + 34x +
    any(unlist(lapply(modules$children, is_arg_used, arg)))
381 - 294x + 294x +
  } else if (inherits(modules, "teal_module")) {
382 - 48x + 48x +
    is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
383 - 246x + 246x +
  } else if (is.function(modules)) {
384 - 244x + 244x +
    isTRUE(arg %in% names(formals(modules)))
@@ -13649,7 +14204,8 @@

teal coverage - 80.55%

386 - 2x + 2x +
    stop("is_arg_used function not implemented for this object")
@@ -13761,28 +14317,32 @@

teal coverage - 80.55%

402 - 12x + 12x +
  checkmate::assert_multi_class(modules, c("teal_module", "teal_modules"))
403 - 12x + 12x +
  checkmate::assert_int(depth, lower = 0)
404 - 11x + 11x +
  if (inherits(modules, "teal_modules")) {
405 - 4x + 4x +
    max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
@@ -13796,7 +14356,8 @@

teal coverage - 80.55%

407 - 7x + 7x +
    depth
@@ -14019,21 +14580,24 @@

teal coverage - 80.55%

15 - 23x + 23x +
  script <- sprintf(
16 - 23x + 23x +
    "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
17 - 23x + 23x +
    ns("timezone")
@@ -14047,14 +14611,16 @@

teal coverage - 80.55%

19 - 23x + 23x +
  shinyjs::runjs(script) # function does not return anything
20 - 23x + 23x +
  invisible(NULL)
@@ -14103,42 +14669,48 @@

teal coverage - 80.55%

27 - 9x + 9x +
  bs_theme <- getOption("teal.bs_theme")
28 - 9x + 9x +
  if (is.null(bs_theme)) {
29 - 6x + 6x +
    NULL
30 - 3x + 3x +
  } else if (!inherits(bs_theme, "bs_theme")) {
31 - 2x + 2x +
    warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
32 - 2x + 2x +
    NULL
@@ -14152,7 +14724,8 @@

teal coverage - 80.55%

34 - 1x + 1x +
    bs_theme
@@ -14208,42 +14781,48 @@

teal coverage - 80.55%

42 - 15x + 15x +
  parents <- character(0)
43 - 15x + 15x +
  for (i in dataname) {
44 - 22x + 22x +
    while (length(i) > 0) {
45 - 24x + 24x +
      parent_i <- teal.data::parent(join_keys, i)
46 - 24x + 24x +
      parents <- c(parent_i, parents)
47 - 24x + 24x +
      i <- parent_i
@@ -14271,7 +14850,8 @@

teal coverage - 80.55%

51 - 15x + 15x +
  unique(c(parents, dataname))
@@ -14355,14 +14935,16 @@

teal coverage - 80.55%

63 - 23x + 23x +
  checkmate::assert_class(x, "teal_data")
64 - 23x + 23x +
  checkmate::assert_character(datanames, min.chars = 1L, any.missing = FALSE)
@@ -14376,21 +14958,24 @@

teal coverage - 80.55%

66 - 23x + 23x +
  ans <- teal.slice::init_filtered_data(
67 - 23x + 23x +
    x = sapply(datanames, function(dn) x[[dn]], simplify = FALSE),
68 - 23x + 23x +
    join_keys = teal.data::join_keys(x)
@@ -14411,21 +14996,24 @@

teal coverage - 80.55%

71 - 23x + 23x +
  attr(ans, "preprocessing_code") <- teal.data::get_code(x, datanames = datanames, check_names = FALSE)
72 - 23x + 23x +
  attr(ans, "verification_status") <- x@verified
73 - 23x + 23x +
  ans
@@ -14558,35 +15146,40 @@

teal coverage - 80.55%

92 - 2x + 2x +
  checkmate::assert_string(title)
93 - 2x + 2x +
  checkmate::assert_string(label)
94 - 2x + 2x +
  checkmate::assert_string(description, null.ok = TRUE)
95 - 2x + 2x +
  checkmate::assert_flag(with_filter)
96 - 2x + 2x +
  checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
@@ -14600,49 +15193,56 @@

teal coverage - 80.55%

98 - 2x + 2x +
  card <- teal::TealReportCard$new()
99 - 2x + 2x +
  title <- if (label == "") title else label
100 - 2x + 2x +
  card$set_name(title)
101 - 2x + 2x +
  card$append_text(title, "header2")
102 - 1x + 1x +
  if (!is.null(description)) card$append_text(description, "header3")
103 - 1x + 1x +
  if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
104 - 2x + 2x +
  card
@@ -14747,14 +15347,16 @@

teal coverage - 80.55%

119 - 22x + 22x +
  checkmate::assert_class(modules, "teal_modules")
120 - 22x + 22x +
  checkmate::assert_character(datanames)
@@ -14768,7 +15370,8 @@

teal coverage - 80.55%

122 - 22x + 22x +
  recursive_check_datanames <- function(modules, datanames) {
@@ -14782,14 +15385,16 @@

teal coverage - 80.55%

124 - 46x + 46x +
    if (inherits(modules, "teal_modules")) {
125 - 22x + 22x +
      sapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
@@ -14803,49 +15408,56 @@

teal coverage - 80.55%

127 - 24x + 24x +
      extra_datanames <- setdiff(modules$datanames, c("all", datanames))
128 - 24x + 24x +
      if (length(extra_datanames)) {
129 - 2x + 2x +
        sprintf(
130 - 2x + 2x +
          "- Module '%s' uses datanames not available in 'data': (%s) not in (%s)",
131 - 2x + 2x +
          modules$label,
132 - 2x + 2x +
          toString(dQuote(extra_datanames, q = FALSE)),
133 - 2x + 2x +
          toString(dQuote(datanames, q = FALSE))
@@ -14880,21 +15492,24 @@

teal coverage - 80.55%

138 - 22x + 22x +
  check_datanames <- unlist(recursive_check_datanames(modules, datanames))
139 - 22x + 22x +
  if (length(check_datanames)) {
140 - 2x + 2x +
    paste(check_datanames, collapse = "\n")
@@ -14908,7 +15523,8 @@

teal coverage - 80.55%

142 - 20x + 20x +
    TRUE
@@ -15013,14 +15629,16 @@

teal coverage - 80.55%

157 - 20x + 20x +
  checkmate::assert_class(filters, "teal_slices")
158 - 20x + 20x +
  checkmate::assert_character(datanames)
@@ -15041,63 +15659,72 @@

teal coverage - 80.55%

161 - 20x + 20x +
  out <- unlist(sapply(
162 - 20x + 20x +
    filters, function(filter) {
163 - 3x + 3x +
      dataname <- shiny::isolate(filter$dataname)
164 - 3x + 3x +
      if (!dataname %in% datanames) {
165 - 2x + 2x +
        sprintf(
166 - 2x + 2x +
          "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
167 - 2x + 2x +
          shiny::isolate(filter$id),
168 - 2x + 2x +
          dQuote(dataname, q = FALSE),
169 - 2x + 2x +
          toString(dQuote(datanames, q = FALSE))
@@ -15146,14 +15773,16 @@

teal coverage - 80.55%

176 - 20x + 20x +
  if (length(out)) {
177 - 2x + 2x +
    paste(out, collapse = "\n")
@@ -15167,7 +15796,8 @@

teal coverage - 80.55%

179 - 18x + 18x +
    TRUE
@@ -15286,28 +15916,32 @@

teal coverage - 80.55%

196 - 20x + 20x +
  checkmate::assert_class(data, "teal_data")
197 - 20x + 20x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
198 - 20x + 20x +
  checkmate::assert_class(filters, "modules_teal_slices")
199 - 20x + 20x +
  checkmate::assert_r6(filtered_data_singleton, "FilteredData")
@@ -15321,7 +15955,8 @@

teal coverage - 80.55%

201 - 20x + 20x +
  if (!isTRUE(attr(filters, "module_specific"))) {
@@ -15335,14 +15970,16 @@

teal coverage - 80.55%

203 - 8x + 8x +
    slices <- shiny::isolate({
204 - 8x + 8x +
      Filter(function(x) x$id %in% attr(filters, "mapping")$global_filters, filters)
@@ -15356,14 +15993,16 @@

teal coverage - 80.55%

206 - 8x + 8x +
    filtered_data_singleton$set_filter_state(slices)
207 - 8x + 8x +
    return(modules_structure(modules, filtered_data_singleton))
@@ -15384,7 +16023,8 @@

teal coverage - 80.55%

210 - 12x + 12x +
  if (inherits(modules, "teal_module")) {
@@ -15398,35 +16038,40 @@

teal coverage - 80.55%

212 - 7x + 7x +
    datanames <-
213 - 7x + 7x +
      if (is.null(modules$datanames) || identical(modules$datanames, "all")) {
214 - 4x + 4x +
        include_parent_datanames(
215 - 4x + 4x +
          teal_data_datanames(data),
216 - 4x + 4x +
          teal.data::join_keys(data)
@@ -15447,21 +16092,24 @@

teal coverage - 80.55%

219 - 3x + 3x +
        include_parent_datanames(
220 - 3x + 3x +
          modules$datanames,
221 - 3x + 3x +
          teal.data::join_keys(data)
@@ -15489,35 +16137,40 @@

teal coverage - 80.55%

225 - 7x + 7x +
    slices <- shiny::isolate({
226 - 7x + 7x +
      Filter(x = filters, f = function(x) {
227 - 20x + 20x +
        x$dataname %in% datanames &&
228 - 20x + 20x +
          (x$id %in% attr(filters, "mapping")$global_filters ||
229 - 20x + 20x +
            x$id %in% unique(unlist(attr(filters, "mapping")[modules$label]))) # nolint: indentation_linter.
@@ -15545,14 +16198,16 @@

teal coverage - 80.55%

233 - 7x + 7x +
    slices$include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
234 - 7x + 7x +
    slices$exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
@@ -15573,7 +16228,8 @@

teal coverage - 80.55%

237 - 7x + 7x +
    filtered_data <- teal_data_to_filtered_data(data, datanames)
@@ -15587,7 +16243,8 @@

teal coverage - 80.55%

239 - 7x + 7x +
    filtered_data$set_filter_state(slices)
@@ -15601,56 +16258,64 @@

teal coverage - 80.55%

241 - 7x + 7x +
    return(filtered_data)
242 - 5x + 5x +
  } else if (inherits(modules, "teal_modules")) {
243 - 5x + 5x +
    ans <- lapply(
244 - 5x + 5x +
      modules$children,
245 - 5x + 5x +
      modules_datasets,
246 - 5x + 5x +
      data = data,
247 - 5x + 5x +
      filters = filters,
248 - 5x + 5x +
      filtered_data_singleton = filtered_data_singleton
@@ -15664,7 +16329,8 @@

teal coverage - 80.55%

250 - 5x + 5x +
    names(ans) <- vapply(modules$children, `[[`, character(1), "label")
@@ -15678,7 +16344,8 @@

teal coverage - 80.55%

252 - 5x + 5x +
    return(ans)
@@ -15734,14 +16401,16 @@

teal coverage - 80.55%

260 - 23x + 23x +
  if (inherits(modules, "teal_module")) {
261 - 13x + 13x +
    return(value)
@@ -15755,21 +16424,24 @@

teal coverage - 80.55%

263 - 10x + 10x +
    stats::setNames(
264 - 10x + 10x +
      lapply(modules$children, modules_structure, value),
265 - 10x + 10x +
      vapply(modules$children, `[[`, character(1), "label")
@@ -15860,21 +16532,24 @@

teal coverage - 80.55%

278 - 83x + 83x +
  checkmate::assert_class(data, "teal_data")
279 - 83x + 83x +
  if (length(teal.data::datanames(data))) {
280 - 77x + 77x +
    teal.data::datanames(data)
@@ -15888,7 +16563,8 @@

teal coverage - 80.55%

282 - 6x + 6x +
    ls(teal.code::get_env(data), all.names = TRUE)
@@ -15958,70 +16634,80 @@

teal coverage - 80.55%

292 - 12x + 12x +
  checkmate::assert_class(shiny_tag, "shiny.tag")
293 - 12x + 12x +
  checkmate::assert_true(shiny_tag$name == "head")
294 - 11x + 11x +
  child_names <- vapply(shiny_tag$children, `[[`, character(1L), "name")
295 - 11x + 11x +
  checkmate::assert_subset(c("title", "link"), child_names, .var.name = "child tags")
296 - 9x + 9x +
  rel_attr <- shiny_tag$children[[which(child_names == "link")]]$attribs$rel
297 - 9x + 9x +
  checkmate::assert_subset(
298 - 9x + 9x +
    rel_attr,
299 - 9x + 9x +
    c("icon", "shortcut icon"),
300 - 9x + 9x +
    .var.name = "Link tag's rel attribute",
301 - 9x + 9x +
    empty.ok = FALSE
@@ -16140,56 +16826,64 @@

teal coverage - 80.55%

318 - 16x + 16x +
  checkmate::assert_string(title, null.ok = TRUE)
319 - 16x + 16x +
  checkmate::assert_string(favicon, null.ok = TRUE)
320 - 16x + 16x +
  tags$head(
321 - 16x + 16x +
    tags$title(title),
322 - 16x + 16x +
    tags$link(
323 - 16x + 16x +
      rel = "icon",
324 - 16x + 16x +
      href = favicon,
325 - 16x + 16x +
      sizes = "any"
@@ -16329,14 +17023,16 @@

teal coverage - 80.55%

345 - 25x + 25x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
346 - 24x + 24x +
  checkmate::assert_class(modules, "teal_modules")
@@ -16350,28 +17046,32 @@

teal coverage - 80.55%

348 - 23x + 23x +
  data <- if (inherits(data, "teal_data")) {
349 - 21x + 21x +
    as.list(data@env)
350 - 23x + 23x +
  } else if (inherits(data, "teal_data_module")) {
351 - 2x + 2x +
    deparse1(body(data$server))
@@ -16385,7 +17085,8 @@

teal coverage - 80.55%

353 - 23x + 23x +
  modules <- lapply(modules, defunction)
@@ -16399,7 +17100,8 @@

teal coverage - 80.55%

355 - 23x + 23x +
  rlang::hash(list(data = data, modules = modules))
@@ -16448,28 +17150,32 @@

teal coverage - 80.55%

362 - 240x + 240x +
  if (is.list(x)) {
363 - 52x + 52x +
    lapply(x, defunction)
364 - 188x + 188x +
  } else if (is.function(x)) {
365 - 56x + 56x +
    deparse1(body(x))
@@ -16483,7 +17189,8 @@

teal coverage - 80.55%

367 - 132x + 132x +
    x
@@ -16581,7 +17288,8 @@

teal coverage - 80.55%

381 - 105x + 105x +
  make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
@@ -16769,56 +17477,64 @@

teal coverage - 80.55%

25 - 4x + 4x +
      checkmate::assert_character(src, min.len = 0, max.len = 1)
26 - 4x + 4x +
      params <- list(...)
27 - 4x + 4x +
      params$eval <- FALSE
28 - 4x + 4x +
      rblock <- RcodeBlock$new(src)
29 - 4x + 4x +
      rblock$set_params(params)
30 - 4x + 4x +
      self$append_content(rblock)
31 - 4x + 4x +
      self$append_metadata("SRC", src)
32 - 4x + 4x +
      invisible(self)
@@ -16888,28 +17604,32 @@

teal coverage - 80.55%

42 - 5x + 5x +
      checkmate::assert_class(fs, "teal_slices")
43 - 4x + 4x +
      self$append_text("Filter State", "header3")
44 - 4x + 4x +
      if (length(fs)) {
45 - 3x + 3x +
        self$append_content(TealSlicesBlock$new(fs))
@@ -16923,7 +17643,8 @@

teal coverage - 80.55%

47 - 1x + 1x +
        self$append_text("No filters specified.")
@@ -16937,7 +17658,8 @@

teal coverage - 80.55%

49 - 4x + 4x +
      invisible(self)
@@ -17014,56 +17736,64 @@

teal coverage - 80.55%

60 - 4x + 4x +
      checkmate::assert_list(encodings)
61 - 4x + 4x +
      self$append_text("Selected Options", "header3")
62 - 4x + 4x +
      if (requireNamespace("yaml", quietly = TRUE)) {
63 - 4x + 4x +
        self$append_text(yaml::as.yaml(encodings, handlers = list(
64 - 4x + 4x +
          POSIXct = function(x) format(x, "%Y-%m-%d"),
65 - 4x + 4x +
          POSIXlt = function(x) format(x, "%Y-%m-%d"),
66 - 4x + 4x +
          Date = function(x) format(x, "%Y-%m-%d")
67 - 4x + 4x +
        )), "verbatim")
@@ -17091,14 +17821,16 @@

teal coverage - 80.55%

71 - 4x + 4x +
      self$append_metadata("Encodings", encodings)
72 - 4x + 4x +
      invisible(self)
@@ -17252,21 +17984,24 @@

teal coverage - 80.55%

94 - 9x + 9x +
      self$set_content(content)
95 - 8x + 8x +
      self$set_style(style)
96 - 8x + 8x +
      invisible(self)
@@ -17357,56 +18092,64 @@

teal coverage - 80.55%

109 - 10x + 10x +
      checkmate::assert_class(content, "teal_slices")
110 - 9x + 9x +
      if (length(content) != 0) {
111 - 7x + 7x +
        states_list <- lapply(content, function(x) {
112 - 7x + 7x +
          x_list <- shiny::isolate(as.list(x))
113 - 7x + 7x +
          if (
114 - 7x + 7x +
            inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
115 - 7x + 7x +
              length(x_list$choices) == 2 &&
116 - 7x + 7x +
              length(x_list$selected) == 2
@@ -17441,7 +18184,8 @@

teal coverage - 80.55%

121 - 7x + 7x +
          if (!is.null(x_list$arg)) {
@@ -17469,14 +18213,16 @@

teal coverage - 80.55%

125 - 7x + 7x +
          x_list <- x_list[
126 - 7x + 7x +
            c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
@@ -17490,21 +18236,24 @@

teal coverage - 80.55%

128 - 7x + 7x +
          names(x_list) <- c(
129 - 7x + 7x +
            "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
130 - 7x + 7x +
            "Selected Values", "Selected range", "Include NA values", "Include Inf values"
@@ -17525,7 +18274,8 @@

teal coverage - 80.55%

133 - 7x + 7x +
          Filter(Negate(is.null), x_list)
@@ -17546,14 +18296,16 @@

teal coverage - 80.55%

136 - 7x + 7x +
        if (requireNamespace("yaml", quietly = TRUE)) {
137 - 7x + 7x +
          super$set_content(yaml::as.yaml(states_list))
@@ -17588,14 +18340,16 @@

teal coverage - 80.55%

142 - 9x + 9x +
      private$teal_slices <- content
143 - 9x + 9x +
      invisible(self)
@@ -17644,28 +18398,32 @@

teal coverage - 80.55%

150 - 1x + 1x +
      checkmate::assert_list(x)
151 - 1x + 1x +
      checkmate::assert_names(names(x), must.include = c("teal_slices"))
152 - 1x + 1x +
      self$set_content(x$teal_slices)
153 - 1x + 1x +
      invisible(self)
@@ -17707,7 +18465,8 @@

teal coverage - 80.55%

159 - 2x + 2x +
      list(teal_slices = private$teal_slices)
@@ -17846,21 +18605,24 @@

teal coverage - 80.55%

12 - 5x + 5x +
  css_files <- list.files(
13 - 5x + 5x +
    system.file("css", package = "teal", mustWork = TRUE),
14 - 5x + 5x +
    pattern = pattern, full.names = TRUE
@@ -17881,14 +18643,16 @@

teal coverage - 80.55%

17 - 5x + 5x +
  singleton(
18 - 5x + 5x +
    tags$head(lapply(css_files, includeCSS))
@@ -18000,21 +18764,24 @@

teal coverage - 80.55%

34 - 5x + 5x +
  checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
35 - 5x + 5x +
  js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
36 - 5x + 5x +
  js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
@@ -18028,7 +18795,8 @@

teal coverage - 80.55%

38 - 5x + 5x +
  singleton(lapply(js_files, includeScript))
@@ -18161,21 +18929,24 @@

teal coverage - 80.55%

57 - 23x + 23x +
  checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
58 - 23x + 23x +
  lapply(files, function(file) {
59 - 23x + 23x +
    shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
@@ -18189,7 +18960,8 @@

teal coverage - 80.55%

61 - 23x + 23x +
  invisible(NULL)
@@ -18294,21 +19066,24 @@

teal coverage - 80.55%

76 - 5x + 5x +
  tagList(
77 - 5x + 5x +
    shinyjs::useShinyjs(),
78 - 5x + 5x +
    include_css_files(),
@@ -18322,14 +19097,16 @@

teal coverage - 80.55%

80 - 5x + 5x +
    include_js_files(except = "init.js"),
81 - 5x + 5x +
    shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
@@ -18888,35 +19665,40 @@

teal coverage - 80.55%

77 - 99x + 99x +
  shiny::isolate({
78 - 99x + 99x +
    checkmate::assert_flag(allow_add)
79 - 99x + 99x +
    checkmate::assert_flag(module_specific)
80 - 47x + 47x +
    if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
81 - 96x + 96x +
    checkmate::assert_string(app_id, null.ok = TRUE)
@@ -18930,14 +19712,16 @@

teal coverage - 80.55%

83 - 96x + 96x +
    slices <- list(...)
84 - 96x + 96x +
    all_slice_id <- vapply(slices, `[[`, character(1L), "id")
@@ -18951,14 +19735,16 @@

teal coverage - 80.55%

86 - 96x + 96x +
    if (missing(mapping)) {
87 - 52x + 52x +
      mapping <- list(global_filters = all_slice_id)
@@ -18972,14 +19758,16 @@

teal coverage - 80.55%

89 - 96x + 96x +
    if (!module_specific) {
90 - 90x + 90x +
      mapping[setdiff(names(mapping), "global_filters")] <- NULL
@@ -19000,42 +19788,48 @@

teal coverage - 80.55%

93 - 96x + 96x +
    failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
94 - 96x + 96x +
    if (length(failed_slice_id)) {
95 - 1x + 1x +
      stop(sprintf(
96 - 1x + 1x +
        "Filters in mapping don't match any available filter.\n %s not in %s",
97 - 1x + 1x +
        toString(failed_slice_id),
98 - 1x + 1x +
        toString(all_slice_id)
@@ -19063,7 +19857,8 @@

teal coverage - 80.55%

102 - 95x + 95x +
    tss <- teal.slice::teal_slices(
@@ -19077,28 +19872,32 @@

teal coverage - 80.55%

104 - 95x + 95x +
      exclude_varnames = exclude_varnames,
105 - 95x + 95x +
      include_varnames = include_varnames,
106 - 95x + 95x +
      count_type = count_type,
107 - 95x + 95x +
      allow_add = allow_add
@@ -19112,35 +19911,40 @@

teal coverage - 80.55%

109 - 95x + 95x +
    attr(tss, "mapping") <- mapping
110 - 95x + 95x +
    attr(tss, "module_specific") <- module_specific
111 - 95x + 95x +
    attr(tss, "app_id") <- app_id
112 - 95x + 95x +
    class(tss) <- c("modules_teal_slices", class(tss))
113 - 95x + 95x +
    tss
@@ -19210,14 +20014,16 @@

teal coverage - 80.55%

123 - 18x + 18x +
  checkmate::assert_list(x)
124 - 18x + 18x +
  lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
@@ -19231,21 +20037,24 @@

teal coverage - 80.55%

126 - 18x + 18x +
  attrs <- attributes(unclass(x))
127 - 18x + 18x +
  ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
128 - 18x + 18x +
  do.call(teal_slices, c(ans, attrs))
@@ -19308,14 +20117,16 @@

teal coverage - 80.55%

137 - 2x + 2x +
  x <- list(...)
138 - 2x + 2x +
  checkmate::assert_true(all(vapply(x, is.teal_slices, logical(1L))), .var.name = "all arguments are teal_slices")
@@ -19329,21 +20140,24 @@

teal coverage - 80.55%

140 - 2x + 2x +
  all_attributes <- lapply(x, attributes)
141 - 2x + 2x +
  all_attributes <- coalesce_r(all_attributes)
142 - 2x + 2x +
  all_attributes <- all_attributes[names(all_attributes) != "class"]
@@ -19357,35 +20171,40 @@

teal coverage - 80.55%

144 - 2x + 2x +
  do.call(
145 - 2x + 2x +
    teal_slices,
146 - 2x + 2x +
    c(
147 - 2x + 2x +
      unique(unlist(x, recursive = FALSE)),
148 - 2x + 2x +
      all_attributes
@@ -19497,28 +20316,32 @@

teal coverage - 80.55%

164 - 6x + 6x +
  checkmate::assert_class(filter, "teal_slices")
165 - 6x + 6x +
  shiny::isolate({
166 - 6x + 6x +
    filter_copy <- lapply(filter, function(slice) {
167 - 2x + 2x +
      teal.slice::as.teal_slice(as.list(slice))
@@ -19532,14 +20355,16 @@

teal coverage - 80.55%

169 - 6x + 6x +
    attributes(filter_copy) <- attributes(filter)
170 - 6x + 6x +
    filter_copy
@@ -20140,56 +20965,64 @@

teal coverage - 80.55%

83 - 9x + 9x +
  checkmate::assert_character(id)
84 - 9x + 9x +
  checkmate::assert_true(is.reactive(slices_global))
85 - 9x + 9x +
  checkmate::assert_class(isolate(slices_global()), "teal_slices")
86 - 9x + 9x +
  checkmate::assert_true(is.reactive(mapping_matrix))
87 - 9x + 9x +
  checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
88 - 9x + 9x +
  checkmate::assert_list(datasets, types = "FilteredData", any.missing = FALSE, names = "named")
89 - 9x + 9x +
  checkmate::assert_true(is.reactive(snapshot_history))
90 - 9x + 9x +
  checkmate::assert_list(isolate(snapshot_history()), names = "unique")
@@ -20203,14 +21036,16 @@

teal coverage - 80.55%

92 - 9x + 9x +
  moduleServer(id, function(input, output, session) {
93 - 9x + 9x +
    logger::log_trace("bookmark_manager_srv initializing")
@@ -20231,7 +21066,8 @@

teal coverage - 80.55%

96 - 9x + 9x +
    app_session <- .subset2(shiny::getDefaultReactiveDomain(), "parent")
@@ -20252,35 +21088,40 @@

teal coverage - 80.55%

99 - 9x + 9x +
    observe({
100 - 79x + 79x +
      inputs <- reactiveValuesToList(app_session$input)
101 - 79x + 79x +
      ids_buttons <- names(Filter(function(x) inherits(x, "shinyActionButtonValue"), inputs))
102 - 79x + 79x +
      id_bookmark_name <- grep("bookmark_name", names(inputs), value = TRUE, fixed = TRUE)
103 - 79x + 79x +
      setBookmarkExclude(union(ids_buttons, id_bookmark_name), session = app_session)
@@ -20294,7 +21135,8 @@

teal coverage - 80.55%

105 - 9x + 9x +
    app_session$onBookmark(function(state) {
@@ -20371,7 +21213,8 @@

teal coverage - 80.55%

116 - 9x + 9x +
    app_session$onBookmarked(function(url) {
@@ -20574,7 +21417,8 @@

teal coverage - 80.55%

145 - 9x + 9x +
    app_session$onRestored(function(state) {
@@ -20728,7 +21572,8 @@

teal coverage - 80.55%

167 - 9x + 9x +
    ns <- session$ns
@@ -20749,14 +21594,16 @@

teal coverage - 80.55%

170 - 9x + 9x +
    bookmark_history <- reactiveVal({
171 - 9x + 9x +
      list()
@@ -20784,7 +21631,8 @@

teal coverage - 80.55%

175 - 9x + 9x +
    observeEvent(input$bookmark_add, {
@@ -20889,7 +21737,8 @@

teal coverage - 80.55%

190 - 9x + 9x +
    observeEvent(input$bookmark_accept, {
@@ -20931,7 +21780,8 @@

teal coverage - 80.55%

196 - 9x + 9x +
    divs <- reactiveValues()
@@ -20945,21 +21795,24 @@

teal coverage - 80.55%

198 - 9x + 9x +
    observeEvent(bookmark_history(), {
199 - 7x + 7x +
      logger::log_trace("bookmark_manager_srv: bookmark history changed, updating bookmark list")
200 - 7x + 7x +
      lapply(names(bookmark_history()), function(s) {
@@ -21057,42 +21910,48 @@

teal coverage - 80.55%

214 - 9x + 9x +
    output$bookmark_list <- renderUI({
215 - 2x + 2x +
      rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
216 - 2x + 2x +
      if (length(rows) == 0L) {
217 - 2x + 2x +
        div(
218 - 2x + 2x +
          class = "manager_placeholder",
219 - 2x + 2x +
          "Bookmarks will appear here."
@@ -21141,7 +22000,8 @@

teal coverage - 80.55%

226 - 9x + 9x +
    bookmark_history
@@ -21315,14 +22175,16 @@

teal coverage - 80.55%

22 - 7x + 7x +
  packageStartupMessage(
23 - 7x + 7x +
    "\nYou are using teal version ",
@@ -21343,7 +22205,8 @@

teal coverage - 80.55%

26 - 7x + 7x +
    read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
@@ -21496,28 +22359,32 @@

teal coverage - 80.55%

8 - 17x + 17x +
  vapply(
9 - 17x + 17x +
    utils::sessionInfo()$otherPkgs,
10 - 17x + 17x +
    function(x) {
11 - 114x + 114x +
      paste0("library(", x$Package, ")")
@@ -21531,7 +22398,8 @@

teal coverage - 80.55%

13 - 17x + 17x +
    character(1)
@@ -21552,21 +22420,24 @@

teal coverage - 80.55%

16 - 17x + 17x +
    rev() %>%
17 - 17x + 17x +
    paste0(sep = "\n") %>%
18 - 17x + 17x +
    paste0(collapse = "")
@@ -21608,21 +22479,24 @@

teal coverage - 80.55%

24 - 21x + 21x +
  code_string <- getOption("teal.load_nest_code")
25 - 21x + 21x +
  if (is.character(code_string)) {
26 - 2x + 2x +
    code_string
@@ -21636,7 +22510,8 @@

teal coverage - 80.55%

28 - 19x + 19x +
    "# Add any code to install/load your NEST environment here\n"
@@ -21776,14 +22651,16 @@

teal coverage - 80.55%

48 - 15x + 15x +
  str_prepro <- attr(datasets, "preprocessing_code")
49 - 15x + 15x +
  if (length(str_prepro) == 0) {
@@ -21804,7 +22681,8 @@

teal coverage - 80.55%

52 - 15x + 15x +
    str_prepro <- paste(str_prepro, collapse = "\n")
@@ -21832,35 +22710,40 @@

teal coverage - 80.55%

56 - 15x + 15x +
  str_hash <- vapply(datanames, function(dataname) {
57 - 28x + 28x +
    sprintf(
58 - 28x + 28x +
      "stopifnot(%s == %s)",
59 - 28x + 28x +
      deparse1(bquote(rlang::hash(.(as.name(dataname))))),
60 - 28x + 28x +
      deparse1(hashes[[dataname]])
@@ -21874,14 +22757,16 @@

teal coverage - 80.55%

62 - 15x + 15x +
  }, character(1))
63 - 15x + 15x +
  str_hash <- paste(str_hash, collapse = "\n")
@@ -21902,21 +22787,24 @@

teal coverage - 80.55%

66 - 15x + 15x +
  str_filter <- teal.slice::get_filter_expr(datasets, datanames)
67 - 15x + 15x +
  if (str_filter == "") {
68 - 10x + 10x +
    str_filter <- character(0)
@@ -21944,14 +22832,16 @@

teal coverage - 80.55%

72 - 15x + 15x +
  str_code <- paste(c(str_prepro, str_hash, str_filter), collapse = "\n\n")
73 - 15x + 15x +
  sprintf("%s\n", str_code)
@@ -22237,21 +23127,24 @@

teal coverage - 80.55%

39 - 10x + 10x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
40 - 10x + 10x +
  checkmate::assert_count(depth)
41 - 10x + 10x +
  UseMethod("ui_nested_tabs", modules)
@@ -22335,35 +23228,40 @@

teal coverage - 80.55%

53 - 5x + 5x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
54 - 5x + 5x +
  ns <- NS(id)
55 - 5x + 5x +
  do.call(
56 - 5x + 5x +
    tabsetPanel,
57 - 5x + 5x +
    c(
@@ -22377,21 +23275,24 @@

teal coverage - 80.55%

59 - 5x + 5x +
      list(
60 - 5x + 5x +
        id = ns("active_tab"),
61 - 5x + 5x +
        type = if (modules$label == "root") "pills" else "tabs"
@@ -22405,91 +23306,104 @@

teal coverage - 80.55%

63 - 5x + 5x +
      lapply(
64 - 5x + 5x +
        names(modules$children),
65 - 5x + 5x +
        function(module_id) {
66 - 5x + 5x +
          module_label <- modules$children[[module_id]]$label
67 - 5x + 5x +
          tabPanel(
68 - 5x + 5x +
            title = module_label,
69 - 5x + 5x +
            value = module_id, # when clicked this tab value changes input$<tabset panel id>
70 - 5x + 5x +
            ui_nested_tabs(
71 - 5x + 5x +
              id = ns(module_id),
72 - 5x + 5x +
              modules = modules$children[[module_id]],
73 - 5x + 5x +
              datasets = datasets[[module_label]],
74 - 5x + 5x +
              depth = depth + 1L,
75 - 5x + 5x +
              is_module_specific = is_module_specific
@@ -22573,14 +23487,16 @@

teal coverage - 80.55%

87 - 5x + 5x +
  checkmate::assert_class(datasets, classes = "FilteredData")
88 - 5x + 5x +
  ns <- NS(id)
@@ -22594,7 +23510,8 @@

teal coverage - 80.55%

90 - 5x + 5x +
  args <- c(list(id = ns("module")), modules$ui_args)
@@ -22608,49 +23525,56 @@

teal coverage - 80.55%

92 - 5x + 5x +
  teal_ui <- tags$div(
93 - 5x + 5x +
    id = id,
94 - 5x + 5x +
    class = "teal_module",
95 - 5x + 5x +
    uiOutput(ns("data_reactive"), inline = TRUE),
96 - 5x + 5x +
    tagList(
97 - 5x + 5x +
      if (depth >= 2L) tags$div(style = "mt-6"),
98 - 5x + 5x +
      do.call(modules$ui, args)
@@ -22678,7 +23602,8 @@

teal coverage - 80.55%

102 - 5x + 5x +
  if (!is.null(modules$datanames) && is_module_specific) {
@@ -22748,7 +23673,8 @@

teal coverage - 80.55%

112 - 5x + 5x +
    teal_ui
@@ -22797,21 +23723,24 @@

teal coverage - 80.55%

119 - 60x + 60x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
120 - 60x + 60x +
  checkmate::assert_class(reporter, "Reporter")
121 - 59x + 59x +
  UseMethod("srv_nested_tabs", modules)
@@ -22909,7 +23838,8 @@

teal coverage - 80.55%

135 - 27x + 27x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
@@ -22923,14 +23853,16 @@

teal coverage - 80.55%

137 - 27x + 27x +
  moduleServer(id = id, module = function(input, output, session) {
138 - 27x + 27x +
    logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
@@ -22944,70 +23876,80 @@

teal coverage - 80.55%

140 - 27x + 27x +
    labels <- vapply(modules$children, `[[`, character(1), "label")
141 - 27x + 27x +
    modules_reactive <- sapply(
142 - 27x + 27x +
      names(modules$children),
143 - 27x + 27x +
      function(module_id) {
144 - 38x + 38x +
        srv_nested_tabs(
145 - 38x + 38x +
          id = module_id,
146 - 38x + 38x +
          datasets = datasets[[labels[module_id]]],
147 - 38x + 38x +
          modules = modules$children[[module_id]],
148 - 38x + 38x +
          is_module_specific = is_module_specific,
149 - 38x + 38x +
          reporter = reporter
@@ -23028,7 +23970,8 @@

teal coverage - 80.55%

152 - 27x + 27x +
      simplify = FALSE
@@ -23056,21 +23999,24 @@

teal coverage - 80.55%

156 - 27x + 27x +
    input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
157 - 27x + 27x +
    get_active_module <- reactive({
158 - 17x + 17x +
      if (length(modules$children) == 1L) {
@@ -23084,7 +24030,8 @@

teal coverage - 80.55%

160 - 6x + 6x +
        modules_reactive[[1]]()
@@ -23105,7 +24052,8 @@

teal coverage - 80.55%

163 - 11x + 11x +
        modules_reactive[[input_validated()]]()
@@ -23133,7 +24081,8 @@

teal coverage - 80.55%

167 - 27x + 27x +
    get_active_module
@@ -23189,14 +24138,16 @@

teal coverage - 80.55%

175 - 32x + 32x +
  checkmate::assert_class(datasets, "FilteredData")
176 - 32x + 32x +
  logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
@@ -23210,14 +24161,16 @@

teal coverage - 80.55%

178 - 32x + 32x +
  moduleServer(id = id, module = function(input, output, session) {
179 - 32x + 32x +
    if (!is.null(modules$datanames) && is_module_specific) {
@@ -23273,35 +24226,40 @@

teal coverage - 80.55%

187 - 32x + 32x +
    trigger_data <- reactiveVal(1L)
188 - 32x + 32x +
    trigger_module <- reactiveVal(NULL)
189 - 32x + 32x +
    output$data_reactive <- renderUI({
190 - 28x + 28x +
      lapply(datasets$datanames(), function(x) {
191 - 43x + 43x +
        datasets$get_data(x, filtered = TRUE)
@@ -23315,14 +24273,16 @@

teal coverage - 80.55%

193 - 28x + 28x +
      isolate(trigger_data(trigger_data() + 1))
194 - 28x + 28x +
      isolate(trigger_module(TRUE))
@@ -23336,7 +24296,8 @@

teal coverage - 80.55%

196 - 28x + 28x +
      NULL
@@ -23364,14 +24325,16 @@

teal coverage - 80.55%

200 - 32x + 32x +
    args <- c(list(id = "module"), modules$server_args)
201 - 32x + 32x +
    if (is_arg_used(modules$server, "reporter")) {
@@ -23399,14 +24362,16 @@

teal coverage - 80.55%

205 - 32x + 32x +
    if (is_arg_used(modules$server, "datasets")) {
206 - 1x + 1x +
      args <- c(args, datasets = datasets)
@@ -23427,21 +24392,24 @@

teal coverage - 80.55%

209 - 32x + 32x +
    if (is_arg_used(modules$server, "data")) {
210 - 12x + 12x +
      data <- eventReactive(trigger_data(), .datasets_to_data(modules, datasets))
211 - 12x + 12x +
      args <- c(args, data = list(data))
@@ -23462,21 +24430,24 @@

teal coverage - 80.55%

214 - 32x + 32x +
    if (is_arg_used(modules$server, "filter_panel_api")) {
215 - 2x + 2x +
      filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
216 - 2x + 2x +
      args <- c(args, filter_panel_api = filter_panel_api)
@@ -23504,21 +24475,24 @@

teal coverage - 80.55%

220 - 32x + 32x +
    call_module <- function() {
221 - 22x + 22x +
      if (is_arg_used(modules$server, "id")) {
222 - 22x + 22x +
        do.call(modules$server, args)
@@ -23567,7 +24541,8 @@

teal coverage - 80.55%

229 - 32x + 32x +
    if (isTRUE(session$restoreContext$active)) {
@@ -23595,7 +24570,8 @@

teal coverage - 80.55%

233 - 32x + 32x +
    } else if (id == "report_previewer") {
@@ -23644,35 +24620,40 @@

teal coverage - 80.55%

240 - 32x + 32x +
      observeEvent(
241 - 32x + 32x +
        ignoreNULL = TRUE,
242 - 32x + 32x +
        once = TRUE,
243 - 32x + 32x +
        eventExpr = trigger_module(),
244 - 32x + 32x +
        handlerExpr = call_module()
@@ -23700,7 +24681,8 @@

teal coverage - 80.55%

248 - 32x + 32x +
    reactive(modules)
@@ -23819,14 +24801,16 @@

teal coverage - 80.55%

265 - 15x + 15x +
  checkmate::assert_class(module, "teal_module")
266 - 15x + 15x +
  checkmate::assert_class(datasets, "FilteredData")
@@ -23840,14 +24824,16 @@

teal coverage - 80.55%

268 - 15x + 15x +
  datanames <- if (is.null(module$datanames) || identical(module$datanames, "all")) {
269 - 12x + 12x +
    datasets$datanames()
@@ -23861,21 +24847,24 @@

teal coverage - 80.55%

271 - 3x + 3x +
    include_parent_datanames(
272 - 3x + 3x +
      module$datanames,
273 - 3x + 3x +
      datasets$get_join_keys()
@@ -23910,7 +24899,8 @@

teal coverage - 80.55%

278 - 15x + 15x +
  data <- sapply(datanames, function(x) datasets$get_data(x, filtered = TRUE), simplify = FALSE)
@@ -23924,7 +24914,8 @@

teal coverage - 80.55%

280 - 15x + 15x +
  hashes <- calculate_hashes(datanames, datasets)
@@ -23938,28 +24929,32 @@

teal coverage - 80.55%

282 - 15x + 15x +
  code <- c(
283 - 15x + 15x +
    get_rcode_str_install(),
284 - 15x + 15x +
    get_rcode_libraries(),
285 - 15x + 15x +
    get_datasets_code(datanames, datasets, hashes)
@@ -23987,21 +24982,24 @@

teal coverage - 80.55%

289 - 15x + 15x +
  data <- do.call(
290 - 15x + 15x +
    teal.data::teal_data,
291 - 15x + 15x +
    args = c(data, code = list(code), join_keys = list(datasets$get_join_keys()[datanames]))
@@ -24022,14 +25020,16 @@

teal coverage - 80.55%

294 - 15x + 15x +
  data@verified <- attr(datasets, "verification_status")
295 - 15x + 15x +
  data
@@ -24113,7 +25113,8 @@

teal coverage - 80.55%

307 - 18x + 18x +
  sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
@@ -24357,21 +25358,24 @@

teal coverage - 80.55%

33 - 5x + 5x +
  checkmate::assert_class(modules, "teal_modules")
34 - 5x + 5x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
35 - 5x + 5x +
  checkmate::assert_class(filter, "teal_slices")
@@ -24385,14 +25389,16 @@

teal coverage - 80.55%

37 - 5x + 5x +
  ns <- NS(id)
38 - 5x + 5x +
  is_module_specific <- isTRUE(attr(filter, "module_specific"))
@@ -24406,63 +25412,72 @@

teal coverage - 80.55%

40 - 5x + 5x +
  teal_ui <- ui_nested_tabs(ns("root"), modules = modules, datasets, is_module_specific = is_module_specific)
41 - 5x + 5x +
  filter_panel_btns <- tags$li(
42 - 5x + 5x +
    class = "flex-grow",
43 - 5x + 5x +
    tags$button(
44 - 5x + 5x +
      class = "btn action-button filter_hamburger", # see sidebar.css for style filter_hamburger
45 - 5x + 5x +
      href = "javascript:void(0)",
46 - 5x + 5x +
      onclick = "toggleFilterPanel();", # see sidebar.js
47 - 5x + 5x +
      title = "Toggle filter panel",
48 - 5x + 5x +
      icon("fas fa-bars")
@@ -24476,7 +25491,8 @@

teal coverage - 80.55%

50 - 5x + 5x +
    wunder_bar_ui(ns("wunder_bar"))
@@ -24490,7 +25506,8 @@

teal coverage - 80.55%

52 - 5x + 5x +
  teal_ui$children[[1]] <- tagAppendChild(teal_ui$children[[1]], filter_panel_btns)
@@ -24504,7 +25521,8 @@

teal coverage - 80.55%

54 - 5x + 5x +
  if (!is_module_specific) {
@@ -24518,63 +25536,72 @@

teal coverage - 80.55%

56 - 5x + 5x +
    tabset_bar <- teal_ui$children[[1]]
57 - 5x + 5x +
    teal_modules <- teal_ui$children[[2]]
58 - 5x + 5x +
    filter_ui <- unlist(datasets)[[1]]$ui_filter_panel(ns("filter_panel"))
59 - 5x + 5x +
    list(
60 - 5x + 5x +
      tabset_bar,
61 - 5x + 5x +
      tags$hr(class = "my-2"),
62 - 5x + 5x +
      fluidRow(
63 - 5x + 5x +
        column(width = 9, teal_modules, class = "teal_primary_col"),
64 - 5x + 5x +
        column(width = 3, filter_ui, class = "teal_secondary_col")
@@ -24672,28 +25699,32 @@

teal coverage - 80.55%

78 - 10x + 10x +
  checkmate::assert_class(modules, "teal_modules")
79 - 10x + 10x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
80 - 10x + 10x +
  checkmate::assert_class(reporter, "Reporter")
81 - 8x + 8x +
  checkmate::assert_class(filter, "teal_slices")
@@ -24707,14 +25738,16 @@

teal coverage - 80.55%

83 - 8x + 8x +
  moduleServer(id, function(input, output, session) {
84 - 8x + 8x +
    logger::log_trace("srv_tabs_with_filters initializing the module.")
@@ -24728,14 +25761,16 @@

teal coverage - 80.55%

86 - 8x + 8x +
    is_module_specific <- isTRUE(attr(filter, "module_specific"))
87 - 8x + 8x +
    wunder_bar_out <- wunder_bar_srv("wunder_bar", datasets, filter)
@@ -24749,42 +25784,48 @@

teal coverage - 80.55%

89 - 8x + 8x +
    active_module <- srv_nested_tabs(
90 - 8x + 8x +
      id = "root",
91 - 8x + 8x +
      datasets = datasets,
92 - 8x + 8x +
      modules = modules,
93 - 8x + 8x +
      reporter = reporter,
94 - 8x + 8x +
      is_module_specific = is_module_specific
@@ -24805,28 +25846,32 @@

teal coverage - 80.55%

97 - 8x + 8x +
    if (!is_module_specific) {
98 - 8x + 8x +
      active_datanames <- reactive({
99 - 11x + 11x +
        if (identical(active_module()$datanames, "all")) {
100 - 5x + 5x +
          singleton$datanames()
@@ -24840,21 +25885,24 @@

teal coverage - 80.55%

102 - 5x + 5x +
          include_parent_datanames(
103 - 5x + 5x +
            active_module()$datanames,
104 - 5x + 5x +
            singleton$get_join_keys()
@@ -24882,14 +25930,16 @@

teal coverage - 80.55%

108 - 8x + 8x +
      singleton <- unlist(datasets)[[1]]
109 - 8x + 8x +
      singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
@@ -24903,28 +25953,32 @@

teal coverage - 80.55%

111 - 8x + 8x +
      observeEvent(
112 - 8x + 8x +
        eventExpr = active_datanames(),
113 - 8x + 8x +
        handlerExpr = {
114 - 9x + 9x +
          script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
@@ -24959,7 +26013,8 @@

teal coverage - 80.55%

119 - 9x + 9x +
            "handleActiveDatasetsPresent();"
@@ -24973,7 +26028,8 @@

teal coverage - 80.55%

121 - 9x + 9x +
          shinyjs::runjs(script)
@@ -24987,7 +26043,8 @@

teal coverage - 80.55%

123 - 8x + 8x +
        ignoreNULL = FALSE
@@ -25015,14 +26072,16 @@

teal coverage - 80.55%

127 - 8x + 8x +
    showNotification("Data loaded - App fully started up")
128 - 8x + 8x +
    logger::log_trace("srv_tabs_with_filters initialized the module")
@@ -25036,7 +26095,8 @@

teal coverage - 80.55%

130 - 8x + 8x +
    active_module
@@ -25399,14 +26459,16 @@

teal coverage - 80.55%

49 - 11x + 11x +
  moduleServer(id, function(input, output, session) {
50 - 11x + 11x +
    logger::log_trace("filter_manager_srv initializing for: { paste(names(datasets), collapse = ', ')}.")
@@ -25420,7 +26482,8 @@

teal coverage - 80.55%

52 - 11x + 11x +
    is_module_specific <- isTRUE(attr(filter, "module_specific"))
@@ -25462,7 +26525,8 @@

teal coverage - 80.55%

58 - 11x + 11x +
    slices_global <- reactiveVal(filter)
@@ -25476,21 +26540,24 @@

teal coverage - 80.55%

60 - 11x + 11x +
    datasets_flat <-
61 - 11x + 11x +
      if (!is_module_specific) {
62 - 9x + 9x +
        flatten_datasets(unlist(datasets)[[1]])
@@ -25504,7 +26571,8 @@

teal coverage - 80.55%

64 - 2x + 2x +
        flatten_datasets(datasets)
@@ -25539,49 +26607,56 @@

teal coverage - 80.55%

69 - 11x + 11x +
    mapping_matrix <- reactive({
70 - 10x + 10x +
      state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
71 - 10x + 10x +
      mapping_smooth <- lapply(datasets_flat, function(x) {
72 - 12x + 12x +
        state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
73 - 12x + 12x +
        state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
74 - 12x + 12x +
        states_active <- state_ids_global %in% state_ids_local
75 - 12x + 12x +
        ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
@@ -25602,7 +26677,8 @@

teal coverage - 80.55%

78 - 10x + 10x +
      as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
@@ -25623,14 +26699,16 @@

teal coverage - 80.55%

81 - 11x + 11x +
    output$slices_table <- renderTable(
82 - 11x + 11x +
      expr = {
@@ -25644,21 +26722,24 @@

teal coverage - 80.55%

84 - 2x + 2x +
        mm <- mapping_matrix()
85 - 2x + 2x +
        mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
86 - 2x + 2x +
        mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
@@ -25679,21 +26760,24 @@

teal coverage - 80.55%

89 - 2x + 2x +
        if (nrow(mm) == 0L) {
90 - 2x + 2x +
          mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
91 - 2x + 2x +
          rownames(mm) <- ""
@@ -25721,7 +26805,8 @@

teal coverage - 80.55%

95 - 2x + 2x +
        mm[names(mm) != "Report previewer"]
@@ -25735,14 +26820,16 @@

teal coverage - 80.55%

97 - 11x + 11x +
      align = paste(c("l", rep("c", sum(names(datasets_flat) != "Report previewer"))), collapse = ""),
98 - 11x + 11x +
      rownames = TRUE
@@ -25770,35 +26857,40 @@

teal coverage - 80.55%

102 - 11x + 11x +
    modules_out <- lapply(names(datasets_flat), function(module_name) {
103 - 15x + 15x +
      filter_manager_module_srv(
104 - 15x + 15x +
        id = module_name,
105 - 15x + 15x +
        module_fd = datasets_flat[[module_name]],
106 - 15x + 15x +
        slices_global = slices_global
@@ -25826,35 +26918,40 @@

teal coverage - 80.55%

110 - 11x + 11x +
    list(
111 - 11x + 11x +
      slices_global = slices_global,
112 - 11x + 11x +
      mapping_matrix = mapping_matrix,
113 - 11x + 11x +
      datasets_flat = datasets_flat,
114 - 11x + 11x +
      modules_out = modules_out # returned for testing purpose
@@ -26050,7 +27147,8 @@

teal coverage - 80.55%

142 - 15x + 15x +
  moduleServer(id, function(input, output, session) {
@@ -26064,7 +27162,8 @@

teal coverage - 80.55%

144 - 15x + 15x +
    module_fd$set_available_teal_slices(reactive(slices_global()))
@@ -26085,7 +27184,8 @@

teal coverage - 80.55%

147 - 15x + 15x +
    slices_module <- reactive(module_fd$get_filter_state())
@@ -26106,14 +27206,16 @@

teal coverage - 80.55%

150 - 15x + 15x +
    previous_slices <- reactiveVal(isolate(slices_module()))
151 - 15x + 15x +
    slices_added <- reactiveVal(NULL)
@@ -26134,35 +27236,40 @@

teal coverage - 80.55%

154 - 15x + 15x +
    observeEvent(slices_module(), ignoreNULL = FALSE, {
155 - 11x + 11x +
      logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
156 - 11x + 11x +
      added <- setdiff_teal_slices(slices_module(), slices_global())
157 - 2x + 2x +
      if (length(added)) slices_added(added)
158 - 11x + 11x +
      previous_slices(slices_module())
@@ -26183,14 +27290,16 @@

teal coverage - 80.55%

161 - 15x + 15x +
    observeEvent(slices_added(), ignoreNULL = TRUE, {
162 - 2x + 2x +
      logger::log_trace("filter_manager_srv@2 added filter in module: { id }.")
@@ -26204,35 +27313,40 @@

teal coverage - 80.55%

164 - 2x + 2x +
      global_ids <- vapply(slices_global(), `[[`, character(1L), "id")
165 - 2x + 2x +
      lapply(
166 - 2x + 2x +
        slices_added(),
167 - 2x + 2x +
        function(slice) {
168 - 2x + 2x +
          if (slice$id %in% global_ids) {
@@ -26267,21 +27381,24 @@

teal coverage - 80.55%

173 - 2x + 2x +
      slices_global_new <- c(slices_global(), slices_added())
174 - 2x + 2x +
      slices_global(slices_global_new)
175 - 2x + 2x +
      slices_added(NULL)
@@ -26302,7 +27419,8 @@

teal coverage - 80.55%

178 - 15x + 15x +
    slices_module # returned for testing purpose
@@ -26435,14 +27553,16 @@

teal coverage - 80.55%

197 - 19x + 19x +
  if (inherits(x, "FilteredData")) {
198 - 15x + 15x +
    setNames(list(x), name)
@@ -26456,7 +27576,8 @@

teal coverage - 80.55%

200 - 4x + 4x +
    unlist(lapply(names(x), function(name) flatten_datasets(x[[name]], name)))
@@ -26840,7 +27961,8 @@

teal coverage - 80.55%

52 - 5x + 5x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
@@ -26854,7 +27976,8 @@

teal coverage - 80.55%

54 - 5x + 5x +
  checkmate::assert_multi_class(splash_ui, c("shiny.tag", "shiny.tag.list", "html"))
@@ -26868,7 +27991,8 @@

teal coverage - 80.55%

56 - 5x + 5x +
  if (is.character(title)) {
@@ -26889,7 +28013,8 @@

teal coverage - 80.55%

59 - 5x + 5x +
    validate_app_title_tag(title)
@@ -26910,28 +28035,32 @@

teal coverage - 80.55%

62 - 5x + 5x +
  checkmate::assert(
63 - 5x + 5x +
    .var.name = "header",
64 - 5x + 5x +
    checkmate::check_string(header),
65 - 5x + 5x +
    checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
@@ -26945,7 +28074,8 @@

teal coverage - 80.55%

67 - 5x + 5x +
  if (checkmate::test_string(header)) {
@@ -26973,28 +28103,32 @@

teal coverage - 80.55%

71 - 5x + 5x +
  checkmate::assert(
72 - 5x + 5x +
    .var.name = "footer",
73 - 5x + 5x +
    checkmate::check_string(footer),
74 - 5x + 5x +
    checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
@@ -27008,7 +28142,8 @@

teal coverage - 80.55%

76 - 5x + 5x +
  if (checkmate::test_string(footer)) {
@@ -27036,7 +28171,8 @@

teal coverage - 80.55%

80 - 5x + 5x +
  ns <- NS(id)
@@ -27057,7 +28193,8 @@

teal coverage - 80.55%

83 - 5x + 5x +
  splash_ui <- tags$div(
@@ -27071,7 +28208,8 @@

teal coverage - 80.55%

85 - 5x + 5x +
    id = ns("main_ui_container"),
@@ -27092,7 +28230,8 @@

teal coverage - 80.55%

88 - 5x + 5x +
    tags$div(splash_ui)
@@ -27127,35 +28266,40 @@

teal coverage - 80.55%

93 - 5x + 5x +
  shiny_busy_message_panel <- conditionalPanel(
94 - 5x + 5x +
    condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint: line_length.
95 - 5x + 5x +
    tags$div(
96 - 5x + 5x +
      icon("arrows-rotate", "spin fa-spin"),
97 - 5x + 5x +
      "Computing ...",
@@ -27169,7 +28313,8 @@

teal coverage - 80.55%

99 - 5x + 5x +
      class = "shinybusymessage"
@@ -27197,98 +28342,112 @@

teal coverage - 80.55%

103 - 5x + 5x +
  fluidPage(
104 - 5x + 5x +
    title = title,
105 - 5x + 5x +
    theme = get_teal_bs_theme(),
106 - 5x + 5x +
    include_teal_css_js(),
107 - 5x + 5x +
    tags$header(header),
108 - 5x + 5x +
    tags$hr(class = "my-2"),
109 - 5x + 5x +
    shiny_busy_message_panel,
110 - 5x + 5x +
    splash_ui,
111 - 5x + 5x +
    tags$hr(),
112 - 5x + 5x +
    tags$footer(
113 - 5x + 5x +
      tags$div(
114 - 5x + 5x +
        footer,
115 - 5x + 5x +
        teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
116 - 5x + 5x +
        textOutput(ns("identifier"))
@@ -27351,21 +28510,24 @@

teal coverage - 80.55%

125 - 24x + 24x +
  stopifnot(is.reactive(teal_data_rv))
126 - 23x + 23x +
  moduleServer(id, function(input, output, session) {
127 - 23x + 23x +
    logger::log_trace("srv_teal initializing the module.")
@@ -27379,14 +28541,16 @@

teal coverage - 80.55%

129 - 23x + 23x +
    output$identifier <- renderText(
130 - 23x + 23x +
      paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
@@ -27407,28 +28571,32 @@

teal coverage - 80.55%

133 - 23x + 23x +
    teal.widgets::verbatim_popup_srv(
134 - 23x + 23x +
      "sessionInfo",
135 - 23x + 23x +
      verbatim_content = utils::capture.output(utils::sessionInfo()),
136 - 23x + 23x +
      title = "SessionInfo"
@@ -27456,7 +28624,8 @@

teal coverage - 80.55%

140 - 23x + 23x +
    run_js_files(files = "init.js")
@@ -27491,49 +28660,56 @@

teal coverage - 80.55%

145 - 23x + 23x +
    get_client_timezone(session$ns)
146 - 23x + 23x +
    observeEvent(
147 - 23x + 23x +
      eventExpr = input$timezone,
148 - 23x + 23x +
      once = TRUE,
149 - 23x + 23x +
      handlerExpr = {
150 - 5x + 5x +
        session$userData$timezone <- input$timezone
151 - 5x + 5x +
        logger::log_trace("srv_teal@1 Timezone set to client's timezone: { input$timezone }.")
@@ -27561,14 +28737,16 @@

teal coverage - 80.55%

155 - 23x + 23x +
    reporter <- teal.reporter::Reporter$new()
156 - 23x + 23x +
    if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
@@ -27596,28 +28774,32 @@

teal coverage - 80.55%

160 - 23x + 23x +
    env <- environment()
161 - 23x + 23x +
    datasets_reactive <- eventReactive(teal_data_rv(), {
162 - 9x + 9x +
      env$progress <- shiny::Progress$new(session)
163 - 9x + 9x +
      env$progress$set(0.25, message = "Setting data")
@@ -27638,7 +28820,8 @@

teal coverage - 80.55%

166 - 9x + 9x +
      modules_datasets(teal_data_rv(), modules, filter, teal_data_to_filtered_data(teal_data_rv()))
@@ -27701,35 +28884,40 @@

teal coverage - 80.55%

175 - 23x + 23x +
    observeEvent(datasets_reactive(), once = TRUE, {
176 - 5x + 5x +
      logger::log_trace("srv_teal@5 setting main ui after data was pulled")
177 - 5x + 5x +
      on.exit(env$progress$close())
178 - 5x + 5x +
      env$progress$set(0.5, message = "Setting up main UI")
179 - 5x + 5x +
      datasets <- datasets_reactive()
@@ -27750,28 +28938,32 @@

teal coverage - 80.55%

182 - 5x + 5x +
      removeUI(sprintf("#%s > div:nth-child(1)", session$ns("main_ui_container")))
183 - 5x + 5x +
      insertUI(
184 - 5x + 5x +
        selector = paste0("#", session$ns("main_ui_container")),
185 - 5x + 5x +
        where = "beforeEnd",
@@ -27792,35 +28984,40 @@

teal coverage - 80.55%

188 - 5x + 5x +
        ui = tags$div(ui_tabs_with_filters(
189 - 5x + 5x +
          session$ns("main_ui"),
190 - 5x + 5x +
          modules = modules,
191 - 5x + 5x +
          datasets = datasets,
192 - 5x + 5x +
          filter = filter
@@ -27848,7 +29045,8 @@

teal coverage - 80.55%

196 - 5x + 5x +
        immediate = TRUE
@@ -27883,42 +29081,48 @@

teal coverage - 80.55%

201 - 5x + 5x +
      srv_tabs_with_filters(
202 - 5x + 5x +
        id = "main_ui",
203 - 5x + 5x +
        datasets = datasets,
204 - 5x + 5x +
        modules = modules,
205 - 5x + 5x +
        reporter = reporter,
206 - 5x + 5x +
        filter = filter
@@ -28120,56 +29324,64 @@

teal coverage - 80.55%

24 - 5x + 5x +
  ns <- NS(id)
25 - 5x + 5x +
  rev( # Reversing order because buttons show up in UI from right to left.
26 - 5x + 5x +
    tagList(
27 - 5x + 5x +
      tags$button(
28 - 5x + 5x +
        id = ns("show_filter_manager"),
29 - 5x + 5x +
        class = "btn action-button wunder_bar_button",
30 - 5x + 5x +
        title = "View filter mapping",
31 - 5x + 5x +
        suppressMessages(icon("solid fa-grip"))
@@ -28183,35 +29395,40 @@

teal coverage - 80.55%

33 - 5x + 5x +
      tags$button(
34 - 5x + 5x +
        id = ns("show_snapshot_manager"),
35 - 5x + 5x +
        class = "btn action-button wunder_bar_button",
36 - 5x + 5x +
        title = "Manage filter state snapshots",
37 - 5x + 5x +
        icon("camera")
@@ -28225,35 +29442,40 @@

teal coverage - 80.55%

39 - 5x + 5x +
      tags$button(
40 - 5x + 5x +
        id = ns("show_bookmark_manager"),
41 - 5x + 5x +
        class = "btn action-button wunder_bar_button",
42 - 5x + 5x +
        title = "Manage bookmarks",
43 - 5x + 5x +
        suppressMessages(icon("solid fa-bookmark"))
@@ -28316,14 +29538,16 @@

teal coverage - 80.55%

52 - 9x + 9x +
  moduleServer(id, function(input, output, session) {
53 - 9x + 9x +
    logger::log_trace("wunder_bar_srv initializing")
@@ -28337,7 +29561,8 @@

teal coverage - 80.55%

55 - 9x + 9x +
    ns <- session$ns
@@ -28351,7 +29576,8 @@

teal coverage - 80.55%

57 - 9x + 9x +
    observeEvent(input$show_filter_manager, {
@@ -28435,56 +29661,64 @@

teal coverage - 80.55%

69 - 9x + 9x +
    observeEvent(input$show_snapshot_manager, {
70 - 8x + 8x +
      logger::log_trace("wunder_bar_srv@1 show_snapshot_manager button has been clicked.")
71 - 8x + 8x +
      showModal(
72 - 8x + 8x +
        modalDialog(
73 - 8x + 8x +
          snapshot_manager_ui(ns("snapshot_manager")),
74 - 8x + 8x +
          size = "m",
75 - 8x + 8x +
          footer = NULL,
76 - 8x + 8x +
          easyClose = TRUE
@@ -28519,7 +29753,8 @@

teal coverage - 80.55%

81 - 9x + 9x +
    observeEvent(input$show_bookmark_manager, {
@@ -28603,28 +29838,32 @@

teal coverage - 80.55%

93 - 9x + 9x +
    filter_manager_results <- filter_manager_srv(
94 - 9x + 9x +
      id = "filter_manager",
95 - 9x + 9x +
      datasets = datasets,
96 - 9x + 9x +
      filter = filter
@@ -28638,35 +29877,40 @@

teal coverage - 80.55%

98 - 9x + 9x +
    snapshot_history <- snapshot_manager_srv(
99 - 9x + 9x +
      id = "snapshot_manager",
100 - 9x + 9x +
      slices_global = filter_manager_results$slices_global,
101 - 9x + 9x +
      mapping_matrix = filter_manager_results$mapping_matrix,
102 - 9x + 9x +
      datasets = filter_manager_results$datasets_flat
@@ -28680,42 +29924,48 @@

teal coverage - 80.55%

104 - 9x + 9x +
    bookmark_history <- bookmark_manager_srv(
105 - 9x + 9x +
      id = "bookmark_manager",
106 - 9x + 9x +
      slices_global = filter_manager_results$slices_global,
107 - 9x + 9x +
      mapping_matrix = filter_manager_results$mapping_matrix,
108 - 9x + 9x +
      datasets = filter_manager_results$datasets_flat,
109 - 9x + 9x +
      snapshot_history = snapshot_history
@@ -28938,14 +30188,16 @@

teal coverage - 80.55%

28 - 12x + 12x +
  checkmate::assert_class(tss, "teal_slices")
29 - 12x + 12x +
  checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
@@ -28959,7 +30211,8 @@

teal coverage - 80.55%

31 - 12x + 12x +
  cat(format(tss, trim_lines = FALSE), "\n", file = file)
@@ -29008,7 +30261,8 @@

teal coverage - 80.55%

38 - 12x + 12x +
  checkmate::assert_file_exists(file, access = "r", extension = "json")
@@ -29022,56 +30276,64 @@

teal coverage - 80.55%

40 - 12x + 12x +
  tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
41 - 12x + 12x +
  tss_json$slices <-
42 - 12x + 12x +
    lapply(tss_json$slices, function(slice) {
43 - 14x + 14x +
      for (field in c("selected", "choices")) {
44 - 28x + 28x +
        if (!is.null(slice[[field]])) {
45 - 14x + 14x +
          if (length(slice[[field]]) > 0) {
46 - 11x + 11x +
            date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
47 - 11x + 11x +
            time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
@@ -29085,35 +30347,40 @@

teal coverage - 80.55%

49 - 11x + 11x +
            slice[[field]] <-
50 - 11x + 11x +
              if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
51 - 3x + 3x +
                as.Date(slice[[field]])
52 - 11x + 11x +
              } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
53 - 3x + 3x +
                as.POSIXct(slice[[field]], tz = "UTC")
@@ -29127,7 +30394,8 @@

teal coverage - 80.55%

55 - 5x + 5x +
                slice[[field]]
@@ -29148,7 +30416,8 @@

teal coverage - 80.55%

58 - 3x + 3x +
            slice[[field]] <- character(0)
@@ -29176,7 +30445,8 @@

teal coverage - 80.55%

62 - 14x + 14x +
      slice
@@ -29197,7 +30467,8 @@

teal coverage - 80.55%

65 - 12x + 12x +
  tss_elements <- lapply(tss_json$slices, as.teal_slice)
@@ -29211,7 +30482,8 @@

teal coverage - 80.55%

67 - 12x + 12x +
  do.call(teal_slices, c(tss_elements, tss_json$attributes))
@@ -29427,28 +30699,32 @@

teal coverage - 80.55%

29 - 13x + 13x +
  teal_data_module(
30 - 13x + 13x +
    ui = function(id) {
31 - 1x + 1x +
      ns <- NS(id)
32 - 1x + 1x +
      object$ui(ns("mutate_inner"))
@@ -29462,21 +30738,24 @@

teal coverage - 80.55%

34 - 13x + 13x +
    server = function(id) {
35 - 11x + 11x +
      moduleServer(id, function(input, output, session) {
36 - 11x + 11x +
        teal_data_rv <- object$server("mutate_inner")
@@ -29490,14 +30769,16 @@

teal coverage - 80.55%

38 - 11x + 11x +
        if (!is.reactive(teal_data_rv)) {
39 - 1x + 1x +
          stop("The `teal_data_module` must return a reactive expression.", call. = FALSE)
@@ -29518,7 +30799,8 @@

teal coverage - 80.55%

42 - 10x + 10x +
        td <- eventReactive(teal_data_rv(),
@@ -29532,14 +30814,16 @@

teal coverage - 80.55%

44 - 10x + 10x +
            if (inherits(teal_data_rv(), c("teal_data", "qenv.error"))) {
45 - 6x + 6x +
              eval_code(teal_data_rv(), code)
@@ -29553,7 +30837,8 @@

teal coverage - 80.55%

47 - 4x + 4x +
              teal_data_rv()
@@ -29574,7 +30859,8 @@

teal coverage - 80.55%

50 - 10x + 10x +
          ignoreNULL = FALSE
@@ -29588,7 +30874,8 @@

teal coverage - 80.55%

52 - 10x + 10x +
        td
@@ -29637,7 +30924,8 @@

teal coverage - 80.55%

59 - 1x + 1x +
  eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
@@ -29665,7 +30953,8 @@

teal coverage - 80.55%

63 - 6x + 6x +
  eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
@@ -30000,56 +31289,64 @@

teal coverage - 80.55%

46 - 17x + 17x +
  checkmate::assert_string(msg, null.ok = TRUE)
47 - 15x + 15x +
  checkmate::assert_data_frame(x)
48 - 15x + 15x +
  if (!is.null(min_nrow)) {
49 - 15x + 15x +
    if (complete) {
50 - 5x + 5x +
      complete_index <- stats::complete.cases(x)
51 - 5x + 5x +
      validate(need(
52 - 5x + 5x +
        sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
53 - 5x + 5x +
        paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
@@ -30070,35 +31367,40 @@

teal coverage - 80.55%

56 - 10x + 10x +
      validate(need(
57 - 10x + 10x +
        nrow(x) >= min_nrow,
58 - 10x + 10x +
        paste(
59 - 10x + 10x +
          c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
60 - 10x + 10x +
          collapse = "\n"
@@ -30133,28 +31435,32 @@

teal coverage - 80.55%

65 - 10x + 10x +
    if (!allow_inf) {
66 - 6x + 6x +
      validate(need(
67 - 6x + 6x +
        all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
68 - 6x + 6x +
        "Dataframe contains Inf values which is not allowed."
@@ -32498,21 +33804,24 @@

teal coverage - 80.55%

23 - 4x + 4x +
  checkmate::assert_string(label)
24 - 2x + 2x +
  checkmate::assert_list(server_args, names = "named")
25 - 2x + 2x +
  checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
@@ -32526,7 +33835,8 @@

teal coverage - 80.55%

27 - 2x + 2x +
  message("Initializing reporter_previewer_module")
@@ -32540,7 +33850,8 @@

teal coverage - 80.55%

29 - 2x + 2x +
  srv <- function(id, reporter, ...) {
@@ -32568,7 +33879,8 @@

teal coverage - 80.55%

33 - 2x + 2x +
  ui <- function(id, ...) {
@@ -32596,28 +33908,32 @@

teal coverage - 80.55%

37 - 2x + 2x +
  module <- module(
38 - 2x + 2x +
    label = "temporary label",
39 - 2x + 2x +
    server = srv, ui = ui,
40 - 2x + 2x +
    server_args = server_args, ui_args = list(), datanames = NULL
@@ -32645,21 +33961,24 @@

teal coverage - 80.55%

44 - 2x + 2x +
  class(module) <- c("teal_module_previewer", class(module))
45 - 2x + 2x +
  module$label <- label
46 - 2x + 2x +
  module
@@ -33428,14 +34747,16 @@

teal coverage - 80.55%

108 - 36x + 36x +
  dots <- list(...)
109 - 2x + 2x +
  if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
@@ -33449,21 +34770,24 @@

teal coverage - 80.55%

111 - 34x + 34x +
  messages <- extract_validator(dots, header)
112 - 34x + 34x +
  failings <- if (!any_names(dots)) {
113 - 29x + 29x +
    add_header(messages, header)
@@ -33477,7 +34801,8 @@

teal coverage - 80.55%

115 - 5x + 5x +
    unlist(messages)
@@ -33498,7 +34823,8 @@

teal coverage - 80.55%

118 - 34x + 34x +
  shiny::validate(shiny::need(is.null(failings), failings))
@@ -33568,7 +34894,8 @@

teal coverage - 80.55%

128 - 118x + 118x +
  all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
@@ -33631,7 +34958,8 @@

teal coverage - 80.55%

137 - 49x + 49x +
  x$.__enclos_env__$private$enabled
@@ -33687,14 +35015,16 @@

teal coverage - 80.55%

145 - 113x + 113x +
  if (inherits(iv, "InputValidator")) {
146 - 49x + 49x +
    add_header(gather_messages(iv), header)
@@ -33708,14 +35038,16 @@

teal coverage - 80.55%

148 - 58x + 58x +
    if (is.null(names(iv))) names(iv) <- rep("", length(iv))
149 - 64x + 64x +
    mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
@@ -33778,28 +35110,32 @@

teal coverage - 80.55%

158 - 49x + 49x +
  if (validator_enabled(iv)) {
159 - 46x + 46x +
    status <- iv$validate()
160 - 46x + 46x +
    failing_inputs <- Filter(Negate(is.null), status)
161 - 46x + 46x +
    unique(lapply(failing_inputs, function(x) x[["message"]]))
@@ -33813,14 +35149,16 @@

teal coverage - 80.55%

163 - 3x + 3x +
    warning("Validator is disabled and will be omitted.")
164 - 3x + 3x +
    list()
@@ -33876,21 +35214,24 @@

teal coverage - 80.55%

172 - 78x + 78x +
  ans <- unlist(messages)
173 - 78x + 78x +
  if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
174 - 31x + 31x +
    ans <- c(paste0(header, "\n"), ans, "\n")
@@ -33904,7 +35245,8 @@

teal coverage - 80.55%

176 - 78x + 78x +
  ans
@@ -33953,21 +35295,24 @@

teal coverage - 80.55%

183 - 103x + 103x +
  any(
184 - 103x + 103x +
    if (is.list(x)) {
185 - 58x + 58x +
      if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
@@ -33981,7 +35326,8 @@

teal coverage - 80.55%

187 - 40x + 40x +
      FALSE
@@ -34127,70 +35473,80 @@

teal coverage - 80.55%

17 - 58x + 58x +
  checkmate::assert_string(label)
18 - 58x + 58x +
  module(
19 - 58x + 58x +
    label,
20 - 58x + 58x +
    server = function(id, data) {
21 - 5x + 5x +
      checkmate::assert_class(data(), "teal_data")
22 - 5x + 5x +
      moduleServer(id, function(input, output, session) {
23 - 5x + 5x +
        updateSelectInput(
24 - 5x + 5x +
          inputId = "dataname",
25 - 5x + 5x +
          choices = isolate(teal.data::datanames(data())),
26 - 5x + 5x +
          selected = restoreInput(session$ns("dataname"), NULL)
@@ -34204,21 +35560,24 @@

teal coverage - 80.55%

28 - 5x + 5x +
        output$text <- renderPrint({
29 - 16x + 16x +
          req(input$dataname)
30 - 11x + 11x +
          data()[[input$dataname]]
@@ -34232,28 +35591,32 @@

teal coverage - 80.55%

32 - 5x + 5x +
        teal.widgets::verbatim_popup_srv(
33 - 5x + 5x +
          id = "rcode",
34 - 5x + 5x +
          verbatim_content = reactive(teal.code::get_code(data())),
35 - 5x + 5x +
          title = "Example Code"
@@ -34281,49 +35644,56 @@

teal coverage - 80.55%

39 - 58x + 58x +
    ui = function(id) {
40 - 5x + 5x +
      ns <- NS(id)
41 - 5x + 5x +
      teal.widgets::standard_layout(
42 - 5x + 5x +
        output = verbatimTextOutput(ns("text")),
43 - 5x + 5x +
        encoding = tags$div(
44 - 5x + 5x +
          selectInput(ns("dataname"), "Choose a dataset", choices = NULL),
45 - 5x + 5x +
          teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
@@ -34351,7 +35721,8 @@

teal coverage - 80.55%

49 - 58x + 58x +
    datanames = datanames
@@ -34567,14 +35938,16 @@

teal coverage - 80.55%

28 - 6x + 6x +
  expr <- substitute(expr)
29 - 6x + 6x +
  extras <- list(...)
@@ -34595,14 +35968,16 @@

teal coverage - 80.55%

32 - 6x + 6x +
  if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
33 - 6x + 6x +
    expr <- call("{", expr)
@@ -34623,7 +35998,8 @@

teal coverage - 80.55%

36 - 6x + 6x +
  calls <- as.list(expr)[-1]
@@ -34644,7 +36020,8 @@

teal coverage - 80.55%

39 - 6x + 6x +
  calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
@@ -34658,7 +36035,8 @@

teal coverage - 80.55%

41 - 6x + 6x +
  eval_code(object = data, code = as.expression(calls))
@@ -35692,35 +37070,40 @@

teal coverage - 80.55%

57 - 36x + 36x +
  checkmate::assert_function(ui, args = "id", nargs = 1)
58 - 35x + 35x +
  checkmate::assert_function(server, args = "id", nargs = 1)
59 - 34x + 34x +
  structure(
60 - 34x + 34x +
    list(ui = ui, server = server),
61 - 34x + 34x +
    class = "teal_data_module"
diff --git a/all_datanames_to_transform@669_insertUI@main/coverage-report/index.html b/all_datanames_to_transform@669_insertUI@main/coverage-report/index.html index aa2036955b..534b9ef8f8 100644 --- a/all_datanames_to_transform@669_insertUI@main/coverage-report/index.html +++ b/all_datanames_to_transform@669_insertUI@main/coverage-report/index.html @@ -1,23 +1,22 @@ - - + - + - + - - + + - + - + - - - + + + @@ -5758,35 +5757,40 @@

teal coverage - 56.74%

68 - 65x + 65x +
  checkmate::assert_string(id)
69 - 65x + 65x +
  checkmate::assert_class(slices_global, ".slicesGlobal")
70 - 65x + 65x +
  moduleServer(id, function(input, output, session) {
71 - 65x + 65x +
    setBookmarkExclude(c("show_filter_manager"))
72 - 65x + 65x +
    observeEvent(input$show_filter_manager, {
@@ -5870,7 +5874,8 @@

teal coverage - 56.74%

84 - 65x + 65x +
    srv_filter_manager("filter_manager", slices_global = slices_global)
@@ -5982,14 +5987,16 @@

teal coverage - 56.74%

100 - 65x + 65x +
  checkmate::assert_string(id)
101 - 65x + 65x +
  checkmate::assert_class(slices_global, ".slicesGlobal")
@@ -6003,14 +6010,16 @@

teal coverage - 56.74%

103 - 65x + 65x +
  moduleServer(id, function(input, output, session) {
104 - 65x + 65x +
    logger::log_debug("filter_manager_srv initializing.")
@@ -6031,7 +6040,8 @@

teal coverage - 56.74%

107 - 65x + 65x +
    session$onBookmark(function(state) {
@@ -6087,14 +6097,16 @@

teal coverage - 56.74%

115 - 65x + 65x +
    bookmarked_slices <- restoreValue(session$ns("filter_state_on_bookmark"), NULL)
116 - 65x + 65x +
    if (!is.null(bookmarked_slices)) {
@@ -6129,7 +6141,8 @@

teal coverage - 56.74%

121 - 65x + 65x +
    mapping_table <- reactive({
@@ -6150,21 +6163,24 @@

teal coverage - 56.74%

124 - 75x + 75x +
      module_labels <- setdiff(
125 - 75x + 75x +
        names(attr(slices_global$all_slices(), "mapping")),
126 - 75x + 75x +
        "Report previewer"
@@ -6178,84 +6194,96 @@

teal coverage - 56.74%

128 - 75x + 75x +
      isolate({
129 - 75x + 75x +
        mm <- as.data.frame(
130 - 75x + 75x +
          sapply(
131 - 75x + 75x +
            module_labels,
132 - 75x + 75x +
            simplify = FALSE,
133 - 75x + 75x +
            function(module_label) {
134 - 88x + 88x +
              available_slices <- slices_global$module_slices_api[[module_label]]$get_available_teal_slices()
135 - 81x + 81x +
              global_ids <- sapply(slices_global$all_slices(), `[[`, "id", simplify = FALSE)
136 - 81x + 81x +
              module_ids <- sapply(slices_global$slices_get(module_label), `[[`, "id", simplify = FALSE)
137 - 81x + 81x +
              allowed_ids <- vapply(available_slices, `[[`, character(1L), "id")
138 - 81x + 81x +
              active_ids <- global_ids %in% module_ids
139 - 81x + 81x +
              setNames(nm = global_ids, ifelse(global_ids %in% allowed_ids, active_ids, NA))
@@ -6276,7 +6304,8 @@

teal coverage - 56.74%

142 - 75x + 75x +
          check.names = FALSE
@@ -6290,7 +6319,8 @@

teal coverage - 56.74%

144 - 68x + 68x +
        colnames(mm)[colnames(mm) == "global_filters"] <- "Global filters"
@@ -6304,7 +6334,8 @@

teal coverage - 56.74%

146 - 68x + 68x +
        mm
@@ -6332,28 +6363,32 @@

teal coverage - 56.74%

150 - 65x + 65x +
    output$slices_table <- renderTable(
151 - 65x + 65x +
      expr = {
152 - 75x + 75x +
        logger::log_debug("filter_manager_srv@1 rendering slices_table.")
153 - 75x + 75x +
        mm <- mapping_table()
@@ -6374,14 +6409,16 @@

teal coverage - 56.74%

156 - 68x + 68x +
        mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
157 - 68x + 68x +
        mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
@@ -6402,21 +6439,24 @@

teal coverage - 56.74%

160 - 68x + 68x +
        if (nrow(mm) == 0L) {
161 - 43x + 43x +
          mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
162 - 43x + 43x +
          rownames(mm) <- ""
@@ -6430,7 +6470,8 @@

teal coverage - 56.74%

164 - 68x + 68x +
        mm
@@ -6444,7 +6485,8 @@

teal coverage - 56.74%

166 - 65x + 65x +
      rownames = TRUE
@@ -6465,7 +6507,8 @@

teal coverage - 56.74%

169 - 65x + 65x +
    mapping_table # for testing purpose
@@ -6507,21 +6550,24 @@

teal coverage - 56.74%

175 - 91x + 91x +
  checkmate::assert_string(id)
176 - 91x + 91x +
  checkmate::assert_class(module_fd, "reactive")
177 - 91x + 91x +
  checkmate::assert_class(slices_global, ".slicesGlobal")
@@ -6535,14 +6581,16 @@

teal coverage - 56.74%

179 - 91x + 91x +
  moduleServer(id, function(input, output, session) {
180 - 91x + 91x +
    logger::log_debug("srv_module_filter_manager initializing for module: { id }.")
@@ -6556,14 +6604,16 @@

teal coverage - 56.74%

182 - 91x + 91x +
    slices_global_module <- reactive({
183 - 165x + 165x +
      slices_global$slices_get(module_label = id)
@@ -6577,7 +6627,8 @@

teal coverage - 56.74%

185 - 91x + 91x +
    slices_module <- reactive(req(module_fd())$get_filter_state())
@@ -6591,7 +6642,8 @@

teal coverage - 56.74%

187 - 91x + 91x +
    module_fd_previous <- reactiveVal(NULL)
@@ -6612,14 +6664,16 @@

teal coverage - 56.74%

190 - 91x + 91x +
    obs1 <- observeEvent(module_fd(), priority = 1, {
191 - 73x + 73x +
      logger::log_debug("srv_module_filter_manager@1 setting initial slices for module: { id }.")
@@ -6633,7 +6687,8 @@

teal coverage - 56.74%

193 - 73x + 73x +
      slices <- slices_global_module()
@@ -6654,14 +6709,16 @@

teal coverage - 56.74%

196 - 3x + 3x +
      if (!is.null(module_fd_previous())) module_fd_previous()$finalize()
197 - 73x + 73x +
      module_fd_previous(module_fd())
@@ -6703,7 +6760,8 @@

teal coverage - 56.74%

203 - 73x + 73x +
      module_fd()$set_filter_state(slices)
@@ -6731,7 +6789,8 @@

teal coverage - 56.74%

207 - 73x + 73x +
      module_fd()$set_available_teal_slices(slices_global$all_slices)
@@ -6752,42 +6811,48 @@

teal coverage - 56.74%

210 - 73x + 73x +
      slices_global$module_slices_api_set(
211 - 73x + 73x +
        id,
212 - 73x + 73x +
        list(
213 - 73x + 73x +
          get_available_teal_slices = module_fd()$get_available_teal_slices(),
214 - 73x + 73x +
          set_filter_state = module_fd()$set_filter_state, # for testing purpose
215 - 73x + 73x +
          get_filter_state = module_fd()$get_filter_state # for testing purpose
@@ -6829,35 +6894,40 @@

teal coverage - 56.74%

221 - 91x + 91x +
    obs2 <- observeEvent(slices_module(), priority = 0, {
222 - 97x + 97x +
      this_slices <- slices_module()
223 - 97x + 97x +
      slices_global$slices_append(this_slices) # append new slices to the all_slices list
224 - 97x + 97x +
      mapping_elem <- setNames(nm = id, list(vapply(this_slices, `[[`, character(1L), "id")))
225 - 97x + 97x +
      slices_global$slices_active(mapping_elem)
@@ -6878,28 +6948,32 @@

teal coverage - 56.74%

228 - 91x + 91x +
    obs3 <- observeEvent(slices_global_module(), {
229 - 114x + 114x +
      global_vs_module <- setdiff_teal_slices(slices_global_module(), slices_module())
230 - 114x + 114x +
      module_vs_global <- setdiff_teal_slices(slices_module(), slices_global_module())
231 - 106x + 106x +
      if (length(global_vs_module) || length(module_vs_global)) {
@@ -6934,21 +7008,24 @@

teal coverage - 56.74%

236 - 13x + 13x +
        logger::log_debug("srv_module_filter_manager@3 (N.B.) global state has changed for a module:{ id }.")
237 - 13x + 13x +
        module_fd()$clear_filter_states()
238 - 13x + 13x +
        module_fd()$set_filter_state(slices_global_module())
@@ -6976,7 +7053,8 @@

teal coverage - 56.74%

242 - 91x + 91x +
    slices_module # returned for testing purpose
@@ -7095,14 +7173,16 @@

teal coverage - 56.74%

259 - 66x + 66x +
      shiny::isolate({
260 - 66x + 66x +
        checkmate::assert_class(slices, "teal_slices")
@@ -7116,28 +7196,32 @@

teal coverage - 56.74%

262 - 66x + 66x +
        if (isTRUE(attr(slices, "module_specific"))) {
263 - 9x + 9x +
          old_mapping <- attr(slices, "mapping")
264 - 9x + 9x +
          new_mapping <- sapply(module_labels, simplify = FALSE, function(module_label) {
265 - 18x + 18x +
            unique(unlist(old_mapping[c(module_label, "global_filters")]))
@@ -7151,7 +7235,8 @@

teal coverage - 56.74%

267 - 9x + 9x +
          attr(slices, "mapping") <- new_mapping
@@ -7165,35 +7250,40 @@

teal coverage - 56.74%

269 - 66x + 66x +
        .self$all_slices <<- shiny::reactiveVal(slices)
270 - 66x + 66x +
        .self$module_slices_api <<- shiny::reactiveValues()
271 - 66x + 66x +
        .self$slices_append(slices)
272 - 66x + 66x +
        .self$slices_active(attr(slices, "mapping"))
273 - 66x + 66x +
        invisible(.self)
@@ -7221,7 +7311,8 @@

teal coverage - 56.74%

277 - 239x + 239x +
      isTRUE(attr(.self$all_slices(), "module_specific"))
@@ -7242,21 +7333,24 @@

teal coverage - 56.74%

280 - 73x + 73x +
      shiny::isolate({
281 - 73x + 73x +
        if (!.self$is_module_specific()) {
282 - 59x + 59x +
          module_label <- "global_filters"
@@ -7270,14 +7364,16 @@

teal coverage - 56.74%

284 - 73x + 73x +
        if (!identical(.self$module_slices_api[[module_label]], functions_list)) {
285 - 73x + 73x +
          .self$module_slices_api[[module_label]] <- functions_list
@@ -7291,7 +7387,8 @@

teal coverage - 56.74%

287 - 73x + 73x +
        invisible(.self)
@@ -7501,21 +7598,24 @@

teal coverage - 56.74%

317 - 166x + 166x +
      shiny::isolate({
318 - 166x + 166x +
        if (.self$is_module_specific()) {
319 - 32x + 32x +
          new_mapping <- modifyList(attr(.self$all_slices(), "mapping"), mapping_elem)
@@ -7529,7 +7629,8 @@

teal coverage - 56.74%

321 - 134x + 134x +
          new_mapping <- setNames(nm = "global_filters", list(unique(unlist(mapping_elem))))
@@ -7550,42 +7651,48 @@

teal coverage - 56.74%

324 - 166x + 166x +
        if (!identical(new_mapping, attr(.self$all_slices(), "mapping"))) {
325 - 108x + 108x +
          mapping_modules <- toString(names(new_mapping))
326 - 108x + 108x +
          logger::log_debug(".slicesGlobal@slices_active: changing mapping for module(s): { mapping_modules }.")
327 - 108x + 108x +
          new_slices <- .self$all_slices()
328 - 108x + 108x +
          attr(new_slices, "mapping") <- new_mapping
329 - 108x + 108x +
          .self$all_slices(new_slices)
@@ -7606,7 +7713,8 @@

teal coverage - 56.74%

332 - 166x + 166x +
        invisible(.self)
@@ -7648,14 +7756,16 @@

teal coverage - 56.74%

338 - 166x + 166x +
      shiny::isolate({
339 - 166x + 166x +
        if (!is.teal_slices(slices)) {
@@ -7690,49 +7800,56 @@

teal coverage - 56.74%

344 - 166x + 166x +
        new_slices <- setdiff_teal_slices(slices, .self$all_slices())
345 - 166x + 166x +
        old_mapping <- attr(.self$all_slices(), "mapping")
346 - 166x + 166x +
        if (length(new_slices)) {
347 - 6x + 6x +
          new_ids <- vapply(new_slices, `[[`, character(1L), "id")
348 - 6x + 6x +
          logger::log_debug(".slicesGlobal@slices_append: appending new slice(s): { new_ids }.")
349 - 6x + 6x +
          slices_ids <- vapply(.self$all_slices(), `[[`, character(1L), "id")
350 - 6x + 6x +
          lapply(new_slices, function(slice) {
@@ -7746,14 +7863,16 @@

teal coverage - 56.74%

352 - 6x + 6x +
            if (slice$id %in% slices_ids) {
353 - 1x + 1x +
              slice$id <- utils::tail(make.unique(c(slices_ids, slice$id), sep = "_"), 1)
@@ -7781,21 +7900,24 @@

teal coverage - 56.74%

357 - 6x + 6x +
          new_slices_all <- c(.self$all_slices(), new_slices)
358 - 6x + 6x +
          attr(new_slices_all, "mapping") <- old_mapping
359 - 6x + 6x +
          .self$all_slices(new_slices_all)
@@ -7816,7 +7938,8 @@

teal coverage - 56.74%

362 - 166x + 166x +
        invisible(.self)
@@ -7844,7 +7967,8 @@

teal coverage - 56.74%

366 - 246x + 246x +
      if (missing(module_label)) {
@@ -7865,28 +7989,32 @@

teal coverage - 56.74%

369 - 246x + 246x +
        module_ids <- unlist(attr(.self$all_slices(), "mapping")[c(module_label, "global_filters")])
370 - 246x + 246x +
        Filter(
371 - 246x + 246x +
          function(slice) slice$id %in% module_ids,
372 - 246x + 246x +
          .self$all_slices()
@@ -7921,14 +8049,16 @@

teal coverage - 56.74%

377 - 7x + 7x +
      shiny::isolate({
378 - 7x + 7x +
        if (!is.teal_slices(slices)) {
@@ -7949,14 +8079,16 @@

teal coverage - 56.74%

381 - 7x + 7x +
        .self$all_slices(slices)
382 - 7x + 7x +
        invisible(.self)
@@ -9089,28 +9221,32 @@

teal coverage - 56.74%

152 - 68x + 68x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
153 - 68x + 68x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module", "reactive", "reactiveVal"))
154 - 67x + 67x +
  checkmate::assert_class(modules, "teal_modules")
155 - 67x + 67x +
  checkmate::assert_class(filter, "teal_slices")
@@ -9124,14 +9260,16 @@

teal coverage - 56.74%

157 - 67x + 67x +
  moduleServer(id, function(input, output, session) {
158 - 67x + 67x +
    logger::log_debug("srv_teal initializing.")
@@ -9145,14 +9283,16 @@

teal coverage - 56.74%

160 - 67x + 67x +
    output$identifier <- renderText(
161 - 67x + 67x +
      paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
@@ -9173,28 +9313,32 @@

teal coverage - 56.74%

164 - 67x + 67x +
    teal.widgets::verbatim_popup_srv(
165 - 67x + 67x +
      "sessionInfo",
166 - 67x + 67x +
      verbatim_content = utils::capture.output(utils::sessionInfo()),
167 - 67x + 67x +
      title = "SessionInfo"
@@ -9215,7 +9359,8 @@

teal coverage - 56.74%

170 - 67x + 67x +
    output$lockFile <- teal_lockfile_downloadhandler()
@@ -9236,7 +9381,8 @@

teal coverage - 56.74%

173 - 67x + 67x +
    run_js_files(files = "init.js")
@@ -9271,35 +9417,40 @@

teal coverage - 56.74%

178 - 67x + 67x +
    get_client_timezone(session$ns)
179 - 67x + 67x +
    observeEvent(
180 - 67x + 67x +
      eventExpr = input$timezone,
181 - 67x + 67x +
      once = TRUE,
182 - 67x + 67x +
      handlerExpr = {
@@ -9341,28 +9492,32 @@

teal coverage - 56.74%

188 - 67x + 67x +
    data_rv <- srv_init_data("data", data = data, modules = modules, filter = filter)
189 - 66x + 66x +
    datasets_rv <- if (!isTRUE(attr(filter, "module_specific"))) {
190 - 57x + 57x +
      eventReactive(data_rv(), {
191 - 48x + 48x +
        if (!inherits(data_rv(), "teal_data")) {
@@ -9383,14 +9538,16 @@

teal coverage - 56.74%

194 - 48x + 48x +
        logger::log_debug("srv_teal@1 initializing FilteredData")
195 - 48x + 48x +
        teal_data_to_filtered_data(data_rv())
@@ -9418,56 +9575,64 @@

teal coverage - 56.74%

199 - 66x + 66x +
    module_labels <- unlist(module_labels(modules), use.names = FALSE)
200 - 66x + 66x +
    slices_global <- methods::new(".slicesGlobal", filter, module_labels)
201 - 66x + 66x +
    modules_output <- srv_teal_module(
202 - 66x + 66x +
      id = "teal_modules",
203 - 66x + 66x +
      data_rv = data_rv,
204 - 66x + 66x +
      datasets = datasets_rv,
205 - 66x + 66x +
      modules = modules,
206 - 66x + 66x +
      slices_global = slices_global
@@ -9481,21 +9646,24 @@

teal coverage - 56.74%

208 - 65x + 65x +
    mapping_table <- srv_filter_manager_panel("filter_manager_panel", slices_global = slices_global)
209 - 65x + 65x +
    snapshots <- srv_snapshot_manager_panel("snapshot_manager_panel", slices_global = slices_global)
210 - 65x + 65x +
    srv_bookmark_panel("bookmark_manager", modules)
@@ -9509,14 +9677,16 @@

teal coverage - 56.74%

212 - 65x + 65x +
    if (inherits(data, "teal_data_module")) {
213 - 8x + 8x +
      setBookmarkExclude(c("teal_modules-active_tab"))
@@ -9544,7 +9714,8 @@

teal coverage - 56.74%

217 - 65x + 65x +
  invisible(NULL)
@@ -10096,35 +10267,40 @@

teal coverage - 56.74%

77 - 139x + 139x +
  shiny::isolate({
78 - 139x + 139x +
    checkmate::assert_flag(allow_add)
79 - 139x + 139x +
    checkmate::assert_flag(module_specific)
80 - 48x + 48x +
    if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
81 - 136x + 136x +
    checkmate::assert_string(app_id, null.ok = TRUE)
@@ -10138,14 +10314,16 @@

teal coverage - 56.74%

83 - 136x + 136x +
    slices <- list(...)
84 - 136x + 136x +
    all_slice_id <- vapply(slices, `[[`, character(1L), "id")
@@ -10159,21 +10337,24 @@

teal coverage - 56.74%

86 - 136x + 136x +
    if (missing(mapping)) {
87 - 91x + 91x +
      mapping <- if (length(all_slice_id)) {
88 - 27x + 27x +
        list(global_filters = all_slice_id)
@@ -10187,7 +10368,8 @@

teal coverage - 56.74%

90 - 64x + 64x +
        list()
@@ -10215,14 +10397,16 @@

teal coverage - 56.74%

94 - 136x + 136x +
    if (!module_specific) {
95 - 119x + 119x +
      mapping[setdiff(names(mapping), "global_filters")] <- NULL
@@ -10243,42 +10427,48 @@

teal coverage - 56.74%

98 - 136x + 136x +
    failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
99 - 136x + 136x +
    if (length(failed_slice_id)) {
100 - 1x + 1x +
      stop(sprintf(
101 - 1x + 1x +
        "Filters in mapping don't match any available filter.\n %s not in %s",
102 - 1x + 1x +
        toString(failed_slice_id),
103 - 1x + 1x +
        toString(all_slice_id)
@@ -10306,7 +10496,8 @@

teal coverage - 56.74%

107 - 135x + 135x +
    tss <- teal.slice::teal_slices(
@@ -10320,28 +10511,32 @@

teal coverage - 56.74%

109 - 135x + 135x +
      exclude_varnames = exclude_varnames,
110 - 135x + 135x +
      include_varnames = include_varnames,
111 - 135x + 135x +
      count_type = count_type,
112 - 135x + 135x +
      allow_add = allow_add
@@ -10355,35 +10550,40 @@

teal coverage - 56.74%

114 - 135x + 135x +
    attr(tss, "mapping") <- mapping
115 - 135x + 135x +
    attr(tss, "module_specific") <- module_specific
116 - 135x + 135x +
    attr(tss, "app_id") <- app_id
117 - 135x + 135x +
    class(tss) <- c("modules_teal_slices", class(tss))
118 - 135x + 135x +
    tss
@@ -10453,14 +10653,16 @@

teal coverage - 56.74%

128 - 10x + 10x +
  checkmate::assert_list(x)
129 - 10x + 10x +
  lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
@@ -10474,21 +10676,24 @@

teal coverage - 56.74%

131 - 10x + 10x +
  attrs <- attributes(unclass(x))
132 - 10x + 10x +
  ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
133 - 10x + 10x +
  do.call(teal_slices, c(ans, attrs))
@@ -10551,14 +10756,16 @@

teal coverage - 56.74%

142 - 6x + 6x +
  x <- list(...)
143 - 6x + 6x +
  checkmate::assert_true(all(vapply(x, is.teal_slices, logical(1L))), .var.name = "all arguments are teal_slices")
@@ -10572,21 +10779,24 @@

teal coverage - 56.74%

145 - 6x + 6x +
  all_attributes <- lapply(x, attributes)
146 - 6x + 6x +
  all_attributes <- coalesce_r(all_attributes)
147 - 6x + 6x +
  all_attributes <- all_attributes[names(all_attributes) != "class"]
@@ -10600,35 +10810,40 @@

teal coverage - 56.74%

149 - 6x + 6x +
  do.call(
150 - 6x + 6x +
    teal_slices,
151 - 6x + 6x +
    c(
152 - 6x + 6x +
      unique(unlist(x, recursive = FALSE)),
153 - 6x + 6x +
      all_attributes
@@ -10740,28 +10955,32 @@

teal coverage - 56.74%

169 - 1x + 1x +
  checkmate::assert_class(filter, "teal_slices")
170 - 1x + 1x +
  shiny::isolate({
171 - 1x + 1x +
    filter_copy <- lapply(filter, function(slice) {
172 - 2x + 2x +
      teal.slice::as.teal_slice(as.list(slice))
@@ -10775,14 +10994,16 @@

teal coverage - 56.74%

174 - 1x + 1x +
    attributes(filter_copy) <- attributes(filter)
175 - 1x + 1x +
    filter_copy
@@ -11775,42 +11996,48 @@

teal coverage - 56.74%

139 - 192x + 192x +
  checkmate::assert_string(label)
140 - 189x + 189x +
  if (label == "global_filters") {
141 - 1x + 1x +
    stop(
142 - 1x + 1x +
      sprintf("module(label = \"%s\", ...\n  ", label),
143 - 1x + 1x +
      "Label 'global_filters' is reserved in teal. Please change to something else.",
144 - 1x + 1x +
      call. = FALSE
@@ -11831,7 +12058,8 @@

teal coverage - 56.74%

147 - 188x + 188x +
  if (label == "Report previewer") {
@@ -11894,35 +12122,40 @@

teal coverage - 56.74%

156 - 188x + 188x +
  checkmate::assert_function(server)
157 - 188x + 188x +
  server_formals <- names(formals(server))
158 - 188x + 188x +
  if (!(
159 - 188x + 188x +
    "id" %in% server_formals ||
160 - 188x + 188x +
      all(c("input", "output", "session") %in% server_formals)
@@ -11936,70 +12169,80 @@

teal coverage - 56.74%

162 - 2x + 2x +
    stop(
163 - 2x + 2x +
      "\nmodule() `server` argument requires a function with following arguments:",
164 - 2x + 2x +
      "\n - id - `teal` will set proper `shiny` namespace for this module.",
165 - 2x + 2x +
      "\n - input, output, session (not recommended) - then `shiny::callModule` will be used to call a module.",
166 - 2x + 2x +
      "\n\nFollowing arguments can be used optionaly:",
167 - 2x + 2x +
      "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
168 - 2x + 2x +
      "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
169 - 2x + 2x +
      "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
170 - 2x + 2x +
      "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
171 - 2x + 2x +
      "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
@@ -12020,42 +12263,48 @@

teal coverage - 56.74%

174 - 186x + 186x +
  if ("datasets" %in% server_formals) {
175 - 2x + 2x +
    warning(
176 - 2x + 2x +
      sprintf("Called from module(label = \"%s\", ...)\n  ", label),
177 - 2x + 2x +
      "`datasets` argument in the server is deprecated and will be removed in the next release. ",
178 - 2x + 2x +
      "Please use `data` instead.",
179 - 2x + 2x +
      call. = FALSE
@@ -12097,56 +12346,64 @@

teal coverage - 56.74%

185 - 186x + 186x +
  checkmate::assert_function(ui)
186 - 186x + 186x +
  ui_formals <- names(formals(ui))
187 - 186x + 186x +
  if (!"id" %in% ui_formals) {
188 - 1x + 1x +
    stop(
189 - 1x + 1x +
      "\nmodule() `ui` argument requires a function with following arguments:",
190 - 1x + 1x +
      "\n - id - `teal` will set proper `shiny` namespace for this module.",
191 - 1x + 1x +
      "\n\nFollowing arguments can be used optionally:",
192 - 1x + 1x +
      "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
@@ -12167,42 +12424,48 @@

teal coverage - 56.74%

195 - 185x + 185x +
  if (any(c("data", "datasets") %in% ui_formals)) {
196 - 2x + 2x +
    stop(
197 - 2x + 2x +
      sprintf("Called from module(label = \"%s\", ...)\n  ", label),
198 - 2x + 2x +
      "UI with `data` or `datasets` argument is no longer accepted.\n  ",
199 - 2x + 2x +
      "If some UI inputs depend on data, please move the logic to your server instead.\n  ",
200 - 2x + 2x +
      "Possible solutions are renderUI() or updateXyzInput() functions."
@@ -12244,7 +12507,8 @@

teal coverage - 56.74%

206 - 183x + 183x +
  if (!missing(filters)) {
@@ -12307,21 +12571,24 @@

teal coverage - 56.74%

215 - 183x + 183x +
  if (!is.element("data", server_formals) && !is.null(datanames)) {
216 - 48x + 48x +
    message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
217 - 48x + 48x +
    datanames <- NULL
@@ -12335,7 +12602,8 @@

teal coverage - 56.74%

219 - 183x + 183x +
  checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
@@ -12356,49 +12624,56 @@

teal coverage - 56.74%

222 - 182x + 182x +
  checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
223 - 180x + 180x +
  srv_extra_args <- setdiff(names(server_args), server_formals)
224 - 180x + 180x +
  if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
225 - 1x + 1x +
    stop(
226 - 1x + 1x +
      "\nFollowing `server_args` elements have no equivalent in the formals of the server:\n",
227 - 1x + 1x +
      paste(paste(" -", srv_extra_args), collapse = "\n"),
228 - 1x + 1x +
      "\n\nUpdate the server arguments by including above or add `...`"
@@ -12433,49 +12708,56 @@

teal coverage - 56.74%

233 - 179x + 179x +
  checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
234 - 177x + 177x +
  ui_extra_args <- setdiff(names(ui_args), ui_formals)
235 - 177x + 177x +
  if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
236 - 1x + 1x +
    stop(
237 - 1x + 1x +
      "\nFollowing `ui_args` elements have no equivalent in the formals of UI:\n",
238 - 1x + 1x +
      paste(paste(" -", ui_extra_args), collapse = "\n"),
239 - 1x + 1x +
      "\n\nUpdate the UI arguments by including above or add `...`"
@@ -12510,7 +12792,8 @@

teal coverage - 56.74%

244 - 176x + 176x +
  checkmate::assert_list(transformers, types = "teal_data_module")
@@ -12524,63 +12807,72 @@

teal coverage - 56.74%

246 - 176x + 176x +
  structure(
247 - 176x + 176x +
    list(
248 - 176x + 176x +
      label = label,
249 - 176x + 176x +
      server = server,
250 - 176x + 176x +
      ui = ui,
251 - 176x + 176x +
      datanames = unique(datanames),
252 - 176x + 176x +
      server_args = server_args,
253 - 176x + 176x +
      ui_args = ui_args,
254 - 176x + 176x +
      transformers = transformers
@@ -12594,7 +12886,8 @@

teal coverage - 56.74%

256 - 176x + 176x +
    class = "teal_module"
@@ -12650,42 +12943,48 @@

teal coverage - 56.74%

264 - 118x + 118x +
  checkmate::assert_string(label)
265 - 116x + 116x +
  submodules <- list(...)
266 - 116x + 116x +
  if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
267 - 2x + 2x +
    stop(
268 - 2x + 2x +
      "The only character argument to modules() must be 'label' and it must be named, ",
269 - 2x + 2x +
      "change modules('lab', ...) to modules(label = 'lab', ...)"
@@ -12713,7 +13012,8 @@

teal coverage - 56.74%

273 - 114x + 114x +
  checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
@@ -12734,42 +13034,48 @@

teal coverage - 56.74%

276 - 111x + 111x +
  labels <- vapply(submodules, function(submodule) submodule$label, character(1))
277 - 111x + 111x +
  names(submodules) <- get_unique_labels(labels)
278 - 111x + 111x +
  structure(
279 - 111x + 111x +
    list(
280 - 111x + 111x +
      label = label,
281 - 111x + 111x +
      children = submodules
@@ -12783,7 +13089,8 @@

teal coverage - 56.74%

283 - 111x + 111x +
    class = "teal_modules"
@@ -12846,7 +13153,8 @@

teal coverage - 56.74%

292 - 3x + 3x +
  paste0(paste(rep(" ", indent), collapse = ""), "+ ", x$label, "\n", collapse = "")
@@ -12951,28 +13259,32 @@

teal coverage - 56.74%

307 - 1x + 1x +
  paste(
308 - 1x + 1x +
    c(
309 - 1x + 1x +
      paste0(rep(" ", indent), "+ ", x$label, "\n"),
310 - 1x + 1x +
      unlist(lapply(x$children, format, indent = indent + 1, ...))
@@ -12986,7 +13298,8 @@

teal coverage - 56.74%

312 - 1x + 1x +
    collapse = ""
@@ -13119,42 +13432,48 @@

teal coverage - 56.74%

331 - 8x + 8x +
  checkmate::assert_class(modules, "teal_modules")
332 - 6x + 6x +
  checkmate::assert_class(module, "teal_module")
333 - 4x + 4x +
  modules$children <- c(modules$children, list(module))
334 - 4x + 4x +
  labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
335 - 4x + 4x +
  names(modules$children) <- get_unique_labels(labels)
336 - 4x + 4x +
  modules
@@ -13259,7 +13578,8 @@

teal coverage - 56.74%

351 - 18x + 18x +
  if (inherits(modules, class)) {
@@ -13273,28 +13593,32 @@

teal coverage - 56.74%

353 - 18x + 18x +
  } else if (inherits(modules, "teal_module")) {
354 - 10x + 10x +
    NULL
355 - 8x + 8x +
  } else if (inherits(modules, "teal_modules")) {
356 - 8x + 8x +
    Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
@@ -13504,49 +13828,56 @@

teal coverage - 56.74%

386 - 455x + 455x +
  checkmate::assert_string(arg)
387 - 452x + 452x +
  if (inherits(modules, "teal_modules")) {
388 - 15x + 15x +
    any(unlist(lapply(modules$children, is_arg_used, arg)))
389 - 437x + 437x +
  } else if (inherits(modules, "teal_module")) {
390 - 27x + 27x +
    is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
391 - 410x + 410x +
  } else if (is.function(modules)) {
392 - 408x + 408x +
    isTRUE(arg %in% names(formals(modules)))
@@ -13560,7 +13891,8 @@

teal coverage - 56.74%

394 - 2x + 2x +
    stop("is_arg_used function not implemented for this object")
@@ -13672,28 +14004,32 @@

teal coverage - 56.74%

410 - 12x + 12x +
  checkmate::assert_multi_class(modules, c("teal_module", "teal_modules"))
411 - 12x + 12x +
  checkmate::assert_int(depth, lower = 0)
412 - 11x + 11x +
  if (inherits(modules, "teal_modules")) {
413 - 4x + 4x +
    max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
@@ -13707,7 +14043,8 @@

teal coverage - 56.74%

415 - 7x + 7x +
    depth
@@ -13784,14 +14121,16 @@

teal coverage - 56.74%

426 - 157x + 157x +
  if (inherits(modules, "teal_modules")) {
427 - 66x + 66x +
    lapply(modules$children, module_labels)
@@ -13805,7 +14144,8 @@

teal coverage - 56.74%

429 - 91x + 91x +
    modules$label
@@ -13882,35 +14222,40 @@

teal coverage - 56.74%

440 - 155x + 155x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
441 - 155x + 155x +
  if (inherits(modules, "teal_modules")) {
442 - 65x + 65x +
    setNames(
443 - 65x + 65x +
      lapply(modules$children, modules_bookmarkable),
444 - 65x + 65x +
      vapply(modules$children, `[[`, "label", FUN.VALUE = character(1))
@@ -13931,7 +14276,8 @@

teal coverage - 56.74%

447 - 90x + 90x +
    attr(modules, "teal_bookmarkable", exact = TRUE)
@@ -14350,35 +14696,40 @@

teal coverage - 56.74%

57 - 90x + 90x +
  checkmate::check_class(teal_data, "reactive")
58 - 90x + 90x +
  moduleServer(
59 - 90x + 90x +
    id = id,
60 - 90x + 90x +
    function(input, output, session) {
61 - 90x + 90x +
      logger::log_debug("srv_data_summary initializing")
@@ -14392,14 +14743,16 @@

teal coverage - 56.74%

63 - 90x + 90x +
      summary_table <- reactive({
64 - 99x + 99x +
        req(inherits(teal_data(), "teal_data"))
@@ -14413,7 +14766,8 @@

teal coverage - 56.74%

66 - 74x + 74x +
        if (length(teal.data::datanames(teal_data())) == 0) {
@@ -14441,14 +14795,16 @@

teal coverage - 56.74%

70 - 74x + 74x +
        filter_overview <- get_filter_overview(teal_data)
71 - 74x + 74x +
        names(filter_overview)[[1]] <- "Data Name"
@@ -14462,28 +14818,32 @@

teal coverage - 56.74%

73 - 74x + 74x +
        filter_overview$Obs <- ifelse(
74 - 74x + 74x +
          !is.na(filter_overview$obs),
75 - 74x + 74x +
          sprintf("%s/%s", filter_overview$obs_filtered, filter_overview$obs),
76 - 74x + 74x +
          ifelse(!is.na(filter_overview$obs_filtered), sprintf("%s", filter_overview$obs_filtered), "")
@@ -14504,21 +14864,24 @@

teal coverage - 56.74%

79 - 74x + 74x +
        filter_overview$Subjects <- ifelse(
80 - 74x + 74x +
          !is.na(filter_overview$subjects),
81 - 74x + 74x +
          sprintf("%s/%s", filter_overview$subjects_filtered, filter_overview$subjects),
@@ -14546,14 +14909,16 @@

teal coverage - 56.74%

85 - 74x + 74x +
        filter_overview <- filter_overview[, colnames(filter_overview) %in% c("Data Name", "Obs", "Subjects")]
86 - 74x + 74x +
        Filter(function(col) !all(col == ""), filter_overview)
@@ -14574,21 +14939,24 @@

teal coverage - 56.74%

89 - 90x + 90x +
      output$table <- renderUI({
90 - 99x + 99x +
        summary_table_out <- try(summary_table(), silent = TRUE)
91 - 99x + 99x +
        if (inherits(summary_table_out, "try-error")) {
@@ -14602,7 +14970,8 @@

teal coverage - 56.74%

93 - 25x + 25x +
          if (!inherits(attr(summary_table_out, "condition"), "shiny.silent.error")) {
@@ -14623,7 +14992,8 @@

teal coverage - 56.74%

96 - 74x + 74x +
        } else if (is.null(summary_table_out)) {
@@ -14644,98 +15014,112 @@

teal coverage - 56.74%

99 - 74x + 74x +
          body_html <- apply(
100 - 74x + 74x +
            summary_table_out,
101 - 74x + 74x +
            1,
102 - 74x + 74x +
            function(x) {
103 - 133x + 133x +
              tags$tr(
104 - 133x + 133x +
                tagList(
105 - 133x + 133x +
                  tags$td(
106 - 133x + 133x +
                    if (all(x[-1] == "")) {
107 - 2x + 2x +
                      icon(
108 - 2x + 2x +
                        name = "fas fa-exclamation-triangle",
109 - 2x + 2x +
                        title = "Unsupported dataset",
110 - 2x + 2x +
                        `data-container` = "body",
111 - 2x + 2x +
                        `data-toggle` = "popover",
112 - 2x + 2x +
                        `data-content` = "object not supported by the data_summary module"
@@ -14756,7 +15140,8 @@

teal coverage - 56.74%

115 - 133x + 133x +
                    x[1]
@@ -14770,7 +15155,8 @@

teal coverage - 56.74%

117 - 133x + 133x +
                  lapply(x[-1], tags$td)
@@ -14812,14 +15198,16 @@

teal coverage - 56.74%

123 - 74x + 74x +
          header_labels <- names(summary_table())
124 - 74x + 74x +
          header_html <- tags$tr(tagList(lapply(header_labels, tags$td)))
@@ -14833,28 +15221,32 @@

teal coverage - 56.74%

126 - 74x + 74x +
          table_html <- tags$table(
127 - 74x + 74x +
            class = "table custom-table",
128 - 74x + 74x +
            tags$thead(header_html),
129 - 74x + 74x +
            tags$tbody(body_html)
@@ -14868,7 +15260,8 @@

teal coverage - 56.74%

131 - 74x + 74x +
          table_html
@@ -14896,7 +15289,8 @@

teal coverage - 56.74%

135 - 90x + 90x +
      summary_table # testing purpose
@@ -14945,35 +15339,40 @@

teal coverage - 56.74%

142 - 74x + 74x +
  datanames <- teal.data::datanames(teal_data())
143 - 74x + 74x +
  joinkeys <- teal.data::join_keys(teal_data())
144 - 74x + 74x +
  filtered_data_objs <- sapply(
145 - 74x + 74x +
    datanames, function(name) teal.code::get_env(teal_data())[[name]],
146 - 74x + 74x +
    simplify = FALSE
@@ -14987,21 +15386,24 @@

teal coverage - 56.74%

148 - 74x + 74x +
  unfiltered_data_objs <- sapply(
149 - 74x + 74x +
    datanames, function(name) teal.code::get_env(teal_data())[[paste0(name, "._raw_")]],
150 - 74x + 74x +
    simplify = FALSE
@@ -15022,28 +15424,32 @@

teal coverage - 56.74%

153 - 74x + 74x +
  rows <- lapply(
154 - 74x + 74x +
    datanames,
155 - 74x + 74x +
    function(dataname) {
156 - 133x + 133x +
      parent <- teal.data::parent(joinkeys, dataname)
@@ -15099,14 +15505,16 @@

teal coverage - 56.74%

164 - 133x + 133x +
      subject_keys <- if (length(parent) > 0) {
165 - 7x + 7x +
        names(joinkeys[dataname, parent])
@@ -15120,7 +15528,8 @@

teal coverage - 56.74%

167 - 126x + 126x +
        joinkeys[dataname, dataname]
@@ -15134,35 +15543,40 @@

teal coverage - 56.74%

169 - 133x + 133x +
      get_object_filter_overview(
170 - 133x + 133x +
        filtered_data = filtered_data_objs[[dataname]],
171 - 133x + 133x +
        unfiltered_data = unfiltered_data_objs[[dataname]],
172 - 133x + 133x +
        dataname = dataname,
173 - 133x + 133x +
        subject_keys = subject_keys
@@ -15197,14 +15611,16 @@

teal coverage - 56.74%

178 - 74x + 74x +
  unssuported_idx <- vapply(rows, function(x) all(is.na(x[-1])), logical(1)) # this is mainly for vectors
179 - 74x + 74x +
  do.call(rbind, c(rows[!unssuported_idx], rows[unssuported_idx]))
@@ -15260,21 +15676,24 @@

teal coverage - 56.74%

187 - 133x + 133x +
  if (inherits(filtered_data, c("data.frame", "DataFrame", "array", "Matrix", "SummarizedExperiment"))) {
188 - 131x + 131x +
    get_object_filter_overview_array(filtered_data, unfiltered_data, dataname, subject_keys)
189 - 2x + 2x +
  } else if (inherits(filtered_data, "MultiAssayExperiment")) {
@@ -15295,42 +15714,48 @@

teal coverage - 56.74%

192 - 2x + 2x +
    data.frame(
193 - 2x + 2x +
      dataname = dataname,
194 - 2x + 2x +
      obs = NA,
195 - 2x + 2x +
      obs_filtered = NA,
196 - 2x + 2x +
      subjects = NA,
197 - 2x + 2x +
      subjects_filtered = NA
@@ -15400,49 +15825,56 @@

teal coverage - 56.74%

207 - 131x + 131x +
  if (length(subject_keys) == 0) {
208 - 118x + 118x +
    data.frame(
209 - 118x + 118x +
      dataname = dataname,
210 - 118x + 118x +
      obs = ifelse(!is.null(nrow(unfiltered_data)), nrow(unfiltered_data), NA),
211 - 118x + 118x +
      obs_filtered = nrow(filtered_data),
212 - 118x + 118x +
      subjects = NA,
213 - 118x + 118x +
      subjects_filtered = NA
@@ -15463,42 +15895,48 @@

teal coverage - 56.74%

216 - 13x + 13x +
    data.frame(
217 - 13x + 13x +
      dataname = dataname,
218 - 13x + 13x +
      obs = ifelse(!is.null(nrow(unfiltered_data)), nrow(unfiltered_data), NA),
219 - 13x + 13x +
      obs_filtered = nrow(filtered_data),
220 - 13x + 13x +
      subjects = nrow(unique(unfiltered_data[subject_keys])),
221 - 13x + 13x +
      subjects_filtered = nrow(unique(filtered_data[subject_keys]))
@@ -16190,42 +16628,48 @@

teal coverage - 56.74%

48 - 34x + 34x +
  lifecycle::deprecate_soft(
49 - 34x + 34x +
    when = "0.15.0",
50 - 34x + 34x +
    what = "tdata()",
51 - 34x + 34x +
    details = paste(
52 - 34x + 34x +
      "tdata is deprecated and will be removed in the next release. Use `teal_data` instead.\n",
53 - 34x + 34x +
      "Please follow migration instructions https://github.com/insightsengineering/teal/discussions/987."
@@ -16246,28 +16690,32 @@

teal coverage - 56.74%

56 - 34x + 34x +
  checkmate::assert_list(
57 - 34x + 34x +
    data,
58 - 34x + 34x +
    any.missing = FALSE, names = "unique",
59 - 34x + 34x +
    types = c("data.frame", "reactive", "MultiAssayExperiment")
@@ -16281,14 +16729,16 @@

teal coverage - 56.74%

61 - 30x + 30x +
  checkmate::assert_class(join_keys, "join_keys", null.ok = TRUE)
62 - 29x + 29x +
  checkmate::assert_multi_class(code, c("character", "reactive"))
@@ -16302,14 +16752,16 @@

teal coverage - 56.74%

64 - 28x + 28x +
  checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
65 - 26x + 26x +
  checkmate::assert_subset(names(metadata), names(data))
@@ -16323,14 +16775,16 @@

teal coverage - 56.74%

67 - 25x + 25x +
  if (is.reactive(code)) {
68 - 9x + 9x +
    isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
@@ -16358,21 +16812,24 @@

teal coverage - 56.74%

72 - 24x + 24x +
  for (x in names(data)) {
73 - 47x + 47x +
    if (!is.reactive(data[[x]])) {
74 - 31x + 31x +
      data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
@@ -16407,21 +16864,24 @@

teal coverage - 56.74%

79 - 24x + 24x +
  attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
80 - 24x + 24x +
  attr(data, "join_keys") <- join_keys
81 - 24x + 24x +
  attr(data, "metadata") <- metadata
@@ -16442,14 +16902,16 @@

teal coverage - 56.74%

84 - 24x + 24x +
  class(data) <- c("tdata", class(data))
85 - 24x + 24x +
  data
@@ -16589,14 +17051,16 @@

teal coverage - 56.74%

105 - 2x + 2x +
  checkmate::assert_class(data, "tdata")
106 - 1x + 1x +
  list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
@@ -16687,14 +17151,16 @@

teal coverage - 56.74%

119 - 7x + 7x +
  checkmate::assert_class(data, "tdata")
120 - 5x + 5x +
  attr(data, "code")()
@@ -16750,7 +17216,8 @@

teal coverage - 56.74%

128 - 2x + 2x +
  attr(data, "join_keys")
@@ -16813,14 +17280,16 @@

teal coverage - 56.74%

137 - 4x + 4x +
  checkmate::assert_string(dataname)
138 - 4x + 4x +
  UseMethod("get_metadata", data)
@@ -16862,21 +17331,24 @@

teal coverage - 56.74%

144 - 4x + 4x +
  metadata <- attr(data, "metadata")
145 - 4x + 4x +
  if (is.null(metadata)) {
146 - 1x + 1x +
    return(NULL)
@@ -16890,7 +17362,8 @@

teal coverage - 56.74%

148 - 3x + 3x +
  metadata[[dataname]]
@@ -17156,14 +17629,16 @@

teal coverage - 56.74%

186 - 8x + 8x +
  if (inherits(x, "tdata")) {
187 - 2x + 2x +
    return(x)
@@ -17177,77 +17652,88 @@

teal coverage - 56.74%

189 - 6x + 6x +
  if (is.reactive(x)) {
190 - 1x + 1x +
    checkmate::assert_class(isolate(x()), "teal_data")
191 - 1x + 1x +
    datanames <- isolate(.teal_data_datanames(x()))
192 - 1x + 1x +
    datasets <- sapply(datanames, function(dataname) reactive(x()[[dataname]]), simplify = FALSE)
193 - 1x + 1x +
    code <- reactive(teal.code::get_code(x()))
194 - 1x + 1x +
    join_keys <- isolate(teal.data::join_keys(x()))
195 - 5x + 5x +
  } else if (inherits(x, "teal_data")) {
196 - 5x + 5x +
    datanames <- .teal_data_datanames(x)
197 - 5x + 5x +
    datasets <- sapply(datanames, function(dataname) reactive(x[[dataname]]), simplify = FALSE)
198 - 5x + 5x +
    code <- reactive(teal.code::get_code(x))
199 - 5x + 5x +
    join_keys <- isolate(teal.data::join_keys(x))
@@ -17268,7 +17754,8 @@

teal coverage - 56.74%

202 - 6x + 6x +
  new_tdata(data = datasets, code = code, join_keys = join_keys)
@@ -18023,7 +18510,8 @@

teal coverage - 56.74%

106 - 9x + 9x +
  logger::log_debug("init initializing teal app with: data ('{ class(data) }').")
@@ -18051,7 +18539,8 @@

teal coverage - 56.74%

110 - 9x + 9x +
  if (inherits(data, "TealData")) {
@@ -18121,14 +18610,16 @@

teal coverage - 56.74%

120 - 9x + 9x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
121 - 9x + 9x +
  checkmate::assert_class(landing_popup, "teal_module_landing", null.ok = TRUE)
@@ -18149,28 +18640,32 @@

teal coverage - 56.74%

124 - 9x + 9x +
  checkmate::assert(
125 - 9x + 9x +
    .var.name = "modules",
126 - 9x + 9x +
    checkmate::check_multi_class(modules, c("teal_modules", "teal_module")),
127 - 9x + 9x +
    checkmate::check_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
@@ -18184,14 +18679,16 @@

teal coverage - 56.74%

129 - 9x + 9x +
  if (inherits(modules, "teal_module")) {
130 - 1x + 1x +
    modules <- list(modules)
@@ -18205,14 +18702,16 @@

teal coverage - 56.74%

132 - 9x + 9x +
  if (checkmate::test_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))) {
133 - 3x + 3x +
    modules <- do.call(teal::modules, modules)
@@ -18240,7 +18739,8 @@

teal coverage - 56.74%

137 - 9x + 9x +
  checkmate::assert_class(filter, "teal_slices")
@@ -18261,28 +18761,32 @@

teal coverage - 56.74%

140 - 8x + 8x +
  checkmate::assert(
141 - 8x + 8x +
    .var.name = "title",
142 - 8x + 8x +
    checkmate::check_string(title),
143 - 8x + 8x +
    checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
@@ -18296,28 +18800,32 @@

teal coverage - 56.74%

145 - 8x + 8x +
  checkmate::assert(
146 - 8x + 8x +
    .var.name = "header",
147 - 8x + 8x +
    checkmate::check_string(header),
148 - 8x + 8x +
    checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
@@ -18331,28 +18839,32 @@

teal coverage - 56.74%

150 - 8x + 8x +
  checkmate::assert(
151 - 8x + 8x +
    .var.name = "footer",
152 - 8x + 8x +
    checkmate::check_string(footer),
153 - 8x + 8x +
    checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
@@ -18366,7 +18878,8 @@

teal coverage - 56.74%

155 - 8x + 8x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
@@ -18387,7 +18900,8 @@

teal coverage - 56.74%

158 - 8x + 8x +
  teal.logger::log_system_info()
@@ -18408,7 +18922,8 @@

teal coverage - 56.74%

161 - 8x + 8x +
  teal_lockfile()
@@ -18436,14 +18951,16 @@

teal coverage - 56.74%

165 - 8x + 8x +
  landing <- extract_module(modules, "teal_module_landing")
166 - 8x + 8x +
  if (length(landing) == 1L) {
@@ -18527,7 +19044,8 @@

teal coverage - 56.74%

178 - 8x + 8x +
  } else if (length(landing) > 1L) {
@@ -18562,7 +19080,8 @@

teal coverage - 56.74%

183 - 8x + 8x +
  if (is.null(attr(filter, "app_id", exact = TRUE))) attr(filter, "app_id") <- create_app_id(data, modules)
@@ -18583,7 +19102,8 @@

teal coverage - 56.74%

186 - 8x + 8x +
  filter <- as.teal_slices(as.list(filter))
@@ -18611,7 +19131,8 @@

teal coverage - 56.74%

190 - 8x + 8x +
  if (isTRUE(attr(filter, "module_specific"))) {
@@ -18800,21 +19321,24 @@

teal coverage - 56.74%

217 - 8x + 8x +
  if (inherits(data, "teal_data")) {
218 - 7x + 7x +
    if (length(.teal_data_datanames(data)) == 0) {
219 - 1x + 1x +
      stop("The environment of `data` is empty.")
@@ -18835,7 +19359,8 @@

teal coverage - 56.74%

222 - 6x + 6x +
    if (!length(teal.data::datanames(data))) {
@@ -18863,14 +19388,16 @@

teal coverage - 56.74%

226 - 6x + 6x +
    is_modules_ok <- check_modules_datanames(modules, .teal_data_datanames(data))
227 - 6x + 6x +
    if (!isTRUE(is_modules_ok)) {
@@ -18898,21 +19425,24 @@

teal coverage - 56.74%

231 - 6x + 6x +
    is_filter_ok <- check_filter_datanames(filter, .teal_data_datanames(data))
232 - 6x + 6x +
    if (!isTRUE(is_filter_ok)) {
233 - 1x + 1x +
      warning(is_filter_ok)
@@ -18954,14 +19484,16 @@

teal coverage - 56.74%

239 - 7x + 7x +
  reporter <- teal.reporter::Reporter$new()$set_id(attr(filter, "app_id"))
240 - 7x + 7x +
  if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
@@ -19010,7 +19542,8 @@

teal coverage - 56.74%

247 - 7x + 7x +
  ns <- NS(id)
@@ -19024,14 +19557,16 @@

teal coverage - 56.74%

249 - 7x + 7x +
  res <- list(
250 - 7x + 7x +
    ui = function(request) {
@@ -19073,7 +19608,8 @@

teal coverage - 56.74%

256 - 7x + 7x +
    server = function(input, output, session) {
@@ -19129,7 +19665,8 @@

teal coverage - 56.74%

264 - 7x + 7x +
  logger::log_debug("init teal app has been initialized.")
@@ -19143,7 +19680,8 @@

teal coverage - 56.74%

266 - 7x + 7x +
  res
@@ -19562,28 +20100,32 @@

teal coverage - 56.74%

58 - 67x + 67x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
59 - 67x + 67x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module", "reactive", "reactiveVal"))
60 - 67x + 67x +
  checkmate::assert_class(modules, "teal_modules")
61 - 67x + 67x +
  checkmate::assert_class(filter, "teal_slices")
@@ -19597,14 +20139,16 @@

teal coverage - 56.74%

63 - 67x + 67x +
  moduleServer(id, function(input, output, session) {
64 - 67x + 67x +
    logger::log_debug("srv_data initializing.")
@@ -19618,7 +20162,8 @@

teal coverage - 56.74%

66 - 67x + 67x +
    if (getOption("teal.show_js_log", default = FALSE)) {
@@ -19660,49 +20205,56 @@

teal coverage - 56.74%

72 - 67x + 67x +
    data_validated <- if (inherits(data, "teal_data_module")) {
73 - 9x + 9x +
      srv_teal_data(
74 - 9x + 9x +
        "teal_data_module",
75 - 9x + 9x +
        data = reactive(req(FALSE)), # to .fallback_on_failure to shiny.silent.error
76 - 9x + 9x +
        data_module = data,
77 - 9x + 9x +
        modules = modules,
78 - 9x + 9x +
        validate_shiny_silent_error = FALSE
@@ -19716,28 +20268,32 @@

teal coverage - 56.74%

80 - 67x + 67x +
    } else if (inherits(data, "teal_data")) {
81 - 30x + 30x +
      reactiveVal(data)
82 - 67x + 67x +
    } else if (inherits(data, c("reactive", "reactiveVal"))) {
83 - 28x + 28x +
      .fallback_on_failure(this = data, that = reactive(req(FALSE)), label = "Reactive data")
@@ -19758,14 +20314,16 @@

teal coverage - 56.74%

86 - 66x + 66x +
    if (inherits(data, "teal_data_module")) {
87 - 8x + 8x +
      shinyjs::disable(selector = sprintf(".teal-body:has('#%s') .nav li a", session$ns("content")))
@@ -19786,28 +20344,32 @@

teal coverage - 56.74%

90 - 66x + 66x +
    observeEvent(data_validated(), {
91 - 55x + 55x +
      showNotification("Data loaded successfully.", duration = 5)
92 - 55x + 55x +
      shinyjs::enable(selector = sprintf(".teal-body:has('#%s') .nav li a", session$ns("content")))
93 - 55x + 55x +
      if (isTRUE(attr(data, "once"))) {
@@ -19821,28 +20383,32 @@

teal coverage - 56.74%

95 - 5x + 5x +
        shinyjs::hide(
96 - 5x + 5x +
          selector = sprintf(
97 - 5x + 5x +
            ".teal-body:has('#%s') a[data-value='teal_data_module']",
98 - 5x + 5x +
            session$ns("content")
@@ -19870,28 +20436,32 @@

teal coverage - 56.74%

102 - 5x + 5x +
        shinyjs::runjs(
103 - 5x + 5x +
          sprintf(
104 - 5x + 5x +
            "document.querySelector('.teal-body:has(#%s) .nav li:nth-child(2) a').click();",
105 - 5x + 5x +
            session$ns("content")
@@ -19926,42 +20496,48 @@

teal coverage - 56.74%

110 - 55x + 55x +
      is_filter_ok <- check_filter_datanames(filter, .teal_data_datanames(data_validated()))
111 - 55x + 55x +
      if (!isTRUE(is_filter_ok)) {
112 - 2x + 2x +
        showNotification(
113 - 2x + 2x +
          "Some filters were not applied because of incompatibility with data. Contact app developer.",
114 - 2x + 2x +
          type = "warning",
115 - 2x + 2x +
          duration = 10
@@ -19975,7 +20551,8 @@

teal coverage - 56.74%

117 - 2x + 2x +
        warning(is_filter_ok)
@@ -20003,7 +20580,8 @@

teal coverage - 56.74%

121 - 66x + 66x +
    observeEvent(data_validated(), once = TRUE, {
@@ -20017,49 +20595,56 @@

teal coverage - 56.74%

123 - 53x + 53x +
      app_session <- .subset2(shiny::getDefaultReactiveDomain(), "parent")
124 - 53x + 53x +
      setBookmarkExclude(
125 - 53x + 53x +
        session$ns(
126 - 53x + 53x +
          grep(
127 - 53x + 53x +
            pattern = "teal_data_module-",
128 - 53x + 53x +
            x = names(reactiveValuesToList(input)),
129 - 53x + 53x +
            value = TRUE
@@ -20080,7 +20665,8 @@

teal coverage - 56.74%

132 - 53x + 53x +
        session = app_session
@@ -20115,7 +20701,8 @@

teal coverage - 56.74%

137 - 66x + 66x +
    reactive(.add_signature_to_data(data_validated()))
@@ -20178,7 +20765,8 @@

teal coverage - 56.74%

146 - 60x + 60x +
  hashes <- .get_hashes_code(data)
@@ -20192,70 +20780,80 @@

teal coverage - 56.74%

148 - 56x + 56x +
  tdata <- do.call(
149 - 56x + 56x +
    teal.data::teal_data,
150 - 56x + 56x +
    c(
151 - 56x + 56x +
      list(code = trimws(c(teal.code::get_code(data), hashes), which = "right")),
152 - 56x + 56x +
      list(join_keys = teal.data::join_keys(data)),
153 - 56x + 56x +
      sapply(
154 - 56x + 56x +
        ls(teal.code::get_env(data)),
155 - 56x + 56x +
        teal.code::get_var,
156 - 56x + 56x +
        object = data,
157 - 56x + 56x +
        simplify = FALSE
@@ -20290,21 +20888,24 @@

teal coverage - 56.74%

162 - 56x + 56x +
  tdata@verified <- data@verified
163 - 56x + 56x +
  teal.data::datanames(tdata) <- teal.data::datanames(data)
164 - 56x + 56x +
  tdata
@@ -20395,63 +20996,72 @@

teal coverage - 56.74%

177 - 60x + 60x +
  vapply(
178 - 60x + 60x +
    datanames,
179 - 60x + 60x +
    function(dataname, datasets) {
180 - 100x + 100x +
      hash <- rlang::hash(data[[dataname]])
181 - 100x + 100x +
      sprintf(
182 - 100x + 100x +
        "stopifnot(%s == %s) # @linksto %s",
183 - 100x + 100x +
        deparse1(bquote(rlang::hash(.(as.name(dataname))))),
184 - 100x + 100x +
        deparse1(hash),
185 - 100x + 100x +
        dataname
@@ -20472,14 +21082,16 @@

teal coverage - 56.74%

188 - 60x + 60x +
    character(1L),
189 - 60x + 60x +
    USE.NAMES = TRUE
@@ -21423,49 +22035,56 @@

teal coverage - 56.74%

132 - 157x + 157x +
  checkmate::assert_string(id)
133 - 157x + 157x +
  checkmate::assert_class(data_rv, "reactive")
134 - 157x + 157x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
135 - 157x + 157x +
  checkmate::assert_class(datasets, "reactive", null.ok = TRUE)
136 - 157x + 157x +
  checkmate::assert_class(slices_global, ".slicesGlobal")
137 - 157x + 157x +
  checkmate::assert_class(reporter, "Reporter")
138 - 157x + 157x +
  UseMethod("srv_teal_module", modules)
@@ -21633,14 +22252,16 @@

teal coverage - 56.74%

162 - 66x + 66x +
  moduleServer(id = id, module = function(input, output, session) {
163 - 66x + 66x +
    logger::log_debug("srv_teal_module.teal_modules initializing the module { deparse1(modules$label) }.")
@@ -21654,77 +22275,88 @@

teal coverage - 56.74%

165 - 66x + 66x +
    modules_output <- sapply(
166 - 66x + 66x +
      names(modules$children),
167 - 66x + 66x +
      function(module_id) {
168 - 91x + 91x +
        srv_teal_module(
169 - 91x + 91x +
          id = module_id,
170 - 91x + 91x +
          data_rv = data_rv,
171 - 91x + 91x +
          modules = modules$children[[module_id]],
172 - 91x + 91x +
          datasets = datasets,
173 - 91x + 91x +
          slices_global = slices_global,
174 - 91x + 91x +
          reporter = reporter,
175 - 91x + 91x +
          is_active = reactive(is_active() && input$active_tab == module_id)
@@ -21745,7 +22377,8 @@

teal coverage - 56.74%

178 - 66x + 66x +
      simplify = FALSE
@@ -21766,7 +22399,8 @@

teal coverage - 56.74%

181 - 65x + 65x +
    modules_output
@@ -21857,42 +22491,48 @@

teal coverage - 56.74%

194 - 91x + 91x +
  logger::log_debug("srv_teal_module.teal_module initializing the module: { deparse1(modules$label) }.")
195 - 91x + 91x +
  moduleServer(id = id, module = function(input, output, session) {
196 - 91x + 91x +
    active_datanames <- reactive(.resolve_module_datanames(data = data_rv(), modules = modules))
197 - 91x + 91x +
    if (is.null(datasets)) {
198 - 18x + 18x +
      datasets <- eventReactive(data_rv(), {
199 - 14x + 14x +
        if (!inherits(data_rv(), "teal_data")) {
@@ -21913,7 +22553,8 @@

teal coverage - 56.74%

202 - 14x + 14x +
        logger::log_debug("srv_teal_module@1 initializing module-specific FilteredData")
@@ -21927,7 +22568,8 @@

teal coverage - 56.74%

204 - 14x + 14x +
        teal_data_to_filtered_data(data_rv(), datanames = active_datanames())
@@ -21990,49 +22632,56 @@

teal coverage - 56.74%

213 - 91x + 91x +
    srv_module_filter_manager(modules$label, module_fd = datasets, slices_global = slices_global)
214 - 91x + 91x +
    filtered_teal_data <- srv_filter_data(
215 - 91x + 91x +
      "filter_panel",
216 - 91x + 91x +
      datasets = datasets,
217 - 91x + 91x +
      active_datanames = active_datanames,
218 - 91x + 91x +
      data_rv = data_rv,
219 - 91x + 91x +
      is_active = is_active
@@ -22053,35 +22702,40 @@

teal coverage - 56.74%

222 - 91x + 91x +
    transformed_teal_data <- srv_transform_data(
223 - 91x + 91x +
      "data_transform",
224 - 91x + 91x +
      data = filtered_teal_data,
225 - 91x + 91x +
      transforms = modules$transformers,
226 - 91x + 91x +
      modules = modules
@@ -22102,28 +22756,32 @@

teal coverage - 56.74%

229 - 90x + 90x +
    module_teal_data <- reactive({
230 - 99x + 99x +
      all_teal_data <- transformed_teal_data()
231 - 74x + 74x +
      module_datanames <- .resolve_module_datanames(data = all_teal_data, modules = modules)
232 - 74x + 74x +
      .subset_teal_data(all_teal_data, module_datanames)
@@ -22144,28 +22802,32 @@

teal coverage - 56.74%

235 - 90x + 90x +
    module_teal_data_validated <- srv_validate_reactive_teal_data(
236 - 90x + 90x +
      "validate_datanames",
237 - 90x + 90x +
      data = module_teal_data,
238 - 90x + 90x +
      modules = modules
@@ -22186,7 +22848,8 @@

teal coverage - 56.74%

241 - 90x + 90x +
    summary_table <- srv_data_summary("data_summary", module_teal_data)
@@ -22207,21 +22870,24 @@

teal coverage - 56.74%

244 - 90x + 90x +
    module_out <- reactiveVal(NULL)
245 - 90x + 90x +
    if (!inherits(modules, "teal_module_previewer")) {
246 - 90x + 90x +
      obs_module <- observeEvent(
@@ -22235,35 +22901,40 @@

teal coverage - 56.74%

248 - 90x + 90x +
        ignoreNULL = TRUE,
249 - 90x + 90x +
        once = TRUE,
250 - 90x + 90x +
        eventExpr = module_teal_data_validated(),
251 - 90x + 90x +
        handlerExpr = {
252 - 66x + 66x +
          module_out(.call_teal_module(modules, datasets, module_teal_data_validated, reporter))
@@ -22354,7 +23025,8 @@

teal coverage - 56.74%

265 - 90x + 90x +
    if ("report" %in% names(module_out)) {
@@ -22382,7 +23054,8 @@

teal coverage - 56.74%

269 - 90x + 90x +
    module_out
@@ -22431,21 +23104,24 @@

teal coverage - 56.74%

276 - 66x + 66x +
  args <- c(list(id = "module"), modules$server_args)
277 - 66x + 66x +
  if (is_arg_used(modules$server, "reporter")) {
278 - 1x + 1x +
    args <- c(args, list(reporter = reporter))
@@ -22466,21 +23142,24 @@

teal coverage - 56.74%

281 - 66x + 66x +
  if (is_arg_used(modules$server, "datasets")) {
282 - 1x + 1x +
    args <- c(args, datasets = datasets())
283 - 1x + 1x +
    warning("datasets argument is not reactive and therefore it won't be updated when data is refreshed.")
@@ -22501,14 +23180,16 @@

teal coverage - 56.74%

286 - 66x + 66x +
  if (is_arg_used(modules$server, "data")) {
287 - 62x + 62x +
    args <- c(args, data = list(filtered_teal_data))
@@ -22529,14 +23210,16 @@

teal coverage - 56.74%

290 - 66x + 66x +
  if (is_arg_used(modules$server, "filter_panel_api")) {
291 - 1x + 1x +
    args <- c(args, filter_panel_api = teal.slice::FilterPanelAPI$new(datasets()))
@@ -22557,14 +23240,16 @@

teal coverage - 56.74%

294 - 66x + 66x +
  if (is_arg_used(modules$server, "id")) {
295 - 66x + 66x +
    do.call(modules$server, args)
@@ -22613,21 +23298,24 @@

teal coverage - 56.74%

302 - 147x + 147x +
  stopifnot("data_rv must be teal_data object." = inherits(data, "teal_data"))
303 - 147x + 147x +
  if (is.null(modules$datanames) || identical(modules$datanames, "all")) {
304 - 127x + 127x +
    .teal_data_datanames(data)
@@ -22641,21 +23329,24 @@

teal coverage - 56.74%

306 - 20x + 20x +
    intersect(
307 - 20x + 20x +
      include_parent_datanames(modules$datanames, teal.data::join_keys(data)),
308 - 20x + 20x +
      .teal_data_ls(data)
@@ -22801,56 +23492,64 @@

teal coverage - 56.74%

17 - 33x + 33x +
  checkmate::assert_string(label)
18 - 33x + 33x +
  ans <- module(
19 - 33x + 33x +
    label,
20 - 33x + 33x +
    server = function(id, data) {
21 - 2x + 2x +
      checkmate::assert_class(isolate(data()), "teal_data")
22 - 2x + 2x +
      moduleServer(id, function(input, output, session) {
23 - 2x + 2x +
        datanames_rv <- reactive({
24 - 2x + 2x +
          teal.data::datanames(req(data()))
@@ -22871,14 +23570,16 @@

teal coverage - 56.74%

27 - 2x + 2x +
        observeEvent(datanames_rv(), {
28 - 2x + 2x +
          selected <- isolate(input$dataname)
@@ -22892,35 +23593,40 @@

teal coverage - 56.74%

30 - 2x + 2x +
          updateSelectInput(
31 - 2x + 2x +
            session = session,
32 - 2x + 2x +
            inputId = "dataname",
33 - 2x + 2x +
            choices = datanames_rv(),
34 - 2x + 2x +
            selected = selected
@@ -22948,14 +23654,16 @@

teal coverage - 56.74%

38 - 2x + 2x +
        output$text <- renderPrint({
39 - 2x + 2x +
          req(input$dataname)
@@ -22983,28 +23691,32 @@

teal coverage - 56.74%

43 - 2x + 2x +
        teal.widgets::verbatim_popup_srv(
44 - 2x + 2x +
          id = "rcode",
45 - 2x + 2x +
          verbatim_content = reactive(teal.code::get_code(data())),
46 - 2x + 2x +
          title = "Example Code"
@@ -23032,7 +23744,8 @@

teal coverage - 56.74%

50 - 33x + 33x +
    ui = function(id) {
@@ -23102,14 +23815,16 @@

teal coverage - 56.74%

60 - 33x + 33x +
    datanames = datanames,
61 - 33x + 33x +
    transformers = transformers
@@ -23123,14 +23838,16 @@

teal coverage - 56.74%

63 - 33x + 33x +
  attr(ans, "teal_bookmarkable") <- TRUE
64 - 33x + 33x +
  ans
@@ -23248,21 +23965,24 @@

teal coverage - 56.74%

15 - 67x + 67x +
  script <- sprintf(
16 - 67x + 67x +
    "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
17 - 67x + 67x +
    ns("timezone")
@@ -23276,14 +23996,16 @@

teal coverage - 56.74%

19 - 67x + 67x +
  shinyjs::runjs(script) # function does not return anything
20 - 67x + 67x +
  invisible(NULL)
@@ -23332,42 +24054,48 @@

teal coverage - 56.74%

27 - 4x + 4x +
  bs_theme <- getOption("teal.bs_theme")
28 - 4x + 4x +
  if (is.null(bs_theme)) {
29 - 1x + 1x +
    NULL
30 - 3x + 3x +
  } else if (!inherits(bs_theme, "bs_theme")) {
31 - 2x + 2x +
    warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
32 - 2x + 2x +
    NULL
@@ -23381,7 +24109,8 @@

teal coverage - 56.74%

34 - 1x + 1x +
    bs_theme
@@ -23437,42 +24166,48 @@

teal coverage - 56.74%

42 - 20x + 20x +
  parents <- character(0)
43 - 20x + 20x +
  for (i in dataname) {
44 - 34x + 34x +
    while (length(i) > 0) {
45 - 36x + 36x +
      parent_i <- teal.data::parent(join_keys, i)
46 - 36x + 36x +
      parents <- c(parent_i, parents)
47 - 36x + 36x +
      i <- parent_i
@@ -23500,7 +24235,8 @@

teal coverage - 56.74%

51 - 20x + 20x +
  unique(c(parents, dataname))
@@ -23584,14 +24320,16 @@

teal coverage - 56.74%

63 - 63x + 63x +
  checkmate::assert_class(x, "teal_data")
64 - 63x + 63x +
  checkmate::assert_character(datanames, min.chars = 1L, any.missing = FALSE)
@@ -23612,21 +24350,24 @@

teal coverage - 56.74%

67 - 63x + 63x +
  teal.slice::init_filtered_data(
68 - 63x + 63x +
    x = sapply(datanames, function(dn) x[[dn]], simplify = FALSE),
69 - 63x + 63x +
    join_keys = teal.data::join_keys(x)
@@ -23766,35 +24507,40 @@

teal coverage - 56.74%

89 - 2x + 2x +
  checkmate::assert_string(title)
90 - 2x + 2x +
  checkmate::assert_string(label)
91 - 2x + 2x +
  checkmate::assert_string(description, null.ok = TRUE)
92 - 2x + 2x +
  checkmate::assert_flag(with_filter)
93 - 2x + 2x +
  checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
@@ -23808,49 +24554,56 @@

teal coverage - 56.74%

95 - 2x + 2x +
  card <- teal::TealReportCard$new()
96 - 2x + 2x +
  title <- if (label == "") title else label
97 - 2x + 2x +
  card$set_name(title)
98 - 2x + 2x +
  card$append_text(title, "header2")
99 - 1x + 1x +
  if (!is.null(description)) card$append_text(description, "header3")
100 - 1x + 1x +
  if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
101 - 2x + 2x +
  card
@@ -23955,14 +24708,16 @@

teal coverage - 56.74%

116 - 101x + 101x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
117 - 101x + 101x +
  checkmate::assert_character(datanames)
@@ -23976,7 +24731,8 @@

teal coverage - 56.74%

119 - 101x + 101x +
  recursive_check_datanames <- function(modules, datanames) {
@@ -23990,14 +24746,16 @@

teal coverage - 56.74%

121 - 117x + 117x +
    if (inherits(modules, "teal_modules")) {
122 - 11x + 11x +
      sapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
@@ -24011,49 +24769,56 @@

teal coverage - 56.74%

124 - 106x + 106x +
      extra_datanames <- setdiff(modules$datanames, c("all", datanames))
125 - 106x + 106x +
      if (length(extra_datanames)) {
126 - 2x + 2x +
        sprintf(
127 - 2x + 2x +
          "Module '%s' uses datanames not available in 'data': (%s) not in (%s)",
128 - 2x + 2x +
          modules$label,
129 - 2x + 2x +
          toString(dQuote(extra_datanames, q = FALSE)),
130 - 2x + 2x +
          toString(dQuote(datanames, q = FALSE))
@@ -24088,21 +24853,24 @@

teal coverage - 56.74%

135 - 101x + 101x +
  check_datanames <- unlist(recursive_check_datanames(modules, datanames))
136 - 101x + 101x +
  if (length(check_datanames)) {
137 - 2x + 2x +
    paste(check_datanames, collapse = "\n")
@@ -24116,7 +24884,8 @@

teal coverage - 56.74%

139 - 99x + 99x +
    TRUE
@@ -24221,14 +24990,16 @@

teal coverage - 56.74%

154 - 61x + 61x +
  checkmate::assert_class(filters, "teal_slices")
155 - 61x + 61x +
  checkmate::assert_character(datanames)
@@ -24249,63 +25020,72 @@

teal coverage - 56.74%

158 - 61x + 61x +
  out <- unlist(sapply(
159 - 61x + 61x +
    filters, function(filter) {
160 - 26x + 26x +
      dataname <- shiny::isolate(filter$dataname)
161 - 26x + 26x +
      if (!dataname %in% datanames) {
162 - 3x + 3x +
        sprintf(
163 - 3x + 3x +
          "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
164 - 3x + 3x +
          shiny::isolate(filter$id),
165 - 3x + 3x +
          dQuote(dataname, q = FALSE),
166 - 3x + 3x +
          toString(dQuote(datanames, q = FALSE))
@@ -24354,14 +25134,16 @@

teal coverage - 56.74%

173 - 61x + 61x +
  if (length(out)) {
174 - 3x + 3x +
    paste(out, collapse = "\n")
@@ -24375,7 +25157,8 @@

teal coverage - 56.74%

176 - 58x + 58x +
    TRUE
@@ -24445,70 +25228,80 @@

teal coverage - 56.74%

186 - 7x + 7x +
  checkmate::assert_class(shiny_tag, "shiny.tag")
187 - 7x + 7x +
  checkmate::assert_true(shiny_tag$name == "head")
188 - 6x + 6x +
  child_names <- vapply(shiny_tag$children, `[[`, character(1L), "name")
189 - 6x + 6x +
  checkmate::assert_subset(c("title", "link"), child_names, .var.name = "child tags")
190 - 4x + 4x +
  rel_attr <- shiny_tag$children[[which(child_names == "link")]]$attribs$rel
191 - 4x + 4x +
  checkmate::assert_subset(
192 - 4x + 4x +
    rel_attr,
193 - 4x + 4x +
    c("icon", "shortcut icon"),
194 - 4x + 4x +
    .var.name = "Link tag's rel attribute",
195 - 4x + 4x +
    empty.ok = FALSE
@@ -24627,56 +25420,64 @@

teal coverage - 56.74%

212 - 10x + 10x +
  checkmate::assert_string(title, null.ok = TRUE)
213 - 10x + 10x +
  checkmate::assert_string(favicon, null.ok = TRUE)
214 - 10x + 10x +
  tags$head(
215 - 10x + 10x +
    tags$title(title),
216 - 10x + 10x +
    tags$link(
217 - 10x + 10x +
      rel = "icon",
218 - 10x + 10x +
      href = favicon,
219 - 10x + 10x +
      sizes = "any"
@@ -24816,14 +25617,16 @@

teal coverage - 56.74%

239 - 18x + 18x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
240 - 17x + 17x +
  checkmate::assert_class(modules, "teal_modules")
@@ -24837,28 +25640,32 @@

teal coverage - 56.74%

242 - 16x + 16x +
  data <- if (inherits(data, "teal_data")) {
243 - 14x + 14x +
    as.list(teal.code::get_env(data))
244 - 16x + 16x +
  } else if (inherits(data, "teal_data_module")) {
245 - 2x + 2x +
    deparse1(body(data$server))
@@ -24872,7 +25679,8 @@

teal coverage - 56.74%

247 - 16x + 16x +
  modules <- lapply(modules, defunction)
@@ -24886,7 +25694,8 @@

teal coverage - 56.74%

249 - 16x + 16x +
  rlang::hash(list(data = data, modules = modules))
@@ -24935,28 +25744,32 @@

teal coverage - 56.74%

256 - 196x + 196x +
  if (is.list(x)) {
257 - 57x + 57x +
    lapply(x, defunction)
258 - 139x + 139x +
  } else if (is.function(x)) {
259 - 42x + 42x +
    deparse1(body(x))
@@ -24970,7 +25783,8 @@

teal coverage - 56.74%

261 - 97x + 97x +
    x
@@ -25068,7 +25882,8 @@

teal coverage - 56.74%

275 - 129x + 129x +
  make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
@@ -25110,7 +25925,8 @@

teal coverage - 56.74%

281 - 101x + 101x +
  checkmate::assert_string(string)
@@ -25124,14 +25940,16 @@

teal coverage - 56.74%

283 - 101x + 101x +
  gsub(
284 - 101x + 101x +
    "(?:(?:\\x{001b}\\[)|\\x{009b})(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\\x{001b}[A-M]",
@@ -25145,21 +25963,24 @@

teal coverage - 56.74%

286 - 101x + 101x +
    string,
287 - 101x + 101x +
    perl = TRUE,
288 - 101x + 101x +
    useBytes = TRUE
@@ -25326,49 +26147,56 @@

teal coverage - 56.74%

21 - 74x + 74x +
  checkmate::assert_class(data, "teal_data")
22 - 74x + 74x +
  data@code <- c(data@code, code)
23 - 74x + 74x +
  data@id <- c(data@id, max(data@id) + 1L + seq_along(code))
24 - 74x + 74x +
  data@messages <- c(data@messages, rep("", length(code)))
25 - 74x + 74x +
  data@warnings <- c(data@warnings, rep("", length(code)))
26 - 74x + 74x +
  methods::validObject(data)
27 - 74x + 74x +
  data
@@ -25403,42 +26231,48 @@

teal coverage - 56.74%

32 - 74x + 74x +
  checkmate::assert_class(data, "teal_data")
33 - 74x + 74x +
  checkmate::assert_class(objects, "list")
34 - 74x + 74x +
  new_env <- list2env(objects, parent = .GlobalEnv)
35 - 74x + 74x +
  rlang::env_coalesce(new_env, data@env)
36 - 74x + 74x +
  data@env <- new_env
37 - 74x + 74x +
  data
@@ -25473,28 +26307,32 @@

teal coverage - 56.74%

42 - 74x + 74x +
  checkmate::assert_class(data, "teal_data")
43 - 74x + 74x +
  checkmate::assert_class(datanames, "character")
44 - 74x + 74x +
  datanames_corrected <- intersect(datanames, ls(data@env))
45 - 74x + 74x +
  dataname_corrected_with_raw <- intersect(c(datanames, sprintf("%s._raw_", datanames)), ls(data@env))
@@ -25508,7 +26346,8 @@

teal coverage - 56.74%

47 - 74x + 74x +
  if (!length(datanames)) {
@@ -25536,49 +26375,56 @@

teal coverage - 56.74%

51 - 74x + 74x +
  new_data <- do.call(
52 - 74x + 74x +
    teal.data::teal_data,
53 - 74x + 74x +
    args = c(
54 - 74x + 74x +
      mget(x = dataname_corrected_with_raw, envir = data@env),
55 - 74x + 74x +
      list(
56 - 74x + 74x +
        code = gsub(
57 - 74x + 74x +
          "warning('Code was not verified for reproducibility.')\n",
@@ -25592,14 +26438,16 @@

teal coverage - 56.74%

59 - 74x + 74x +
          teal.data::get_code(data, datanames = dataname_corrected_with_raw),
60 - 74x + 74x +
          fixed = TRUE
@@ -25613,7 +26461,8 @@

teal coverage - 56.74%

62 - 74x + 74x +
        join_keys = teal.data::join_keys(data)[datanames_corrected]
@@ -25641,21 +26490,24 @@

teal coverage - 56.74%

66 - 74x + 74x +
  new_data@verified <- data@verified
67 - 74x + 74x +
  teal.data::datanames(new_data) <- datanames_corrected
68 - 74x + 74x +
  new_data
@@ -25690,28 +26542,32 @@

teal coverage - 56.74%

73 - 318x + 318x +
  checkmate::assert_class(data, "teal_data")
74 - 314x + 314x +
  datanames <- teal.data::datanames(data)
75 - 314x + 314x +
  if (length(datanames)) {
76 - 219x + 219x +
    datanames
@@ -25725,7 +26581,8 @@

teal coverage - 56.74%

78 - 95x + 95x +
    .teal_data_ls(data)
@@ -25767,7 +26624,8 @@

teal coverage - 56.74%

84 - 210x + 210x +
  grep("._raw_", ls(teal.code::get_env(data), all.names = TRUE), value = TRUE, invert = TRUE)
@@ -25976,35 +26834,40 @@

teal coverage - 56.74%

28 - 91x + 91x +
  checkmate::assert_class(datasets, "reactive")
29 - 91x + 91x +
  moduleServer(id, function(input, output, session) {
30 - 91x + 91x +
    output$panel <- renderUI({
31 - 81x + 81x +
      req(inherits(datasets(), "FilteredData"))
32 - 73x + 73x +
      isolate({
@@ -26025,21 +26888,24 @@

teal coverage - 56.74%

35 - 73x + 73x +
        logger::log_debug("srv_filter_panel rendering filter panel.")
36 - 73x + 73x +
        if (length(active_datanames())) {
37 - 72x + 72x +
          datasets()$srv_active("filters", active_datanames = active_datanames)
@@ -26053,7 +26919,8 @@

teal coverage - 56.74%

39 - 72x + 72x +
          datasets()$ui_active(session$ns("filters"), active_datanames = active_datanames)
@@ -26088,7 +26955,8 @@

teal coverage - 56.74%

44 - 91x + 91x +
    trigger_data <- .observe_active_filter_changed(datasets, is_active, active_datanames, data_rv)
@@ -26102,14 +26970,16 @@

teal coverage - 56.74%

46 - 91x + 91x +
    eventReactive(trigger_data(), {
47 - 74x + 74x +
      .make_filtered_teal_data(modules, data = data_rv(), datasets = datasets(), datanames = active_datanames())
@@ -26158,42 +27028,48 @@

teal coverage - 56.74%

54 - 74x + 74x +
  data <- eval_code(data, sprintf("%1$s._raw_ <- %1$s", datanames))
55 - 74x + 74x +
  filtered_code <- teal.slice::get_filter_expr(datasets = datasets, datanames = datanames)
56 - 74x + 74x +
  filtered_teal_data <- .append_evaluated_code(data, filtered_code)
57 - 74x + 74x +
  filtered_datasets <- sapply(datanames, function(x) datasets$get_data(x, filtered = TRUE), simplify = FALSE)
58 - 74x + 74x +
  filtered_teal_data <- .append_modified_data(filtered_teal_data, filtered_datasets)
59 - 74x + 74x +
  filtered_teal_data
@@ -26228,42 +27104,48 @@

teal coverage - 56.74%

64 - 91x + 91x +
  previous_signature <- reactiveVal(NULL)
65 - 91x + 91x +
  filter_changed <- reactive({
66 - 159x + 159x +
    req(inherits(datasets(), "FilteredData"))
67 - 155x + 155x +
    new_signature <- c(
68 - 155x + 155x +
      teal.data::get_code(data_rv()),
69 - 155x + 155x +
      teal.slice::get_filter_expr(datasets = datasets(), datanames = active_datanames())
@@ -26277,21 +27159,24 @@

teal coverage - 56.74%

71 - 155x + 155x +
    if (!identical(previous_signature(), new_signature)) {
72 - 74x + 74x +
      previous_signature(new_signature)
73 - 74x + 74x +
      TRUE
@@ -26305,7 +27190,8 @@

teal coverage - 56.74%

75 - 81x + 81x +
      FALSE
@@ -26333,42 +27219,48 @@

teal coverage - 56.74%

79 - 91x + 91x +
  trigger_data <- reactiveVal(NULL)
80 - 91x + 91x +
  observe({
81 - 193x + 193x +
    if (isTRUE(is_active() && filter_changed())) {
82 - 74x + 74x +
      isolate({
83 - 74x + 74x +
        if (is.null(trigger_data())) {
84 - 74x + 74x +
          trigger_data(0)
@@ -26382,7 +27274,8 @@

teal coverage - 56.74%

86 - 8x + 8x +
          trigger_data(trigger_data() + 1)
@@ -26424,7 +27317,8 @@

teal coverage - 56.74%

92 - 91x + 91x +
  trigger_data
@@ -27137,28 +28031,32 @@

teal coverage - 56.74%

100 - 65x + 65x +
  moduleServer(id, function(input, output, session) {
101 - 65x + 65x +
    logger::log_debug("srv_snapshot_manager_panel initializing")
102 - 65x + 65x +
    setBookmarkExclude(c("show_snapshot_manager"))
103 - 65x + 65x +
    observeEvent(input$show_snapshot_manager, {
@@ -27242,7 +28140,8 @@

teal coverage - 56.74%

115 - 65x + 65x +
    srv_snapshot_manager("module", slices_global = slices_global)
@@ -27403,7 +28302,8 @@

teal coverage - 56.74%

138 - 65x + 65x +
  checkmate::assert_character(id)
@@ -27417,14 +28317,16 @@

teal coverage - 56.74%

140 - 65x + 65x +
  moduleServer(id, function(input, output, session) {
141 - 65x + 65x +
    logger::log_debug("srv_snapshot_manager initializing")
@@ -27452,28 +28354,32 @@

teal coverage - 56.74%

145 - 65x + 65x +
    setBookmarkExclude(c(
146 - 65x + 65x +
      "snapshot_add", "snapshot_load", "snapshot_reset",
147 - 65x + 65x +
      "snapshot_name_accept", "snaphot_file_accept",
148 - 65x + 65x +
      "snapshot_name", "snapshot_file"
@@ -27494,7 +28400,8 @@

teal coverage - 56.74%

151 - 65x + 65x +
    session$onBookmark(function(state) {
@@ -27529,7 +28436,8 @@

teal coverage - 56.74%

156 - 65x + 65x +
    ns <- session$ns
@@ -27550,7 +28458,8 @@

teal coverage - 56.74%

159 - 65x + 65x +
    snapshot_history <- reactiveVal({
@@ -27564,21 +28473,24 @@

teal coverage - 56.74%

161 - 65x + 65x +
      restoreValue(
162 - 65x + 65x +
        ns("snapshot_history"),
163 - 65x + 65x +
        list("Initial application state" = shiny::isolate(as.list(slices_global$all_slices(), recursive = TRUE)))
@@ -27620,7 +28532,8 @@

teal coverage - 56.74%

169 - 65x + 65x +
    observeEvent(input$snapshot_add, {
@@ -27718,7 +28631,8 @@

teal coverage - 56.74%

183 - 65x + 65x +
    observeEvent(input$snapshot_name_accept, {
@@ -27935,7 +28849,8 @@

teal coverage - 56.74%

214 - 65x + 65x +
    observeEvent(input$snapshot_load, {
@@ -28068,7 +28983,8 @@

teal coverage - 56.74%

233 - 65x + 65x +
    observeEvent(input$snaphot_file_accept, {
@@ -28404,21 +29320,24 @@

teal coverage - 56.74%

281 - 65x + 65x +
    observeEvent(input$snapshot_reset, {
282 - 2x + 2x +
      logger::log_debug("srv_snapshot_manager: snapshot_reset button clicked, restoring snapshot")
283 - 2x + 2x +
      s <- "Initial application state"
@@ -28432,7 +29351,8 @@

teal coverage - 56.74%

285 - 2x + 2x +
      snapshot <- snapshot_history()[[s]]
@@ -28446,21 +29366,24 @@

teal coverage - 56.74%

287 - 2x + 2x +
      snapshot_state <- as.teal_slices(snapshot)
288 - 2x + 2x +
      slices_global$slices_set(snapshot_state)
289 - 2x + 2x +
      removeModal()
@@ -28516,21 +29439,24 @@

teal coverage - 56.74%

297 - 65x + 65x +
    observers <- reactiveValues()
298 - 65x + 65x +
    handlers <- reactiveValues()
299 - 65x + 65x +
    divs <- reactiveValues()
@@ -28544,21 +29470,24 @@

teal coverage - 56.74%

301 - 65x + 65x +
    observeEvent(snapshot_history(), {
302 - 57x + 57x +
      logger::log_debug("srv_snapshot_manager: snapshot history modified, updating snapshot list")
303 - 57x + 57x +
      lapply(names(snapshot_history())[-1L], function(s) {
@@ -28866,42 +29795,48 @@

teal coverage - 56.74%

347 - 65x + 65x +
    output$snapshot_list <- renderUI({
348 - 57x + 57x +
      rows <- rev(reactiveValuesToList(divs))
349 - 57x + 57x +
      if (length(rows) == 0L) {
350 - 57x + 57x +
        tags$div(
351 - 57x + 57x +
          class = "manager_placeholder",
352 - 57x + 57x +
          "Snapshots will appear here."
@@ -28950,7 +29885,8 @@

teal coverage - 56.74%

359 - 65x + 65x +
    snapshot_history
@@ -29369,28 +30305,32 @@

teal coverage - 56.74%

57 - 26x + 26x +
  checkmate::assert_string(id)
58 - 26x + 26x +
  checkmate::assert_class(data, "reactive")
59 - 26x + 26x +
  checkmate::assert_class(data_module, "teal_data_module")
60 - 26x + 26x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"), null.ok = TRUE)
@@ -29404,14 +30344,16 @@

teal coverage - 56.74%

62 - 26x + 26x +
  moduleServer(id, function(input, output, session) {
63 - 26x + 26x +
    logger::log_debug("srv_teal_data initializing.")
@@ -29425,14 +30367,16 @@

teal coverage - 56.74%

65 - 26x + 26x +
    data_out <- if (is_arg_used(data_module$server, "data")) {
66 - 17x + 17x +
      data_module$server(id = "data", data = data)
@@ -29446,7 +30390,8 @@

teal coverage - 56.74%

68 - 9x + 9x +
      data_module$server(id = "data")
@@ -29467,35 +30412,40 @@

teal coverage - 56.74%

71 - 26x + 26x +
    data_validated <- srv_validate_reactive_teal_data(
72 - 26x + 26x +
      id = "validate",
73 - 26x + 26x +
      data = data_out,
74 - 26x + 26x +
      modules = modules,
75 - 26x + 26x +
      validate_shiny_silent_error = validate_shiny_silent_error
@@ -29516,28 +30466,32 @@

teal coverage - 56.74%

78 - 24x + 24x +
    .fallback_on_failure(
79 - 24x + 24x +
      this = data_validated,
80 - 24x + 24x +
      that = data,
81 - 24x + 24x +
      label = sprintf("Data element '%s' for module '%s'", id, modules$label)
@@ -29663,21 +30617,24 @@

teal coverage - 56.74%

99 - 116x + 116x +
  moduleServer(id, function(input, output, session) {
100 - 116x + 116x +
    if (!is.reactive(data)) {
101 - 2x + 2x +
      stop("The `teal_data_module` passed to `data` must return a reactive expression.", call. = FALSE)
@@ -29698,7 +30655,8 @@

teal coverage - 56.74%

104 - 114x + 114x +
    data_out_rv <- reactive(tryCatch(data(), error = function(e) e))
@@ -29712,7 +30670,8 @@

teal coverage - 56.74%

106 - 114x + 114x +
    data_validated <- reactive({
@@ -29726,7 +30685,8 @@

teal coverage - 56.74%

108 - 126x + 126x +
      data_out <- data_out_rv()
@@ -29747,21 +30707,24 @@

teal coverage - 56.74%

111 - 126x + 126x +
      if (inherits(data_out, "shiny.silent.error") && identical(data_out$message, "")) {
112 - 25x + 25x +
        if (!validate_shiny_silent_error) {
113 - 25x + 25x +
          return(NULL)
@@ -29873,56 +30836,64 @@

teal coverage - 56.74%

129 - 101x + 101x +
      if (inherits(data_out, c("qenv.error", "error"))) {
130 - 5x + 5x +
        validate(
131 - 5x + 5x +
          need(
132 - 5x + 5x +
            FALSE,
133 - 5x + 5x +
            paste(
134 - 5x + 5x +
              "Error when executing `teal_data_module` passed to `data`:\n ",
135 - 5x + 5x +
              strip_style(paste(data_out$message, collapse = "\n")),
136 - 5x + 5x +
              "\n Check your inputs or contact app developer if error persists."
@@ -29964,56 +30935,64 @@

teal coverage - 56.74%

142 - 96x + 96x +
      validate(
143 - 96x + 96x +
        need(
144 - 96x + 96x +
          inherits(data_out, "teal_data"),
145 - 96x + 96x +
          paste(
146 - 96x + 96x +
            "Error: `teal_data_module` passed to `data` failed to return `teal_data` object, returned",
147 - 96x + 96x +
            strip_style(toString(sQuote(class(data_out)))),
148 - 96x + 96x +
            "instead.",
149 - 96x + 96x +
            "\n Check your inputs or contact app developer if error persists."
@@ -30055,7 +31034,8 @@

teal coverage - 56.74%

155 - 95x + 95x +
      data_out
@@ -30076,21 +31056,24 @@

teal coverage - 56.74%

158 - 114x + 114x +
    output$shiny_errors <- renderUI({
159 - 126x + 126x +
      data_validated()
160 - 120x + 120x +
      NULL
@@ -30111,35 +31094,40 @@

teal coverage - 56.74%

163 - 114x + 114x +
    output$shiny_warnings <- renderUI({
164 - 126x + 126x +
      if (inherits(data_out_rv(), "teal_data")) {
165 - 95x + 95x +
        is_modules_ok <- check_modules_datanames(modules = modules, datanames = .teal_data_ls(data_validated()))
166 - 95x + 95x +
        if (!isTRUE(is_modules_ok)) {
167 - 2x + 2x +
          tags$div(is_modules_ok, class = "teal-output-warning")
@@ -30174,7 +31162,8 @@

teal coverage - 56.74%

172 - 114x + 114x +
    data_validated
@@ -30293,21 +31282,24 @@

teal coverage - 56.74%

189 - 52x + 52x +
  checkmate::assert_class(this, "reactive")
190 - 52x + 52x +
  checkmate::assert_class(that, "reactive")
191 - 52x + 52x +
  checkmate::assert_string(label)
@@ -30321,35 +31313,40 @@

teal coverage - 56.74%

193 - 52x + 52x +
  reactive({
194 - 52x + 52x +
    res <- try(this(), silent = TRUE)
195 - 52x + 52x +
    if (inherits(res, "teal_data")) {
196 - 46x + 46x +
      logger::log_debug("{ label } evaluated successfully.")
197 - 46x + 46x +
      res
@@ -30363,14 +31360,16 @@

teal coverage - 56.74%

199 - 6x + 6x +
      logger::log_debug("{ label } failed, falling back to previous data.")
200 - 6x + 6x +
      that()
@@ -31153,14 +32152,16 @@

teal coverage - 56.74%

108 - 36x + 36x +
  dots <- list(...)
109 - 2x + 2x +
  if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
@@ -31174,21 +32175,24 @@

teal coverage - 56.74%

111 - 34x + 34x +
  messages <- extract_validator(dots, header)
112 - 34x + 34x +
  failings <- if (!any_names(dots)) {
113 - 29x + 29x +
    add_header(messages, header)
@@ -31202,7 +32206,8 @@

teal coverage - 56.74%

115 - 5x + 5x +
    unlist(messages)
@@ -31223,7 +32228,8 @@

teal coverage - 56.74%

118 - 34x + 34x +
  shiny::validate(shiny::need(is.null(failings), failings))
@@ -31293,7 +32299,8 @@

teal coverage - 56.74%

128 - 118x + 118x +
  all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
@@ -31356,7 +32363,8 @@

teal coverage - 56.74%

137 - 49x + 49x +
  x$.__enclos_env__$private$enabled
@@ -31412,14 +32420,16 @@

teal coverage - 56.74%

145 - 113x + 113x +
  if (inherits(iv, "InputValidator")) {
146 - 49x + 49x +
    add_header(gather_messages(iv), header)
@@ -31433,14 +32443,16 @@

teal coverage - 56.74%

148 - 58x + 58x +
    if (is.null(names(iv))) names(iv) <- rep("", length(iv))
149 - 64x + 64x +
    mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
@@ -31503,28 +32515,32 @@

teal coverage - 56.74%

158 - 49x + 49x +
  if (validator_enabled(iv)) {
159 - 46x + 46x +
    status <- iv$validate()
160 - 46x + 46x +
    failing_inputs <- Filter(Negate(is.null), status)
161 - 46x + 46x +
    unique(lapply(failing_inputs, function(x) x[["message"]]))
@@ -31538,14 +32554,16 @@

teal coverage - 56.74%

163 - 3x + 3x +
    warning("Validator is disabled and will be omitted.")
164 - 3x + 3x +
    list()
@@ -31601,21 +32619,24 @@

teal coverage - 56.74%

172 - 78x + 78x +
  ans <- unlist(messages)
173 - 78x + 78x +
  if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
174 - 31x + 31x +
    ans <- c(paste0(header, "\n"), ans, "\n")
@@ -31629,7 +32650,8 @@

teal coverage - 56.74%

176 - 78x + 78x +
  ans
@@ -31678,21 +32700,24 @@

teal coverage - 56.74%

183 - 103x + 103x +
  any(
184 - 103x + 103x +
    if (is.list(x)) {
185 - 58x + 58x +
      if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
@@ -31706,7 +32731,8 @@

teal coverage - 56.74%

187 - 40x + 40x +
      FALSE
@@ -31943,7 +32969,8 @@

teal coverage - 56.74%

30 - 8x + 8x +
  lockfile_path <- "teal_app.lock"
@@ -31957,14 +32984,16 @@

teal coverage - 56.74%

32 - 8x + 8x +
  user_lockfile <- getOption("teal.renv.lockfile", "")
33 - 8x + 8x +
  if (!identical(user_lockfile, "")) {
@@ -32027,7 +33056,8 @@

teal coverage - 56.74%

42 - 8x + 8x +
  if (!(is_in_test() || is_r_cmd_check())) {
@@ -32125,21 +33155,24 @@

teal coverage - 56.74%

56 - 1x + 1x +
  checkmate::assert_flag(close)
57 - 1x + 1x +
  checkmate::assert_string(lockfile_path, na.ok = TRUE)
58 - 1x + 1x +
  promise <- promises::future_promise({
@@ -32160,7 +33193,8 @@

teal coverage - 56.74%

61 - 1x + 1x +
    shiny::onStop(function() file.remove(lockfile_path))
@@ -32174,35 +33208,40 @@

teal coverage - 56.74%

63 - 1x + 1x +
    renv_logs <- utils::capture.output(
64 - 1x + 1x +
      renv::snapshot(
65 - 1x + 1x +
        lockfile = lockfile_path,
66 - 1x + 1x +
        prompt = FALSE,
67 - 1x + 1x +
        force = TRUE
@@ -32230,7 +33269,8 @@

teal coverage - 56.74%

71 - 1x + 1x +
    if (any(grepl("Lockfile written", renv_logs))) {
@@ -32251,7 +33291,8 @@

teal coverage - 56.74%

74 - 1x + 1x +
      logger::log_debug("lockfile created with issues.")
@@ -32272,7 +33313,8 @@

teal coverage - 56.74%

77 - 1x + 1x +
    lockfile_path
@@ -32286,7 +33328,8 @@

teal coverage - 56.74%

79 - 1x + 1x +
  if (close) {
@@ -32300,14 +33343,16 @@

teal coverage - 56.74%

81 - 1x + 1x +
    promises::then(promise, onFulfilled = function() {
82 - 1x + 1x +
      future::plan(future::sequential)
@@ -32328,7 +33373,8 @@

teal coverage - 56.74%

85 - 1x + 1x +
  promise
@@ -32356,14 +33402,16 @@

teal coverage - 56.74%

89 - 67x + 67x +
  downloadHandler(
90 - 67x + 67x +
    filename = function() {
@@ -32384,7 +33432,8 @@

teal coverage - 56.74%

93 - 67x + 67x +
    content = function(file) {
@@ -32461,7 +33510,8 @@

teal coverage - 56.74%

104 - 67x + 67x +
    contentType = "application/json"
@@ -32524,7 +33574,8 @@

teal coverage - 56.74%

113 - 8x + 8x +
  identical(Sys.getenv("TESTTHAT"), "true")
@@ -32733,14 +33784,16 @@

teal coverage - 56.74%

28 - 9x + 9x +
  checkmate::assert_class(tss, "teal_slices")
29 - 9x + 9x +
  checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
@@ -32754,7 +33807,8 @@

teal coverage - 56.74%

31 - 9x + 9x +
  cat(format(tss, trim_lines = FALSE), "\n", file = file)
@@ -32803,7 +33857,8 @@

teal coverage - 56.74%

38 - 9x + 9x +
  checkmate::assert_file_exists(file, access = "r", extension = "json")
@@ -32817,56 +33872,64 @@

teal coverage - 56.74%

40 - 9x + 9x +
  tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
41 - 9x + 9x +
  tss_json$slices <-
42 - 9x + 9x +
    lapply(tss_json$slices, function(slice) {
43 - 9x + 9x +
      for (field in c("selected", "choices")) {
44 - 18x + 18x +
        if (!is.null(slice[[field]])) {
45 - 12x + 12x +
          if (length(slice[[field]]) > 0) {
46 - 9x + 9x +
            date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
47 - 9x + 9x +
            time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
@@ -32880,35 +33943,40 @@

teal coverage - 56.74%

49 - 9x + 9x +
            slice[[field]] <-
50 - 9x + 9x +
              if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
51 - 3x + 3x +
                as.Date(slice[[field]])
52 - 9x + 9x +
              } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
53 - 3x + 3x +
                as.POSIXct(slice[[field]], tz = "UTC")
@@ -32922,7 +33990,8 @@

teal coverage - 56.74%

55 - 3x + 3x +
                slice[[field]]
@@ -32943,7 +34012,8 @@

teal coverage - 56.74%

58 - 3x + 3x +
            slice[[field]] <- character(0)
@@ -32971,7 +34041,8 @@

teal coverage - 56.74%

62 - 9x + 9x +
      slice
@@ -32992,7 +34063,8 @@

teal coverage - 56.74%

65 - 9x + 9x +
  tss_elements <- lapply(tss_json$slices, as.teal_slice)
@@ -33006,7 +34078,8 @@

teal coverage - 56.74%

67 - 9x + 9x +
  do.call(teal_slices, c(tss_elements, tss_json$attributes))
@@ -33411,28 +34484,32 @@

teal coverage - 56.74%

56 - 91x + 91x +
  checkmate::assert_string(id)
57 - 91x + 91x +
  checkmate::assert_class(data, "reactive")
58 - 91x + 91x +
  checkmate::assert_list(transforms, "teal_transform_module", null.ok = TRUE)
59 - 91x + 91x +
  checkmate::assert_class(modules, "teal_module")
@@ -33446,14 +34523,16 @@

teal coverage - 56.74%

61 - 91x + 91x +
  if (length(transforms) == 0L) {
62 - 77x + 77x +
    return(data)
@@ -33474,21 +34553,24 @@

teal coverage - 56.74%

65 - 14x + 14x +
  labels <- lapply(transforms, function(x) attr(x, "label"))
66 - 14x + 14x +
  ids <- get_unique_labels(labels)
67 - 14x + 14x +
  names(transforms) <- ids
@@ -33502,63 +34584,72 @@

teal coverage - 56.74%

69 - 14x + 14x +
  moduleServer(id, function(input, output, session) {
70 - 14x + 14x +
    logger::log_debug("srv_teal_data_modules initializing.")
71 - 14x + 14x +
    Reduce(
72 - 14x + 14x +
      function(previous_result, name) {
73 - 17x + 17x +
        srv_teal_data(
74 - 17x + 17x +
          id = name,
75 - 17x + 17x +
          data = previous_result,
76 - 17x + 17x +
          data_module = transforms[[name]],
77 - 17x + 17x +
          modules = modules
@@ -33579,14 +34670,16 @@

teal coverage - 56.74%

80 - 14x + 14x +
      x = names(transforms),
81 - 14x + 14x +
      init = data
@@ -33788,56 +34881,64 @@

teal coverage - 56.74%

25 - 4x + 4x +
      checkmate::assert_character(src, min.len = 0, max.len = 1)
26 - 4x + 4x +
      params <- list(...)
27 - 4x + 4x +
      params$eval <- FALSE
28 - 4x + 4x +
      rblock <- RcodeBlock$new(src)
29 - 4x + 4x +
      rblock$set_params(params)
30 - 4x + 4x +
      self$append_content(rblock)
31 - 4x + 4x +
      self$append_metadata("SRC", src)
32 - 4x + 4x +
      invisible(self)
@@ -33907,28 +35008,32 @@

teal coverage - 56.74%

42 - 5x + 5x +
      checkmate::assert_class(fs, "teal_slices")
43 - 4x + 4x +
      self$append_text("Filter State", "header3")
44 - 4x + 4x +
      if (length(fs)) {
45 - 3x + 3x +
        self$append_content(TealSlicesBlock$new(fs))
@@ -33942,7 +35047,8 @@

teal coverage - 56.74%

47 - 1x + 1x +
        self$append_text("No filters specified.")
@@ -33956,7 +35062,8 @@

teal coverage - 56.74%

49 - 4x + 4x +
      invisible(self)
@@ -34033,56 +35140,64 @@

teal coverage - 56.74%

60 - 4x + 4x +
      checkmate::assert_list(encodings)
61 - 4x + 4x +
      self$append_text("Selected Options", "header3")
62 - 4x + 4x +
      if (requireNamespace("yaml", quietly = TRUE)) {
63 - 4x + 4x +
        self$append_text(yaml::as.yaml(encodings, handlers = list(
64 - 4x + 4x +
          POSIXct = function(x) format(x, "%Y-%m-%d"),
65 - 4x + 4x +
          POSIXlt = function(x) format(x, "%Y-%m-%d"),
66 - 4x + 4x +
          Date = function(x) format(x, "%Y-%m-%d")
67 - 4x + 4x +
        )), "verbatim")
@@ -34110,14 +35225,16 @@

teal coverage - 56.74%

71 - 4x + 4x +
      self$append_metadata("Encodings", encodings)
72 - 4x + 4x +
      invisible(self)
@@ -34320,21 +35437,24 @@

teal coverage - 56.74%

101 - 9x + 9x +
      self$set_content(content)
102 - 8x + 8x +
      self$set_style(style)
103 - 8x + 8x +
      invisible(self)
@@ -34425,56 +35545,64 @@

teal coverage - 56.74%

116 - 9x + 9x +
      checkmate::assert_class(content, "teal_slices")
117 - 8x + 8x +
      if (length(content) != 0) {
118 - 6x + 6x +
        states_list <- lapply(content, function(x) {
119 - 6x + 6x +
          x_list <- shiny::isolate(as.list(x))
120 - 6x + 6x +
          if (
121 - 6x + 6x +
            inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
122 - 6x + 6x +
              length(x_list$choices) == 2 &&
123 - 6x + 6x +
              length(x_list$selected) == 2
@@ -34509,7 +35637,8 @@

teal coverage - 56.74%

128 - 6x + 6x +
          if (!is.null(x_list$arg)) {
@@ -34537,14 +35666,16 @@

teal coverage - 56.74%

132 - 6x + 6x +
          x_list <- x_list[
133 - 6x + 6x +
            c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
@@ -34558,21 +35689,24 @@

teal coverage - 56.74%

135 - 6x + 6x +
          names(x_list) <- c(
136 - 6x + 6x +
            "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
137 - 6x + 6x +
            "Selected Values", "Selected range", "Include NA values", "Include Inf values"
@@ -34593,7 +35727,8 @@

teal coverage - 56.74%

140 - 6x + 6x +
          Filter(Negate(is.null), x_list)
@@ -34614,14 +35749,16 @@

teal coverage - 56.74%

143 - 6x + 6x +
        if (requireNamespace("yaml", quietly = TRUE)) {
144 - 6x + 6x +
          super$set_content(yaml::as.yaml(states_list))
@@ -34656,14 +35793,16 @@

teal coverage - 56.74%

149 - 8x + 8x +
      private$teal_slices <- content
150 - 8x + 8x +
      invisible(self)
@@ -34761,35 +35900,40 @@

teal coverage - 56.74%

164 - 1x + 1x +
      checkmate::assert_list(x)
165 - 1x + 1x +
      checkmate::assert_names(names(x), must.include = c("text", "style"))
166 - 1x + 1x +
      super$set_content(x$text)
167 - 1x + 1x +
      super$set_style(x$style)
168 - 1x + 1x +
      invisible(self)
@@ -34866,28 +36010,32 @@

teal coverage - 56.74%

179 - 2x + 2x +
      content <- self$get_content()
180 - 2x + 2x +
      list(
181 - 2x + 2x +
        text = if (length(content)) content else "",
182 - 2x + 2x +
        style = self$get_style()
@@ -35467,49 +36615,56 @@

teal coverage - 56.74%

74 - 65x + 65x +
  checkmate::assert_character(id)
75 - 65x + 65x +
  checkmate::assert_class(modules, "teal_modules")
76 - 65x + 65x +
  moduleServer(id, function(input, output, session) {
77 - 65x + 65x +
    logger::log_debug("bookmark_manager_srv initializing")
78 - 65x + 65x +
    ns <- session$ns
79 - 65x + 65x +
    bookmark_option <- get_bookmarking_option()
80 - 65x + 65x +
    is_unbookmarkable <- need_bookmarking(modules)
@@ -35537,7 +36692,8 @@

teal coverage - 56.74%

84 - 65x + 65x +
    setBookmarkExclude(c("do_bookmark"))
@@ -35551,14 +36707,16 @@

teal coverage - 56.74%

86 - 65x + 65x +
    app_session <- .subset2(session, "parent")
87 - 65x + 65x +
    app_session$onBookmarked(function(url) {
@@ -35943,7 +37101,8 @@

teal coverage - 56.74%

142 - 65x + 65x +
    observeEvent(input$do_bookmark, {
@@ -35978,7 +37137,8 @@

teal coverage - 56.74%

147 - 65x + 65x +
    invisible(NULL)
@@ -36027,14 +37187,16 @@

teal coverage - 56.74%

154 - 65x + 65x +
  bookmark_option <- getShinyOption("bookmarkStore")
155 - 65x + 65x +
  if (is.null(bookmark_option) && identical(getOption("shiny.bookmarkStore"), "server")) {
@@ -36055,7 +37217,8 @@

teal coverage - 56.74%

158 - 65x + 65x +
  bookmark_option
@@ -36090,21 +37253,24 @@

teal coverage - 56.74%

163 - 65x + 65x +
  unlist(rapply2(
164 - 65x + 65x +
    modules_bookmarkable(modules),
165 - 65x + 65x +
    Negate(isTRUE)
@@ -36328,28 +37494,32 @@

teal coverage - 56.74%

197 - 130x + 130x +
  checkmate::assert_character("value")
198 - 130x + 130x +
  session_default <- shiny::getDefaultReactiveDomain()
199 - 130x + 130x +
  session_parent <- .subset2(session_default, "parent")
200 - 130x + 130x +
  session <- if (is.null(session_parent)) session_default else session_parent
@@ -36363,7 +37533,8 @@

teal coverage - 56.74%

202 - 130x + 130x +
  if (isTRUE(session$restoreContext$active) && exists(value, session$restoreContext$values, inherits = FALSE)) {
@@ -36384,7 +37555,8 @@

teal coverage - 56.74%

205 - 130x + 130x +
    default
@@ -37203,14 +38375,16 @@

teal coverage - 56.74%

322 - 155x + 155x +
  if (inherits(x, "list")) {
323 - 65x + 65x +
    lapply(x, rapply2, f = f)
@@ -37224,7 +38398,8 @@

teal coverage - 56.74%

325 - 90x + 90x +
    f(x)
@@ -37643,21 +38818,24 @@

teal coverage - 56.74%

57 - 67x + 67x +
  checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
58 - 67x + 67x +
  lapply(files, function(file) {
59 - 67x + 67x +
    shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
@@ -37671,7 +38849,8 @@

teal coverage - 56.74%

61 - 67x + 67x +
  invisible(NULL)
@@ -38153,56 +39332,64 @@

teal coverage - 56.74%

46 - 17x + 17x +
  checkmate::assert_string(msg, null.ok = TRUE)
47 - 15x + 15x +
  checkmate::assert_data_frame(x)
48 - 15x + 15x +
  if (!is.null(min_nrow)) {
49 - 15x + 15x +
    if (complete) {
50 - 5x + 5x +
      complete_index <- stats::complete.cases(x)
51 - 5x + 5x +
      validate(need(
52 - 5x + 5x +
        sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
53 - 5x + 5x +
        paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
@@ -38223,35 +39410,40 @@

teal coverage - 56.74%

56 - 10x + 10x +
      validate(need(
57 - 10x + 10x +
        nrow(x) >= min_nrow,
58 - 10x + 10x +
        paste(
59 - 10x + 10x +
          c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
60 - 10x + 10x +
          collapse = "\n"
@@ -38286,28 +39478,32 @@

teal coverage - 56.74%

65 - 10x + 10x +
    if (!allow_inf) {
66 - 6x + 6x +
      validate(need(
67 - 6x + 6x +
        all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
68 - 6x + 6x +
        "Dataframe contains Inf values which is not allowed."
@@ -40651,21 +41847,24 @@

teal coverage - 56.74%

23 - 7x + 7x +
  checkmate::assert_string(label)
24 - 5x + 5x +
  checkmate::assert_list(server_args, names = "named")
25 - 5x + 5x +
  checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
@@ -40679,7 +41878,8 @@

teal coverage - 56.74%

27 - 3x + 3x +
  message("Initializing reporter_previewer_module")
@@ -40693,7 +41893,8 @@

teal coverage - 56.74%

29 - 3x + 3x +
  srv <- function(id, reporter, ...) {
@@ -40721,7 +41922,8 @@

teal coverage - 56.74%

33 - 3x + 3x +
  ui <- function(id, ...) {
@@ -40749,28 +41951,32 @@

teal coverage - 56.74%

37 - 3x + 3x +
  module <- module(
38 - 3x + 3x +
    label = "temporary label",
39 - 3x + 3x +
    server = srv, ui = ui,
40 - 3x + 3x +
    server_args = server_args, ui_args = list(), datanames = NULL
@@ -40798,28 +42004,32 @@

teal coverage - 56.74%

44 - 3x + 3x +
  class(module) <- c("teal_module_previewer", class(module))
45 - 3x + 3x +
  module$label <- label
46 - 3x + 3x +
  attr(module, "teal_bookmarkable") <- TRUE
47 - 3x + 3x +
  module
@@ -41657,28 +42867,32 @@

teal coverage - 56.74%

29 - 9x + 9x +
  teal_data_module(
30 - 9x + 9x +
    ui = function(id) {
31 - 1x + 1x +
      ns <- NS(id)
32 - 1x + 1x +
      object$ui(ns("mutate_inner"))
@@ -41692,21 +42906,24 @@

teal coverage - 56.74%

34 - 9x + 9x +
    server = function(id) {
35 - 7x + 7x +
      moduleServer(id, function(input, output, session) {
36 - 7x + 7x +
        teal_data_rv <- object$server("mutate_inner")
@@ -41720,14 +42937,16 @@

teal coverage - 56.74%

38 - 7x + 7x +
        if (!is.reactive(teal_data_rv)) {
39 - 1x + 1x +
          stop("The `teal_data_module` must return a reactive expression.", call. = FALSE)
@@ -41748,7 +42967,8 @@

teal coverage - 56.74%

42 - 6x + 6x +
        td <- eventReactive(teal_data_rv(),
@@ -41762,14 +42982,16 @@

teal coverage - 56.74%

44 - 6x + 6x +
            if (inherits(teal_data_rv(), c("teal_data", "qenv.error"))) {
45 - 4x + 4x +
              eval_code(teal_data_rv(), code)
@@ -41783,7 +43005,8 @@

teal coverage - 56.74%

47 - 2x + 2x +
              teal_data_rv()
@@ -41804,7 +43027,8 @@

teal coverage - 56.74%

50 - 6x + 6x +
          ignoreNULL = FALSE
@@ -41818,7 +43042,8 @@

teal coverage - 56.74%

52 - 6x + 6x +
        td
@@ -41867,7 +43092,8 @@

teal coverage - 56.74%

59 - 1x + 1x +
  eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
@@ -41895,7 +43121,8 @@

teal coverage - 56.74%

63 - 2x + 2x +
  eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
@@ -42356,49 +43583,56 @@

teal coverage - 56.74%

64 - 32x + 32x +
  checkmate::assert_function(ui, args = "id", nargs = 1)
65 - 31x + 31x +
  checkmate::assert_function(server, args = "id", nargs = 1)
66 - 29x + 29x +
  structure(
67 - 29x + 29x +
    list(ui = ui, server = server),
68 - 29x + 29x +
    label = label,
69 - 29x + 29x +
    class = "teal_data_module",
70 - 29x + 29x +
    once = once
@@ -42776,42 +44010,48 @@

teal coverage - 56.74%

124 - 13x + 13x +
  checkmate::assert_function(ui, args = "id", nargs = 1)
125 - 13x + 13x +
  checkmate::assert_function(server, args = c("id", "data"), nargs = 2)
126 - 13x + 13x +
  structure(
127 - 13x + 13x +
    list(ui = ui, server = server),
128 - 13x + 13x +
    label = label,
129 - 13x + 13x +
    class = c("teal_transform_module", "teal_data_module")
@@ -42887,28 +44127,32 @@

teal coverage - 56.74%

8 - 1x + 1x +
  libraries <- vapply(
9 - 1x + 1x +
    utils::sessionInfo()$otherPkgs,
10 - 1x + 1x +
    function(x) {
11 - 6x + 6x +
      paste0("library(", x$Package, ")")
@@ -42922,7 +44166,8 @@

teal coverage - 56.74%

13 - 1x + 1x +
    character(1)
@@ -42936,7 +44181,8 @@

teal coverage - 56.74%

15 - 1x + 1x +
  paste0(paste0(rev(libraries), sep = "\n"), collapse = "")
@@ -42985,21 +44231,24 @@

teal coverage - 56.74%

22 - 5x + 5x +
  code_string <- getOption("teal.load_nest_code")
23 - 5x + 5x +
  if (is.character(code_string)) {
24 - 2x + 2x +
    code_string
@@ -43013,7 +44262,8 @@

teal coverage - 56.74%

26 - 3x + 3x +
    "# Add any code to install/load your NEST environment here\n"
@@ -43229,14 +44479,16 @@

teal coverage - 56.74%

28 - 2x + 2x +
  expr <- substitute(expr)
29 - 2x + 2x +
  extras <- list(...)
@@ -43257,14 +44509,16 @@

teal coverage - 56.74%

32 - 2x + 2x +
  if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
33 - 2x + 2x +
    expr <- call("{", expr)
@@ -43285,7 +44539,8 @@

teal coverage - 56.74%

36 - 2x + 2x +
  calls <- as.list(expr)[-1]
@@ -43306,7 +44561,8 @@

teal coverage - 56.74%

39 - 2x + 2x +
  calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
@@ -43320,7 +44576,8 @@

teal coverage - 56.74%

41 - 2x + 2x +
  eval_code(object = data, code = as.expression(calls))
@@ -43773,14 +45030,16 @@

teal coverage - 56.74%

19 - 2x + 2x +
  packageStartupMessage(
20 - 2x + 2x +
    "\nYou are using teal version ",
@@ -43801,7 +45060,8 @@

teal coverage - 56.74%

23 - 2x + 2x +
    read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
diff --git a/ddl@main/coverage-report/index.html b/ddl@main/coverage-report/index.html index 4490b07529..638de08b41 100644 --- a/ddl@main/coverage-report/index.html +++ b/ddl@main/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -214,21 +213,24 @@

teal coverage - 71.94%

15 - 16x + 16x +
  script <- sprintf(
16 - 16x + 16x +
    "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
17 - 16x + 16x +
    ns("timezone")
@@ -242,14 +244,16 @@

teal coverage - 71.94%

19 - 16x + 16x +
  shinyjs::runjs(script) # function does not return anything
20 - 16x + 16x +
  return(invisible(NULL))
@@ -291,42 +295,48 @@

teal coverage - 71.94%

26 - 26x + 26x +
  bs_theme <- getOption("teal.bs_theme")
27 - 26x + 26x +
  if (is.null(bs_theme)) {
28 - 23x + 23x +
    NULL
29 - 3x + 3x +
  } else if (!inherits(bs_theme, "bs_theme")) {
30 - 2x + 2x +
    warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
31 - 2x + 2x +
    NULL
@@ -340,7 +350,8 @@

teal coverage - 71.94%

33 - 1x + 1x +
    bs_theme
@@ -375,42 +386,48 @@

teal coverage - 71.94%

38 - 3x + 3x +
  parents <- character(0)
39 - 3x + 3x +
  for (i in dataname) {
40 - 6x + 6x +
    while (length(i) > 0) {
41 - 6x + 6x +
      parent_i <- teal.data::parent(join_keys, i)
42 - 6x + 6x +
      parents <- c(parent_i, parents)
43 - 6x + 6x +
      i <- parent_i
@@ -438,7 +455,8 @@

teal coverage - 71.94%

47 - 3x + 3x +
  return(unique(c(parents, dataname)))
@@ -529,21 +547,24 @@

teal coverage - 71.94%

60 - 15x + 15x +
  checkmate::assert_class(x, "teal_data")
61 - 15x + 15x +
  checkmate::assert_character(datanames, min.len = 1L, any.missing = FALSE)
62 - 15x + 15x +
  checkmate::assert_subset(datanames, teal.data::datanames(x))
@@ -557,21 +578,24 @@

teal coverage - 71.94%

64 - 15x + 15x +
  ans <- teal.slice::init_filtered_data(
65 - 15x + 15x +
    x = sapply(datanames, function(dn) x[[dn]], simplify = FALSE),
66 - 15x + 15x +
    join_keys = teal.data::join_keys(x)
@@ -592,14 +616,16 @@

teal coverage - 71.94%

69 - 15x + 15x +
  attr(ans, "preprocessing_code") <- teal.code::get_code(x)
70 - 15x + 15x +
  ans
@@ -732,35 +758,40 @@

teal coverage - 71.94%

89 - 2x + 2x +
  checkmate::assert_string(title)
90 - 2x + 2x +
  checkmate::assert_string(label)
91 - 2x + 2x +
  checkmate::assert_string(description, null.ok = TRUE)
92 - 2x + 2x +
  checkmate::assert_flag(with_filter)
93 - 2x + 2x +
  checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
@@ -774,49 +805,56 @@

teal coverage - 71.94%

95 - 2x + 2x +
  card <- teal::TealReportCard$new()
96 - 2x + 2x +
  title <- if (label == "") title else label
97 - 2x + 2x +
  card$set_name(title)
98 - 2x + 2x +
  card$append_text(title, "header2")
99 - 1x + 1x +
  if (!is.null(description)) card$append_text(description, "header3")
100 - 1x + 1x +
  if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
101 - 2x + 2x +
  card
@@ -1194,14 +1232,16 @@

teal coverage - 71.94%

155 - 7x + 7x +
  checkmate::assert_class(modules, "teal_modules")
156 - 7x + 7x +
  checkmate::assert_character(datanames)
@@ -1215,7 +1255,8 @@

teal coverage - 71.94%

158 - 7x + 7x +
  recursive_check_datanames <- function(modules, datanames) {
@@ -1229,14 +1270,16 @@

teal coverage - 71.94%

160 - 14x + 14x +
    if (inherits(modules, "teal_modules")) {
161 - 7x + 7x +
      sapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
@@ -1250,49 +1293,56 @@

teal coverage - 71.94%

163 - 7x + 7x +
      extra_datanames <- setdiff(modules$datanames, c("all", datanames))
164 - 7x + 7x +
      if (length(extra_datanames)) {
165 - 2x + 2x +
        sprintf(
166 - 2x + 2x +
          "- Module '%s' uses datanames not available in 'data': (%s) not in (%s)",
167 - 2x + 2x +
          modules$label,
168 - 2x + 2x +
          toString(dQuote(extra_datanames, q = FALSE)),
169 - 2x + 2x +
          toString(dQuote(datanames, q = FALSE))
@@ -1327,21 +1377,24 @@

teal coverage - 71.94%

174 - 7x + 7x +
  check_datanames <- unlist(recursive_check_datanames(modules, datanames))
175 - 7x + 7x +
  if (length(check_datanames)) {
176 - 2x + 2x +
    paste(check_datanames, collapse = "\n")
@@ -1355,7 +1408,8 @@

teal coverage - 71.94%

178 - 5x + 5x +
    TRUE
@@ -1460,14 +1514,16 @@

teal coverage - 71.94%

193 - 5x + 5x +
  checkmate::assert_class(filters, "teal_slices")
194 - 5x + 5x +
  checkmate::assert_character(datanames)
@@ -1488,63 +1544,72 @@

teal coverage - 71.94%

197 - 5x + 5x +
  out <- unlist(sapply(
198 - 5x + 5x +
    filters, function(filter) {
199 - 2x + 2x +
      dataname <- shiny::isolate(filter$dataname)
200 - 2x + 2x +
      if (!dataname %in% datanames) {
201 - 2x + 2x +
        sprintf(
202 - 2x + 2x +
          "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
203 - 2x + 2x +
          shiny::isolate(filter$id),
204 - 2x + 2x +
          dQuote(dataname, q = FALSE),
205 - 2x + 2x +
          toString(dQuote(datanames, q = FALSE))
@@ -1593,14 +1658,16 @@

teal coverage - 71.94%

212 - 5x + 5x +
  if (length(out)) {
213 - 2x + 2x +
    paste(out, collapse = "\n")
@@ -1614,7 +1681,8 @@

teal coverage - 71.94%

215 - 3x + 3x +
    TRUE
@@ -2376,42 +2444,48 @@

teal coverage - 71.94%

106 - 7x + 7x +
  checkmate::assert_character(id)
107 - 7x + 7x +
  checkmate::assert_true(is.reactive(slices_global))
108 - 7x + 7x +
  checkmate::assert_class(isolate(slices_global()), "teal_slices")
109 - 7x + 7x +
  checkmate::assert_true(is.reactive(mapping_matrix))
110 - 7x + 7x +
  checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
111 - 7x + 7x +
  checkmate::assert_list(filtered_data_list, types = "FilteredData", any.missing = FALSE, names = "named")
@@ -2425,14 +2499,16 @@

teal coverage - 71.94%

113 - 7x + 7x +
  moduleServer(id, function(input, output, session) {
114 - 7x + 7x +
    ns <- session$ns
@@ -2453,28 +2529,32 @@

teal coverage - 71.94%

117 - 7x + 7x +
    filter <- isolate(slices_global())
118 - 7x + 7x +
    snapshot_history <- reactiveVal({
119 - 7x + 7x +
      list(
120 - 7x + 7x +
        "Initial application state" = as.list(filter, recursive = TRUE)
@@ -2516,7 +2596,8 @@

teal coverage - 71.94%

126 - 7x + 7x +
    observeEvent(input$snapshot_add, {
@@ -2607,7 +2688,8 @@

teal coverage - 71.94%

139 - 7x + 7x +
    observeEvent(input$snapshot_name_accept, {
@@ -2803,7 +2885,8 @@

teal coverage - 71.94%

167 - 7x + 7x +
    observeEvent(input$snapshot_load, {
@@ -2929,7 +3012,8 @@

teal coverage - 71.94%

185 - 7x + 7x +
    observeEvent(input$snaphot_file_accept, {
@@ -3279,7 +3363,8 @@

teal coverage - 71.94%

235 - 7x + 7x +
    observeEvent(input$snapshot_reset, {
@@ -3447,21 +3532,24 @@

teal coverage - 71.94%

259 - 7x + 7x +
    observers <- reactiveValues()
260 - 7x + 7x +
    handlers <- reactiveValues()
261 - 7x + 7x +
    divs <- reactiveValues()
@@ -3475,14 +3563,16 @@

teal coverage - 71.94%

263 - 7x + 7x +
    observeEvent(snapshot_history(), {
264 - 3x + 3x +
      lapply(names(snapshot_history())[-1L], function(s) {
@@ -3853,42 +3943,48 @@

teal coverage - 71.94%

317 - 7x + 7x +
    output$snapshot_list <- renderUI({
318 - 3x + 3x +
      rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
319 - 3x + 3x +
      if (length(rows) == 0L) {
320 - 3x + 3x +
        div(
321 - 3x + 3x +
          class = "snapshot_manager_placeholder",
322 - 3x + 3x +
          "Snapshots will appear here."
@@ -4699,7 +4795,8 @@

teal coverage - 71.94%

67 - 22x + 22x +
  if (checkmate::test_string(header)) {
@@ -4720,7 +4817,8 @@

teal coverage - 71.94%

70 - 22x + 22x +
  if (checkmate::test_string(footer)) {
@@ -4741,28 +4839,32 @@

teal coverage - 71.94%

73 - 22x + 22x +
  checkmate::assert(
74 - 22x + 22x +
    checkmate::check_class(splash_ui, "shiny.tag"),
75 - 22x + 22x +
    checkmate::check_class(splash_ui, "shiny.tag.list"),
76 - 22x + 22x +
    checkmate::check_class(splash_ui, "html")
@@ -4776,28 +4878,32 @@

teal coverage - 71.94%

78 - 22x + 22x +
  checkmate::assert(
79 - 22x + 22x +
    checkmate::check_class(header, "shiny.tag"),
80 - 22x + 22x +
    checkmate::check_class(header, "shiny.tag.list"),
81 - 22x + 22x +
    checkmate::check_class(header, "html")
@@ -4811,28 +4917,32 @@

teal coverage - 71.94%

83 - 22x + 22x +
  checkmate::assert(
84 - 22x + 22x +
    checkmate::check_class(footer, "shiny.tag"),
85 - 22x + 22x +
    checkmate::check_class(footer, "shiny.tag.list"),
86 - 22x + 22x +
    checkmate::check_class(footer, "html")
@@ -4853,7 +4963,8 @@

teal coverage - 71.94%

89 - 22x + 22x +
  ns <- NS(id)
@@ -4867,7 +4978,8 @@

teal coverage - 71.94%

91 - 22x + 22x +
  splash_ui <- div(
@@ -4881,7 +4993,8 @@

teal coverage - 71.94%

93 - 22x + 22x +
    id = ns("main_ui_container"),
@@ -4902,7 +5015,8 @@

teal coverage - 71.94%

96 - 22x + 22x +
    div(splash_ui)
@@ -4937,35 +5051,40 @@

teal coverage - 71.94%

101 - 22x + 22x +
  shiny_busy_message_panel <- conditionalPanel(
102 - 22x + 22x +
    condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint
103 - 22x + 22x +
    div(
104 - 22x + 22x +
      icon("arrows-rotate", "spin fa-spin"),
105 - 22x + 22x +
      "Computing ...",
@@ -4979,7 +5098,8 @@

teal coverage - 71.94%

107 - 22x + 22x +
      class = "shinybusymessage"
@@ -5007,98 +5127,112 @@

teal coverage - 71.94%

111 - 22x + 22x +
  res <- fluidPage(
112 - 22x + 22x +
    title = title,
113 - 22x + 22x +
    theme = get_teal_bs_theme(),
114 - 22x + 22x +
    include_teal_css_js(),
115 - 22x + 22x +
    tags$header(header),
116 - 22x + 22x +
    tags$hr(class = "my-2"),
117 - 22x + 22x +
    shiny_busy_message_panel,
118 - 22x + 22x +
    splash_ui,
119 - 22x + 22x +
    tags$hr(),
120 - 22x + 22x +
    tags$footer(
121 - 22x + 22x +
      div(
122 - 22x + 22x +
        footer,
123 - 22x + 22x +
        teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
124 - 22x + 22x +
        textOutput(ns("identifier"))
@@ -5126,7 +5260,8 @@

teal coverage - 71.94%

128 - 22x + 22x +
  return(res)
@@ -5168,21 +5303,24 @@

teal coverage - 71.94%

134 - 17x + 17x +
  stopifnot(is.reactive(teal_data_rv))
135 - 16x + 16x +
  moduleServer(id, function(input, output, session) {
136 - 16x + 16x +
    logger::log_trace("srv_teal initializing the module.")
@@ -5196,14 +5334,16 @@

teal coverage - 71.94%

138 - 16x + 16x +
    output$identifier <- renderText(
139 - 16x + 16x +
      paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
@@ -5224,28 +5364,32 @@

teal coverage - 71.94%

142 - 16x + 16x +
    teal.widgets::verbatim_popup_srv(
143 - 16x + 16x +
      "sessionInfo",
144 - 16x + 16x +
      verbatim_content = utils::capture.output(utils::sessionInfo()),
145 - 16x + 16x +
      title = "SessionInfo"
@@ -5273,7 +5417,8 @@

teal coverage - 71.94%

149 - 16x + 16x +
    run_js_files(files = "init.js") # `JavaScript` code to make the clipboard accessible
@@ -5301,35 +5446,40 @@

teal coverage - 71.94%

153 - 16x + 16x +
    get_client_timezone(session$ns)
154 - 16x + 16x +
    observeEvent(
155 - 16x + 16x +
      eventExpr = input$timezone,
156 - 16x + 16x +
      once = TRUE,
157 - 16x + 16x +
      handlerExpr = {
@@ -5371,14 +5521,16 @@

teal coverage - 71.94%

163 - 16x + 16x +
    reporter <- teal.reporter::Reporter$new()
164 - 16x + 16x +
    if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
@@ -5406,28 +5558,32 @@

teal coverage - 71.94%

168 - 16x + 16x +
    env <- environment()
169 - 16x + 16x +
    datasets_reactive <- eventReactive(teal_data_rv(), {
170 - 5x + 5x +
      env$progress <- shiny::Progress$new(session)
171 - 5x + 5x +
      env$progress$set(0.25, message = "Setting data")
@@ -5455,7 +5611,8 @@

teal coverage - 71.94%

175 - 5x + 5x +
      datasets_singleton <- teal_data_to_filtered_data(teal_data_rv())
@@ -5476,14 +5633,16 @@

teal coverage - 71.94%

178 - 5x + 5x +
      filter_global <- Filter(function(x) x$id %in% attr(filter, "mapping")$global_filters, filter)
179 - 5x + 5x +
      datasets_singleton$set_filter_state(filter_global)
@@ -5497,49 +5656,56 @@

teal coverage - 71.94%

181 - 5x + 5x +
      module_datasets <- function(modules) {
182 - 20x + 20x +
        if (inherits(modules, "teal_modules")) {
183 - 8x + 8x +
          datasets <- lapply(modules$children, module_datasets)
184 - 8x + 8x +
          labels <- vapply(modules$children, `[[`, character(1), "label")
185 - 8x + 8x +
          names(datasets) <- labels
186 - 8x + 8x +
          datasets
187 - 12x + 12x +
        } else if (isTRUE(attr(filter, "module_specific"))) {
@@ -5560,28 +5726,32 @@

teal coverage - 71.94%

190 - 3x + 3x +
          datanames <- if (is.null(modules$datanames) || modules$datanames == "all") {
191 - 3x + 3x +
            include_parent_datanames(
192 - 3x + 3x +
              teal.data::datanames(teal_data_rv()),
193 - 3x + 3x +
              teal_data_rv()@join_keys
@@ -5623,7 +5793,8 @@

teal coverage - 71.94%

199 - 3x + 3x +
          datasets_module <- teal_data_to_filtered_data(teal_data_rv(), datanames = datanames)
@@ -5651,7 +5822,8 @@

teal coverage - 71.94%

203 - 3x + 3x +
          slices <- Filter(x = filter, f = function(x) {
@@ -5679,42 +5851,48 @@

teal coverage - 71.94%

207 - 3x + 3x +
          include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
208 - 3x + 3x +
          exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
209 - 3x + 3x +
          slices$include_varnames <- include_varnames
210 - 3x + 3x +
          slices$exclude_varnames <- exclude_varnames
211 - 3x + 3x +
          datasets_module$set_filter_state(slices)
212 - 3x + 3x +
          datasets_module
@@ -5728,7 +5906,8 @@

teal coverage - 71.94%

214 - 9x + 9x +
          datasets_singleton
@@ -5749,7 +5928,8 @@

teal coverage - 71.94%

217 - 5x + 5x +
      module_datasets(modules)
@@ -5812,35 +5992,40 @@

teal coverage - 71.94%

226 - 16x + 16x +
    observeEvent(datasets_reactive(), once = TRUE, {
227 - 1x + 1x +
      logger::log_trace("srv_teal@5 setting main ui after data was pulled")
228 - 1x + 1x +
      on.exit(env$progress$close())
229 - 1x + 1x +
      env$progress$set(0.5, message = "Setting up main UI")
230 - 1x + 1x +
      datasets <- datasets_reactive()
@@ -5861,28 +6046,32 @@

teal coverage - 71.94%

233 - 1x + 1x +
      removeUI(sprintf("#%s > div:nth-child(1)", session$ns("main_ui_container")))
234 - 1x + 1x +
      insertUI(
235 - 1x + 1x +
        selector = paste0("#", session$ns("main_ui_container")),
236 - 1x + 1x +
        where = "beforeEnd",
@@ -5903,35 +6092,40 @@

teal coverage - 71.94%

239 - 1x + 1x +
        ui = div(ui_tabs_with_filters(
240 - 1x + 1x +
          session$ns("main_ui"),
241 - 1x + 1x +
          modules = modules,
242 - 1x + 1x +
          datasets = datasets,
243 - 1x + 1x +
          filter = filter
@@ -5959,7 +6153,8 @@

teal coverage - 71.94%

247 - 1x + 1x +
        immediate = TRUE
@@ -5994,42 +6189,48 @@

teal coverage - 71.94%

252 - 1x + 1x +
      active_module <- srv_tabs_with_filters(
253 - 1x + 1x +
        id = "main_ui",
254 - 1x + 1x +
        datasets = datasets,
255 - 1x + 1x +
        modules = modules,
256 - 1x + 1x +
        reporter = reporter,
257 - 1x + 1x +
        filter = filter
@@ -6043,7 +6244,8 @@

teal coverage - 71.94%

259 - 1x + 1x +
      return(active_module)
@@ -6126,28 +6328,32 @@

teal coverage - 71.94%

8 - 16x + 16x +
  vapply(
9 - 16x + 16x +
    utils::sessionInfo()$otherPkgs,
10 - 16x + 16x +
    function(x) {
11 - 272x + 272x +
      paste0("library(", x$Package, ")")
@@ -6161,7 +6367,8 @@

teal coverage - 71.94%

13 - 16x + 16x +
    character(1)
@@ -6182,21 +6389,24 @@

teal coverage - 71.94%

16 - 16x + 16x +
    rev() %>%
17 - 16x + 16x +
    paste0(sep = "\n") %>%
18 - 16x + 16x +
    paste0(collapse = "")
@@ -6238,7 +6448,8 @@

teal coverage - 71.94%

24 - 20x + 20x +
  code_string <- getOption("teal.load_nest_code")
@@ -6252,14 +6463,16 @@

teal coverage - 71.94%

26 - 20x + 20x +
  if (!is.null(code_string) && is.character(code_string)) {
27 - 2x + 2x +
    return(code_string)
@@ -6280,7 +6493,8 @@

teal coverage - 71.94%

30 - 18x + 18x +
  return("# Add any code to install/load your NEST environment here\n")
@@ -6406,14 +6620,16 @@

teal coverage - 71.94%

48 - 14x + 14x +
  str_prepro <- teal.data:::get_code_dependency(attr(datasets, "preprocessing_code"), names = datanames)
49 - 14x + 14x +
  if (length(str_prepro) == 0) {
@@ -6427,14 +6643,16 @@

teal coverage - 71.94%

51 - 14x + 14x +
  } else if (length(str_prepro) > 0) {
52 - 14x + 14x +
    str_prepro <- paste0(str_prepro, "\n\n")
@@ -6455,63 +6673,72 @@

teal coverage - 71.94%

55 - 14x + 14x +
  str_hash <- paste(
56 - 14x + 14x +
    paste0(
57 - 14x + 14x +
      vapply(
58 - 14x + 14x +
        datanames,
59 - 14x + 14x +
        function(dataname) {
60 - 17x + 17x +
          sprintf(
61 - 17x + 17x +
            "stopifnot(%s == %s)",
62 - 17x + 17x +
            deparse1(bquote(rlang::hash(.(as.name(dataname))))),
63 - 17x + 17x +
            deparse1(hashes[[dataname]])
@@ -6532,7 +6759,8 @@

teal coverage - 71.94%

66 - 14x + 14x +
        character(1)
@@ -6546,7 +6774,8 @@

teal coverage - 71.94%

68 - 14x + 14x +
      collapse = "\n"
@@ -6560,7 +6789,8 @@

teal coverage - 71.94%

70 - 14x + 14x +
    "\n\n"
@@ -6581,7 +6811,8 @@

teal coverage - 71.94%

73 - 14x + 14x +
  str_filter <- teal.slice::get_filter_expr(datasets, datanames)
@@ -6595,7 +6826,8 @@

teal coverage - 71.94%

75 - 14x + 14x +
  c(str_prepro, str_hash, str_filter)
@@ -6930,56 +7162,64 @@

teal coverage - 71.94%

46 - 17x + 17x +
  checkmate::assert_string(msg, null.ok = TRUE)
47 - 15x + 15x +
  checkmate::assert_data_frame(x)
48 - 15x + 15x +
  if (!is.null(min_nrow)) {
49 - 15x + 15x +
    if (complete) {
50 - 5x + 5x +
      complete_index <- stats::complete.cases(x)
51 - 5x + 5x +
      validate(need(
52 - 5x + 5x +
        sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
53 - 5x + 5x +
        paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
@@ -7000,35 +7240,40 @@

teal coverage - 71.94%

56 - 10x + 10x +
      validate(need(
57 - 10x + 10x +
        nrow(x) >= min_nrow,
58 - 10x + 10x +
        paste(
59 - 10x + 10x +
          c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
60 - 10x + 10x +
          collapse = "\n"
@@ -7063,28 +7308,32 @@

teal coverage - 71.94%

65 - 10x + 10x +
    if (!allow_inf) {
66 - 6x + 6x +
      validate(need(
67 - 6x + 6x +
        all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
68 - 6x + 6x +
        "Dataframe contains Inf values which is not allowed."
@@ -9869,77 +10118,88 @@

teal coverage - 71.94%

92 - 64x + 64x +
  checkmate::assert_string(label)
93 - 64x + 64x +
  module(
94 - 64x + 64x +
    label,
95 - 64x + 64x +
    server = function(id, data) {
96 - 1x + 1x +
      checkmate::assert_class(data, "tdata")
97 - 1x + 1x +
      moduleServer(id, function(input, output, session) {
98 - 1x + 1x +
        output$text <- renderPrint(data[[input$dataname]]())
99 - 1x + 1x +
        teal.widgets::verbatim_popup_srv(
100 - 1x + 1x +
          id = "rcode",
101 - 1x + 1x +
          verbatim_content = attr(data, "code")(),
102 - 1x + 1x +
          title = "Association Plot"
@@ -9967,49 +10227,56 @@

teal coverage - 71.94%

106 - 64x + 64x +
    ui = function(id, data) {
107 - 1x + 1x +
      ns <- NS(id)
108 - 1x + 1x +
      teal.widgets::standard_layout(
109 - 1x + 1x +
        output = verbatimTextOutput(ns("text")),
110 - 1x + 1x +
        encoding = div(
111 - 1x + 1x +
          selectInput(ns("dataname"), "Choose a dataset", choices = names(data)),
112 - 1x + 1x +
          teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code")
@@ -10037,7 +10304,8 @@

teal coverage - 71.94%

116 - 64x + 64x +
    datanames = datanames
@@ -10128,70 +10396,80 @@

teal coverage - 71.94%

129 - 3x + 3x +
  checkmate::assert_subset(datanames, c("ADSL", "ADTTE"))
130 - 3x + 3x +
  mods <- modules(
131 - 3x + 3x +
    label = "d1",
132 - 3x + 3x +
    modules(
133 - 3x + 3x +
      label = "d2",
134 - 3x + 3x +
      modules(
135 - 3x + 3x +
        label = "d3",
136 - 3x + 3x +
        example_module(label = "aaa1", datanames = datanames),
137 - 3x + 3x +
        example_module(label = "aaa2", datanames = datanames),
138 - 3x + 3x +
        example_module(label = "aaa3", datanames = datanames)
@@ -10205,7 +10483,8 @@

teal coverage - 71.94%

140 - 3x + 3x +
      example_module(label = "bbb", datanames = datanames)
@@ -10219,7 +10498,8 @@

teal coverage - 71.94%

142 - 3x + 3x +
    example_module(label = "ccc", datanames = datanames)
@@ -10233,7 +10513,8 @@

teal coverage - 71.94%

144 - 3x + 3x +
  return(mods)
@@ -10554,28 +10835,32 @@

teal coverage - 71.94%

44 - 42x + 42x +
  checkmate::assert_list(
45 - 42x + 42x +
    data,
46 - 42x + 42x +
    any.missing = FALSE, names = "unique",
47 - 42x + 42x +
    types = c("data.frame", "reactive", "MultiAssayExperiment")
@@ -10589,14 +10874,16 @@

teal coverage - 71.94%

49 - 38x + 38x +
  checkmate::assert_class(join_keys, "join_keys", null.ok = TRUE)
50 - 37x + 37x +
  checkmate::assert_multi_class(code, c("character", "reactive"))
@@ -10610,21 +10897,24 @@

teal coverage - 71.94%

52 - 36x + 36x +
  checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
53 - 34x + 34x +
  checkmate::assert_subset(names(metadata), names(data))
54 - 22x + 22x +
  for (m in metadata) teal.data::validate_metadata(m)
@@ -10638,14 +10928,16 @@

teal coverage - 71.94%

56 - 33x + 33x +
  if (is.reactive(code)) {
57 - 17x + 17x +
    isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
@@ -10673,21 +10965,24 @@

teal coverage - 71.94%

61 - 32x + 32x +
  for (x in names(data)) {
62 - 51x + 51x +
    if (!is.reactive(data[[x]])) {
63 - 29x + 29x +
      data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
@@ -10701,28 +10996,32 @@

teal coverage - 71.94%

65 - 22x + 22x +
      isolate(
66 - 22x + 22x +
        checkmate::assert_multi_class(
67 - 22x + 22x +
          data[[x]](), c("data.frame", "MultiAssayExperiment"),
68 - 22x + 22x +
          .var.name = "data"
@@ -10771,21 +11070,24 @@

teal coverage - 71.94%

75 - 31x + 31x +
  attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
76 - 31x + 31x +
  attr(data, "join_keys") <- join_keys
77 - 31x + 31x +
  attr(data, "metadata") <- metadata
@@ -10806,14 +11108,16 @@

teal coverage - 71.94%

80 - 31x + 31x +
  class(data) <- c("tdata", class(data))
81 - 31x + 31x +
  data
@@ -10946,14 +11250,16 @@

teal coverage - 71.94%

100 - 2x + 2x +
  checkmate::assert_class(data, "tdata")
101 - 1x + 1x +
  list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
@@ -11016,7 +11322,8 @@

teal coverage - 71.94%

110 - 6x + 6x +
  attr(x, "code")()
@@ -11100,14 +11407,16 @@

teal coverage - 71.94%

122 - 4x + 4x +
  checkmate::assert_class(data, "tdata")
123 - 2x + 2x +
  get_code(data)
@@ -11163,7 +11472,8 @@

teal coverage - 71.94%

131 - 3x + 3x +
  attr(data, "join_keys")
@@ -11233,14 +11543,16 @@

teal coverage - 71.94%

141 - 4x + 4x +
  checkmate::assert_string(dataname)
142 - 4x + 4x +
  UseMethod("get_metadata", data)
@@ -11282,21 +11594,24 @@

teal coverage - 71.94%

148 - 4x + 4x +
  metadata <- attr(data, "metadata")
149 - 4x + 4x +
  if (is.null(metadata)) {
150 - 1x + 1x +
    return(NULL)
@@ -11310,7 +11625,8 @@

teal coverage - 71.94%

152 - 3x + 3x +
  metadata[[dataname]]
@@ -11890,35 +12206,40 @@

teal coverage - 71.94%

75 - 90x + 90x +
  shiny::isolate({
76 - 90x + 90x +
    checkmate::assert_flag(allow_add)
77 - 90x + 90x +
    checkmate::assert_flag(module_specific)
78 - 44x + 44x +
    if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
79 - 87x + 87x +
    checkmate::assert_string(app_id, null.ok = TRUE)
@@ -11932,14 +12253,16 @@

teal coverage - 71.94%

81 - 87x + 87x +
    slices <- list(...)
82 - 87x + 87x +
    all_slice_id <- vapply(slices, `[[`, character(1L), "id")
@@ -11953,14 +12276,16 @@

teal coverage - 71.94%

84 - 87x + 87x +
    if (missing(mapping)) {
85 - 46x + 46x +
      mapping <- list(global_filters = all_slice_id)
@@ -11974,14 +12299,16 @@

teal coverage - 71.94%

87 - 87x + 87x +
    if (!module_specific) {
88 - 83x + 83x +
      mapping[setdiff(names(mapping), "global_filters")] <- NULL
@@ -12002,42 +12329,48 @@

teal coverage - 71.94%

91 - 87x + 87x +
    failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
92 - 87x + 87x +
    if (length(failed_slice_id)) {
93 - 1x + 1x +
      stop(sprintf(
94 - 1x + 1x +
        "Filters in mapping don't match any available filter.\n %s not in %s",
95 - 1x + 1x +
        toString(failed_slice_id),
96 - 1x + 1x +
        toString(all_slice_id)
@@ -12065,7 +12398,8 @@

teal coverage - 71.94%

100 - 86x + 86x +
    tss <- teal.slice::teal_slices(
@@ -12079,28 +12413,32 @@

teal coverage - 71.94%

102 - 86x + 86x +
      exclude_varnames = exclude_varnames,
103 - 86x + 86x +
      include_varnames = include_varnames,
104 - 86x + 86x +
      count_type = count_type,
105 - 86x + 86x +
      allow_add = allow_add
@@ -12114,35 +12452,40 @@

teal coverage - 71.94%

107 - 86x + 86x +
    attr(tss, "mapping") <- mapping
108 - 86x + 86x +
    attr(tss, "module_specific") <- module_specific
109 - 86x + 86x +
    attr(tss, "app_id") <- app_id
110 - 86x + 86x +
    class(tss) <- c("modules_teal_slices", class(tss))
111 - 86x + 86x +
    tss
@@ -12212,14 +12555,16 @@

teal coverage - 71.94%

121 - 25x + 25x +
  checkmate::assert_list(x)
122 - 25x + 25x +
  lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
@@ -12233,21 +12578,24 @@

teal coverage - 71.94%

124 - 25x + 25x +
  attrs <- attributes(unclass(x))
125 - 25x + 25x +
  ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
126 - 25x + 25x +
  do.call(teal_slices, c(ans, attrs))
@@ -12499,28 +12847,32 @@

teal coverage - 71.94%

162 - 1x + 1x +
  checkmate::assert_class(filter, "teal_slices")
163 - 1x + 1x +
  shiny::isolate({
164 - 1x + 1x +
    filter_copy <- lapply(filter, function(slice) {
165 - 2x + 2x +
      teal.slice::as.teal_slice(as.list(slice))
@@ -12534,14 +12886,16 @@

teal coverage - 71.94%

167 - 1x + 1x +
    attributes(filter_copy) <- attributes(filter)
168 - 1x + 1x +
    filter_copy
@@ -12904,42 +13258,48 @@

teal coverage - 71.94%

49 - 1x + 1x +
  ns <- NS(id)
50 - 1x + 1x +
  tags$button(
51 - 1x + 1x +
    id = ns("show"),
52 - 1x + 1x +
    class = "btn action-button filter_manager_button",
53 - 1x + 1x +
    title = "Show filters manager modal",
54 - 1x + 1x +
    icon("gear")
@@ -12981,14 +13341,16 @@

teal coverage - 71.94%

60 - 4x + 4x +
  moduleServer(id, function(input, output, session) {
61 - 4x + 4x +
    observeEvent(input$show, {
@@ -13072,7 +13434,8 @@

teal coverage - 71.94%

73 - 4x + 4x +
    filter_manager_srv("filter_manager", filtered_data_list, filter)
@@ -13331,14 +13694,16 @@

teal coverage - 71.94%

110 - 6x + 6x +
  moduleServer(id, function(input, output, session) {
111 - 6x + 6x +
    logger::log_trace("filter_manager_srv initializing for: { paste(names(filtered_data_list), collapse = ', ')}.")
@@ -13352,7 +13717,8 @@

teal coverage - 71.94%

113 - 6x + 6x +
    is_module_specific <- isTRUE(attr(filter, "module_specific"))
@@ -13394,7 +13760,8 @@

teal coverage - 71.94%

119 - 6x + 6x +
    slices_global <- reactiveVal(filter)
@@ -13408,14 +13775,16 @@

teal coverage - 71.94%

121 - 6x + 6x +
    filtered_data_list <-
122 - 6x + 6x +
      if (!is_module_specific) {
@@ -13436,7 +13805,8 @@

teal coverage - 71.94%

125 - 5x + 5x +
        list(global_filters = unlist(filtered_data_list)[[1]])
@@ -13464,21 +13834,24 @@

teal coverage - 71.94%

129 - 1x + 1x +
        flatten_nested <- function(x, name = NULL) {
130 - 5x + 5x +
          if (inherits(x, "FilteredData")) {
131 - 3x + 3x +
            setNames(list(x), name)
@@ -13492,7 +13865,8 @@

teal coverage - 71.94%

133 - 2x + 2x +
            unlist(lapply(names(x), function(name) flatten_nested(x[[name]], name)))
@@ -13513,7 +13887,8 @@

teal coverage - 71.94%

136 - 1x + 1x +
        flatten_nested(filtered_data_list)
@@ -13548,49 +13923,56 @@

teal coverage - 71.94%

141 - 6x + 6x +
    mapping_matrix <- reactive({
142 - 6x + 6x +
      state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
143 - 6x + 6x +
      mapping_smooth <- lapply(filtered_data_list, function(x) {
144 - 8x + 8x +
        state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
145 - 8x + 8x +
        state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
146 - 8x + 8x +
        states_active <- state_ids_global %in% state_ids_local
147 - 8x + 8x +
        ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
@@ -13611,7 +13993,8 @@

teal coverage - 71.94%

150 - 6x + 6x +
      as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
@@ -13632,14 +14015,16 @@

teal coverage - 71.94%

153 - 6x + 6x +
    output$slices_table <- renderTable(
154 - 6x + 6x +
      expr = {
@@ -13653,28 +14038,32 @@

teal coverage - 71.94%

156 - 3x + 3x +
        mm <- mapping_matrix()
157 - 3x + 3x +
        mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
158 - 3x + 3x +
        mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
159 - 3x + 3x +
        if (!is_module_specific) colnames(mm) <- "Global Filters"
@@ -13695,21 +14084,24 @@

teal coverage - 71.94%

162 - 3x + 3x +
        if (nrow(mm) == 0L) {
163 - 3x + 3x +
          mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
164 - 3x + 3x +
          rownames(mm) <- ""
@@ -13737,7 +14129,8 @@

teal coverage - 71.94%

168 - 3x + 3x +
        mm[names(mm) != "Report previewer"]
@@ -13751,14 +14144,16 @@

teal coverage - 71.94%

170 - 6x + 6x +
      align = paste(c("l", rep("c", sum(names(filtered_data_list) != "Report previewer"))), collapse = ""),
171 - 6x + 6x +
      rownames = TRUE
@@ -13786,35 +14181,40 @@

teal coverage - 71.94%

175 - 6x + 6x +
    modules_out <- lapply(names(filtered_data_list), function(module_name) {
176 - 8x + 8x +
      filter_manager_module_srv(
177 - 8x + 8x +
        id = module_name,
178 - 8x + 8x +
        module_fd = filtered_data_list[[module_name]],
179 - 8x + 8x +
        slices_global = slices_global
@@ -13849,7 +14249,8 @@

teal coverage - 71.94%

184 - 6x + 6x +
    snapshot_manager_srv("snapshot_manager", slices_global, mapping_matrix, filtered_data_list)
@@ -13863,7 +14264,8 @@

teal coverage - 71.94%

186 - 6x + 6x +
    modules_out # returned for testing purpose
@@ -14052,7 +14454,8 @@

teal coverage - 71.94%

213 - 8x + 8x +
  moduleServer(id, function(input, output, session) {
@@ -14066,7 +14469,8 @@

teal coverage - 71.94%

215 - 8x + 8x +
    module_fd$set_available_teal_slices(reactive(slices_global()))
@@ -14087,7 +14491,8 @@

teal coverage - 71.94%

218 - 8x + 8x +
    slices_module <- reactive(module_fd$get_filter_state())
@@ -14108,14 +14513,16 @@

teal coverage - 71.94%

221 - 8x + 8x +
    previous_slices <- reactiveVal(isolate(slices_module()))
222 - 8x + 8x +
    slices_added <- reactiveVal(NULL)
@@ -14136,21 +14543,24 @@

teal coverage - 71.94%

225 - 8x + 8x +
    observeEvent(slices_module(), ignoreNULL = FALSE, {
226 - 3x + 3x +
      logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
227 - 3x + 3x +
      added <- setdiff_teal_slices(slices_module(), slices_global())
@@ -14164,7 +14574,8 @@

teal coverage - 71.94%

229 - 3x + 3x +
      previous_slices(slices_module())
@@ -14185,7 +14596,8 @@

teal coverage - 71.94%

232 - 8x + 8x +
    observeEvent(slices_added(), ignoreNULL = TRUE, {
@@ -14304,7 +14716,8 @@

teal coverage - 71.94%

249 - 8x + 8x +
    slices_module # returned for testing purpose
@@ -14499,56 +14912,64 @@

teal coverage - 71.94%

25 - 4x + 4x +
      checkmate::assert_character(src, min.len = 0, max.len = 1)
26 - 4x + 4x +
      params <- list(...)
27 - 4x + 4x +
      params$eval <- FALSE
28 - 4x + 4x +
      rblock <- RcodeBlock$new(src)
29 - 4x + 4x +
      rblock$set_params(params)
30 - 4x + 4x +
      self$append_content(rblock)
31 - 4x + 4x +
      self$append_metadata("SRC", src)
32 - 4x + 4x +
      invisible(self)
@@ -14618,28 +15039,32 @@

teal coverage - 71.94%

42 - 5x + 5x +
      checkmate::assert_class(fs, "teal_slices")
43 - 4x + 4x +
      self$append_text("Filter State", "header3")
44 - 4x + 4x +
      self$append_content(TealSlicesBlock$new(fs))
45 - 4x + 4x +
      invisible(self)
@@ -14716,56 +15141,64 @@

teal coverage - 71.94%

56 - 4x + 4x +
      checkmate::assert_list(encodings)
57 - 4x + 4x +
      self$append_text("Selected Options", "header3")
58 - 4x + 4x +
      if (requireNamespace("yaml", quietly = TRUE)) {
59 - 4x + 4x +
        self$append_text(yaml::as.yaml(encodings, handlers = list(
60 - 4x + 4x +
          POSIXct = function(x) format(x, "%Y-%m-%d"),
61 - 4x + 4x +
          POSIXlt = function(x) format(x, "%Y-%m-%d"),
62 - 4x + 4x +
          Date = function(x) format(x, "%Y-%m-%d")
63 - 4x + 4x +
        )), "verbatim")
@@ -14793,14 +15226,16 @@

teal coverage - 71.94%

67 - 4x + 4x +
      self$append_metadata("Encodings", encodings)
68 - 4x + 4x +
      invisible(self)
@@ -14968,21 +15403,24 @@

teal coverage - 71.94%

92 - 10x + 10x +
      self$set_content(content)
93 - 9x + 9x +
      self$set_style(style)
94 - 9x + 9x +
      invisible(self)
@@ -15073,56 +15511,64 @@

teal coverage - 71.94%

107 - 11x + 11x +
      checkmate::assert_class(content, "teal_slices")
108 - 10x + 10x +
      if (length(content) != 0) {
109 - 7x + 7x +
        states_list <- lapply(content, function(x) {
110 - 7x + 7x +
          x_list <- shiny::isolate(as.list(x))
111 - 7x + 7x +
          if (
112 - 7x + 7x +
            inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
113 - 7x + 7x +
              length(x_list$choices) == 2 &&
114 - 7x + 7x +
              length(x_list$selected) == 2
@@ -15157,7 +15603,8 @@

teal coverage - 71.94%

119 - 7x + 7x +
          if (!is.null(x_list$arg)) {
@@ -15185,14 +15632,16 @@

teal coverage - 71.94%

123 - 7x + 7x +
          x_list <- x_list[
124 - 7x + 7x +
            c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
@@ -15206,21 +15655,24 @@

teal coverage - 71.94%

126 - 7x + 7x +
          names(x_list) <- c(
127 - 7x + 7x +
            "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
128 - 7x + 7x +
            "Selected Values", "Selected range", "Include NA values", "Include Inf values"
@@ -15241,7 +15693,8 @@

teal coverage - 71.94%

131 - 7x + 7x +
          Filter(Negate(is.null), x_list)
@@ -15262,14 +15715,16 @@

teal coverage - 71.94%

134 - 7x + 7x +
        if (requireNamespace("yaml", quietly = TRUE)) {
135 - 7x + 7x +
          super$set_content(yaml::as.yaml(states_list))
@@ -15304,14 +15759,16 @@

teal coverage - 71.94%

140 - 10x + 10x +
      private$teal_slices <- content
141 - 10x + 10x +
      invisible(self)
@@ -15360,28 +15817,32 @@

teal coverage - 71.94%

148 - 1x + 1x +
      checkmate::assert_list(x)
149 - 1x + 1x +
      checkmate::assert_names(names(x), must.include = c("teal_slices"))
150 - 1x + 1x +
      self$set_content(x$teal_slices)
151 - 1x + 1x +
      invisible(self)
@@ -15423,7 +15884,8 @@

teal coverage - 71.94%

157 - 2x + 2x +
      list(teal_slices = private$teal_slices)
@@ -15688,28 +16150,32 @@

teal coverage - 71.94%

30 - 5x + 5x +
  teal_data_module(
31 - 5x + 5x +
    ui = function(id) {
32 - 1x + 1x +
      ns <- NS(id)
33 - 1x + 1x +
      object$ui(ns("mutate_inner"))
@@ -15723,28 +16189,32 @@

teal coverage - 71.94%

35 - 5x + 5x +
    server = function(id) {
36 - 4x + 4x +
      moduleServer(id, function(input, output, session) {
37 - 4x + 4x +
        data <- object$server("mutate_inner")
38 - 4x + 4x +
        reactive(eval_code(data(), code))
@@ -15807,7 +16277,8 @@

teal coverage - 71.94%

47 - 1x + 1x +
  eval_code(object, code = format_expression(code))
@@ -15849,7 +16320,8 @@

teal coverage - 71.94%

53 - 4x + 4x +
  eval_code(object, code = format_expression(code))
@@ -16031,14 +16503,16 @@

teal coverage - 71.94%

79 - 3x + 3x +
  expr <- substitute(expr)
80 - 3x + 3x +
  extras <- list(...)
@@ -16059,14 +16533,16 @@

teal coverage - 71.94%

83 - 3x + 3x +
  if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
84 - 3x + 3x +
    expr <- call("{", expr)
@@ -16087,7 +16563,8 @@

teal coverage - 71.94%

87 - 3x + 3x +
  calls <- as.list(expr)[-1]
@@ -16108,7 +16585,8 @@

teal coverage - 71.94%

90 - 3x + 3x +
  calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
@@ -16122,7 +16600,8 @@

teal coverage - 71.94%

92 - 3x + 3x +
  eval_code(object = data, code = as.expression(calls))
@@ -16219,21 +16698,24 @@

teal coverage - 71.94%

12 - 22x + 22x +
  css_files <- list.files(
13 - 22x + 22x +
    system.file("css", package = "teal", mustWork = TRUE),
14 - 22x + 22x +
    pattern = pattern, full.names = TRUE
@@ -16247,21 +16729,24 @@

teal coverage - 71.94%

16 - 22x + 22x +
  return(
17 - 22x + 22x +
    shiny::singleton(
18 - 22x + 22x +
      shiny::tags$head(lapply(css_files, shiny::includeCSS))
@@ -16380,21 +16865,24 @@

teal coverage - 71.94%

35 - 22x + 22x +
  checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
36 - 22x + 22x +
  js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
37 - 22x + 22x +
  js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
@@ -16408,7 +16896,8 @@

teal coverage - 71.94%

39 - 22x + 22x +
  return(singleton(lapply(js_files, includeScript)))
@@ -16527,21 +17016,24 @@

teal coverage - 71.94%

56 - 16x + 16x +
  checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
57 - 16x + 16x +
  lapply(files, function(file) {
58 - 16x + 16x +
    shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
@@ -16555,7 +17047,8 @@

teal coverage - 71.94%

60 - 16x + 16x +
  return(invisible(NULL))
@@ -16688,21 +17181,24 @@

teal coverage - 71.94%

79 - 22x + 22x +
  tagList(
80 - 22x + 22x +
    shinyjs::useShinyjs(),
81 - 22x + 22x +
    include_css_files(),
@@ -16716,14 +17212,16 @@

teal coverage - 71.94%

83 - 22x + 22x +
    include_js_files(except = "init.js"),
84 - 22x + 22x +
    shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
@@ -17471,14 +17969,16 @@

teal coverage - 71.94%

104 - 36x + 36x +
  dots <- list(...)
105 - 2x + 2x +
  if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
@@ -17492,21 +17992,24 @@

teal coverage - 71.94%

107 - 34x + 34x +
  messages <- extract_validator(dots, header)
108 - 34x + 34x +
  failings <- if (!any_names(dots)) {
109 - 29x + 29x +
    add_header(messages, header)
@@ -17520,7 +18023,8 @@

teal coverage - 71.94%

111 - 5x + 5x +
    unlist(messages)
@@ -17541,7 +18045,8 @@

teal coverage - 71.94%

114 - 34x + 34x +
  shiny::validate(shiny::need(is.null(failings), failings))
@@ -17604,7 +18109,8 @@

teal coverage - 71.94%

123 - 118x + 118x +
  all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
@@ -17660,7 +18166,8 @@

teal coverage - 71.94%

131 - 49x + 49x +
  x$.__enclos_env__$private$enabled
@@ -17709,14 +18216,16 @@

teal coverage - 71.94%

138 - 113x + 113x +
  if (inherits(iv, "InputValidator")) {
139 - 49x + 49x +
    add_header(gather_messages(iv), header)
@@ -17730,14 +18239,16 @@

teal coverage - 71.94%

141 - 58x + 58x +
    if (is.null(names(iv))) names(iv) <- rep("", length(iv))
142 - 64x + 64x +
    mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
@@ -17793,28 +18304,32 @@

teal coverage - 71.94%

150 - 49x + 49x +
  if (validator_enabled(iv)) {
151 - 46x + 46x +
    status <- iv$validate()
152 - 46x + 46x +
    failing_inputs <- Filter(Negate(is.null), status)
153 - 46x + 46x +
    unique(lapply(failing_inputs, function(x) x[["message"]]))
@@ -17828,14 +18343,16 @@

teal coverage - 71.94%

155 - 3x + 3x +
    logger::log_warn("Validator is disabled and will be omitted.")
156 - 3x + 3x +
    list()
@@ -17884,21 +18401,24 @@

teal coverage - 71.94%

163 - 78x + 78x +
  ans <- unlist(messages)
164 - 78x + 78x +
  if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
165 - 31x + 31x +
    ans <- c(paste0(header, "\n"), ans, "\n")
@@ -17912,7 +18432,8 @@

teal coverage - 71.94%

167 - 78x + 78x +
  ans
@@ -17954,21 +18475,24 @@

teal coverage - 71.94%

173 - 103x + 103x +
  any(
174 - 103x + 103x +
    if (is.list(x)) {
175 - 58x + 58x +
      if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
@@ -17982,7 +18506,8 @@

teal coverage - 71.94%

177 - 40x + 40x +
      FALSE
@@ -18800,21 +19325,24 @@

teal coverage - 71.94%

113 - 30x + 30x +
  logger::log_trace("init initializing teal app with: data ({ class(data)[1] }).")
114 - 30x + 30x +
  if (!inherits(data, c("TealData", "teal_data", "teal_data_module"))) {
115 - 24x + 24x +
    data <- teal.data::to_relational_data(data = data)
@@ -18835,42 +19363,48 @@

teal coverage - 71.94%

118 - 25x + 25x +
  checkmate::assert_multi_class(data, c("TealData", "teal_data", "teal_data_module"))
119 - 25x + 25x +
  checkmate::assert_multi_class(modules, c("teal_module", "list", "teal_modules"))
120 - 25x + 25x +
  checkmate::assert_string(title, null.ok = TRUE)
121 - 25x + 25x +
  checkmate::assert(
122 - 25x + 25x +
    checkmate::check_class(filter, "teal_slices"),
123 - 25x + 25x +
    checkmate::check_list(filter, names = "named")
@@ -18884,21 +19418,24 @@

teal coverage - 71.94%

125 - 24x + 24x +
  checkmate::assert_multi_class(header, c("shiny.tag", "character"))
126 - 24x + 24x +
  checkmate::assert_multi_class(footer, c("shiny.tag", "character"))
127 - 24x + 24x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
@@ -18912,7 +19449,8 @@

teal coverage - 71.94%

129 - 24x + 24x +
  teal.logger::log_system_info()
@@ -18926,14 +19464,16 @@

teal coverage - 71.94%

131 - 24x + 24x +
  if (inherits(modules, "teal_module")) {
132 - 1x + 1x +
    modules <- list(modules)
@@ -18947,14 +19487,16 @@

teal coverage - 71.94%

134 - 24x + 24x +
  if (inherits(modules, "list")) {
135 - 4x + 4x +
    modules <- do.call(teal::modules, modules)
@@ -18975,7 +19517,8 @@

teal coverage - 71.94%

138 - 24x + 24x +
  landing <- extract_module(modules, "teal_module_landing")
@@ -18989,7 +19532,8 @@

teal coverage - 71.94%

140 - 24x + 24x +
  modules <- drop_module(modules, "teal_module_landing")
@@ -19024,56 +19568,64 @@

teal coverage - 71.94%

145 - 24x + 24x +
  hashables <- mget(c("data", "modules"))
146 - 24x + 24x +
  hashables$data <- if (inherits(hashables$data, "teal_data")) {
147 - 4x + 4x +
    as.list(hashables$data@env)
148 - 24x + 24x +
  } else if (inherits(data, "teal_data_module")) {
149 - 1x + 1x +
    body(data$server)
150 - 24x + 24x +
  } else if (hashables$data$is_pulled()) {
151 - 17x + 17x +
    sapply(get_dataname(hashables$data), simplify = FALSE, function(dn) {
152 - 23x + 23x +
      hashables$data$get_dataset(dn)$get_raw_data()
@@ -19094,7 +19646,8 @@

teal coverage - 71.94%

155 - 2x + 2x +
    hashables$data$get_code()
@@ -19115,7 +19668,8 @@

teal coverage - 71.94%

158 - 24x + 24x +
  attr(filter, "app_id") <- rlang::hash(hashables)
@@ -19136,7 +19690,8 @@

teal coverage - 71.94%

161 - 24x + 24x +
  filter <- as.teal_slices(as.list(filter))
@@ -19150,7 +19705,8 @@

teal coverage - 71.94%

163 - 24x + 24x +
  if (isTRUE(attr(filter, "module_specific"))) {
@@ -19332,21 +19888,24 @@

teal coverage - 71.94%

189 - 24x + 24x +
  if (inherits(data, "teal_data")) {
190 - 4x + 4x +
    if (length(teal.data::datanames(data)) == 0) {
191 - 1x + 1x +
      stop("`data` object has no datanames. Specify `datanames(data)` and try again.")
@@ -19374,28 +19933,32 @@

teal coverage - 71.94%

195 - 3x + 3x +
    is_modules_ok <- check_modules_datanames(modules, teal.data::datanames(data))
196 - 3x + 3x +
    if (!isTRUE(is_modules_ok)) {
197 - 1x + 1x +
      logger::log_error(is_modules_ok)
198 - 1x + 1x +
      checkmate::assert(is_modules_ok, .var.name = "modules")
@@ -19423,21 +19986,24 @@

teal coverage - 71.94%

202 - 2x + 2x +
    is_filter_ok <- check_filter_datanames(filter, teal.data::datanames(data))
203 - 2x + 2x +
    if (!isTRUE(is_filter_ok)) {
204 - 1x + 1x +
      logger::log_warn(is_filter_ok)
@@ -19507,21 +20073,24 @@

teal coverage - 71.94%

214 - 22x + 22x +
  res <- list(
215 - 22x + 22x +
    ui = ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
216 - 22x + 22x +
    server = function(input, output, session) {
@@ -19612,14 +20181,16 @@

teal coverage - 71.94%

229 - 22x + 22x +
  logger::log_trace("init teal app has been initialized.")
230 - 22x + 22x +
  return(res)
@@ -20080,21 +20651,24 @@

teal coverage - 71.94%

64 - 2x + 2x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
65 - 2x + 2x +
  checkmate::assert_count(depth)
66 - 2x + 2x +
  UseMethod("ui_nested_tabs", modules)
@@ -20178,35 +20752,40 @@

teal coverage - 71.94%

78 - 1x + 1x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
79 - 1x + 1x +
  ns <- NS(id)
80 - 1x + 1x +
  do.call(
81 - 1x + 1x +
    tabsetPanel,
82 - 1x + 1x +
    c(
@@ -20220,21 +20799,24 @@

teal coverage - 71.94%

84 - 1x + 1x +
      list(
85 - 1x + 1x +
        id = ns("active_tab"),
86 - 1x + 1x +
        type = if (modules$label == "root") "pills" else "tabs"
@@ -20248,91 +20830,104 @@

teal coverage - 71.94%

88 - 1x + 1x +
      lapply(
89 - 1x + 1x +
        names(modules$children),
90 - 1x + 1x +
        function(module_id) {
91 - 1x + 1x +
          module_label <- modules$children[[module_id]]$label
92 - 1x + 1x +
          tabPanel(
93 - 1x + 1x +
            title = module_label,
94 - 1x + 1x +
            value = module_id, # when clicked this tab value changes input$<tabset panel id>
95 - 1x + 1x +
            ui_nested_tabs(
96 - 1x + 1x +
              id = ns(module_id),
97 - 1x + 1x +
              modules = modules$children[[module_id]],
98 - 1x + 1x +
              datasets = datasets[[module_label]],
99 - 1x + 1x +
              depth = depth + 1L,
100 - 1x + 1x +
              is_module_specific = is_module_specific
@@ -20416,14 +21011,16 @@

teal coverage - 71.94%

112 - 1x + 1x +
  checkmate::assert_class(datasets, classes = "FilteredData")
113 - 1x + 1x +
  ns <- NS(id)
@@ -20437,14 +21034,16 @@

teal coverage - 71.94%

115 - 1x + 1x +
  args <- isolate(teal.transform::resolve_delayed(modules$ui_args, datasets))
116 - 1x + 1x +
  args <- c(list(id = ns("module")), args)
@@ -20458,7 +21057,8 @@

teal coverage - 71.94%

118 - 1x + 1x +
  if (is_arg_used(modules$ui, "datasets")) {
@@ -20486,21 +21086,24 @@

teal coverage - 71.94%

122 - 1x + 1x +
  if (is_arg_used(modules$ui, "data")) {
123 - 1x + 1x +
    data <- .datasets_to_data(modules, datasets)
124 - 1x + 1x +
    args <- c(args, data = list(data))
@@ -20521,49 +21124,56 @@

teal coverage - 71.94%

127 - 1x + 1x +
  teal_ui <- tags$div(
128 - 1x + 1x +
    id = id,
129 - 1x + 1x +
    class = "teal_module",
130 - 1x + 1x +
    uiOutput(ns("data_reactive"), inline = TRUE),
131 - 1x + 1x +
    tagList(
132 - 1x + 1x +
      if (depth >= 2L) div(style = "mt-6"),
133 - 1x + 1x +
      do.call(modules$ui, args)
@@ -20591,7 +21201,8 @@

teal coverage - 71.94%

137 - 1x + 1x +
  if (!is.null(modules$datanames) && is_module_specific) {
@@ -20661,7 +21272,8 @@

teal coverage - 71.94%

147 - 1x + 1x +
    teal_ui
@@ -20710,21 +21322,24 @@

teal coverage - 71.94%

154 - 54x + 54x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
155 - 54x + 54x +
  checkmate::assert_class(reporter, "Reporter")
156 - 53x + 53x +
  UseMethod("srv_nested_tabs", modules)
@@ -20822,7 +21437,8 @@

teal coverage - 71.94%

170 - 24x + 24x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
@@ -20836,14 +21452,16 @@

teal coverage - 71.94%

172 - 24x + 24x +
  moduleServer(id = id, module = function(input, output, session) {
173 - 24x + 24x +
    logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
@@ -20857,70 +21475,80 @@

teal coverage - 71.94%

175 - 24x + 24x +
    labels <- vapply(modules$children, `[[`, character(1), "label")
176 - 24x + 24x +
    modules_reactive <- sapply(
177 - 24x + 24x +
      names(modules$children),
178 - 24x + 24x +
      function(module_id) {
179 - 35x + 35x +
        srv_nested_tabs(
180 - 35x + 35x +
          id = module_id,
181 - 35x + 35x +
          datasets = datasets[[labels[module_id]]],
182 - 35x + 35x +
          modules = modules$children[[module_id]],
183 - 35x + 35x +
          is_module_specific = is_module_specific,
184 - 35x + 35x +
          reporter = reporter
@@ -20941,7 +21569,8 @@

teal coverage - 71.94%

187 - 24x + 24x +
      simplify = FALSE
@@ -20969,21 +21598,24 @@

teal coverage - 71.94%

191 - 24x + 24x +
    input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
192 - 24x + 24x +
    get_active_module <- reactive({
193 - 13x + 13x +
      if (length(modules$children) == 1L) {
@@ -20997,7 +21629,8 @@

teal coverage - 71.94%

195 - 2x + 2x +
        modules_reactive[[1]]()
@@ -21018,7 +21651,8 @@

teal coverage - 71.94%

198 - 11x + 11x +
        modules_reactive[[input_validated()]]()
@@ -21046,7 +21680,8 @@

teal coverage - 71.94%

202 - 24x + 24x +
    get_active_module
@@ -21102,14 +21737,16 @@

teal coverage - 71.94%

210 - 29x + 29x +
  checkmate::assert_class(datasets, "FilteredData")
211 - 29x + 29x +
  logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
@@ -21123,21 +21760,24 @@

teal coverage - 71.94%

213 - 29x + 29x +
  moduleServer(id = id, module = function(input, output, session) {
214 - 29x + 29x +
    modules$server_args <- teal.transform::resolve_delayed(modules$server_args, datasets)
215 - 29x + 29x +
    if (!is.null(modules$datanames) && is_module_specific) {
@@ -21193,35 +21833,40 @@

teal coverage - 71.94%

223 - 29x + 29x +
    trigger_data <- reactiveVal(1L)
224 - 29x + 29x +
    trigger_module <- reactiveVal(NULL)
225 - 29x + 29x +
    output$data_reactive <- renderUI({
226 - 18x + 18x +
      lapply(datasets$datanames(), function(x) {
227 - 22x + 22x +
        datasets$get_data(x, filtered = TRUE)
@@ -21235,14 +21880,16 @@

teal coverage - 71.94%

229 - 18x + 18x +
      isolate(trigger_data(trigger_data() + 1))
230 - 18x + 18x +
      isolate(trigger_module(TRUE))
@@ -21256,7 +21903,8 @@

teal coverage - 71.94%

232 - 18x + 18x +
      NULL
@@ -21284,14 +21932,16 @@

teal coverage - 71.94%

236 - 29x + 29x +
    args <- c(list(id = "module"), modules$server_args)
237 - 29x + 29x +
    if (is_arg_used(modules$server, "reporter")) {
@@ -21319,14 +21969,16 @@

teal coverage - 71.94%

241 - 29x + 29x +
    if (is_arg_used(modules$server, "datasets")) {
242 - 2x + 2x +
      args <- c(args, datasets = datasets)
@@ -21347,21 +21999,24 @@

teal coverage - 71.94%

245 - 29x + 29x +
    if (is_arg_used(modules$server, "data")) {
246 - 9x + 9x +
      data <- .datasets_to_data(modules, datasets, trigger_data)
247 - 9x + 9x +
      args <- c(args, data = list(data))
@@ -21382,21 +22037,24 @@

teal coverage - 71.94%

250 - 29x + 29x +
    if (is_arg_used(modules$server, "filter_panel_api")) {
251 - 2x + 2x +
      filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
252 - 2x + 2x +
      args <- c(args, filter_panel_api = filter_panel_api)
@@ -21417,28 +22075,32 @@

teal coverage - 71.94%

255 - 29x + 29x +
    if (is_arg_used(modules$server, "datasets") && is_arg_used(modules$server, "data")) {
256 - 1x + 1x +
      warning(
257 - 1x + 1x +
        "Module '", modules$label, "' has `data` and `datasets` arguments in the formals.",
258 - 1x + 1x +
        "\nIt's recommended to use `data` to work with filtered objects."
@@ -21473,49 +22135,56 @@

teal coverage - 71.94%

263 - 29x + 29x +
    observeEvent(
264 - 29x + 29x +
      ignoreNULL = TRUE,
265 - 29x + 29x +
      once = TRUE,
266 - 29x + 29x +
      eventExpr = trigger_module(),
267 - 29x + 29x +
      handlerExpr = {
268 - 18x + 18x +
        module_output <- if (is_arg_used(modules$server, "id")) {
269 - 18x + 18x +
          do.call(modules$server, args)
@@ -21564,7 +22233,8 @@

teal coverage - 71.94%

276 - 29x + 29x +
    reactive(modules)
@@ -21704,21 +22374,24 @@

teal coverage - 71.94%

296 - 15x + 15x +
  checkmate::assert_class(module, "teal_module")
297 - 15x + 15x +
  checkmate::assert_class(datasets, "FilteredData")
298 - 15x + 15x +
  checkmate::assert_class(trigger_data, "reactiveVal")
@@ -21732,14 +22405,16 @@

teal coverage - 71.94%

300 - 14x + 14x +
  datanames <- if (is.null(module$datanames) || identical(module$datanames, "all")) {
301 - 5x + 5x +
    datasets$datanames()
@@ -21753,7 +22428,8 @@

teal coverage - 71.94%

303 - 9x + 9x +
    unique(module$datanames) # todo: include parents! unique shouldn't be needed here!
@@ -21781,28 +22457,32 @@

teal coverage - 71.94%

307 - 14x + 14x +
  data <- sapply(
308 - 14x + 14x +
    datanames,
309 - 14x + 14x +
    function(x) eventReactive(trigger_data(), datasets$get_data(x, filtered = TRUE)),
310 - 14x + 14x +
    simplify = FALSE
@@ -21823,14 +22503,16 @@

teal coverage - 71.94%

313 - 14x + 14x +
  hashes <- calculate_hashes(datanames, datasets)
314 - 14x + 14x +
  metadata <- sapply(datanames, datasets$get_metadata, simplify = FALSE)
@@ -21844,28 +22526,32 @@

teal coverage - 71.94%

316 - 14x + 14x +
  new_tdata(
317 - 14x + 14x +
    data,
318 - 14x + 14x +
    eventReactive(
319 - 14x + 14x +
      trigger_data(),
@@ -21879,28 +22565,32 @@

teal coverage - 71.94%

321 - 14x + 14x +
        c(
322 - 14x + 14x +
          get_rcode_str_install(),
323 - 14x + 14x +
          get_rcode_libraries(),
324 - 14x + 14x +
          get_datasets_code(datanames, datasets, hashes)
@@ -21928,14 +22618,16 @@

teal coverage - 71.94%

328 - 14x + 14x +
    datasets$get_join_keys(),
329 - 14x + 14x +
    metadata
@@ -22026,7 +22718,8 @@

teal coverage - 71.94%

342 - 17x + 17x +
  sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
@@ -22459,21 +23152,24 @@

teal coverage - 71.94%

60 - 1x + 1x +
  checkmate::assert_class(modules, "teal_modules")
61 - 1x + 1x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
62 - 1x + 1x +
  checkmate::assert_class(filter, "teal_slices")
@@ -22487,14 +23183,16 @@

teal coverage - 71.94%

64 - 1x + 1x +
  ns <- NS(id)
65 - 1x + 1x +
  is_module_specific <- isTRUE(attr(filter, "module_specific"))
@@ -22508,63 +23206,72 @@

teal coverage - 71.94%

67 - 1x + 1x +
  teal_ui <- ui_nested_tabs(ns("root"), modules = modules, datasets, is_module_specific = is_module_specific)
68 - 1x + 1x +
  filter_panel_btns <- tags$li(
69 - 1x + 1x +
    class = "flex-grow",
70 - 1x + 1x +
    tags$button(
71 - 1x + 1x +
      class = "btn action-button filter_hamburger", # see sidebar.css for style filter_hamburger
72 - 1x + 1x +
      href = "javascript:void(0)",
73 - 1x + 1x +
      onclick = "toggleFilterPanel();", # see sidebar.js
74 - 1x + 1x +
      title = "Toggle filter panels",
75 - 1x + 1x +
      icon("fas fa-bars")
@@ -22578,7 +23285,8 @@

teal coverage - 71.94%

77 - 1x + 1x +
    filter_manager_modal_ui(ns("filter_manager"))
@@ -22592,7 +23300,8 @@

teal coverage - 71.94%

79 - 1x + 1x +
  teal_ui$children[[1]] <- tagAppendChild(teal_ui$children[[1]], filter_panel_btns)
@@ -22606,7 +23315,8 @@

teal coverage - 71.94%

81 - 1x + 1x +
  if (!is_module_specific) {
@@ -22620,63 +23330,72 @@

teal coverage - 71.94%

83 - 1x + 1x +
    tabset_bar <- teal_ui$children[[1]]
84 - 1x + 1x +
    teal_modules <- teal_ui$children[[2]]
85 - 1x + 1x +
    filter_ui <- unlist(datasets)[[1]]$ui_filter_panel(ns("filter_panel"))
86 - 1x + 1x +
    list(
87 - 1x + 1x +
      tabset_bar,
88 - 1x + 1x +
      tags$hr(class = "my-2"),
89 - 1x + 1x +
      fluidRow(
90 - 1x + 1x +
        column(width = 9, teal_modules, class = "teal_primary_col"),
91 - 1x + 1x +
        column(width = 3, filter_ui, class = "teal_secondary_col")
@@ -22774,28 +23493,32 @@

teal coverage - 71.94%

105 - 6x + 6x +
  checkmate::assert_class(modules, "teal_modules")
106 - 6x + 6x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
107 - 6x + 6x +
  checkmate::assert_class(reporter, "Reporter")
108 - 4x + 4x +
  checkmate::assert_class(filter, "teal_slices")
@@ -22809,14 +23532,16 @@

teal coverage - 71.94%

110 - 4x + 4x +
  moduleServer(id, function(input, output, session) {
111 - 4x + 4x +
    logger::log_trace("srv_tabs_with_filters initializing the module.")
@@ -22830,14 +23555,16 @@

teal coverage - 71.94%

113 - 4x + 4x +
    is_module_specific <- isTRUE(attr(filter, "module_specific"))
114 - 4x + 4x +
    manager_out <- filter_manager_modal_srv("filter_manager", filtered_data_list = datasets, filter = filter)
@@ -22851,42 +23578,48 @@

teal coverage - 71.94%

116 - 4x + 4x +
    active_module <- srv_nested_tabs(
117 - 4x + 4x +
      id = "root",
118 - 4x + 4x +
      datasets = datasets,
119 - 4x + 4x +
      modules = modules,
120 - 4x + 4x +
      reporter = reporter,
121 - 4x + 4x +
      is_module_specific = is_module_specific
@@ -22907,28 +23640,32 @@

teal coverage - 71.94%

124 - 4x + 4x +
    if (!is_module_specific) {
125 - 4x + 4x +
      active_datanames <- reactive({
126 - 7x + 7x +
        if (identical(active_module()$datanames, "all")) {
127 - 1x + 1x +
          singleton$datanames()
@@ -22942,7 +23679,8 @@

teal coverage - 71.94%

129 - 5x + 5x +
          active_module()$datanames
@@ -22963,14 +23701,16 @@

teal coverage - 71.94%

132 - 4x + 4x +
      singleton <- unlist(datasets)[[1]]
133 - 4x + 4x +
      singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
@@ -22984,28 +23724,32 @@

teal coverage - 71.94%

135 - 4x + 4x +
      observeEvent(
136 - 4x + 4x +
        eventExpr = active_datanames(),
137 - 4x + 4x +
        handlerExpr = {
138 - 5x + 5x +
          script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
@@ -23040,7 +23784,8 @@

teal coverage - 71.94%

143 - 5x + 5x +
            "handleActiveDatasetsPresent();"
@@ -23054,7 +23799,8 @@

teal coverage - 71.94%

145 - 5x + 5x +
          shinyjs::runjs(script)
@@ -23068,7 +23814,8 @@

teal coverage - 71.94%

147 - 4x + 4x +
        ignoreNULL = FALSE
@@ -23096,21 +23843,24 @@

teal coverage - 71.94%

151 - 4x + 4x +
    showNotification("Data loaded - App fully started up")
152 - 4x + 4x +
    logger::log_trace("srv_tabs_with_filters initialized the module")
153 - 4x + 4x +
    return(active_module)
@@ -23305,14 +24055,16 @@

teal coverage - 71.94%

25 - 22x + 22x +
  checkmate::assert_multi_class(data, c("TealData", "teal_data", "teal_data_module"))
26 - 22x + 22x +
  ns <- NS(id)
@@ -23361,42 +24113,48 @@

teal coverage - 71.94%

33 - 22x + 22x +
  splash_ui <- if (inherits(data, "teal_data_module")) {
34 - 1x + 1x +
    data$ui(ns("teal_data_module"))
35 - 22x + 22x +
  } else if (inherits(data, "teal_data")) {
36 - 2x + 2x +
    div()
37 - 22x + 22x +
  } else if (inherits(data, "TealDataAbstract") && teal.data::is_pulled(data)) {
38 - 17x + 17x +
    div()
@@ -23410,14 +24168,16 @@

teal coverage - 71.94%

40 - 2x + 2x +
    message("App was initialized with delayed data loading.")
41 - 2x + 2x +
    data$get_ui(ns("startapp_module"))
@@ -23431,42 +24191,48 @@

teal coverage - 71.94%

43 - 22x + 22x +
  ui_teal(
44 - 22x + 22x +
    id = ns("teal"),
45 - 22x + 22x +
    splash_ui = div(splash_ui, uiOutput(ns("error"))),
46 - 22x + 22x +
    title = title,
47 - 22x + 22x +
    header = header,
48 - 22x + 22x +
    footer = footer
@@ -23599,7 +24365,8 @@

teal coverage - 71.94%

67 - 13x + 13x +
  checkmate::check_multi_class(data, c("TealData", "teal_data", "teal_data_module"))
@@ -23613,14 +24380,16 @@

teal coverage - 71.94%

69 - 13x + 13x +
  moduleServer(id, function(input, output, session) {
70 - 13x + 13x +
    logger::log_trace("srv_teal_with_splash initializing module with data.")
@@ -23634,7 +24403,8 @@

teal coverage - 71.94%

72 - 13x + 13x +
    if (getOption("teal.show_js_log", default = FALSE)) {
@@ -23676,28 +24446,32 @@

teal coverage - 71.94%

78 - 13x + 13x +
    teal_data_rv <- if (inherits(data, "teal_data_module")) {
79 - 6x + 6x +
      data <- data$server(id = "teal_data_module")
80 - 6x + 6x +
      if (!is.reactive(data)) {
81 - 1x + 1x +
        stop("The `teal_data_module` must return a reactive expression.", call. = FALSE)
@@ -23711,28 +24485,32 @@

teal coverage - 71.94%

83 - 5x + 5x +
      data
84 - 13x + 13x +
    } else if (inherits(data, "teal_data")) {
85 - 5x + 5x +
      reactiveVal(data)
86 - 13x + 13x +
    } else if (inherits(data, "TealDataAbstract") && teal.data::is_pulled(data)) {
@@ -23809,28 +24587,32 @@

teal coverage - 71.94%

97 - 2x + 2x +
      raw_data_old <- data$get_server()(id = "startapp_module")
98 - 2x + 2x +
      raw_data <- reactive({
99 - 3x + 3x +
        data <- raw_data_old()
100 - 3x + 3x +
        if (!is.null(data)) {
@@ -23851,42 +24633,48 @@

teal coverage - 71.94%

103 - 1x + 1x +
          do.call(
104 - 1x + 1x +
            teal.data::teal_data,
105 - 1x + 1x +
            c(
106 - 1x + 1x +
              lapply(data$get_datasets(), function(x) x$get_raw_data()),
107 - 1x + 1x +
              list(code = data$get_code()),
108 - 1x + 1x +
              list(join_keys = teal.data::join_keys(data))
@@ -23921,7 +24709,8 @@

teal coverage - 71.94%

113 - 2x + 2x +
      raw_data
@@ -23942,7 +24731,8 @@

teal coverage - 71.94%

116 - 12x + 12x +
    teal_data_rv_validate <- reactive({
@@ -23956,7 +24746,8 @@

teal coverage - 71.94%

118 - 8x + 8x +
      data <- tryCatch(teal_data_rv(), error = function(e) e)
@@ -23977,7 +24768,8 @@

teal coverage - 71.94%

121 - 8x + 8x +
      if (inherits(data, "shiny.silent.error") && identical(data$message, "")) {
@@ -24012,56 +24804,64 @@

teal coverage - 71.94%

126 - 8x + 8x +
      if (inherits(data, "qenv.error")) {
127 - 1x + 1x +
        validate(
128 - 1x + 1x +
          need(
129 - 1x + 1x +
            FALSE,
130 - 1x + 1x +
            paste(
131 - 1x + 1x +
              "Error when executing `teal_data_module`:\n ",
132 - 1x + 1x +
              paste(data$message, collapse = "\n"),
133 - 1x + 1x +
              "\n Check your inputs or contact app developer if error persists."
@@ -24110,56 +24910,64 @@

teal coverage - 71.94%

140 - 7x + 7x +
      if (inherits(data, "error")) {
141 - 1x + 1x +
        validate(
142 - 1x + 1x +
          need(
143 - 1x + 1x +
            FALSE,
144 - 1x + 1x +
            paste(
145 - 1x + 1x +
              "Error when executing `teal_data_module`:\n ",
146 - 1x + 1x +
              paste(data$message, collpase = "\n"),
147 - 1x + 1x +
              "\n Check your inputs or contact app developer if error persists."
@@ -24201,42 +25009,48 @@

teal coverage - 71.94%

153 - 6x + 6x +
      validate(
154 - 6x + 6x +
        need(
155 - 6x + 6x +
          inherits(data, "teal_data"),
156 - 6x + 6x +
          paste(
157 - 6x + 6x +
            "Error: `teal_data_module` did not return `teal_data` object",
158 - 6x + 6x +
            "\n Check your inputs or contact app developer if error persists"
@@ -24271,7 +25085,8 @@

teal coverage - 71.94%

163 - 5x + 5x +
      validate(need(teal.data::datanames(data), "Data has no datanames. Contact app developer."))
@@ -24292,14 +25107,16 @@

teal coverage - 71.94%

166 - 4x + 4x +
      is_modules_ok <- check_modules_datanames(modules, teal.data::datanames(data))
167 - 4x + 4x +
      validate(need(isTRUE(is_modules_ok), is_modules_ok))
@@ -24313,42 +25130,48 @@

teal coverage - 71.94%

169 - 3x + 3x +
      is_filter_ok <- check_filter_datanames(filter, teal.data::datanames(data))
170 - 3x + 3x +
      if (!isTRUE(is_filter_ok)) {
171 - 1x + 1x +
        showNotification(
172 - 1x + 1x +
          "Some filters were not applied because of incompatibility with data. Contact app developer.",
173 - 1x + 1x +
          type = "warning",
174 - 1x + 1x +
          duration = 10
@@ -24362,7 +25185,8 @@

teal coverage - 71.94%

176 - 1x + 1x +
        logger::log_warn(is_filter_ok)
@@ -24383,7 +25207,8 @@

teal coverage - 71.94%

179 - 3x + 3x +
      teal_data_rv()
@@ -24404,21 +25229,24 @@

teal coverage - 71.94%

182 - 12x + 12x +
    output$error <- renderUI({
183 - 1x + 1x +
      teal_data_rv_validate()
184 - 1x + 1x +
      NULL
@@ -24453,21 +25281,24 @@

teal coverage - 71.94%

189 - 12x + 12x +
    res <- srv_teal(id = "teal", modules = modules, teal_data_rv = teal_data_rv_validate, filter = filter)
190 - 12x + 12x +
    logger::log_trace("srv_teal_with_splash initialized module with data.")
191 - 12x + 12x +
    return(res)
@@ -24732,14 +25563,16 @@

teal coverage - 71.94%

35 - 6x + 6x +
  checkmate::assert_class(tss, "teal_slices")
36 - 6x + 6x +
  checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
@@ -24753,7 +25586,8 @@

teal coverage - 71.94%

38 - 6x + 6x +
  cat(format(tss, trim_lines = FALSE), "\n", file = file)
@@ -24907,7 +25741,8 @@

teal coverage - 71.94%

60 - 6x + 6x +
  checkmate::assert_file_exists(file, access = "r", extension = "json")
@@ -24921,49 +25756,56 @@

teal coverage - 71.94%

62 - 6x + 6x +
  tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
63 - 6x + 6x +
  tss_json$slices <-
64 - 6x + 6x +
    lapply(tss_json$slices, function(slice) {
65 - 6x + 6x +
      for (field in c("selected", "choices")) {
66 - 12x + 12x +
        if (!is.null(slice[[field]])) {
67 - 9x + 9x +
          date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
68 - 9x + 9x +
          time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
@@ -24977,35 +25819,40 @@

teal coverage - 71.94%

70 - 9x + 9x +
          slice[[field]] <-
71 - 9x + 9x +
            if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
72 - 3x + 3x +
              as.Date(slice[[field]])
73 - 9x + 9x +
            } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
74 - 3x + 3x +
              as.POSIXct(slice[[field]], tz = "UTC")
@@ -25019,7 +25866,8 @@

teal coverage - 71.94%

76 - 3x + 3x +
              slice[[field]]
@@ -25047,7 +25895,8 @@

teal coverage - 71.94%

80 - 6x + 6x +
      slice
@@ -25068,7 +25917,8 @@

teal coverage - 71.94%

83 - 6x + 6x +
  tss_elements <- lapply(tss_json$slices, as.teal_slice)
@@ -25082,7 +25932,8 @@

teal coverage - 71.94%

85 - 6x + 6x +
  do.call(teal_slices, c(tss_elements, tss_json$attributes))
@@ -25578,42 +26429,48 @@

teal coverage - 71.94%

69 - 140x + 140x +
  checkmate::assert_string(label)
70 - 138x + 138x +
  submodules <- list(...)
71 - 138x + 138x +
  if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
72 - 2x + 2x +
    stop(
73 - 2x + 2x +
      "The only character argument to modules() must be 'label' and it must be named, ",
74 - 2x + 2x +
      "change modules('lab', ...) to modules(label = 'lab', ...)"
@@ -25641,7 +26498,8 @@

teal coverage - 71.94%

78 - 136x + 136x +
  checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
@@ -25662,42 +26520,48 @@

teal coverage - 71.94%

81 - 133x + 133x +
  labels <- vapply(submodules, function(submodule) submodule$label, character(1))
82 - 133x + 133x +
  names(submodules) <- make.unique(gsub("[^[:alnum:]]+", "_", labels), sep = "_")
83 - 133x + 133x +
  structure(
84 - 133x + 133x +
    list(
85 - 133x + 133x +
      label = label,
86 - 133x + 133x +
      children = submodules
@@ -25711,7 +26575,8 @@

teal coverage - 71.94%

88 - 133x + 133x +
    class = "teal_modules"
@@ -25781,42 +26646,48 @@

teal coverage - 71.94%

98 - 7x + 7x +
  checkmate::assert_class(modules, "teal_modules")
99 - 5x + 5x +
  checkmate::assert_class(module, "teal_module")
100 - 3x + 3x +
  modules$children <- c(modules$children, list(module))
101 - 3x + 3x +
  labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
102 - 3x + 3x +
  names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
103 - 3x + 3x +
  modules
@@ -25921,7 +26792,8 @@

teal coverage - 71.94%

118 - 68x + 68x +
  if (inherits(modules, class)) {
@@ -25935,28 +26807,32 @@

teal coverage - 71.94%

120 - 68x + 68x +
  } else if (inherits(modules, "teal_module")) {
121 - 38x + 38x +
    NULL
122 - 30x + 30x +
  } else if (inherits(modules, "teal_modules")) {
123 - 30x + 30x +
    Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
@@ -26012,7 +26888,8 @@

teal coverage - 71.94%

131 - 68x + 68x +
  if (inherits(modules, class)) {
@@ -26026,42 +26903,48 @@

teal coverage - 71.94%

133 - 68x + 68x +
  } else if (inherits(modules, "teal_module")) {
134 - 38x + 38x +
    modules
135 - 30x + 30x +
  } else if (inherits(modules, "teal_modules")) {
136 - 30x + 30x +
    do.call(
137 - 30x + 30x +
      "modules",
138 - 30x + 30x +
      c(Filter(function(x) length(x) > 0L, lapply(modules$children, drop_module, class)), label = modules$label)
@@ -26152,49 +27035,56 @@

teal coverage - 71.94%

151 - 320x + 320x +
  checkmate::assert_string(arg)
152 - 317x + 317x +
  if (inherits(modules, "teal_modules")) {
153 - 27x + 27x +
    any(unlist(lapply(modules$children, is_arg_used, arg)))
154 - 290x + 290x +
  } else if (inherits(modules, "teal_module")) {
155 - 41x + 41x +
    is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
156 - 249x + 249x +
  } else if (is.function(modules)) {
157 - 247x + 247x +
    isTRUE(arg %in% names(formals(modules)))
@@ -26208,7 +27098,8 @@

teal coverage - 71.94%

159 - 2x + 2x +
    stop("is_arg_used function not implemented for this object")
@@ -26740,42 +27631,48 @@

teal coverage - 71.94%

235 - 155x + 155x +
  checkmate::assert_string(label)
236 - 152x + 152x +
  checkmate::assert_function(server)
237 - 152x + 152x +
  checkmate::assert_function(ui)
238 - 152x + 152x +
  checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
239 - 151x + 151x +
  checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
240 - 149x + 149x +
  checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
@@ -26789,7 +27686,8 @@

teal coverage - 71.94%

242 - 147x + 147x +
  if (!missing(filters)) {
@@ -26852,35 +27750,40 @@

teal coverage - 71.94%

251 - 147x + 147x +
  if (label == "global_filters") {
252 - 1x + 1x +
    stop(
253 - 1x + 1x +
      sprintf("module(label = \"%s\", ...\n  ", label),
254 - 1x + 1x +
      "Label 'global_filters' is reserved in teal. Please change to something else.",
255 - 1x + 1x +
      call. = FALSE
@@ -26901,7 +27804,8 @@

teal coverage - 71.94%

258 - 146x + 146x +
  if (label == "Report previewer") {
@@ -26950,28 +27854,32 @@

teal coverage - 71.94%

265 - 146x + 146x +
  server_formals <- names(formals(server))
266 - 146x + 146x +
  if (!(
267 - 146x + 146x +
    "id" %in% server_formals ||
268 - 146x + 146x +
      all(c("input", "output", "session") %in% server_formals)
@@ -26985,70 +27893,80 @@

teal coverage - 71.94%

270 - 2x + 2x +
    stop(
271 - 2x + 2x +
      "\nmodule() `server` argument requires a function with following arguments:",
272 - 2x + 2x +
      "\n - id - teal will set proper shiny namespace for this module.",
273 - 2x + 2x +
      "\n - input, output, session (not recommended) - then shiny::callModule will be used to call a module.",
274 - 2x + 2x +
      "\n\nFollowing arguments can be used optionaly:",
275 - 2x + 2x +
      "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
276 - 2x + 2x +
      "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
277 - 2x + 2x +
      "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
278 - 2x + 2x +
      "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
279 - 2x + 2x +
      "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
@@ -27076,21 +27994,24 @@

teal coverage - 71.94%

283 - 144x + 144x +
  if (!is.element("data", server_formals) && !is.null(datanames)) {
284 - 61x + 61x +
    message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
285 - 61x + 61x +
    datanames <- NULL
@@ -27111,42 +28032,48 @@

teal coverage - 71.94%

288 - 144x + 144x +
  srv_extra_args <- setdiff(names(server_args), server_formals)
289 - 144x + 144x +
  if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
290 - 1x + 1x +
    stop(
291 - 1x + 1x +
      "\nFollowing `server_args` elements have no equivalent in the formals of the `server`:\n",
292 - 1x + 1x +
      paste(paste(" -", srv_extra_args), collapse = "\n"),
293 - 1x + 1x +
      "\n\nUpdate the `server` arguments by including above or add `...`"
@@ -27174,63 +28101,72 @@

teal coverage - 71.94%

297 - 143x + 143x +
  ui_formals <- names(formals(ui))
298 - 143x + 143x +
  if (!"id" %in% ui_formals) {
299 - 1x + 1x +
    stop(
300 - 1x + 1x +
      "\nmodule() `ui` argument requires a function with following arguments:",
301 - 1x + 1x +
      "\n - id - teal will set proper shiny namespace for this module.",
302 - 1x + 1x +
      "\n\nFollowing arguments can be used optionaly:",
303 - 1x + 1x +
      "\n - `data` - module will receive list of reactive (filtered) data specied in the `filters` argument",
304 - 1x + 1x +
      "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
305 - 1x + 1x +
      "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
@@ -27258,42 +28194,48 @@

teal coverage - 71.94%

309 - 142x + 142x +
  ui_extra_args <- setdiff(names(ui_args), ui_formals)
310 - 142x + 142x +
  if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
311 - 1x + 1x +
    stop(
312 - 1x + 1x +
      "\nFollowing `ui_args` elements have no equivalent in the formals of `ui`:\n",
313 - 1x + 1x +
      paste(paste(" -", ui_extra_args), collapse = "\n"),
314 - 1x + 1x +
      "\n\nUpdate the `ui` arguments by including above or add `...`"
@@ -27321,35 +28263,40 @@

teal coverage - 71.94%

318 - 141x + 141x +
  structure(
319 - 141x + 141x +
    list(
320 - 141x + 141x +
      label = label,
321 - 141x + 141x +
      server = server, ui = ui, datanames = unique(datanames),
322 - 141x + 141x +
      server_args = server_args, ui_args = ui_args
@@ -27363,7 +28310,8 @@

teal coverage - 71.94%

324 - 141x + 141x +
    class = "teal_module"
@@ -27643,21 +28591,24 @@

teal coverage - 71.94%

364 - 12x + 12x +
  checkmate::assert(
365 - 12x + 12x +
    checkmate::check_class(modules, "teal_module"),
366 - 12x + 12x +
    checkmate::check_class(modules, "teal_modules")
@@ -27671,21 +28622,24 @@

teal coverage - 71.94%

368 - 12x + 12x +
  checkmate::assert_int(depth, lower = 0)
369 - 11x + 11x +
  if (inherits(modules, "teal_modules")) {
370 - 4x + 4x +
    max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
@@ -27699,7 +28653,8 @@

teal coverage - 71.94%

372 - 7x + 7x +
    depth
@@ -28426,35 +29381,40 @@

teal coverage - 71.94%

46 - 20x + 20x +
  checkmate::assert_function(ui, args = "id", nargs = 1)
47 - 19x + 19x +
  checkmate::assert_function(server, args = "id", nargs = 1)
48 - 18x + 18x +
  structure(
49 - 18x + 18x +
    list(ui = ui, server = server),
50 - 18x + 18x +
    class = "teal_data_module"
@@ -28607,21 +29567,24 @@

teal coverage - 71.94%

19 - 4x + 4x +
  checkmate::assert_string(label)
20 - 2x + 2x +
  checkmate::assert_list(server_args, names = "named")
21 - 2x + 2x +
  checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
@@ -28635,7 +29598,8 @@

teal coverage - 71.94%

23 - 2x + 2x +
  logger::log_info("Initializing reporter_previewer_module")
@@ -28649,7 +29613,8 @@

teal coverage - 71.94%

25 - 2x + 2x +
  srv <- function(id, reporter, ...) {
@@ -28677,7 +29642,8 @@

teal coverage - 71.94%

29 - 2x + 2x +
  ui <- function(id, ...) {
@@ -28705,28 +29671,32 @@

teal coverage - 71.94%

33 - 2x + 2x +
  module <- module(
34 - 2x + 2x +
    label = "temporary label",
35 - 2x + 2x +
    server = srv, ui = ui,
36 - 2x + 2x +
    server_args = server_args, ui_args = list(), datanames = NULL
@@ -28754,21 +29724,24 @@

teal coverage - 71.94%

40 - 2x + 2x +
  class(module) <- c("teal_module_previewer", class(module))
41 - 2x + 2x +
  module$label <- label
42 - 2x + 2x +
  module
@@ -28907,14 +29880,16 @@

teal coverage - 71.94%

18 - 2x + 2x +
  packageStartupMessage(
19 - 2x + 2x +
    "\nYou are using teal version ",
@@ -28935,7 +29910,8 @@

teal coverage - 71.94%

22 - 2x + 2x +
    read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
diff --git a/latest-tag/404.html b/latest-tag/404.html index c3a8f3acff..63023393ef 100644 --- a/latest-tag/404.html +++ b/latest-tag/404.html @@ -1,5 +1,4 @@ - - + @@ -80,23 +79,7 @@ - - + - + + diff --git a/latest-tag/CODE_OF_CONDUCT.html b/latest-tag/CODE_OF_CONDUCT.html index e751a842c5..dc1fc90789 100644 --- a/latest-tag/CODE_OF_CONDUCT.html +++ b/latest-tag/CODE_OF_CONDUCT.html @@ -1,8 +1,22 @@ - -Contributor Covenant Code of Conduct • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,65 +131,80 @@
-

Our Pledge

+

Our Pledge +

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

-

Our Standards

+

Our Standards +

Examples of behavior that contributes to a positive environment for our community include:

-
+ +
-

Enforcement Responsibilities

+

Enforcement Responsibilities +

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

-

Scope

+

Scope +

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

-

Enforcement

+

Enforcement +

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

-

Enforcement Guidelines

+

Enforcement Guidelines +

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

-

1. Correction

+

1. Correction +

Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

-

2. Warning

+

2. Warning +

Community Impact: A violation through a single incident or series of actions.

Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

-

3. Temporary Ban

+

3. Temporary Ban +

Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

-

4. Permanent Ban

+

4. Permanent Ban +

Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

Consequence: A permanent ban from any sort of public interaction within the community.

-

Attribution

+

Attribution +

This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

@@ -177,17 +212,19 @@

Attribution

+ + + + - - + + diff --git a/latest-tag/CONTRIBUTING.html b/latest-tag/CONTRIBUTING.html index e60c9ba54a..908e7d746e 100644 --- a/latest-tag/CONTRIBUTING.html +++ b/latest-tag/CONTRIBUTING.html @@ -1,8 +1,22 @@ - -Contribution Guidelines • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -113,7 +133,8 @@

🙏 Thank you for taking the time to contribute!

Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

-

Table of contents

+

Table of contents +

👶 Getting started

📔 Code of Conduct

🗃 License

@@ -124,38 +145,47 @@

Table of contents❓ Questions

-

Getting started

+

Getting started +

Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

-

Code of Conduct

+

Code of Conduct +

A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

-

License

+

License +

All your contributions will be covered by this project’s license.

-

Issues

+

Issues +

We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

-

Pull requests

+

Pull requests +

-

GitHub Flow

+

GitHub Flow +

This repository uses the GitHub Flow model for collaboration. To submit a pull request:

-
  1. +
      +
    1. Create a branch

      Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

    2. Make changes

      Make sure your code

      -
      • passes all checks imposed by GitHub Actions
      • +
          +
        • passes all checks imposed by GitHub Actions
        • is well documented
        • is well tested with unit tests sufficiently covering the changes introduced
        • -
        +
      +
    3. Create a pull request (PR)

      In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

      @@ -169,76 +199,93 @@

      GitHub Flow -

      Branch naming convention

      +

      Branch naming convention +

      Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

      If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

monorepo and staged.dependencies -

+ +

Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

Please refer to the staged.dependencies package documentation for more details.

-

Coding guidelines

+

Coding guidelines +

This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

-

Style guide

+

Style guide +

This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

-

Dependency management

+

Dependency management +

Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

-

Dependency version management

+

Dependency version management +

If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

- +
-

R & package versions

+

R & package versions +

We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

-

pre-commit

+

+pre-commit +

We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

-

Recognition model

+

Recognition model +

As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

- +

*Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

The package maintainer also reserves the right to adjust the criteria to recognize contributions.

-

Questions

+

Questions +

If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

+ + + + - - + + diff --git a/latest-tag/LICENSE-text.html b/latest-tag/LICENSE-text.html index 149de865b6..17ba20d136 100644 --- a/latest-tag/LICENSE-text.html +++ b/latest-tag/LICENSE-text.html @@ -1,8 +1,22 @@ - -License • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -123,17 +143,19 @@ limitations under the License. - + + + + - - + + diff --git a/latest-tag/SECURITY.html b/latest-tag/SECURITY.html index 409122c91e..0bab2fdd15 100644 --- a/latest-tag/SECURITY.html +++ b/latest-tag/SECURITY.html @@ -1,8 +1,22 @@ - -Security Policy • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,38 +131,44 @@
-

Reporting Security Issues

+

Reporting Security Issues +

If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

Instead, please send an email to vulnerability.management[@]roche.com.

Please include as much of the information listed below as you can to help us better understand and resolve the issue:

- +

This information will help us triage your report more quickly.

-

Data Security Standards (DSS)

+

Data Security Standards (DSS) +

Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

+ + + + - - + + diff --git a/latest-tag/articles/adding-support-for-reporting.html b/latest-tag/articles/adding-support-for-reporting.html index 7dd83299c4..886e755f68 100644 --- a/latest-tag/articles/adding-support-for-reporting.html +++ b/latest-tag/articles/adding-support-for-reporting.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/blueprint/actors.html b/latest-tag/articles/blueprint/actors.html index 84d06815f4..117dcd140e 100644 --- a/latest-tag/articles/blueprint/actors.html +++ b/latest-tag/articles/blueprint/actors.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/blueprint/dataflow.html b/latest-tag/articles/blueprint/dataflow.html index 9c46bc2de8..36f5082365 100644 --- a/latest-tag/articles/blueprint/dataflow.html +++ b/latest-tag/articles/blueprint/dataflow.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/blueprint/filter_panel.html b/latest-tag/articles/blueprint/filter_panel.html index b3c15e6293..ee7011595d 100644 --- a/latest-tag/articles/blueprint/filter_panel.html +++ b/latest-tag/articles/blueprint/filter_panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/blueprint/in_app_data.html b/latest-tag/articles/blueprint/in_app_data.html index 3c44c395ee..9277cc5d8e 100644 --- a/latest-tag/articles/blueprint/in_app_data.html +++ b/latest-tag/articles/blueprint/in_app_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/blueprint/index.html b/latest-tag/articles/blueprint/index.html index e29740786a..5e99a13233 100644 --- a/latest-tag/articles/blueprint/index.html +++ b/latest-tag/articles/blueprint/index.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/blueprint/input_data.html b/latest-tag/articles/blueprint/input_data.html index 9bb316b3f1..76a10cdc87 100644 --- a/latest-tag/articles/blueprint/input_data.html +++ b/latest-tag/articles/blueprint/input_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/blueprint/intro.html b/latest-tag/articles/blueprint/intro.html index 3d2936ab23..3c5250000b 100644 --- a/latest-tag/articles/blueprint/intro.html +++ b/latest-tag/articles/blueprint/intro.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/blueprint/module_encapsulation.html b/latest-tag/articles/blueprint/module_encapsulation.html index 6f081619c0..5806e11ff3 100644 --- a/latest-tag/articles/blueprint/module_encapsulation.html +++ b/latest-tag/articles/blueprint/module_encapsulation.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/blueprint/product_map.html b/latest-tag/articles/blueprint/product_map.html index d30b3aa113..3b993028aa 100644 --- a/latest-tag/articles/blueprint/product_map.html +++ b/latest-tag/articles/blueprint/product_map.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/bootstrap-themes-in-teal.html b/latest-tag/articles/bootstrap-themes-in-teal.html index e2a2cb4ec8..7d5cac222b 100644 --- a/latest-tag/articles/bootstrap-themes-in-teal.html +++ b/latest-tag/articles/bootstrap-themes-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/creating-custom-modules.html b/latest-tag/articles/creating-custom-modules.html index 2cfd76907d..c64af5fba5 100644 --- a/latest-tag/articles/creating-custom-modules.html +++ b/latest-tag/articles/creating-custom-modules.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/data-as-shiny-module.html b/latest-tag/articles/data-as-shiny-module.html index 716aa387fe..11c5b7476a 100644 --- a/latest-tag/articles/data-as-shiny-module.html +++ b/latest-tag/articles/data-as-shiny-module.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/filter-panel.html b/latest-tag/articles/filter-panel.html index cd7f27469d..1dead27954 100644 --- a/latest-tag/articles/filter-panel.html +++ b/latest-tag/articles/filter-panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/getting-started-with-teal.html b/latest-tag/articles/getting-started-with-teal.html index 070608a63f..2e092e1ab4 100644 --- a/latest-tag/articles/getting-started-with-teal.html +++ b/latest-tag/articles/getting-started-with-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/including-data-in-teal-applications.html b/latest-tag/articles/including-data-in-teal-applications.html index 580c913f35..d41f4f7a88 100644 --- a/latest-tag/articles/including-data-in-teal-applications.html +++ b/latest-tag/articles/including-data-in-teal-applications.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/articles/index.html b/latest-tag/articles/index.html index 9cb9ed52e5..7fa34719a6 100644 --- a/latest-tag/articles/index.html +++ b/latest-tag/articles/index.html @@ -1,8 +1,22 @@ - -Articles • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,78 +131,113 @@

Get started

-
Getting Started with teal
+
+
Getting Started with teal
-
+ +
+
-

Using teal

+

Using teal +

-
Filter Panel
+
+
Filter Panel
-
Modifying a teal Application With R Options
+ +
Modifying a teal Application With R Options
-
Bootstrap Themes in teal
+ +
Bootstrap Themes in teal
-
+ + +

Data in teal apps

-
Including Data in teal Applications
+
+
Including Data in teal Applications
-
Data as shiny Module
+ +
Data as shiny Module
-
+ + +
-

Extending teal

+

Extending teal +

-
Creating Custom Modules
+
+
Creating Custom Modules
-
Adding Support for Reporting to Custom Modules
+ +
Adding Support for Reporting to Custom Modules
-
+ + +

📃 Technical blueprint

-

The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

+

+

The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

-
About Technical Blueprint
+
+
About Technical Blueprint
-
Introduction
+ +
Introduction
-
Actors
+ +
Actors
-
Data Flow
+ +
Data Flow
-
Product Map
+ +
Product Map
-
+ + +

-

Features.

+

+

Features.

-
Input Data
+
+
Input Data
-
In-App Data
+ +
In-App Data
-
Filter Panel
+ +
Filter Panel
-
Module Encapsulation
+ +
Module Encapsulation
-
+ + + + + + + - - + + diff --git a/latest-tag/articles/teal-options.html b/latest-tag/articles/teal-options.html index 1158b3339c..fe98a8535d 100644 --- a/latest-tag/articles/teal-options.html +++ b/latest-tag/articles/teal-options.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/latest-tag/authors.html b/latest-tag/authors.html index edbe52093f..716a75ddc3 100644 --- a/latest-tag/authors.html +++ b/latest-tag/authors.html @@ -1,8 +1,22 @@ - -Authors and Citation • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -110,7 +130,8 @@

Authors

-
+ +

Citation

@@ -203,17 +225,19 @@

Citation

}
+ + + + - - + + diff --git a/latest-tag/coverage-report/index.html b/latest-tag/coverage-report/index.html index 0d3937952e..91b47fe15e 100644 --- a/latest-tag/coverage-report/index.html +++ b/latest-tag/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -445,42 +444,48 @@

teal coverage - 69.63%

48 - 34x + 34x +
  lifecycle::deprecate_soft(
49 - 34x + 34x +
    when = "0.15.0",
50 - 34x + 34x +
    what = "tdata()",
51 - 34x + 34x +
    details = paste(
52 - 34x + 34x +
      "tdata is deprecated and will be removed in the next release. Use `teal_data` instead.\n",
53 - 34x + 34x +
      "Please follow migration instructions https://github.com/insightsengineering/teal/discussions/987."
@@ -501,28 +506,32 @@

teal coverage - 69.63%

56 - 34x + 34x +
  checkmate::assert_list(
57 - 34x + 34x +
    data,
58 - 34x + 34x +
    any.missing = FALSE, names = "unique",
59 - 34x + 34x +
    types = c("data.frame", "reactive", "MultiAssayExperiment")
@@ -536,14 +545,16 @@

teal coverage - 69.63%

61 - 30x + 30x +
  checkmate::assert_class(join_keys, "join_keys", null.ok = TRUE)
62 - 29x + 29x +
  checkmate::assert_multi_class(code, c("character", "reactive"))
@@ -557,14 +568,16 @@

teal coverage - 69.63%

64 - 28x + 28x +
  checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
65 - 26x + 26x +
  checkmate::assert_subset(names(metadata), names(data))
@@ -578,14 +591,16 @@

teal coverage - 69.63%

67 - 25x + 25x +
  if (is.reactive(code)) {
68 - 9x + 9x +
    isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
@@ -613,21 +628,24 @@

teal coverage - 69.63%

72 - 24x + 24x +
  for (x in names(data)) {
73 - 47x + 47x +
    if (!is.reactive(data[[x]])) {
74 - 31x + 31x +
      data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
@@ -662,21 +680,24 @@

teal coverage - 69.63%

79 - 24x + 24x +
  attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
80 - 24x + 24x +
  attr(data, "join_keys") <- join_keys
81 - 24x + 24x +
  attr(data, "metadata") <- metadata
@@ -697,14 +718,16 @@

teal coverage - 69.63%

84 - 24x + 24x +
  class(data) <- c("tdata", class(data))
85 - 24x + 24x +
  data
@@ -844,14 +867,16 @@

teal coverage - 69.63%

105 - 2x + 2x +
  checkmate::assert_class(data, "tdata")
106 - 1x + 1x +
  list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
@@ -942,14 +967,16 @@

teal coverage - 69.63%

119 - 7x + 7x +
  checkmate::assert_class(data, "tdata")
120 - 5x + 5x +
  attr(data, "code")()
@@ -1005,7 +1032,8 @@

teal coverage - 69.63%

128 - 2x + 2x +
  attr(data, "join_keys")
@@ -1068,14 +1096,16 @@

teal coverage - 69.63%

137 - 4x + 4x +
  checkmate::assert_string(dataname)
138 - 4x + 4x +
  UseMethod("get_metadata", data)
@@ -1117,21 +1147,24 @@

teal coverage - 69.63%

144 - 4x + 4x +
  metadata <- attr(data, "metadata")
145 - 4x + 4x +
  if (is.null(metadata)) {
146 - 1x + 1x +
    return(NULL)
@@ -1145,7 +1178,8 @@

teal coverage - 69.63%

148 - 3x + 3x +
  metadata[[dataname]]
@@ -1390,14 +1424,16 @@

teal coverage - 69.63%

183 - 8x + 8x +
  if (inherits(x, "tdata")) {
184 - 2x + 2x +
    return(x)
@@ -1411,77 +1447,88 @@

teal coverage - 69.63%

186 - 6x + 6x +
  if (is.reactive(x)) {
187 - 1x + 1x +
    checkmate::assert_class(isolate(x()), "teal_data")
188 - 1x + 1x +
    datanames <- isolate(teal_data_datanames(x()))
189 - 1x + 1x +
    datasets <- sapply(datanames, function(dataname) reactive(x()[[dataname]]), simplify = FALSE)
190 - 1x + 1x +
    code <- reactive(teal.code::get_code(x()))
191 - 1x + 1x +
    join_keys <- isolate(teal.data::join_keys(x()))
192 - 5x + 5x +
  } else if (inherits(x, "teal_data")) {
193 - 5x + 5x +
    datanames <- teal_data_datanames(x)
194 - 5x + 5x +
    datasets <- sapply(datanames, function(dataname) reactive(x[[dataname]]), simplify = FALSE)
195 - 5x + 5x +
    code <- reactive(teal.code::get_code(x))
196 - 5x + 5x +
    join_keys <- isolate(teal.data::join_keys(x))
@@ -1502,7 +1549,8 @@

teal coverage - 69.63%

199 - 6x + 6x +
  new_tdata(data = datasets, code = code, join_keys = join_keys)
@@ -1641,14 +1689,16 @@

teal coverage - 69.63%

18 - 2x + 2x +
  packageStartupMessage(
19 - 2x + 2x +
    "\nYou are using teal version ",
@@ -1669,7 +1719,8 @@

teal coverage - 69.63%

22 - 2x + 2x +
    read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
@@ -1941,56 +1992,64 @@

teal coverage - 69.63%

25 - 4x + 4x +
      checkmate::assert_character(src, min.len = 0, max.len = 1)
26 - 4x + 4x +
      params <- list(...)
27 - 4x + 4x +
      params$eval <- FALSE
28 - 4x + 4x +
      rblock <- RcodeBlock$new(src)
29 - 4x + 4x +
      rblock$set_params(params)
30 - 4x + 4x +
      self$append_content(rblock)
31 - 4x + 4x +
      self$append_metadata("SRC", src)
32 - 4x + 4x +
      invisible(self)
@@ -2060,28 +2119,32 @@

teal coverage - 69.63%

42 - 5x + 5x +
      checkmate::assert_class(fs, "teal_slices")
43 - 4x + 4x +
      self$append_text("Filter State", "header3")
44 - 4x + 4x +
      if (length(fs)) {
45 - 3x + 3x +
        self$append_content(TealSlicesBlock$new(fs))
@@ -2095,7 +2158,8 @@

teal coverage - 69.63%

47 - 1x + 1x +
        self$append_text("No filters specified.")
@@ -2109,7 +2173,8 @@

teal coverage - 69.63%

49 - 4x + 4x +
      invisible(self)
@@ -2186,56 +2251,64 @@

teal coverage - 69.63%

60 - 4x + 4x +
      checkmate::assert_list(encodings)
61 - 4x + 4x +
      self$append_text("Selected Options", "header3")
62 - 4x + 4x +
      if (requireNamespace("yaml", quietly = TRUE)) {
63 - 4x + 4x +
        self$append_text(yaml::as.yaml(encodings, handlers = list(
64 - 4x + 4x +
          POSIXct = function(x) format(x, "%Y-%m-%d"),
65 - 4x + 4x +
          POSIXlt = function(x) format(x, "%Y-%m-%d"),
66 - 4x + 4x +
          Date = function(x) format(x, "%Y-%m-%d")
67 - 4x + 4x +
        )), "verbatim")
@@ -2263,14 +2336,16 @@

teal coverage - 69.63%

71 - 4x + 4x +
      self$append_metadata("Encodings", encodings)
72 - 4x + 4x +
      invisible(self)
@@ -2424,21 +2499,24 @@

teal coverage - 69.63%

94 - 9x + 9x +
      self$set_content(content)
95 - 8x + 8x +
      self$set_style(style)
96 - 8x + 8x +
      invisible(self)
@@ -2529,56 +2607,64 @@

teal coverage - 69.63%

109 - 10x + 10x +
      checkmate::assert_class(content, "teal_slices")
110 - 9x + 9x +
      if (length(content) != 0) {
111 - 7x + 7x +
        states_list <- lapply(content, function(x) {
112 - 7x + 7x +
          x_list <- shiny::isolate(as.list(x))
113 - 7x + 7x +
          if (
114 - 7x + 7x +
            inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
115 - 7x + 7x +
              length(x_list$choices) == 2 &&
116 - 7x + 7x +
              length(x_list$selected) == 2
@@ -2613,7 +2699,8 @@

teal coverage - 69.63%

121 - 7x + 7x +
          if (!is.null(x_list$arg)) {
@@ -2641,14 +2728,16 @@

teal coverage - 69.63%

125 - 7x + 7x +
          x_list <- x_list[
126 - 7x + 7x +
            c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
@@ -2662,21 +2751,24 @@

teal coverage - 69.63%

128 - 7x + 7x +
          names(x_list) <- c(
129 - 7x + 7x +
            "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
130 - 7x + 7x +
            "Selected Values", "Selected range", "Include NA values", "Include Inf values"
@@ -2697,7 +2789,8 @@

teal coverage - 69.63%

133 - 7x + 7x +
          Filter(Negate(is.null), x_list)
@@ -2718,14 +2811,16 @@

teal coverage - 69.63%

136 - 7x + 7x +
        if (requireNamespace("yaml", quietly = TRUE)) {
137 - 7x + 7x +
          super$set_content(yaml::as.yaml(states_list))
@@ -2760,14 +2855,16 @@

teal coverage - 69.63%

142 - 9x + 9x +
      private$teal_slices <- content
143 - 9x + 9x +
      invisible(self)
@@ -2816,28 +2913,32 @@

teal coverage - 69.63%

150 - 1x + 1x +
      checkmate::assert_list(x)
151 - 1x + 1x +
      checkmate::assert_names(names(x), must.include = c("teal_slices"))
152 - 1x + 1x +
      self$set_content(x$teal_slices)
153 - 1x + 1x +
      invisible(self)
@@ -2879,7 +2980,8 @@

teal coverage - 69.63%

159 - 2x + 2x +
      list(teal_slices = private$teal_slices)
@@ -2990,28 +3092,32 @@

teal coverage - 69.63%

8 - 6x + 6x +
  vapply(
9 - 6x + 6x +
    utils::sessionInfo()$otherPkgs,
10 - 6x + 6x +
    function(x) {
11 - 36x + 36x +
      paste0("library(", x$Package, ")")
@@ -3025,7 +3131,8 @@

teal coverage - 69.63%

13 - 6x + 6x +
    character(1)
@@ -3046,21 +3153,24 @@

teal coverage - 69.63%

16 - 6x + 6x +
    rev() %>%
17 - 6x + 6x +
    paste0(sep = "\n") %>%
18 - 6x + 6x +
    paste0(collapse = "")
@@ -3102,21 +3212,24 @@

teal coverage - 69.63%

24 - 10x + 10x +
  code_string <- getOption("teal.load_nest_code")
25 - 10x + 10x +
  if (is.character(code_string)) {
26 - 2x + 2x +
    code_string
@@ -3130,7 +3243,8 @@

teal coverage - 69.63%

28 - 8x + 8x +
    "# Add any code to install/load your NEST environment here\n"
@@ -3270,14 +3384,16 @@

teal coverage - 69.63%

48 - 4x + 4x +
  str_prepro <- attr(datasets, "preprocessing_code")
49 - 4x + 4x +
  if (length(str_prepro) == 0) {
@@ -3298,7 +3414,8 @@

teal coverage - 69.63%

52 - 4x + 4x +
    str_prepro <- paste(str_prepro, collapse = "\n")
@@ -3326,35 +3443,40 @@

teal coverage - 69.63%

56 - 4x + 4x +
  str_hash <- vapply(datanames, function(dataname) {
57 - 6x + 6x +
    sprintf(
58 - 6x + 6x +
      "stopifnot(%s == %s)",
59 - 6x + 6x +
      deparse1(bquote(rlang::hash(.(as.name(dataname))))),
60 - 6x + 6x +
      deparse1(hashes[[dataname]])
@@ -3368,14 +3490,16 @@

teal coverage - 69.63%

62 - 4x + 4x +
  }, character(1))
63 - 4x + 4x +
  str_hash <- paste(str_hash, collapse = "\n")
@@ -3396,21 +3520,24 @@

teal coverage - 69.63%

66 - 4x + 4x +
  str_filter <- teal.slice::get_filter_expr(datasets, datanames)
67 - 4x + 4x +
  if (str_filter == "") {
68 - 2x + 2x +
    str_filter <- character(0)
@@ -3438,14 +3565,16 @@

teal coverage - 69.63%

72 - 4x + 4x +
  str_code <- paste(c(str_prepro, str_hash, str_filter), collapse = "\n\n")
73 - 4x + 4x +
  sprintf("%s\n", str_code)
@@ -4424,42 +4553,48 @@

teal coverage - 69.63%

138 - 147x + 147x +
  checkmate::assert_string(label)
139 - 144x + 144x +
  if (label == "global_filters") {
140 - 1x + 1x +
    stop(
141 - 1x + 1x +
      sprintf("module(label = \"%s\", ...\n  ", label),
142 - 1x + 1x +
      "Label 'global_filters' is reserved in teal. Please change to something else.",
143 - 1x + 1x +
      call. = FALSE
@@ -4480,7 +4615,8 @@

teal coverage - 69.63%

146 - 143x + 143x +
  if (label == "Report previewer") {
@@ -4543,35 +4679,40 @@

teal coverage - 69.63%

155 - 143x + 143x +
  checkmate::assert_function(server)
156 - 143x + 143x +
  server_formals <- names(formals(server))
157 - 143x + 143x +
  if (!(
158 - 143x + 143x +
    "id" %in% server_formals ||
159 - 143x + 143x +
      all(c("input", "output", "session") %in% server_formals)
@@ -4585,70 +4726,80 @@

teal coverage - 69.63%

161 - 2x + 2x +
    stop(
162 - 2x + 2x +
      "\nmodule() `server` argument requires a function with following arguments:",
163 - 2x + 2x +
      "\n - id - `teal` will set proper `shiny` namespace for this module.",
164 - 2x + 2x +
      "\n - input, output, session (not recommended) - then `shiny::callModule` will be used to call a module.",
165 - 2x + 2x +
      "\n\nFollowing arguments can be used optionaly:",
166 - 2x + 2x +
      "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
167 - 2x + 2x +
      "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
168 - 2x + 2x +
      "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
169 - 2x + 2x +
      "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
170 - 2x + 2x +
      "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
@@ -4669,42 +4820,48 @@

teal coverage - 69.63%

173 - 141x + 141x +
  if ("datasets" %in% server_formals) {
174 - 2x + 2x +
    warning(
175 - 2x + 2x +
      sprintf("Called from module(label = \"%s\", ...)\n  ", label),
176 - 2x + 2x +
      "`datasets` argument in the server is deprecated and will be removed in the next release. ",
177 - 2x + 2x +
      "Please use `data` instead.",
178 - 2x + 2x +
      call. = FALSE
@@ -4746,56 +4903,64 @@

teal coverage - 69.63%

184 - 141x + 141x +
  checkmate::assert_function(ui)
185 - 141x + 141x +
  ui_formals <- names(formals(ui))
186 - 141x + 141x +
  if (!"id" %in% ui_formals) {
187 - 1x + 1x +
    stop(
188 - 1x + 1x +
      "\nmodule() `ui` argument requires a function with following arguments:",
189 - 1x + 1x +
      "\n - id - `teal` will set proper `shiny` namespace for this module.",
190 - 1x + 1x +
      "\n\nFollowing arguments can be used optionally:",
191 - 1x + 1x +
      "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
@@ -4816,42 +4981,48 @@

teal coverage - 69.63%

194 - 140x + 140x +
  if (any(c("data", "datasets") %in% ui_formals)) {
195 - 2x + 2x +
    stop(
196 - 2x + 2x +
      sprintf("Called from module(label = \"%s\", ...)\n  ", label),
197 - 2x + 2x +
      "UI with `data` or `datasets` argument is no longer accepted.\n  ",
198 - 2x + 2x +
      "If some UI inputs depend on data, please move the logic to your server instead.\n  ",
199 - 2x + 2x +
      "Possible solutions are renderUI() or updateXyzInput() functions."
@@ -4893,7 +5064,8 @@

teal coverage - 69.63%

205 - 138x + 138x +
  if (!missing(filters)) {
@@ -4963,21 +5135,24 @@

teal coverage - 69.63%

215 - 138x + 138x +
  if (!is.element("data", server_formals) && !is.null(datanames)) {
216 - 50x + 50x +
    message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
217 - 50x + 50x +
    datanames <- NULL
@@ -4991,7 +5166,8 @@

teal coverage - 69.63%

219 - 138x + 138x +
  checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
@@ -5012,49 +5188,56 @@

teal coverage - 69.63%

222 - 137x + 137x +
  checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
223 - 135x + 135x +
  srv_extra_args <- setdiff(names(server_args), server_formals)
224 - 135x + 135x +
  if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
225 - 1x + 1x +
    stop(
226 - 1x + 1x +
      "\nFollowing `server_args` elements have no equivalent in the formals of the server:\n",
227 - 1x + 1x +
      paste(paste(" -", srv_extra_args), collapse = "\n"),
228 - 1x + 1x +
      "\n\nUpdate the server arguments by including above or add `...`"
@@ -5089,49 +5272,56 @@

teal coverage - 69.63%

233 - 134x + 134x +
  checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
234 - 132x + 132x +
  ui_extra_args <- setdiff(names(ui_args), ui_formals)
235 - 132x + 132x +
  if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
236 - 1x + 1x +
    stop(
237 - 1x + 1x +
      "\nFollowing `ui_args` elements have no equivalent in the formals of UI:\n",
238 - 1x + 1x +
      paste(paste(" -", ui_extra_args), collapse = "\n"),
239 - 1x + 1x +
      "\n\nUpdate the UI arguments by including above or add `...`"
@@ -5159,35 +5349,40 @@

teal coverage - 69.63%

243 - 131x + 131x +
  structure(
244 - 131x + 131x +
    list(
245 - 131x + 131x +
      label = label,
246 - 131x + 131x +
      server = server, ui = ui, datanames = unique(datanames),
247 - 131x + 131x +
      server_args = server_args, ui_args = ui_args
@@ -5201,7 +5396,8 @@

teal coverage - 69.63%

249 - 131x + 131x +
    class = "teal_module"
@@ -5257,42 +5453,48 @@

teal coverage - 69.63%

257 - 102x + 102x +
  checkmate::assert_string(label)
258 - 100x + 100x +
  submodules <- list(...)
259 - 100x + 100x +
  if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
260 - 2x + 2x +
    stop(
261 - 2x + 2x +
      "The only character argument to modules() must be 'label' and it must be named, ",
262 - 2x + 2x +
      "change modules('lab', ...) to modules(label = 'lab', ...)"
@@ -5320,7 +5522,8 @@

teal coverage - 69.63%

266 - 98x + 98x +
  checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
@@ -5341,42 +5544,48 @@

teal coverage - 69.63%

269 - 95x + 95x +
  labels <- vapply(submodules, function(submodule) submodule$label, character(1))
270 - 95x + 95x +
  names(submodules) <- make.unique(gsub("[^[:alnum:]]+", "_", labels), sep = "_")
271 - 95x + 95x +
  structure(
272 - 95x + 95x +
    list(
273 - 95x + 95x +
      label = label,
274 - 95x + 95x +
      children = submodules
@@ -5390,7 +5599,8 @@

teal coverage - 69.63%

276 - 95x + 95x +
    class = "teal_modules"
@@ -5453,7 +5663,8 @@

teal coverage - 69.63%

285 - 3x + 3x +
  paste0(paste(rep(" ", indent), collapse = ""), "+ ", x$label, "\n", collapse = "")
@@ -5558,28 +5769,32 @@

teal coverage - 69.63%

300 - 1x + 1x +
  paste(
301 - 1x + 1x +
    c(
302 - 1x + 1x +
      paste0(rep(" ", indent), "+ ", x$label, "\n"),
303 - 1x + 1x +
      unlist(lapply(x$children, format, indent = indent + 1, ...))
@@ -5593,7 +5808,8 @@

teal coverage - 69.63%

305 - 1x + 1x +
    collapse = ""
@@ -5726,42 +5942,48 @@

teal coverage - 69.63%

324 - 8x + 8x +
  checkmate::assert_class(modules, "teal_modules")
325 - 6x + 6x +
  checkmate::assert_class(module, "teal_module")
326 - 4x + 4x +
  modules$children <- c(modules$children, list(module))
327 - 4x + 4x +
  labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
328 - 4x + 4x +
  names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
329 - 4x + 4x +
  modules
@@ -5866,7 +6088,8 @@

teal coverage - 69.63%

344 - 20x + 20x +
  if (inherits(modules, class)) {
@@ -5880,28 +6103,32 @@

teal coverage - 69.63%

346 - 20x + 20x +
  } else if (inherits(modules, "teal_module")) {
347 - 11x + 11x +
    NULL
348 - 9x + 9x +
  } else if (inherits(modules, "teal_modules")) {
349 - 9x + 9x +
    Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
@@ -6111,49 +6338,56 @@

teal coverage - 69.63%

379 - 286x + 286x +
  checkmate::assert_string(arg)
380 - 283x + 283x +
  if (inherits(modules, "teal_modules")) {
381 - 29x + 29x +
    any(unlist(lapply(modules$children, is_arg_used, arg)))
382 - 254x + 254x +
  } else if (inherits(modules, "teal_module")) {
383 - 43x + 43x +
    is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
384 - 211x + 211x +
  } else if (is.function(modules)) {
385 - 209x + 209x +
    isTRUE(arg %in% names(formals(modules)))
@@ -6167,7 +6401,8 @@

teal coverage - 69.63%

387 - 2x + 2x +
    stop("is_arg_used function not implemented for this object")
@@ -6279,28 +6514,32 @@

teal coverage - 69.63%

403 - 12x + 12x +
  checkmate::assert_multi_class(modules, c("teal_module", "teal_modules"))
404 - 12x + 12x +
  checkmate::assert_int(depth, lower = 0)
405 - 11x + 11x +
  if (inherits(modules, "teal_modules")) {
406 - 4x + 4x +
    max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
@@ -6314,7 +6553,8 @@

teal coverage - 69.63%

408 - 7x + 7x +
    depth
@@ -6768,14 +7008,16 @@

teal coverage - 69.63%

48 - 3x + 3x +
  moduleServer(id, function(input, output, session) {
49 - 3x + 3x +
    observeEvent(input$show, {
@@ -6859,7 +7101,8 @@

teal coverage - 69.63%

61 - 3x + 3x +
    filter_manager_srv("filter_manager", filtered_data_list, filter)
@@ -6971,14 +7214,16 @@

teal coverage - 69.63%

77 - 5x + 5x +
  moduleServer(id, function(input, output, session) {
78 - 5x + 5x +
    logger::log_trace("filter_manager_srv initializing for: { paste(names(filtered_data_list), collapse = ', ')}.")
@@ -6992,7 +7237,8 @@

teal coverage - 69.63%

80 - 5x + 5x +
    is_module_specific <- isTRUE(attr(filter, "module_specific"))
@@ -7034,7 +7280,8 @@

teal coverage - 69.63%

86 - 5x + 5x +
    slices_global <- reactiveVal(filter)
@@ -7048,14 +7295,16 @@

teal coverage - 69.63%

88 - 5x + 5x +
    filtered_data_list <-
89 - 5x + 5x +
      if (!is_module_specific) {
@@ -7076,7 +7325,8 @@

teal coverage - 69.63%

92 - 4x + 4x +
        list(global_filters = unlist(filtered_data_list)[[1]])
@@ -7104,21 +7354,24 @@

teal coverage - 69.63%

96 - 1x + 1x +
        flatten_nested <- function(x, name = NULL) {
97 - 5x + 5x +
          if (inherits(x, "FilteredData")) {
98 - 3x + 3x +
            setNames(list(x), name)
@@ -7132,7 +7385,8 @@

teal coverage - 69.63%

100 - 2x + 2x +
            unlist(lapply(names(x), function(name) flatten_nested(x[[name]], name)))
@@ -7153,7 +7407,8 @@

teal coverage - 69.63%

103 - 1x + 1x +
        flatten_nested(filtered_data_list)
@@ -7188,49 +7443,56 @@

teal coverage - 69.63%

108 - 5x + 5x +
    mapping_matrix <- reactive({
109 - 5x + 5x +
      state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
110 - 5x + 5x +
      mapping_smooth <- lapply(filtered_data_list, function(x) {
111 - 7x + 7x +
        state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
112 - 7x + 7x +
        state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
113 - 7x + 7x +
        states_active <- state_ids_global %in% state_ids_local
114 - 7x + 7x +
        ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
@@ -7251,7 +7513,8 @@

teal coverage - 69.63%

117 - 5x + 5x +
      as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
@@ -7272,14 +7535,16 @@

teal coverage - 69.63%

120 - 5x + 5x +
    output$slices_table <- renderTable(
121 - 5x + 5x +
      expr = {
@@ -7293,28 +7558,32 @@

teal coverage - 69.63%

123 - 2x + 2x +
        mm <- mapping_matrix()
124 - 2x + 2x +
        mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
125 - 2x + 2x +
        mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
126 - 2x + 2x +
        if (!is_module_specific) colnames(mm) <- "Global Filters"
@@ -7335,21 +7604,24 @@

teal coverage - 69.63%

129 - 2x + 2x +
        if (nrow(mm) == 0L) {
130 - 2x + 2x +
          mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
131 - 2x + 2x +
          rownames(mm) <- ""
@@ -7377,7 +7649,8 @@

teal coverage - 69.63%

135 - 2x + 2x +
        mm[names(mm) != "Report previewer"]
@@ -7391,14 +7664,16 @@

teal coverage - 69.63%

137 - 5x + 5x +
      align = paste(c("l", rep("c", sum(names(filtered_data_list) != "Report previewer"))), collapse = ""),
138 - 5x + 5x +
      rownames = TRUE
@@ -7426,35 +7701,40 @@

teal coverage - 69.63%

142 - 5x + 5x +
    modules_out <- lapply(names(filtered_data_list), function(module_name) {
143 - 7x + 7x +
      filter_manager_module_srv(
144 - 7x + 7x +
        id = module_name,
145 - 7x + 7x +
        module_fd = filtered_data_list[[module_name]],
146 - 7x + 7x +
        slices_global = slices_global
@@ -7489,7 +7769,8 @@

teal coverage - 69.63%

151 - 5x + 5x +
    snapshot_manager_srv("snapshot_manager", slices_global, mapping_matrix, filtered_data_list)
@@ -7503,7 +7784,8 @@

teal coverage - 69.63%

153 - 5x + 5x +
    modules_out # returned for testing purpose
@@ -7692,7 +7974,8 @@

teal coverage - 69.63%

180 - 7x + 7x +
  moduleServer(id, function(input, output, session) {
@@ -7706,7 +7989,8 @@

teal coverage - 69.63%

182 - 7x + 7x +
    module_fd$set_available_teal_slices(reactive(slices_global()))
@@ -7727,7 +8011,8 @@

teal coverage - 69.63%

185 - 7x + 7x +
    slices_module <- reactive(module_fd$get_filter_state())
@@ -7748,14 +8033,16 @@

teal coverage - 69.63%

188 - 7x + 7x +
    previous_slices <- reactiveVal(isolate(slices_module()))
189 - 7x + 7x +
    slices_added <- reactiveVal(NULL)
@@ -7776,21 +8063,24 @@

teal coverage - 69.63%

192 - 7x + 7x +
    observeEvent(slices_module(), ignoreNULL = FALSE, {
193 - 2x + 2x +
      logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
194 - 2x + 2x +
      added <- setdiff_teal_slices(slices_module(), slices_global())
@@ -7804,7 +8094,8 @@

teal coverage - 69.63%

196 - 2x + 2x +
      previous_slices(slices_module())
@@ -7825,7 +8116,8 @@

teal coverage - 69.63%

199 - 7x + 7x +
    observeEvent(slices_added(), ignoreNULL = TRUE, {
@@ -7944,7 +8236,8 @@

teal coverage - 69.63%

216 - 7x + 7x +
    slices_module # returned for testing purpose
@@ -8503,35 +8796,40 @@

teal coverage - 69.63%

77 - 79x + 79x +
  shiny::isolate({
78 - 79x + 79x +
    checkmate::assert_flag(allow_add)
79 - 79x + 79x +
    checkmate::assert_flag(module_specific)
80 - 33x + 33x +
    if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
81 - 76x + 76x +
    checkmate::assert_string(app_id, null.ok = TRUE)
@@ -8545,14 +8843,16 @@

teal coverage - 69.63%

83 - 76x + 76x +
    slices <- list(...)
84 - 76x + 76x +
    all_slice_id <- vapply(slices, `[[`, character(1L), "id")
@@ -8566,14 +8866,16 @@

teal coverage - 69.63%

86 - 76x + 76x +
    if (missing(mapping)) {
87 - 46x + 46x +
      mapping <- list(global_filters = all_slice_id)
@@ -8587,14 +8889,16 @@

teal coverage - 69.63%

89 - 76x + 76x +
    if (!module_specific) {
90 - 71x + 71x +
      mapping[setdiff(names(mapping), "global_filters")] <- NULL
@@ -8615,42 +8919,48 @@

teal coverage - 69.63%

93 - 76x + 76x +
    failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
94 - 76x + 76x +
    if (length(failed_slice_id)) {
95 - 1x + 1x +
      stop(sprintf(
96 - 1x + 1x +
        "Filters in mapping don't match any available filter.\n %s not in %s",
97 - 1x + 1x +
        toString(failed_slice_id),
98 - 1x + 1x +
        toString(all_slice_id)
@@ -8678,7 +8988,8 @@

teal coverage - 69.63%

102 - 75x + 75x +
    tss <- teal.slice::teal_slices(
@@ -8692,28 +9003,32 @@

teal coverage - 69.63%

104 - 75x + 75x +
      exclude_varnames = exclude_varnames,
105 - 75x + 75x +
      include_varnames = include_varnames,
106 - 75x + 75x +
      count_type = count_type,
107 - 75x + 75x +
      allow_add = allow_add
@@ -8727,35 +9042,40 @@

teal coverage - 69.63%

109 - 75x + 75x +
    attr(tss, "mapping") <- mapping
110 - 75x + 75x +
    attr(tss, "module_specific") <- module_specific
111 - 75x + 75x +
    attr(tss, "app_id") <- app_id
112 - 75x + 75x +
    class(tss) <- c("modules_teal_slices", class(tss))
113 - 75x + 75x +
    tss
@@ -8825,14 +9145,16 @@

teal coverage - 69.63%

123 - 10x + 10x +
  checkmate::assert_list(x)
124 - 10x + 10x +
  lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
@@ -8846,21 +9168,24 @@

teal coverage - 69.63%

126 - 10x + 10x +
  attrs <- attributes(unclass(x))
127 - 10x + 10x +
  ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
128 - 10x + 10x +
  do.call(teal_slices, c(ans, attrs))
@@ -9112,28 +9437,32 @@

teal coverage - 69.63%

164 - 1x + 1x +
  checkmate::assert_class(filter, "teal_slices")
165 - 1x + 1x +
  shiny::isolate({
166 - 1x + 1x +
    filter_copy <- lapply(filter, function(slice) {
167 - 2x + 2x +
      teal.slice::as.teal_slice(as.list(slice))
@@ -9147,14 +9476,16 @@

teal coverage - 69.63%

169 - 1x + 1x +
    attributes(filter_copy) <- attributes(filter)
170 - 1x + 1x +
    filter_copy
@@ -9930,14 +10261,16 @@

teal coverage - 69.63%

108 - 36x + 36x +
  dots <- list(...)
109 - 2x + 2x +
  if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
@@ -9951,21 +10284,24 @@

teal coverage - 69.63%

111 - 34x + 34x +
  messages <- extract_validator(dots, header)
112 - 34x + 34x +
  failings <- if (!any_names(dots)) {
113 - 29x + 29x +
    add_header(messages, header)
@@ -9979,7 +10315,8 @@

teal coverage - 69.63%

115 - 5x + 5x +
    unlist(messages)
@@ -10000,7 +10337,8 @@

teal coverage - 69.63%

118 - 34x + 34x +
  shiny::validate(shiny::need(is.null(failings), failings))
@@ -10070,7 +10408,8 @@

teal coverage - 69.63%

128 - 118x + 118x +
  all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
@@ -10133,7 +10472,8 @@

teal coverage - 69.63%

137 - 49x + 49x +
  x$.__enclos_env__$private$enabled
@@ -10189,14 +10529,16 @@

teal coverage - 69.63%

145 - 113x + 113x +
  if (inherits(iv, "InputValidator")) {
146 - 49x + 49x +
    add_header(gather_messages(iv), header)
@@ -10210,14 +10552,16 @@

teal coverage - 69.63%

148 - 58x + 58x +
    if (is.null(names(iv))) names(iv) <- rep("", length(iv))
149 - 64x + 64x +
    mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
@@ -10280,28 +10624,32 @@

teal coverage - 69.63%

158 - 49x + 49x +
  if (validator_enabled(iv)) {
159 - 46x + 46x +
    status <- iv$validate()
160 - 46x + 46x +
    failing_inputs <- Filter(Negate(is.null), status)
161 - 46x + 46x +
    unique(lapply(failing_inputs, function(x) x[["message"]]))
@@ -10315,14 +10663,16 @@

teal coverage - 69.63%

163 - 3x + 3x +
    warning("Validator is disabled and will be omitted.")
164 - 3x + 3x +
    list()
@@ -10378,21 +10728,24 @@

teal coverage - 69.63%

172 - 78x + 78x +
  ans <- unlist(messages)
173 - 78x + 78x +
  if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
174 - 31x + 31x +
    ans <- c(paste0(header, "\n"), ans, "\n")
@@ -10406,7 +10759,8 @@

teal coverage - 69.63%

176 - 78x + 78x +
  ans
@@ -10455,21 +10809,24 @@

teal coverage - 69.63%

183 - 103x + 103x +
  any(
184 - 103x + 103x +
    if (is.list(x)) {
185 - 58x + 58x +
      if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
@@ -10483,7 +10840,8 @@

teal coverage - 69.63%

187 - 40x + 40x +
      FALSE
@@ -11252,42 +11610,48 @@

teal coverage - 69.63%

106 - 6x + 6x +
  checkmate::assert_character(id)
107 - 6x + 6x +
  checkmate::assert_true(is.reactive(slices_global))
108 - 6x + 6x +
  checkmate::assert_class(isolate(slices_global()), "teal_slices")
109 - 6x + 6x +
  checkmate::assert_true(is.reactive(mapping_matrix))
110 - 6x + 6x +
  checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
111 - 6x + 6x +
  checkmate::assert_list(filtered_data_list, types = "FilteredData", any.missing = FALSE, names = "named")
@@ -11301,14 +11665,16 @@

teal coverage - 69.63%

113 - 6x + 6x +
  moduleServer(id, function(input, output, session) {
114 - 6x + 6x +
    ns <- session$ns
@@ -11329,28 +11695,32 @@

teal coverage - 69.63%

117 - 6x + 6x +
    filter <- isolate(slices_global())
118 - 6x + 6x +
    snapshot_history <- reactiveVal({
119 - 6x + 6x +
      list(
120 - 6x + 6x +
        "Initial application state" = as.list(filter, recursive = TRUE)
@@ -11392,7 +11762,8 @@

teal coverage - 69.63%

126 - 6x + 6x +
    observeEvent(input$snapshot_add, {
@@ -11483,7 +11854,8 @@

teal coverage - 69.63%

139 - 6x + 6x +
    observeEvent(input$snapshot_name_accept, {
@@ -11679,7 +12051,8 @@

teal coverage - 69.63%

167 - 6x + 6x +
    observeEvent(input$snapshot_load, {
@@ -11805,7 +12178,8 @@

teal coverage - 69.63%

185 - 6x + 6x +
    observeEvent(input$snaphot_file_accept, {
@@ -12155,7 +12529,8 @@

teal coverage - 69.63%

235 - 6x + 6x +
    observeEvent(input$snapshot_reset, {
@@ -12323,21 +12698,24 @@

teal coverage - 69.63%

259 - 6x + 6x +
    observers <- reactiveValues()
260 - 6x + 6x +
    handlers <- reactiveValues()
261 - 6x + 6x +
    divs <- reactiveValues()
@@ -12351,14 +12729,16 @@

teal coverage - 69.63%

263 - 6x + 6x +
    observeEvent(snapshot_history(), {
264 - 2x + 2x +
      lapply(names(snapshot_history())[-1L], function(s) {
@@ -12729,42 +13109,48 @@

teal coverage - 69.63%

317 - 6x + 6x +
    output$snapshot_list <- renderUI({
318 - 2x + 2x +
      rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
319 - 2x + 2x +
      if (length(rows) == 0L) {
320 - 2x + 2x +
        div(
321 - 2x + 2x +
          class = "snapshot_manager_placeholder",
322 - 2x + 2x +
          "Snapshots will appear here."
@@ -13449,7 +13835,8 @@

teal coverage - 69.63%

52 - 7x + 7x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
@@ -13463,7 +13850,8 @@

teal coverage - 69.63%

54 - 7x + 7x +
  checkmate::assert_multi_class(splash_ui, c("shiny.tag", "shiny.tag.list", "html"))
@@ -13477,7 +13865,8 @@

teal coverage - 69.63%

56 - 7x + 7x +
  if (is.character(title)) {
@@ -13498,7 +13887,8 @@

teal coverage - 69.63%

59 - 7x + 7x +
    validate_app_title_tag(title)
@@ -13519,28 +13909,32 @@

teal coverage - 69.63%

62 - 7x + 7x +
  checkmate::assert(
63 - 7x + 7x +
    .var.name = "header",
64 - 7x + 7x +
    checkmate::check_string(header),
65 - 7x + 7x +
    checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
@@ -13554,7 +13948,8 @@

teal coverage - 69.63%

67 - 7x + 7x +
  if (checkmate::test_string(header)) {
@@ -13582,28 +13977,32 @@

teal coverage - 69.63%

71 - 7x + 7x +
  checkmate::assert(
72 - 7x + 7x +
    .var.name = "footer",
73 - 7x + 7x +
    checkmate::check_string(footer),
74 - 7x + 7x +
    checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
@@ -13617,7 +14016,8 @@

teal coverage - 69.63%

76 - 7x + 7x +
  if (checkmate::test_string(footer)) {
@@ -13645,7 +14045,8 @@

teal coverage - 69.63%

80 - 7x + 7x +
  ns <- NS(id)
@@ -13666,7 +14067,8 @@

teal coverage - 69.63%

83 - 7x + 7x +
  splash_ui <- div(
@@ -13680,7 +14082,8 @@

teal coverage - 69.63%

85 - 7x + 7x +
    id = ns("main_ui_container"),
@@ -13701,7 +14104,8 @@

teal coverage - 69.63%

88 - 7x + 7x +
    div(splash_ui)
@@ -13736,35 +14140,40 @@

teal coverage - 69.63%

93 - 7x + 7x +
  shiny_busy_message_panel <- conditionalPanel(
94 - 7x + 7x +
    condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint: line_length.
95 - 7x + 7x +
    div(
96 - 7x + 7x +
      icon("arrows-rotate", "spin fa-spin"),
97 - 7x + 7x +
      "Computing ...",
@@ -13778,7 +14187,8 @@

teal coverage - 69.63%

99 - 7x + 7x +
      class = "shinybusymessage"
@@ -13806,98 +14216,112 @@

teal coverage - 69.63%

103 - 7x + 7x +
  fluidPage(
104 - 7x + 7x +
    title = title,
105 - 7x + 7x +
    theme = get_teal_bs_theme(),
106 - 7x + 7x +
    include_teal_css_js(),
107 - 7x + 7x +
    tags$header(header),
108 - 7x + 7x +
    tags$hr(class = "my-2"),
109 - 7x + 7x +
    shiny_busy_message_panel,
110 - 7x + 7x +
    splash_ui,
111 - 7x + 7x +
    tags$hr(),
112 - 7x + 7x +
    tags$footer(
113 - 7x + 7x +
      div(
114 - 7x + 7x +
        footer,
115 - 7x + 7x +
        teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
116 - 7x + 7x +
        textOutput(ns("identifier"))
@@ -13960,21 +14384,24 @@

teal coverage - 69.63%

125 - 19x + 19x +
  stopifnot(is.reactive(teal_data_rv))
126 - 18x + 18x +
  moduleServer(id, function(input, output, session) {
127 - 18x + 18x +
    logger::log_trace("srv_teal initializing the module.")
@@ -13988,14 +14415,16 @@

teal coverage - 69.63%

129 - 18x + 18x +
    output$identifier <- renderText(
130 - 18x + 18x +
      paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
@@ -14016,28 +14445,32 @@

teal coverage - 69.63%

133 - 18x + 18x +
    teal.widgets::verbatim_popup_srv(
134 - 18x + 18x +
      "sessionInfo",
135 - 18x + 18x +
      verbatim_content = utils::capture.output(utils::sessionInfo()),
136 - 18x + 18x +
      title = "SessionInfo"
@@ -14065,7 +14498,8 @@

teal coverage - 69.63%

140 - 18x + 18x +
    run_js_files(files = "init.js")
@@ -14100,35 +14534,40 @@

teal coverage - 69.63%

145 - 18x + 18x +
    get_client_timezone(session$ns)
146 - 18x + 18x +
    observeEvent(
147 - 18x + 18x +
      eventExpr = input$timezone,
148 - 18x + 18x +
      once = TRUE,
149 - 18x + 18x +
      handlerExpr = {
@@ -14170,14 +14609,16 @@

teal coverage - 69.63%

155 - 18x + 18x +
    reporter <- teal.reporter::Reporter$new()
156 - 18x + 18x +
    if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
@@ -14205,28 +14646,32 @@

teal coverage - 69.63%

160 - 18x + 18x +
    env <- environment()
161 - 18x + 18x +
    datasets_reactive <- eventReactive(teal_data_rv(), {
162 - 4x + 4x +
      env$progress <- shiny::Progress$new(session)
163 - 4x + 4x +
      env$progress$set(0.25, message = "Setting data")
@@ -14247,7 +14692,8 @@

teal coverage - 69.63%

166 - 4x + 4x +
      modules_datasets(teal_data_rv(), modules, filter, teal_data_to_filtered_data(teal_data_rv()))
@@ -14310,7 +14756,8 @@

teal coverage - 69.63%

175 - 18x + 18x +
    observeEvent(datasets_reactive(), once = TRUE, {
@@ -15394,21 +15841,24 @@

teal coverage - 69.63%

119 - 50x + 50x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
120 - 50x + 50x +
  checkmate::assert_class(reporter, "Reporter")
121 - 49x + 49x +
  UseMethod("srv_nested_tabs", modules)
@@ -15506,7 +15956,8 @@

teal coverage - 69.63%

135 - 22x + 22x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
@@ -15520,14 +15971,16 @@

teal coverage - 69.63%

137 - 22x + 22x +
  moduleServer(id = id, module = function(input, output, session) {
138 - 22x + 22x +
    logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
@@ -15541,70 +15994,80 @@

teal coverage - 69.63%

140 - 22x + 22x +
    labels <- vapply(modules$children, `[[`, character(1), "label")
141 - 22x + 22x +
    modules_reactive <- sapply(
142 - 22x + 22x +
      names(modules$children),
143 - 22x + 22x +
      function(module_id) {
144 - 33x + 33x +
        srv_nested_tabs(
145 - 33x + 33x +
          id = module_id,
146 - 33x + 33x +
          datasets = datasets[[labels[module_id]]],
147 - 33x + 33x +
          modules = modules$children[[module_id]],
148 - 33x + 33x +
          is_module_specific = is_module_specific,
149 - 33x + 33x +
          reporter = reporter
@@ -15625,7 +16088,8 @@

teal coverage - 69.63%

152 - 22x + 22x +
      simplify = FALSE
@@ -15653,21 +16117,24 @@

teal coverage - 69.63%

156 - 22x + 22x +
    input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
157 - 22x + 22x +
    get_active_module <- reactive({
158 - 12x + 12x +
      if (length(modules$children) == 1L) {
@@ -15681,7 +16148,8 @@

teal coverage - 69.63%

160 - 1x + 1x +
        modules_reactive[[1]]()
@@ -15702,7 +16170,8 @@

teal coverage - 69.63%

163 - 11x + 11x +
        modules_reactive[[input_validated()]]()
@@ -15730,7 +16199,8 @@

teal coverage - 69.63%

167 - 22x + 22x +
    get_active_module
@@ -15786,14 +16256,16 @@

teal coverage - 69.63%

175 - 27x + 27x +
  checkmate::assert_class(datasets, "FilteredData")
176 - 27x + 27x +
  logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
@@ -15807,14 +16279,16 @@

teal coverage - 69.63%

178 - 27x + 27x +
  moduleServer(id = id, module = function(input, output, session) {
179 - 27x + 27x +
    if (!is.null(modules$datanames) && is_module_specific) {
@@ -15870,35 +16344,40 @@

teal coverage - 69.63%

187 - 27x + 27x +
    trigger_data <- reactiveVal(1L)
188 - 27x + 27x +
    trigger_module <- reactiveVal(NULL)
189 - 27x + 27x +
    output$data_reactive <- renderUI({
190 - 17x + 17x +
      lapply(datasets$datanames(), function(x) {
191 - 21x + 21x +
        datasets$get_data(x, filtered = TRUE)
@@ -15912,14 +16391,16 @@

teal coverage - 69.63%

193 - 17x + 17x +
      isolate(trigger_data(trigger_data() + 1))
194 - 17x + 17x +
      isolate(trigger_module(TRUE))
@@ -15933,7 +16414,8 @@

teal coverage - 69.63%

196 - 17x + 17x +
      NULL
@@ -15961,14 +16443,16 @@

teal coverage - 69.63%

200 - 27x + 27x +
    args <- c(list(id = "module"), modules$server_args)
201 - 27x + 27x +
    if (is_arg_used(modules$server, "reporter")) {
@@ -15996,14 +16480,16 @@

teal coverage - 69.63%

205 - 27x + 27x +
    if (is_arg_used(modules$server, "datasets")) {
206 - 1x + 1x +
      args <- c(args, datasets = datasets)
@@ -16024,21 +16510,24 @@

teal coverage - 69.63%

209 - 27x + 27x +
    if (is_arg_used(modules$server, "data")) {
210 - 7x + 7x +
      data <- eventReactive(trigger_data(), .datasets_to_data(modules, datasets))
211 - 7x + 7x +
      args <- c(args, data = list(data))
@@ -16059,21 +16548,24 @@

teal coverage - 69.63%

214 - 27x + 27x +
    if (is_arg_used(modules$server, "filter_panel_api")) {
215 - 2x + 2x +
      filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
216 - 2x + 2x +
      args <- c(args, filter_panel_api = filter_panel_api)
@@ -16101,49 +16593,56 @@

teal coverage - 69.63%

220 - 27x + 27x +
    observeEvent(
221 - 27x + 27x +
      ignoreNULL = TRUE,
222 - 27x + 27x +
      once = TRUE,
223 - 27x + 27x +
      eventExpr = trigger_module(),
224 - 27x + 27x +
      handlerExpr = {
225 - 17x + 17x +
        module_output <- if (is_arg_used(modules$server, "id")) {
226 - 17x + 17x +
          do.call(modules$server, args)
@@ -16192,7 +16691,8 @@

teal coverage - 69.63%

233 - 27x + 27x +
    reactive(modules)
@@ -16311,14 +16811,16 @@

teal coverage - 69.63%

250 - 4x + 4x +
  checkmate::assert_class(module, "teal_module")
251 - 4x + 4x +
  checkmate::assert_class(datasets, "FilteredData")
@@ -16332,14 +16834,16 @@

teal coverage - 69.63%

253 - 4x + 4x +
  datanames <- if (is.null(module$datanames) || identical(module$datanames, "all")) {
254 - 1x + 1x +
    datasets$datanames()
@@ -16353,21 +16857,24 @@

teal coverage - 69.63%

256 - 3x + 3x +
    include_parent_datanames(
257 - 3x + 3x +
      module$datanames,
258 - 3x + 3x +
      datasets$get_join_keys()
@@ -16402,7 +16909,8 @@

teal coverage - 69.63%

263 - 4x + 4x +
  data <- sapply(datanames, function(x) datasets$get_data(x, filtered = TRUE), simplify = FALSE)
@@ -16416,7 +16924,8 @@

teal coverage - 69.63%

265 - 4x + 4x +
  hashes <- calculate_hashes(datanames, datasets)
@@ -16430,28 +16939,32 @@

teal coverage - 69.63%

267 - 4x + 4x +
  code <- c(
268 - 4x + 4x +
    get_rcode_str_install(),
269 - 4x + 4x +
    get_rcode_libraries(),
270 - 4x + 4x +
    get_datasets_code(datanames, datasets, hashes)
@@ -16479,21 +16992,24 @@

teal coverage - 69.63%

274 - 4x + 4x +
  data <- do.call(
275 - 4x + 4x +
    teal.data::teal_data,
276 - 4x + 4x +
    args = c(data, code = list(code), join_keys = list(datasets$get_join_keys()[datanames]))
@@ -16514,14 +17030,16 @@

teal coverage - 69.63%

279 - 4x + 4x +
  data@verified <- attr(datasets, "verification_status")
280 - 4x + 4x +
  data
@@ -16605,7 +17123,8 @@

teal coverage - 69.63%

292 - 7x + 7x +
  sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
@@ -17164,28 +17683,32 @@

teal coverage - 69.63%

78 - 5x + 5x +
  checkmate::assert_class(modules, "teal_modules")
79 - 5x + 5x +
  checkmate::assert_list(datasets, types = c("list", "FilteredData"))
80 - 5x + 5x +
  checkmate::assert_class(reporter, "Reporter")
81 - 3x + 3x +
  checkmate::assert_class(filter, "teal_slices")
@@ -17199,14 +17722,16 @@

teal coverage - 69.63%

83 - 3x + 3x +
  moduleServer(id, function(input, output, session) {
84 - 3x + 3x +
    logger::log_trace("srv_tabs_with_filters initializing the module.")
@@ -17220,14 +17745,16 @@

teal coverage - 69.63%

86 - 3x + 3x +
    is_module_specific <- isTRUE(attr(filter, "module_specific"))
87 - 3x + 3x +
    manager_out <- filter_manager_modal_srv("filter_manager", filtered_data_list = datasets, filter = filter)
@@ -17241,42 +17768,48 @@

teal coverage - 69.63%

89 - 3x + 3x +
    active_module <- srv_nested_tabs(
90 - 3x + 3x +
      id = "root",
91 - 3x + 3x +
      datasets = datasets,
92 - 3x + 3x +
      modules = modules,
93 - 3x + 3x +
      reporter = reporter,
94 - 3x + 3x +
      is_module_specific = is_module_specific
@@ -17297,21 +17830,24 @@

teal coverage - 69.63%

97 - 3x + 3x +
    if (!is_module_specific) {
98 - 3x + 3x +
      active_datanames <- reactive({
99 - 6x + 6x +
        if (identical(active_module()$datanames, "all")) {
@@ -17332,21 +17868,24 @@

teal coverage - 69.63%

102 - 5x + 5x +
          include_parent_datanames(
103 - 5x + 5x +
            active_module()$datanames,
104 - 5x + 5x +
            singleton$get_join_keys()
@@ -17374,14 +17913,16 @@

teal coverage - 69.63%

108 - 3x + 3x +
      singleton <- unlist(datasets)[[1]]
109 - 3x + 3x +
      singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
@@ -17395,28 +17936,32 @@

teal coverage - 69.63%

111 - 3x + 3x +
      observeEvent(
112 - 3x + 3x +
        eventExpr = active_datanames(),
113 - 3x + 3x +
        handlerExpr = {
114 - 4x + 4x +
          script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
@@ -17451,7 +17996,8 @@

teal coverage - 69.63%

119 - 4x + 4x +
            "handleActiveDatasetsPresent();"
@@ -17465,7 +18011,8 @@

teal coverage - 69.63%

121 - 4x + 4x +
          shinyjs::runjs(script)
@@ -17479,7 +18026,8 @@

teal coverage - 69.63%

123 - 3x + 3x +
        ignoreNULL = FALSE
@@ -17507,14 +18055,16 @@

teal coverage - 69.63%

127 - 3x + 3x +
    showNotification("Data loaded - App fully started up")
128 - 3x + 3x +
    logger::log_trace("srv_tabs_with_filters initialized the module")
@@ -17528,7 +18078,8 @@

teal coverage - 69.63%

130 - 3x + 3x +
    active_module
@@ -17968,42 +18519,48 @@

teal coverage - 69.63%

60 - 7x + 7x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
61 - 7x + 7x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
62 - 7x + 7x +
  checkmate::assert(
63 - 7x + 7x +
    .var.name = "title",
64 - 7x + 7x +
    checkmate::check_string(title),
65 - 7x + 7x +
    checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
@@ -18017,28 +18574,32 @@

teal coverage - 69.63%

67 - 7x + 7x +
  checkmate::assert(
68 - 7x + 7x +
    .var.name = "header",
69 - 7x + 7x +
    checkmate::check_string(header),
70 - 7x + 7x +
    checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
@@ -18052,28 +18613,32 @@

teal coverage - 69.63%

72 - 7x + 7x +
  checkmate::assert(
73 - 7x + 7x +
    .var.name = "footer",
74 - 7x + 7x +
    checkmate::check_string(footer),
75 - 7x + 7x +
    checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
@@ -18094,7 +18659,8 @@

teal coverage - 69.63%

78 - 7x + 7x +
  ns <- NS(id)
@@ -18136,28 +18702,32 @@

teal coverage - 69.63%

84 - 7x + 7x +
  splash_ui <- if (inherits(data, "teal_data_module")) {
85 - 1x + 1x +
    data$ui(ns("teal_data_module"))
86 - 7x + 7x +
  } else if (inherits(data, "teal_data")) {
87 - 6x + 6x +
    div()
@@ -18171,42 +18741,48 @@

teal coverage - 69.63%

89 - 7x + 7x +
  ui_teal(
90 - 7x + 7x +
    id = ns("teal"),
91 - 7x + 7x +
    splash_ui = div(splash_ui, uiOutput(ns("error"))),
92 - 7x + 7x +
    title = title,
93 - 7x + 7x +
    header = header,
94 - 7x + 7x +
    footer = footer
@@ -18255,28 +18831,32 @@

teal coverage - 69.63%

101 - 15x + 15x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
102 - 15x + 15x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
103 - 15x + 15x +
  checkmate::assert_class(modules, "teal_modules")
104 - 15x + 15x +
  checkmate::assert_class(filter, "teal_slices")
@@ -18290,14 +18870,16 @@

teal coverage - 69.63%

106 - 15x + 15x +
  moduleServer(id, function(input, output, session) {
107 - 15x + 15x +
    logger::log_trace("srv_teal_with_splash initializing module with data.")
@@ -18311,7 +18893,8 @@

teal coverage - 69.63%

109 - 15x + 15x +
    if (getOption("teal.show_js_log", default = FALSE)) {
@@ -18353,28 +18936,32 @@

teal coverage - 69.63%

115 - 15x + 15x +
    teal_data_rv <- if (inherits(data, "teal_data_module")) {
116 - 10x + 10x +
      data <- data$server(id = "teal_data_module")
117 - 10x + 10x +
      if (!is.reactive(data)) {
118 - 1x + 1x +
        stop("The `teal_data_module` passed to `data` must return a reactive expression.", call. = FALSE)
@@ -18388,21 +18975,24 @@

teal coverage - 69.63%

120 - 9x + 9x +
      data
121 - 15x + 15x +
    } else if (inherits(data, "teal_data")) {
122 - 5x + 5x +
      reactiveVal(data)
@@ -18423,7 +19013,8 @@

teal coverage - 69.63%

125 - 14x + 14x +
    teal_data_rv_validate <- reactive({
@@ -18437,7 +19028,8 @@

teal coverage - 69.63%

127 - 11x + 11x +
      data <- tryCatch(teal_data_rv(), error = function(e) e)
@@ -18458,7 +19050,8 @@

teal coverage - 69.63%

130 - 11x + 11x +
      if (inherits(data, "shiny.silent.error") && identical(data$message, "")) {
@@ -18493,56 +19086,64 @@

teal coverage - 69.63%

135 - 11x + 11x +
      if (inherits(data, "qenv.error")) {
136 - 2x + 2x +
        validate(
137 - 2x + 2x +
          need(
138 - 2x + 2x +
            FALSE,
139 - 2x + 2x +
            paste(
140 - 2x + 2x +
              "Error when executing `teal_data_module` passed to `data`:\n ",
141 - 2x + 2x +
              paste(data$message, collapse = "\n"),
142 - 2x + 2x +
              "\n Check your inputs or contact app developer if error persists."
@@ -18591,56 +19192,64 @@

teal coverage - 69.63%

149 - 9x + 9x +
      if (inherits(data, "error")) {
150 - 1x + 1x +
        validate(
151 - 1x + 1x +
          need(
152 - 1x + 1x +
            FALSE,
153 - 1x + 1x +
            paste(
154 - 1x + 1x +
              "Error when executing `teal_data_module` passed to `data`:\n ",
155 - 1x + 1x +
              paste(data$message, collpase = "\n"),
156 - 1x + 1x +
              "\n Check your inputs or contact app developer if error persists."
@@ -18682,56 +19291,64 @@

teal coverage - 69.63%

162 - 8x + 8x +
      validate(
163 - 8x + 8x +
        need(
164 - 8x + 8x +
          inherits(data, "teal_data"),
165 - 8x + 8x +
          paste(
166 - 8x + 8x +
            "Error: `teal_data_module` passed to `data` failed to return `teal_data` object, returned",
167 - 8x + 8x +
            toString(sQuote(class(data))),
168 - 8x + 8x +
            "instead.",
169 - 8x + 8x +
            "\n Check your inputs or contact app developer if error persists."
@@ -18766,14 +19383,16 @@

teal coverage - 69.63%

174 - 5x + 5x +
      if (!length(teal.data::datanames(data))) {
175 - 1x + 1x +
        warning("`data` object has no datanames. Default datanames are set using `teal_data`'s environment.")
@@ -18794,21 +19413,24 @@

teal coverage - 69.63%

178 - 5x + 5x +
      is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
179 - 5x + 5x +
      if (!isTRUE(is_modules_ok)) {
180 - 1x + 1x +
        validate(need(isTRUE(is_modules_ok), sprintf("%s. Contact app developer.", is_modules_ok)))
@@ -18829,42 +19451,48 @@

teal coverage - 69.63%

183 - 4x + 4x +
      is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
184 - 4x + 4x +
      if (!isTRUE(is_filter_ok)) {
185 - 1x + 1x +
        showNotification(
186 - 1x + 1x +
          "Some filters were not applied because of incompatibility with data. Contact app developer.",
187 - 1x + 1x +
          type = "warning",
188 - 1x + 1x +
          duration = 10
@@ -18878,7 +19506,8 @@

teal coverage - 69.63%

190 - 1x + 1x +
        warning(is_filter_ok)
@@ -18899,7 +19528,8 @@

teal coverage - 69.63%

193 - 4x + 4x +
      teal_data_rv()
@@ -18920,7 +19550,8 @@

teal coverage - 69.63%

196 - 14x + 14x +
    output$error <- renderUI({
@@ -18962,14 +19593,16 @@

teal coverage - 69.63%

202 - 14x + 14x +
    res <- srv_teal(id = "teal", modules = modules, teal_data_rv = teal_data_rv_validate, filter = filter)
203 - 14x + 14x +
    logger::log_trace("srv_teal_with_splash initialized module with data.")
@@ -18983,7 +19616,8 @@

teal coverage - 69.63%

205 - 14x + 14x +
    res
@@ -19108,21 +19742,24 @@

teal coverage - 69.63%

15 - 18x + 18x +
  script <- sprintf(
16 - 18x + 18x +
    "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
17 - 18x + 18x +
    ns("timezone")
@@ -19136,14 +19773,16 @@

teal coverage - 69.63%

19 - 18x + 18x +
  shinyjs::runjs(script) # function does not return anything
20 - 18x + 18x +
  invisible(NULL)
@@ -19192,42 +19831,48 @@

teal coverage - 69.63%

27 - 11x + 11x +
  bs_theme <- getOption("teal.bs_theme")
28 - 11x + 11x +
  if (is.null(bs_theme)) {
29 - 8x + 8x +
    NULL
30 - 3x + 3x +
  } else if (!inherits(bs_theme, "bs_theme")) {
31 - 2x + 2x +
    warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
32 - 2x + 2x +
    NULL
@@ -19241,7 +19886,8 @@

teal coverage - 69.63%

34 - 1x + 1x +
    bs_theme
@@ -19297,42 +19943,48 @@

teal coverage - 69.63%

42 - 15x + 15x +
  parents <- character(0)
43 - 15x + 15x +
  for (i in dataname) {
44 - 22x + 22x +
    while (length(i) > 0) {
45 - 24x + 24x +
      parent_i <- teal.data::parent(join_keys, i)
46 - 24x + 24x +
      parents <- c(parent_i, parents)
47 - 24x + 24x +
      i <- parent_i
@@ -19360,7 +20012,8 @@

teal coverage - 69.63%

51 - 15x + 15x +
  unique(c(parents, dataname))
@@ -19444,14 +20097,16 @@

teal coverage - 69.63%

63 - 18x + 18x +
  checkmate::assert_class(x, "teal_data")
64 - 18x + 18x +
  checkmate::assert_character(datanames, min.chars = 1L, any.missing = FALSE)
@@ -19465,21 +20120,24 @@

teal coverage - 69.63%

66 - 18x + 18x +
  ans <- teal.slice::init_filtered_data(
67 - 18x + 18x +
    x = sapply(datanames, function(dn) x[[dn]], simplify = FALSE),
68 - 18x + 18x +
    join_keys = teal.data::join_keys(x)
@@ -19500,21 +20158,24 @@

teal coverage - 69.63%

71 - 18x + 18x +
  attr(ans, "preprocessing_code") <- teal.data::get_code(x, datanames = datanames, check_names = FALSE)
72 - 18x + 18x +
  attr(ans, "verification_status") <- x@verified
73 - 18x + 18x +
  ans
@@ -19647,35 +20308,40 @@

teal coverage - 69.63%

92 - 2x + 2x +
  checkmate::assert_string(title)
93 - 2x + 2x +
  checkmate::assert_string(label)
94 - 2x + 2x +
  checkmate::assert_string(description, null.ok = TRUE)
95 - 2x + 2x +
  checkmate::assert_flag(with_filter)
96 - 2x + 2x +
  checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
@@ -19689,49 +20355,56 @@

teal coverage - 69.63%

98 - 2x + 2x +
  card <- teal::TealReportCard$new()
99 - 2x + 2x +
  title <- if (label == "") title else label
100 - 2x + 2x +
  card$set_name(title)
101 - 2x + 2x +
  card$append_text(title, "header2")
102 - 1x + 1x +
  if (!is.null(description)) card$append_text(description, "header3")
103 - 1x + 1x +
  if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
104 - 2x + 2x +
  card
@@ -19836,14 +20509,16 @@

teal coverage - 69.63%

119 - 12x + 12x +
  checkmate::assert_class(modules, "teal_modules")
120 - 12x + 12x +
  checkmate::assert_character(datanames)
@@ -19857,7 +20532,8 @@

teal coverage - 69.63%

122 - 12x + 12x +
  recursive_check_datanames <- function(modules, datanames) {
@@ -19871,14 +20547,16 @@

teal coverage - 69.63%

124 - 26x + 26x +
    if (inherits(modules, "teal_modules")) {
125 - 12x + 12x +
      sapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
@@ -19892,49 +20570,56 @@

teal coverage - 69.63%

127 - 14x + 14x +
      extra_datanames <- setdiff(modules$datanames, c("all", datanames))
128 - 14x + 14x +
      if (length(extra_datanames)) {
129 - 2x + 2x +
        sprintf(
130 - 2x + 2x +
          "- Module '%s' uses datanames not available in 'data': (%s) not in (%s)",
131 - 2x + 2x +
          modules$label,
132 - 2x + 2x +
          toString(dQuote(extra_datanames, q = FALSE)),
133 - 2x + 2x +
          toString(dQuote(datanames, q = FALSE))
@@ -19969,21 +20654,24 @@

teal coverage - 69.63%

138 - 12x + 12x +
  check_datanames <- unlist(recursive_check_datanames(modules, datanames))
139 - 12x + 12x +
  if (length(check_datanames)) {
140 - 2x + 2x +
    paste(check_datanames, collapse = "\n")
@@ -19997,7 +20685,8 @@

teal coverage - 69.63%

142 - 10x + 10x +
    TRUE
@@ -20102,14 +20791,16 @@

teal coverage - 69.63%

157 - 10x + 10x +
  checkmate::assert_class(filters, "teal_slices")
158 - 10x + 10x +
  checkmate::assert_character(datanames)
@@ -20130,63 +20821,72 @@

teal coverage - 69.63%

161 - 10x + 10x +
  out <- unlist(sapply(
162 - 10x + 10x +
    filters, function(filter) {
163 - 3x + 3x +
      dataname <- shiny::isolate(filter$dataname)
164 - 3x + 3x +
      if (!dataname %in% datanames) {
165 - 2x + 2x +
        sprintf(
166 - 2x + 2x +
          "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
167 - 2x + 2x +
          shiny::isolate(filter$id),
168 - 2x + 2x +
          dQuote(dataname, q = FALSE),
169 - 2x + 2x +
          toString(dQuote(datanames, q = FALSE))
@@ -20235,14 +20935,16 @@

teal coverage - 69.63%

176 - 10x + 10x +
  if (length(out)) {
177 - 2x + 2x +
    paste(out, collapse = "\n")
@@ -20256,7 +20958,8 @@

teal coverage - 69.63%

179 - 8x + 8x +
    TRUE
@@ -20375,28 +21078,32 @@

teal coverage - 69.63%

196 - 15x + 15x +
  checkmate::assert_class(data, "teal_data")
197 - 15x + 15x +
  checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
198 - 15x + 15x +
  checkmate::assert_class(filters, "modules_teal_slices")
199 - 15x + 15x +
  checkmate::assert_r6(filtered_data_singleton, "FilteredData")
@@ -20410,7 +21117,8 @@

teal coverage - 69.63%

201 - 15x + 15x +
  if (!isTRUE(attr(filters, "module_specific"))) {
@@ -20424,14 +21132,16 @@

teal coverage - 69.63%

203 - 3x + 3x +
    slices <- shiny::isolate({
204 - 3x + 3x +
      Filter(function(x) x$id %in% attr(filters, "mapping")$global_filters, filters)
@@ -20445,14 +21155,16 @@

teal coverage - 69.63%

206 - 3x + 3x +
    filtered_data_singleton$set_filter_state(slices)
207 - 3x + 3x +
    return(modules_structure(modules, filtered_data_singleton))
@@ -20473,7 +21185,8 @@

teal coverage - 69.63%

210 - 12x + 12x +
  if (inherits(modules, "teal_module")) {
@@ -20487,35 +21200,40 @@

teal coverage - 69.63%

212 - 7x + 7x +
    datanames <-
213 - 7x + 7x +
      if (is.null(modules$datanames) || identical(modules$datanames, "all")) {
214 - 4x + 4x +
        include_parent_datanames(
215 - 4x + 4x +
          teal_data_datanames(data),
216 - 4x + 4x +
          teal.data::join_keys(data)
@@ -20536,21 +21254,24 @@

teal coverage - 69.63%

219 - 3x + 3x +
        include_parent_datanames(
220 - 3x + 3x +
          modules$datanames,
221 - 3x + 3x +
          teal.data::join_keys(data)
@@ -20578,35 +21299,40 @@

teal coverage - 69.63%

225 - 7x + 7x +
    slices <- shiny::isolate({
226 - 7x + 7x +
      Filter(x = filters, f = function(x) {
227 - 20x + 20x +
        x$dataname %in% datanames &&
228 - 20x + 20x +
          (x$id %in% attr(filters, "mapping")$global_filters ||
229 - 20x + 20x +
            x$id %in% unique(unlist(attr(filters, "mapping")[modules$label]))) # nolint: indentation_linter.
@@ -20634,14 +21360,16 @@

teal coverage - 69.63%

233 - 7x + 7x +
    slices$include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
234 - 7x + 7x +
    slices$exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
@@ -20662,7 +21390,8 @@

teal coverage - 69.63%

237 - 7x + 7x +
    filtered_data <- teal_data_to_filtered_data(data, datanames)
@@ -20676,7 +21405,8 @@

teal coverage - 69.63%

239 - 7x + 7x +
    filtered_data$set_filter_state(slices)
@@ -20690,56 +21420,64 @@

teal coverage - 69.63%

241 - 7x + 7x +
    return(filtered_data)
242 - 5x + 5x +
  } else if (inherits(modules, "teal_modules")) {
243 - 5x + 5x +
    ans <- lapply(
244 - 5x + 5x +
      modules$children,
245 - 5x + 5x +
      modules_datasets,
246 - 5x + 5x +
      data = data,
247 - 5x + 5x +
      filters = filters,
248 - 5x + 5x +
      filtered_data_singleton = filtered_data_singleton
@@ -20753,7 +21491,8 @@

teal coverage - 69.63%

250 - 5x + 5x +
    names(ans) <- vapply(modules$children, `[[`, character(1), "label")
@@ -20767,7 +21506,8 @@

teal coverage - 69.63%

252 - 5x + 5x +
    return(ans)
@@ -20823,14 +21563,16 @@

teal coverage - 69.63%

260 - 13x + 13x +
  if (inherits(modules, "teal_module")) {
261 - 8x + 8x +
    return(value)
@@ -20844,21 +21586,24 @@

teal coverage - 69.63%

263 - 5x + 5x +
    stats::setNames(
264 - 5x + 5x +
      lapply(modules$children, modules_structure, value),
265 - 5x + 5x +
      vapply(modules$children, `[[`, character(1), "label")
@@ -20949,21 +21694,24 @@

teal coverage - 69.63%

278 - 53x + 53x +
  checkmate::assert_class(data, "teal_data")
279 - 53x + 53x +
  if (length(teal.data::datanames(data))) {
280 - 47x + 47x +
    teal.data::datanames(data)
@@ -20977,7 +21725,8 @@

teal coverage - 69.63%

282 - 6x + 6x +
    ls(teal.code::get_env(data), all.names = TRUE)
@@ -21047,70 +21796,80 @@

teal coverage - 69.63%

292 - 14x + 14x +
  checkmate::assert_class(shiny_tag, "shiny.tag")
293 - 14x + 14x +
  checkmate::assert_true(shiny_tag$name == "head")
294 - 13x + 13x +
  child_names <- vapply(shiny_tag$children, `[[`, character(1L), "name")
295 - 13x + 13x +
  checkmate::assert_subset(c("title", "link"), child_names, .var.name = "child tags")
296 - 11x + 11x +
  rel_attr <- shiny_tag$children[[which(child_names == "link")]]$attribs$rel
297 - 11x + 11x +
  checkmate::assert_subset(
298 - 11x + 11x +
    rel_attr,
299 - 11x + 11x +
    c("icon", "shortcut icon"),
300 - 11x + 11x +
    .var.name = "Link tag's rel attribute",
301 - 11x + 11x +
    empty.ok = FALSE
@@ -21229,56 +21988,64 @@

teal coverage - 69.63%

318 - 11x + 11x +
  checkmate::assert_string(title, null.ok = TRUE)
319 - 11x + 11x +
  checkmate::assert_string(favicon, null.ok = TRUE)
320 - 11x + 11x +
  tags$head(
321 - 11x + 11x +
    tags$title(title),
322 - 11x + 11x +
    tags$link(
323 - 11x + 11x +
      rel = "icon",
324 - 11x + 11x +
      href = favicon,
325 - 11x + 11x +
      sizes = "any"
@@ -21418,14 +22185,16 @@

teal coverage - 69.63%

345 - 19x + 19x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
346 - 18x + 18x +
  checkmate::assert_class(modules, "teal_modules")
@@ -21439,28 +22208,32 @@

teal coverage - 69.63%

348 - 17x + 17x +
  data <- if (inherits(data, "teal_data")) {
349 - 15x + 15x +
    as.list(data@env)
350 - 17x + 17x +
  } else if (inherits(data, "teal_data_module")) {
351 - 2x + 2x +
    deparse1(body(data$server))
@@ -21474,7 +22247,8 @@

teal coverage - 69.63%

353 - 17x + 17x +
  modules <- lapply(modules, defunction)
@@ -21488,7 +22262,8 @@

teal coverage - 69.63%

355 - 17x + 17x +
  rlang::hash(list(data = data, modules = modules))
@@ -21537,28 +22312,32 @@

teal coverage - 69.63%

362 - 186x + 186x +
  if (is.list(x)) {
363 - 40x + 40x +
    lapply(x, defunction)
364 - 146x + 146x +
  } else if (is.function(x)) {
365 - 44x + 44x +
    deparse1(body(x))
@@ -21572,7 +22351,8 @@

teal coverage - 69.63%

367 - 102x + 102x +
    x
@@ -21788,14 +22568,16 @@

teal coverage - 69.63%

28 - 9x + 9x +
  checkmate::assert_class(tss, "teal_slices")
29 - 9x + 9x +
  checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
@@ -21809,7 +22591,8 @@

teal coverage - 69.63%

31 - 9x + 9x +
  cat(format(tss, trim_lines = FALSE), "\n", file = file)
@@ -21858,7 +22641,8 @@

teal coverage - 69.63%

38 - 9x + 9x +
  checkmate::assert_file_exists(file, access = "r", extension = "json")
@@ -21872,56 +22656,64 @@

teal coverage - 69.63%

40 - 9x + 9x +
  tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
41 - 9x + 9x +
  tss_json$slices <-
42 - 9x + 9x +
    lapply(tss_json$slices, function(slice) {
43 - 9x + 9x +
      for (field in c("selected", "choices")) {
44 - 18x + 18x +
        if (!is.null(slice[[field]])) {
45 - 12x + 12x +
          if (length(slice[[field]]) > 0) {
46 - 9x + 9x +
            date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
47 - 9x + 9x +
            time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
@@ -21935,35 +22727,40 @@

teal coverage - 69.63%

49 - 9x + 9x +
            slice[[field]] <-
50 - 9x + 9x +
              if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
51 - 3x + 3x +
                as.Date(slice[[field]])
52 - 9x + 9x +
              } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
53 - 3x + 3x +
                as.POSIXct(slice[[field]], tz = "UTC")
@@ -21977,7 +22774,8 @@

teal coverage - 69.63%

55 - 3x + 3x +
                slice[[field]]
@@ -21998,7 +22796,8 @@

teal coverage - 69.63%

58 - 3x + 3x +
            slice[[field]] <- character(0)
@@ -22026,7 +22825,8 @@

teal coverage - 69.63%

62 - 9x + 9x +
      slice
@@ -22047,7 +22847,8 @@

teal coverage - 69.63%

65 - 9x + 9x +
  tss_elements <- lapply(tss_json$slices, as.teal_slice)
@@ -22061,7 +22862,8 @@

teal coverage - 69.63%

67 - 9x + 9x +
  do.call(teal_slices, c(tss_elements, tss_json$attributes))
@@ -22396,56 +23198,64 @@

teal coverage - 69.63%

46 - 17x + 17x +
  checkmate::assert_string(msg, null.ok = TRUE)
47 - 15x + 15x +
  checkmate::assert_data_frame(x)
48 - 15x + 15x +
  if (!is.null(min_nrow)) {
49 - 15x + 15x +
    if (complete) {
50 - 5x + 5x +
      complete_index <- stats::complete.cases(x)
51 - 5x + 5x +
      validate(need(
52 - 5x + 5x +
        sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
53 - 5x + 5x +
        paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
@@ -22466,35 +23276,40 @@

teal coverage - 69.63%

56 - 10x + 10x +
      validate(need(
57 - 10x + 10x +
        nrow(x) >= min_nrow,
58 - 10x + 10x +
        paste(
59 - 10x + 10x +
          c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
60 - 10x + 10x +
          collapse = "\n"
@@ -22529,28 +23344,32 @@

teal coverage - 69.63%

65 - 10x + 10x +
    if (!allow_inf) {
66 - 6x + 6x +
      validate(need(
67 - 6x + 6x +
        all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
68 - 6x + 6x +
        "Dataframe contains Inf values which is not allowed."
@@ -25454,7 +26273,8 @@

teal coverage - 69.63%

103 - 10x + 10x +
  logger::log_trace("init initializing teal app with: data ('{ class(data) }').")
@@ -25482,7 +26302,8 @@

teal coverage - 69.63%

107 - 10x + 10x +
  if (inherits(data, "TealData")) {
@@ -25552,7 +26373,8 @@

teal coverage - 69.63%

117 - 10x + 10x +
  checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
@@ -25573,28 +26395,32 @@

teal coverage - 69.63%

120 - 10x + 10x +
  checkmate::assert(
121 - 10x + 10x +
    .var.name = "modules",
122 - 10x + 10x +
    checkmate::check_multi_class(modules, c("teal_modules", "teal_module")),
123 - 10x + 10x +
    checkmate::check_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
@@ -25608,14 +26434,16 @@

teal coverage - 69.63%

125 - 10x + 10x +
  if (inherits(modules, "teal_module")) {
126 - 1x + 1x +
    modules <- list(modules)
@@ -25629,14 +26457,16 @@

teal coverage - 69.63%

128 - 10x + 10x +
  if (checkmate::test_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))) {
129 - 4x + 4x +
    modules <- do.call(teal::modules, modules)
@@ -25664,7 +26494,8 @@

teal coverage - 69.63%

133 - 10x + 10x +
  checkmate::assert_class(filter, "teal_slices")
@@ -25685,28 +26516,32 @@

teal coverage - 69.63%

136 - 9x + 9x +
  checkmate::assert(
137 - 9x + 9x +
    .var.name = "title",
138 - 9x + 9x +
    checkmate::check_string(title),
139 - 9x + 9x +
    checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
@@ -25720,28 +26555,32 @@

teal coverage - 69.63%

141 - 9x + 9x +
  checkmate::assert(
142 - 9x + 9x +
    .var.name = "header",
143 - 9x + 9x +
    checkmate::check_string(header),
144 - 9x + 9x +
    checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
@@ -25755,28 +26594,32 @@

teal coverage - 69.63%

146 - 9x + 9x +
  checkmate::assert(
147 - 9x + 9x +
    .var.name = "footer",
148 - 9x + 9x +
    checkmate::check_string(footer),
149 - 9x + 9x +
    checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
@@ -25790,7 +26633,8 @@

teal coverage - 69.63%

151 - 9x + 9x +
  checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
@@ -25811,7 +26655,8 @@

teal coverage - 69.63%

154 - 9x + 9x +
  teal.logger::log_system_info()
@@ -25839,21 +26684,24 @@

teal coverage - 69.63%

158 - 9x + 9x +
  landing <- extract_module(modules, "teal_module_landing")
159 - 9x + 9x +
  landing_module <- NULL
160 - 9x + 9x +
  if (length(landing) == 1L) {
@@ -25874,7 +26722,8 @@

teal coverage - 69.63%

163 - 9x + 9x +
  } else if (length(landing) > 1L) {
@@ -25909,7 +26758,8 @@

teal coverage - 69.63%

168 - 9x + 9x +
  attr(filter, "app_id") <- create_app_id(data, modules)
@@ -25930,7 +26780,8 @@

teal coverage - 69.63%

171 - 9x + 9x +
  filter <- as.teal_slices(as.list(filter))
@@ -25958,7 +26809,8 @@

teal coverage - 69.63%

175 - 9x + 9x +
  if (isTRUE(attr(filter, "module_specific"))) {
@@ -26147,21 +26999,24 @@

teal coverage - 69.63%

202 - 9x + 9x +
  if (inherits(data, "teal_data")) {
203 - 8x + 8x +
    if (length(teal_data_datanames(data)) == 0) {
204 - 1x + 1x +
      stop("The environment of `data` is empty.")
@@ -26182,28 +27037,32 @@

teal coverage - 69.63%

207 - 7x + 7x +
    is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
208 - 7x + 7x +
    if (!isTRUE(is_modules_ok)) {
209 - 1x + 1x +
      logger::log_error(is_modules_ok)
210 - 1x + 1x +
      checkmate::assert(is_modules_ok, .var.name = "modules")
@@ -26224,21 +27083,24 @@

teal coverage - 69.63%

213 - 6x + 6x +
    is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
214 - 6x + 6x +
    if (!isTRUE(is_filter_ok)) {
215 - 1x + 1x +
      warning(is_filter_ok)
@@ -26301,21 +27163,24 @@

teal coverage - 69.63%

224 - 7x + 7x +
  res <- list(
225 - 7x + 7x +
    ui = ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
226 - 7x + 7x +
    server = function(input, output, session) {
@@ -26371,7 +27236,8 @@

teal coverage - 69.63%

234 - 7x + 7x +
  logger::log_trace("init teal app has been initialized.")
@@ -26385,7 +27251,8 @@

teal coverage - 69.63%

236 - 7x + 7x +
  res
@@ -26594,14 +27461,16 @@

teal coverage - 69.63%

28 - 6x + 6x +
  expr <- substitute(expr)
29 - 6x + 6x +
  extras <- list(...)
@@ -26622,14 +27491,16 @@

teal coverage - 69.63%

32 - 6x + 6x +
  if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
33 - 6x + 6x +
    expr <- call("{", expr)
@@ -26650,7 +27521,8 @@

teal coverage - 69.63%

36 - 6x + 6x +
  calls <- as.list(expr)[-1]
@@ -26671,7 +27543,8 @@

teal coverage - 69.63%

39 - 6x + 6x +
  calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
@@ -26685,7 +27558,8 @@

teal coverage - 69.63%

41 - 6x + 6x +
  eval_code(object = data, code = as.expression(calls))
@@ -26782,21 +27656,24 @@

teal coverage - 69.63%

12 - 7x + 7x +
  css_files <- list.files(
13 - 7x + 7x +
    system.file("css", package = "teal", mustWork = TRUE),
14 - 7x + 7x +
    pattern = pattern, full.names = TRUE
@@ -26817,14 +27694,16 @@

teal coverage - 69.63%

17 - 7x + 7x +
  singleton(
18 - 7x + 7x +
    tags$head(lapply(css_files, includeCSS))
@@ -26936,21 +27815,24 @@

teal coverage - 69.63%

34 - 7x + 7x +
  checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
35 - 7x + 7x +
  js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
36 - 7x + 7x +
  js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
@@ -26964,7 +27846,8 @@

teal coverage - 69.63%

38 - 7x + 7x +
  singleton(lapply(js_files, includeScript))
@@ -27097,21 +27980,24 @@

teal coverage - 69.63%

57 - 18x + 18x +
  checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
58 - 18x + 18x +
  lapply(files, function(file) {
59 - 18x + 18x +
    shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
@@ -27125,7 +28011,8 @@

teal coverage - 69.63%

61 - 18x + 18x +
  invisible(NULL)
@@ -27230,21 +28117,24 @@

teal coverage - 69.63%

76 - 7x + 7x +
  tagList(
77 - 7x + 7x +
    shinyjs::useShinyjs(),
78 - 7x + 7x +
    include_css_files(),
@@ -27258,14 +28148,16 @@

teal coverage - 69.63%

80 - 7x + 7x +
    include_js_files(except = "init.js"),
81 - 7x + 7x +
    shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
@@ -27404,28 +28296,32 @@

teal coverage - 69.63%

17 - 53x + 53x +
  checkmate::assert_string(label)
18 - 53x + 53x +
  module(
19 - 53x + 53x +
    label,
20 - 53x + 53x +
    server = function(id, data) {
@@ -27530,7 +28426,8 @@

teal coverage - 69.63%

35 - 53x + 53x +
    ui = function(id) {
@@ -27600,7 +28497,8 @@

teal coverage - 69.63%

45 - 53x + 53x +
    datanames = datanames
@@ -27823,28 +28721,32 @@

teal coverage - 69.63%

29 - 13x + 13x +
  teal_data_module(
30 - 13x + 13x +
    ui = function(id) {
31 - 1x + 1x +
      ns <- NS(id)
32 - 1x + 1x +
      object$ui(ns("mutate_inner"))
@@ -27858,21 +28760,24 @@

teal coverage - 69.63%

34 - 13x + 13x +
    server = function(id) {
35 - 11x + 11x +
      moduleServer(id, function(input, output, session) {
36 - 11x + 11x +
        teal_data_rv <- object$server("mutate_inner")
@@ -27886,14 +28791,16 @@

teal coverage - 69.63%

38 - 11x + 11x +
        if (!is.reactive(teal_data_rv)) {
39 - 1x + 1x +
          stop("The `teal_data_module` must return a reactive expression.", call. = FALSE)
@@ -27914,7 +28821,8 @@

teal coverage - 69.63%

42 - 10x + 10x +
        td <- eventReactive(teal_data_rv(),
@@ -27928,14 +28836,16 @@

teal coverage - 69.63%

44 - 10x + 10x +
            if (inherits(teal_data_rv(), c("teal_data", "qenv.error"))) {
45 - 6x + 6x +
              eval_code(teal_data_rv(), code)
@@ -27949,7 +28859,8 @@

teal coverage - 69.63%

47 - 4x + 4x +
              teal_data_rv()
@@ -27970,7 +28881,8 @@

teal coverage - 69.63%

50 - 10x + 10x +
          ignoreNULL = FALSE
@@ -27984,7 +28896,8 @@

teal coverage - 69.63%

52 - 10x + 10x +
        td
@@ -28033,7 +28946,8 @@

teal coverage - 69.63%

59 - 1x + 1x +
  eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
@@ -28061,7 +28975,8 @@

teal coverage - 69.63%

63 - 6x + 6x +
  eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
@@ -28857,21 +29772,24 @@

teal coverage - 69.63%

23 - 4x + 4x +
  checkmate::assert_string(label)
24 - 2x + 2x +
  checkmate::assert_list(server_args, names = "named")
25 - 2x + 2x +
  checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
@@ -28885,7 +29803,8 @@

teal coverage - 69.63%

27 - 2x + 2x +
  logger::log_info("Initializing reporter_previewer_module")
@@ -28899,7 +29818,8 @@

teal coverage - 69.63%

29 - 2x + 2x +
  srv <- function(id, reporter, ...) {
@@ -28927,7 +29847,8 @@

teal coverage - 69.63%

33 - 2x + 2x +
  ui <- function(id, ...) {
@@ -28955,28 +29876,32 @@

teal coverage - 69.63%

37 - 2x + 2x +
  module <- module(
38 - 2x + 2x +
    label = "temporary label",
39 - 2x + 2x +
    server = srv, ui = ui,
40 - 2x + 2x +
    server_args = server_args, ui_args = list(), datanames = NULL
@@ -29004,21 +29929,24 @@

teal coverage - 69.63%

44 - 2x + 2x +
  class(module) <- c("teal_module_previewer", class(module))
45 - 2x + 2x +
  module$label <- label
46 - 2x + 2x +
  module
@@ -29430,35 +30358,40 @@

teal coverage - 69.63%

57 - 36x + 36x +
  checkmate::assert_function(ui, args = "id", nargs = 1)
58 - 35x + 35x +
  checkmate::assert_function(server, args = "id", nargs = 1)
59 - 34x + 34x +
  structure(
60 - 34x + 34x +
    list(ui = ui, server = server),
61 - 34x + 34x +
    class = "teal_data_module"
diff --git a/latest-tag/index.html b/latest-tag/index.html index f1e5827450..fccc573a2a 100644 --- a/latest-tag/index.html +++ b/latest-tag/index.html @@ -1,5 +1,4 @@ - - + @@ -88,23 +87,7 @@ - - + - + + diff --git a/latest-tag/news/index.html b/latest-tag/news/index.html index a90394fb5a..3aea2486e2 100644 --- a/latest-tag/news/index.html +++ b/latest-tag/news/index.html @@ -1,8 +1,22 @@ - -Changelog • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -109,35 +129,55 @@
-

teal 0.15.2

CRAN release: 2024-03-07

-
-

Bug fixes

-
+

teal 0.15.2 +

+

CRAN release: 2024-03-07

+
+

Bug fixes +

+ +
-

teal 0.15.1

CRAN release: 2024-02-22

-
-

Bug fixes

-
+

teal 0.15.1 +

+

CRAN release: 2024-02-22

+
+

Bug fixes +

+ +
-

Miscellaneous

-
+

Miscellaneous +

+ +
-

teal 0.15.0

CRAN release: 2024-02-08

-
-

New features

- +
-

Breaking changes

-
+ +
-

Bug fixes

-
+ +
-

teal 0.14.0

+

teal 0.14.0 +

-

New features

-
+ +
-

Breaking changes

-
+ +
-

Miscellaneous

-
+ +
-

teal 0.13.0

+

teal 0.13.0 +

-

Breaking changes

-
+ +
-

New features

-
+ +
-

Miscellaneous

-
+ +
-

teal 0.12.0

-
-

New features

-
+

teal 0.12.0 +

+
+

New features +

+ +
-

Enhancements

-
+ +
-

Breaking changes

-
+ +
-

Miscellaneous

-
+

Miscellaneous +

+ +
-

teal 0.11.1

+

teal 0.11.1 +

-

Enhancements

-
+ +
-

Breaking changes

-
+

Breaking changes +

+ +
-

Miscellaneous

-
+ +
-

teal 0.11.0

- +

The teal package contains the code to create apps (teal::init), to create a module (teal::module) and to group modules in the app (teal::modules). teal depends on teal.transform and teal.data which contain the functions that teal app creators are likely to need. The other package teal only imports from and therefore teal module creators should either fully specify functions from these packages when required or import them into custom packages as library(teal) will not load them.

+
+

New features +

+ +
-

Breaking changes

-
+ +
-

Miscellaneous

-
+ +
-

Bug fixes

-
+

Bug fixes +

+ +
-

teal 0.10.1

+

teal 0.10.1 +

-

Breaking changes

-
+ +
-

New features

+

New features +

-
Logging
-
+ +
-
Other
-
+ +
-

teal 0.10.0

+

teal 0.10.0 +

-

New features

-
+ + + +
-

Bug fixes

-
+ +
-

Enhancements

-
+ +
-

Miscellaneous

-
+ +
-

teal 0.9.5

+

teal 0.9.5 +

-

Enhancements

-
+ +
-

Bug fixes

-
+ +
-

teal 0.9.4

+

teal 0.9.4 +

-

Enhancements

-
+ +
-

Bug fixes

-
+ +
-

teal 0.9.3

+

teal 0.9.3 +

-

New Features

-
+ +
-

Bug fixes

-
+ +
-

Enhancements

-
+

Enhancements +

+ +
-

teal 0.9.2

+

teal 0.9.2 +

-

New Features

-
+ +
-

Enhancements

-
+ +
-

Miscellaneous

-
+

Miscellaneous +

+ +
-

teal 0.9.1

-
-

teal 0.8.5

-
+

teal 0.8.5 +

+ +
-

teal 0.8.4

-
+ +
-

teal 0.8.3

-
+ +
-

teal 0.8.2

-
+ +
-

teal 0.8.1

-
+

teal 0.8.1 +

+ +
-

teal 0.8.0

-
+ +
-

teal 0.7.0

-
+ +
-

teal 0.6.0

-
+ +
-

teal 0.0.5

-
+ +
-

teal 0.0.4

-
+

teal 0.0.4 +

+ +
-

teal 0.0.3

-
-
New features
- +
-
Changes
-
+ +
-

teal 0.0.1

-
+

teal 0.0.1 +

+ + + + + + - - + + diff --git a/latest-tag/pull_request_template.html b/latest-tag/pull_request_template.html index 0eca9930a5..202314d428 100644 --- a/latest-tag/pull_request_template.html +++ b/latest-tag/pull_request_template.html @@ -1,8 +1,22 @@ - -Pull Request • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -114,17 +134,19 @@

Fixes #nnn

- + + + + - - + + diff --git a/latest-tag/reference/TealReportCard.html b/latest-tag/reference/TealReportCard.html index e777febcf4..7016c1b1b4 100644 --- a/latest-tag/reference/TealReportCard.html +++ b/latest-tag/reference/TealReportCard.html @@ -1,16 +1,32 @@ - - + + + + + +TealReportCard — TealReportCard • teal +TealReportCard — TealReportCard • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -127,20 +149,27 @@
-

Super class

+

Super class +

teal.reporter::ReportCard -> TealReportCard

-

Methods

+

Methods +

-

Public methods

+

Public methods +

-

Inherited methods +
+

Inherited methods


-

Method append_src()

-

Appends the source code to the content meta data of this TealReportCard.

-

Usage

-

TealReportCard$append_src(src, ...)

+

+
+
+

Method append_src() +

+

Appends the source code to the content meta data of this TealReportCard.

+
+

Usage +

+

+
+
TealReportCard$append_src(src, ...)
+

+
-

Arguments

-

src
+

Arguments +

+

+
+
+
src

(character(1)) code as text.

@@ -172,85 +214,148 @@

Arguments -

Returns

+

Returns +

Object of class TealReportCard, invisibly.

-

Examples

-

card <- TealReportCard$new()$append_src(
+

Examples +

+

+
+
card <- TealReportCard$new()$append_src(
   "plot(iris)"
 )
-card$get_content()[[1]]$get_content()

+card$get_content()[[1]]$get_content()
+

+
-


-

Method append_fs()

+
+

+
+
+

Method append_fs() +

Appends the filter state list to the content and metadata of this TealReportCard. If the filter state list has an attribute named formatted, it appends it to the card otherwise it uses the default yaml::as.yaml to format the list. -If the filter state list is empty, nothing is appended to the content.

-

Usage

-

TealReportCard$append_fs(fs)

+If the filter state list is empty, nothing is appended to the content.

+
+

Usage +

+

+
+
TealReportCard$append_fs(fs)
+

+
-

Arguments

-

fs
+

Arguments +

+

+
+
+
fs

(teal_slices) object returned from teal_slices() function.

-

+
+

+
-

Returns

+

Returns +

self, invisibly.

-


-

Method append_encodings()

-

Appends the encodings list to the content and metadata of this TealReportCard.

-

Usage

-

TealReportCard$append_encodings(encodings)

+
+

+
+
+

Method append_encodings() +

+

Appends the encodings list to the content and metadata of this TealReportCard.

+
+

Usage +

+

+
+
TealReportCard$append_encodings(encodings)
+

+
-

Arguments

-

encodings
+

Arguments +

+

+
+
+
encodings

(list) list of encodings selections of the teal app.

-

+
+

+
-

Returns

+

Returns +

self, invisibly.

-

Examples

-

card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
+

Examples +

+

+
+
card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
 card$get_content()[[1]]$get_content()
-

+
+

+
-


-

Method clone()

-

The objects of this class are cloneable with this method.

-

Usage

-

TealReportCard$clone(deep = FALSE)

+
+

+
+
+

Method clone() +

+

The objects of this class are cloneable with this method.

+
+

Usage +

+

+
+
TealReportCard$clone(deep = FALSE)
+

+
-

Arguments

-

deep
+

Arguments +

+

+
+
+
deep

Whether to make a deep clone.

-

+
+

+
@@ -258,7 +363,8 @@

Arguments -

Examples

+

Examples +


 ## ------------------------------------------------
 ## Method `TealReportCard$append_src`
@@ -281,17 +387,19 @@ 

Examples

+ +
+ +
- - + + diff --git a/latest-tag/reference/TealSlicesBlock.html b/latest-tag/reference/TealSlicesBlock.html index c22c73b587..21920ac9ba 100644 --- a/latest-tag/reference/TealSlicesBlock.html +++ b/latest-tag/reference/TealSlicesBlock.html @@ -1,10 +1,26 @@ - -RcodeBlock — TealSlicesBlock • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
@@ -118,34 +140,54 @@
-

Super classes

+

Super classes +

teal.reporter::ContentBlock -> teal.reporter::TextBlock -> TealSlicesBlock

+

Inherited methods


-

Method new()

-

Returns a TealSlicesBlock object.

-

Usage

-

TealSlicesBlock$new(content = teal_slices(), style = "verbatim")

+

+
+
+

Method new() +

+

Returns a TealSlicesBlock object.

+
+

Usage +

+

+
+
TealSlicesBlock$new(content = teal_slices(), style = "verbatim")
+

+
-

Arguments

-

content
+

Arguments +

+

+
+
+
content

(teal_slices) object returned from teal_slices() function.

@@ -153,89 +195,154 @@

Arguments -

Details

+

Details +

Returns a TealSlicesBlock object with no content and no parameters.

-

Returns

+

Returns +

Object of class TealSlicesBlock, invisibly.

-


-

Method set_content()

+
+

+
+
+

Method set_content() +

Sets content of this TealSlicesBlock. Sets content as YAML text which represents a list generated from teal_slices. The list displays limited number of fields from teal_slice objects, but this list is sufficient to conclude which filters were applied. -When selected field in teal_slice object is a range, then it is displayed as a "min"

-

Usage

-

TealSlicesBlock$set_content(content)

+When selected field in teal_slice object is a range, then it is displayed as a "min"

+
+

Usage +

+

+
+
TealSlicesBlock$set_content(content)
+

+
-

Arguments

-

content
+

Arguments +

+

+
+
+
content

(teal_slices) object returned from teal_slices() function.

-

+
+

+
-

Returns

+

Returns +

self, invisibly.

-


-

Method from_list()

-

Create the RcodeBlock from a list.

-

Usage

-

TealSlicesBlock$from_list(x)

+
+

+
+
+

Method from_list() +

+

Create the RcodeBlock from a list.

+
+

Usage +

+

+
+
TealSlicesBlock$from_list(x)
+

+
-

Arguments

-

x
+

Arguments +

+

+
+
+
x

(named list) with two fields c("text", "params"). Use the get_available_params method to get all possible parameters.

-

+
+

+
-

Returns

+

Returns +

self, invisibly.

-


-

Method to_list()

-

Convert the RcodeBlock to a list.

-

Usage

-

TealSlicesBlock$to_list()

+
+

+
+
+

Method to_list() +

+

Convert the RcodeBlock to a list.

+
+

Usage +

+

+
+
TealSlicesBlock$to_list()
+

+
-

Returns

+

Returns +

named list with a text and params.

-


-

Method clone()

-

The objects of this class are cloneable with this method.

-

Usage

-

TealSlicesBlock$clone(deep = FALSE)

+
+

+
+
+

Method clone() +

+

The objects of this class are cloneable with this method.

+
+

Usage +

+

+
+
TealSlicesBlock$clone(deep = FALSE)
+

+
-

Arguments

-

deep
+

Arguments +

+

+
+
+
deep

Whether to make a deep clone.

-

+
+

+
@@ -243,17 +350,19 @@

Arguments

+ +
+ +
- - + + diff --git a/latest-tag/reference/append_module.html b/latest-tag/reference/append_module.html index 33504fe229..2fbe33ad08 100644 --- a/latest-tag/reference/append_module.html +++ b/latest-tag/reference/append_module.html @@ -1,8 +1,24 @@ - -Append a teal_module to children of a teal_modules object — append_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
@@ -114,39 +136,46 @@
-

Usage

+

Usage +

append_module(modules, module)
-

Arguments

-
modules
+

Arguments +

+
+
modules

(teal_modules)

module

(teal_module) object to be appended onto the children of modules

-
+ +
-

Value

+

Value +

A teal_modules object with module appended.

+ +
+ + - - + + diff --git a/latest-tag/reference/build_app_title.html b/latest-tag/reference/build_app_title.html index 73d2404bb4..80c939a2da 100644 --- a/latest-tag/reference/build_app_title.html +++ b/latest-tag/reference/build_app_title.html @@ -1,8 +1,24 @@ - -Build app title with favicon — build_app_title • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
-

Usage

+

Usage +

build_app_title(
   title = "teal app",
   favicon =
@@ -123,8 +146,10 @@ 

Usage

-

Arguments

-
title
+

Arguments +

+
+
title

(character) The browser title for the teal app.

@@ -132,26 +157,30 @@

Arguments -

Value

+

Value +

A shiny.tag containing the element that adds the title and logo to the shiny app.

+ + + + - - + + diff --git a/latest-tag/reference/calculate_hashes.html b/latest-tag/reference/calculate_hashes.html index caf806a2bf..cd34af01bd 100644 --- a/latest-tag/reference/calculate_hashes.html +++ b/latest-tag/reference/calculate_hashes.html @@ -1,8 +1,24 @@ - -Get the hash of a dataset — calculate_hashes • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
-

Usage

+

Usage +

calculate_hashes(datanames, datasets)
-

Arguments

-
datanames
+

Arguments +

+
+
datanames

(character) names of datasets

datasets

(FilteredData) object holding the data

-
+ +
-

Value

+

Value +

A list of hashes per dataset.

+ + + + - - + + diff --git a/latest-tag/reference/check_filter_datanames.html b/latest-tag/reference/check_filter_datanames.html index 91742dd993..c207b62171 100644 --- a/latest-tag/reference/check_filter_datanames.html +++ b/latest-tag/reference/check_filter_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in filters — check_filter_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
-

Usage

+

Usage +

check_filter_datanames(filters, datanames)
-

Arguments

-
filters
+

Arguments +

+
+
filters

(teal_slices) object

datanames

(character) names of datasets available in the data object

-
+ +
-

Value

+

Value +

A character(1) containing error message or TRUE if validation passes.

+ + + + - - + + diff --git a/latest-tag/reference/check_modules_datanames.html b/latest-tag/reference/check_modules_datanames.html index ebfed97190..7dad186f57 100644 --- a/latest-tag/reference/check_modules_datanames.html +++ b/latest-tag/reference/check_modules_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in modules — check_modules_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
-

Usage

+

Usage +

check_modules_datanames(modules, datanames)
-

Arguments

-
modules
+

Arguments +

+
+
modules

(teal_modules) object

datanames

(character) names of datasets available in the data object

-
+ +
-

Value

+

Value +

A character(1) containing error message or TRUE if validation passes.

+ + + + - - + + diff --git a/latest-tag/reference/create_app_id.html b/latest-tag/reference/create_app_id.html index a47d15c56f..eadeaec5ce 100644 --- a/latest-tag/reference/create_app_id.html +++ b/latest-tag/reference/create_app_id.html @@ -1,8 +1,24 @@ - -Application ID — create_app_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,53 @@
-

Usage

+

Usage +

create_app_id(data, modules)
-

Arguments

-
data
+

Arguments +

+
+
data

(teal_data or teal_data_module) as accepted by init

modules

(teal_modules) object as accepted by init

-
+ +
-

Value

+

Value +

A single character string.

-

Details

+

Details +

Calculate app ID that will be used to stamp filter state snapshots. App ID is a hash of the app's data and modules. See "transferring snapshots" section in ?snapshot.

+ + + + - - + + diff --git a/latest-tag/reference/deep_copy_filter.html b/latest-tag/reference/deep_copy_filter.html index fd1cb830a1..6cb01af3d0 100644 --- a/latest-tag/reference/deep_copy_filter.html +++ b/latest-tag/reference/deep_copy_filter.html @@ -1,14 +1,30 @@ - - + + + + + +Deep copy teal_slices — deep_copy_filter • teal +Deep copy teal_slices — deep_copy_filter • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + +
@@ -123,18 +146,23 @@
-

Usage

+

Usage +

deep_copy_filter(filter)
-

Arguments

-
filter
+

Arguments +

+
+
filter

(teal_slices)

-
+ +
-

Value

+

Value +

teal_slices

@@ -143,17 +171,19 @@

Value

+ + + + - - + + diff --git a/latest-tag/reference/dot-datasets_to_data.html b/latest-tag/reference/dot-datasets_to_data.html index edc63b5e61..7761232260 100644 --- a/latest-tag/reference/dot-datasets_to_data.html +++ b/latest-tag/reference/dot-datasets_to_data.html @@ -1,12 +1,28 @@ - - + + + + + +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
-

Usage

+

Usage +

.datasets_to_data(module, datasets)
-

Arguments

-
module
+

Arguments +

+
+
module

(teal_module) module where needed filters are taken from

datasets

(FilteredData) object where needed data are taken from

-
+ +
-

Value

+

Value +

A teal_data object.

+ + + + - - + + diff --git a/latest-tag/reference/example_module.html b/latest-tag/reference/example_module.html index 32d6294243..16164d8d22 100644 --- a/latest-tag/reference/example_module.html +++ b/latest-tag/reference/example_module.html @@ -1,8 +1,24 @@ - -An example teal module — example_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
-

Usage

+

Usage +

example_module(label = "example teal module", datanames = "all")
-

Arguments

-
label
+

Arguments +

+
+
label

(character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

@@ -132,16 +157,19 @@

Arguments will show filters of all datasets. datanames also determines a subset of datasets which are appended to the data argument in server function.

-

+ +
-

Value

+

Value +

A teal module which can be included in the modules argument to init().

-

Examples

+

Examples +

app <- init(
   data = teal_data(IRIS = iris, MTCARS = mtcars),
   modules = example_module()
@@ -152,17 +180,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/filter_manager_module_srv.html b/latest-tag/reference/filter_manager_module_srv.html index a6505b172a..6481d214b8 100644 --- a/latest-tag/reference/filter_manager_module_srv.html +++ b/latest-tag/reference/filter_manager_module_srv.html @@ -1,8 +1,24 @@ - -Module specific filter manager — filter_manager_module_srv • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
-

Usage

+

Usage +

filter_manager_module_srv(id, module_fd, slices_global)
-

Arguments

-
id
+

Arguments +

+
+
id

(character(1)) shiny module id.

@@ -131,21 +156,28 @@

Arguments -

Value

+

Value +

A reactive expression containing the slices active in this module.

-

Details

+

Details +

This module tracks the state of a single FilteredData object and global teal_slices and updates both objects as necessary. Filter states added in different modules Filter states added any individual module are added to global teal_slices @@ -154,17 +186,19 @@

Details

+ + + + - - + + diff --git a/latest-tag/reference/get_client_timezone.html b/latest-tag/reference/get_client_timezone.html index 788cb5f944..d4c0542565 100644 --- a/latest-tag/reference/get_client_timezone.html +++ b/latest-tag/reference/get_client_timezone.html @@ -1,10 +1,26 @@ - -Get client timezone — get_client_timezone • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,19 +139,24 @@
-

Usage

+

Usage +

get_client_timezone(ns)
-

Arguments

-
ns
+

Arguments +

+
+
ns

(function) namespace function passed from the session object in the shiny server. For shiny modules this will allow for proper name spacing of the registered input.

-
+ +
-

Value

+

Value +

(shiny) input variable accessible with input$tz which is a (character) @@ -137,17 +164,19 @@

Value

+ + + + - - + + diff --git a/latest-tag/reference/get_code_tdata.html b/latest-tag/reference/get_code_tdata.html index d9f154864b..a085b98cac 100644 --- a/latest-tag/reference/get_code_tdata.html +++ b/latest-tag/reference/get_code_tdata.html @@ -1,8 +1,24 @@ - -Wrapper for get_code.tdata — get_code_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
@@ -114,35 +137,42 @@
-

Usage

+

Usage +

get_code_tdata(data)
-

Arguments

-
data
+

Arguments +

+
+
data

(tdata) object

-
+ +
-

Value

+

Value +

(character) code used in the tdata object.

+ + + + - - + + diff --git a/latest-tag/reference/get_datasets_code.html b/latest-tag/reference/get_datasets_code.html index 14adab55eb..08b81c4950 100644 --- a/latest-tag/reference/get_datasets_code.html +++ b/latest-tag/reference/get_datasets_code.html @@ -1,8 +1,24 @@ - -Get datasets code — get_datasets_code • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
-

Usage

+

Usage +

get_datasets_code(datanames, datasets, hashes)
-

Arguments

-
datanames
+

Arguments +

+
+
datanames

(character) names of datasets to extract code from

@@ -131,28 +156,35 @@

Arguments -

Value

+

Value +

-

Character string concatenated from the following elements:

  • data pre-processing code (from data argument in init)

  • +

    Character string concatenated from the following elements:

    +
      +
    • data pre-processing code (from data argument in init)

    • hash check of loaded objects

    • filter code (if any)

    • -
+ + + + + + - - + + diff --git a/latest-tag/reference/get_metadata.html b/latest-tag/reference/get_metadata.html index 48dc07e590..2284d4e6d8 100644 --- a/latest-tag/reference/get_metadata.html +++ b/latest-tag/reference/get_metadata.html @@ -1,8 +1,24 @@ - -Function to get metadata from a tdata object — get_metadata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
-

Usage

+

Usage +

get_metadata(data, dataname)
 
 # S3 method for tdata
@@ -125,34 +148,40 @@ 

Usage

-

Arguments

-
data
+

Arguments +

+
+
data

(tdata - object) to extract the data from

dataname

(character(1)) the dataset name whose metadata is requested

-
+ +
-

Value

+

Value +

Either list of metadata or NULL if no metadata.

+ + + + - - + + diff --git a/latest-tag/reference/get_rcode_libraries.html b/latest-tag/reference/get_rcode_libraries.html index 1c92cce2f5..3e9a985d39 100644 --- a/latest-tag/reference/get_rcode_libraries.html +++ b/latest-tag/reference/get_rcode_libraries.html @@ -1,8 +1,24 @@ - -Generates library calls from current session info — get_rcode_libraries • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,29 +136,33 @@
-

Usage

+

Usage +

get_rcode_libraries()
-

Value

+

Value +

Character vector of library(<package>) calls.

+ + + + - - + + diff --git a/latest-tag/reference/include_css_files.html b/latest-tag/reference/include_css_files.html index ddb9781288..aac05699d6 100644 --- a/latest-tag/reference/include_css_files.html +++ b/latest-tag/reference/include_css_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,35 +142,42 @@
-

Usage

+

Usage +

include_css_files(pattern = "*")
-

Arguments

-
pattern
+

Arguments +

+
+
pattern

(character) pattern of files to be included

-
+ +
-

Value

+

Value +

HTML code that includes CSS files.

+ + + + - - + + diff --git a/latest-tag/reference/include_js_files.html b/latest-tag/reference/include_js_files.html index 05c010eaa8..fa89841321 100644 --- a/latest-tag/reference/include_js_files.html +++ b/latest-tag/reference/include_js_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include JS files from /inst/js/ package directory to application header — include_js_files • teal +Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
-

Usage

+

Usage +

include_js_files(pattern = NULL, except = NULL)
-

Arguments

-
pattern
+

Arguments +

+
+
pattern

(character) pattern of files to be included, passed to system.file

except

(character) vector of basename filenames to be excluded

-
+ +
-

Value

+

Value +

HTML code that includes JS files.

+ + + + - - + + diff --git a/latest-tag/reference/include_teal_css_js.html b/latest-tag/reference/include_teal_css_js.html index 837f0f9637..f1fede65a9 100644 --- a/latest-tag/reference/include_teal_css_js.html +++ b/latest-tag/reference/include_teal_css_js.html @@ -1,16 +1,32 @@ - - + + + + + +Code to include teal CSS and JavaScript files — include_teal_css_js • teal +Code to include teal CSS and JavaScript files — include_teal_css_js • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -126,33 +148,38 @@
-

Usage

+

Usage +

include_teal_css_js()
-

Value

+

Value +

A shiny.tag.list.

-

Details

+

Details +

Simply add include_teal_css_js() as one of the UI elements.

+ + + + - - + + diff --git a/latest-tag/reference/index.html b/latest-tag/reference/index.html index f3e4856292..94603d8d14 100644 --- a/latest-tag/reference/index.html +++ b/latest-tag/reference/index.html @@ -1,8 +1,22 @@ - -Function reference • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -108,230 +128,312 @@
-

Core teal functions

+

Core teal functions +

-

Main functions needed to build a teal app

+

+

Main functions needed to build a teal app

-
+
+
-
+
+
init()
Create the server and UI function for the shiny app
-
+
+
+
teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
Data module for teal applications
-
+
+
+
module() modules() format(<teal_module>) print(<teal_module>) format(<teal_modules>) print(<teal_modules>)
Create teal_module and teal_modules objects
-
+
+
+
ui_teal_with_splash() srv_teal_with_splash()
Add splash screen to teal application
-
+
+
+
teal_slices() as.teal_slices() c(<teal_slices>)
Filter settings for teal applications
-
-

Helper Functions

+ +
+
+

Helper Functions +

-

Helper functions for teal

+

+

Helper functions for teal

-
+
+
-
+
+
build_app_title()
Build app title with favicon
-
-

Example module

+ +
+
+

Example module +

-

A simple teal module

+

+

A simple teal module

-
+
+
-
+
+
example_module()
An example teal module
-
-

Creating reports

+ +
+
+

Creating reports +

-
+
+
-
+
+
reporter_previewer_module()
Create a teal module for previewing a report
-
+
+
+
TealReportCard
TealReportCard
-
+
+
+
report_card_template()
Template function for TealReportCard creation and customization
-
-

Landing popup

+ +
+
+

Landing popup +

-
+
+
-
+
+
landing_popup_module()
Landing popup module
-
-

Functions for module developers

+ +
+
+

Functions for module developers +

-
+
+
-
+
+
as_tdata()
Downgrade teal_data objects in modules for compatibility
-
+
+
+
new_tdata()
Create a tdata object
-
+
+
+
get_code_tdata()
-
Wrapper for get_code.tdata
-
+
Wrapper for get_code.tdata +
+
+
+
get_metadata()
Function to get metadata from a tdata object
-
+
+
+
tdata2env()
-
Function to convert a tdata object to an environment
-
+
Function to convert a tdata object to an environment +
+
+
+
teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
Data module for teal applications
-
+
+
+
show_rcode_modal()
Show R code modal
-
+
+
+
join_keys(<tdata>)
-
Extract join_keys from tdata
-
-

Validation functions

+
Extract join_keys from tdata +
+ +
+
+

Validation functions +

-
+
+
-
+
+
validate_has_data()
Validate that dataset has a minimum number of observations
-
+
+
+
validate_has_elements()
Validates that vector has length greater than 0
-
+
+
+
validate_has_variable()
Validates that dataset contains specific variable
-
+
+
+
validate_in()
Validates that vector includes all expected values
-
+
+
+
validate_inputs()
Send input validation messages to output
-
+
+
+
validate_n_levels()
Validate that variables has expected number of levels
-
+
+
+
validate_no_intersection()
Validates no intersection between two vectors
-
+
+
+
validate_one_row_per_id()
Validate that dataset has unique rows for key variables
-
+ + + + + + - - + + diff --git a/latest-tag/reference/init.html b/latest-tag/reference/init.html index 263abcb8f2..7434539dbd 100644 --- a/latest-tag/reference/init.html +++ b/latest-tag/reference/init.html @@ -1,12 +1,28 @@ - - + + + + + +Create the server and UI function for the shiny app — init • teal +Create the server and UI function for the shiny app — init • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
-

Usage

+

Usage +

init(
   data,
   modules,
@@ -133,8 +156,10 @@ 

Usage

-

Arguments

-
data
+

Arguments +

+
+
data

(teal_data or teal_data_module) For constructing the data object, refer to teal_data() and teal_data_module().

@@ -174,21 +199,25 @@

Arguments -

Value

+

Value +

Named list with server and UI functions.

-

Details

+

Details +

When initializing the teal app, if datanames are not set for the teal_data object, defaults from the teal_data environment will be used.

-

Examples

+

Examples +

app <- init(
   data = teal_data(
     new_iris = transform(iris, id = seq_len(nrow(iris))),
@@ -243,17 +272,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/is_arg_used.html b/latest-tag/reference/is_arg_used.html index 6e6376230d..95416c4fbc 100644 --- a/latest-tag/reference/is_arg_used.html +++ b/latest-tag/reference/is_arg_used.html @@ -1,8 +1,24 @@ - -Does the object make use of the arg — is_arg_used • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
@@ -114,39 +137,46 @@
-

Usage

+

Usage +

is_arg_used(modules, arg)
-

Arguments

-
modules
+

Arguments +

+
+
modules

(teal_module or teal_modules) object

arg

(character(1)) names of the arguments to be checked against formals of teal modules.

-
+ +
-

Value

+

Value +

logical whether the object makes use of arg.

+ + + + - - + + diff --git a/latest-tag/reference/join_keys.tdata.html b/latest-tag/reference/join_keys.tdata.html index 0050234c5a..abb57484a9 100644 --- a/latest-tag/reference/join_keys.tdata.html +++ b/latest-tag/reference/join_keys.tdata.html @@ -1,8 +1,24 @@ - -Extract join_keys from tdata — join_keys.tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
@@ -114,34 +137,40 @@
-

Usage

+

Usage +

# S3 method for tdata
 join_keys(data, ...)
-

Arguments

-
data
+

Arguments +

+
+
data

(tdata) object

...

Additional arguments (not used)

-
+ +
+ + + + - - + + diff --git a/latest-tag/reference/landing_popup_module.html b/latest-tag/reference/landing_popup_module.html index af908058a7..b5eee1a56e 100644 --- a/latest-tag/reference/landing_popup_module.html +++ b/latest-tag/reference/landing_popup_module.html @@ -1,12 +1,28 @@ - - + + + + + +Landing popup module — landing_popup_module • teal +Landing popup module — landing_popup_module • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
-

Usage

+

Usage +

landing_popup_module(
   label = "Landing Popup",
   title = NULL,
@@ -130,8 +153,10 @@ 

Usage

-

Arguments

-
label
+

Arguments +

+
+
label

(character(1)) Label of the module.

@@ -147,16 +172,19 @@

Arguments -

Value

+

Value +

A teal_module (extended with teal_landing_module class) to be used in teal applications.

-

Examples

+

Examples +

app1 <- init(
   data = teal_data(iris = iris),
   modules = modules(
@@ -203,17 +231,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/matrix_to_mapping.html b/latest-tag/reference/matrix_to_mapping.html index d613f76b3e..fb9946f029 100644 --- a/latest-tag/reference/matrix_to_mapping.html +++ b/latest-tag/reference/matrix_to_mapping.html @@ -1,14 +1,30 @@ - - + + + + + +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,36 +145,43 @@
-

Usage

+

Usage +

matrix_to_mapping(mapping_matrix)
-

Arguments

-
mapping_matrix
+

Arguments +

+
+
mapping_matrix

(data.frame) of logical vectors where columns represent modules and row represent teal_slices

-
+ +
-

Value

+

Value +

Named list like that in the mapping attribute of a teal_slices object.

+ + + + - - + + diff --git a/latest-tag/reference/module_filter_manager.html b/latest-tag/reference/module_filter_manager.html index 5c64b9dbe2..d8ecf12a0c 100644 --- a/latest-tag/reference/module_filter_manager.html +++ b/latest-tag/reference/module_filter_manager.html @@ -1,8 +1,24 @@ - -Manage multiple FilteredData objects — module_filter_manager • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
-

Usage

+

Usage +

filter_manager_ui(id)
 
 filter_manager_srv(id, filtered_data_list, filter)
-

Arguments

-
id
+

Arguments +

+
+
id

(character(1)) shiny module id.

@@ -139,15 +164,18 @@

Argumentsteal_slices().

-

+ +
-

Value

+

Value +

A list of reactives, each holding a teal_slices, as returned by filter_manager_module_srv.

-

Details

+

Details +

This module observes changes in the filters of each FilteredData object and keeps track of all filters used. A mapping of filters to modules is kept in the mapping_matrix object (which is actually a data.frame) @@ -155,17 +183,19 @@

Details

+ + + + - - + + diff --git a/latest-tag/reference/module_filter_manager_modal.html b/latest-tag/reference/module_filter_manager_modal.html index 2516f2a86b..1689793ca4 100644 --- a/latest-tag/reference/module_filter_manager_modal.html +++ b/latest-tag/reference/module_filter_manager_modal.html @@ -1,8 +1,24 @@ - -Filter manager modal — module_filter_manager_modal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
-

Usage

+

Usage +

filter_manager_modal_ui(id)
 
 filter_manager_modal_srv(id, filtered_data_list, filter)
-

Arguments

-
id
+

Arguments +

+
+
id

(character(1)) shiny module id.

@@ -139,20 +164,23 @@

Argumentsteal_slices().

-

+ + + + + + - - + + diff --git a/latest-tag/reference/module_labels.html b/latest-tag/reference/module_labels.html index 3481947b5d..4cd2cce0d0 100644 --- a/latest-tag/reference/module_labels.html +++ b/latest-tag/reference/module_labels.html @@ -1,8 +1,24 @@ - -Retrieve labels from teal_modules — module_labels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
@@ -114,18 +137,23 @@
-

Usage

+

Usage +

module_labels(modules)
-

Arguments

-
modules
+

Arguments +

+
+
modules

(teal_modules)

-
+ +
-

Value

+

Value +

A list containing the labels of the modules. If the modules are nested, @@ -133,17 +161,19 @@

Value

+ + + + - - + + diff --git a/latest-tag/reference/module_management.html b/latest-tag/reference/module_management.html index 5bb9f35bab..d0fe766999 100644 --- a/latest-tag/reference/module_management.html +++ b/latest-tag/reference/module_management.html @@ -1,8 +1,24 @@ - -Extract/Remove module(s) of specific class — extract_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,54 @@
-

Usage

+

Usage +

extract_module(modules, class)
 
 drop_module(modules, class)
-

Arguments

-
modules
+

Arguments +

+
+
modules

(teal_modules)

class

The class name of teal_module to be extracted or dropped.

-
+ +
-

Value

+

Value +

-
  • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

  • +
      +
    • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

    • For drop_module, the opposite, which is all teal_modules of class other than class.

    • -

    teal_modules

    +
+

teal_modules

+ + + + - - + + diff --git a/latest-tag/reference/module_nested_tabs.html b/latest-tag/reference/module_nested_tabs.html index aa466c5fe2..7608ddb632 100644 --- a/latest-tag/reference/module_nested_tabs.html +++ b/latest-tag/reference/module_nested_tabs.html @@ -1,8 +1,24 @@ - -Create a UI of nested tabs of teal_modules — module_nested_tabs • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
@@ -114,7 +137,8 @@
-

Usage

+

Usage +

ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)
 
 # S3 method for default
@@ -163,8 +187,10 @@ 

Usage

-

Arguments

-
id
+

Arguments +

+
+
id

(character(1)) module id

@@ -197,18 +223,25 @@

Arguments -

Value

+

Value +

-

Depending on the class of modules, ui_nested_tabs returns:

  • teal_module: instantiated UI of the module.

  • +

    Depending on the class of modules, ui_nested_tabs returns:

    +
      +
    • teal_module: instantiated UI of the module.

    • teal_modules: tabsetPanel with each tab corresponding to recursively calling this function on it.

    • -

    srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

    +
+

srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

-

ui_nested_tabs

+

+ui_nested_tabs +

Each teal_modules is translated to a tabsetPanel and each @@ -218,25 +251,32 @@

ui_nested_tabs

-

srv_nested_tabs

+

+srv_nested_tabs +

-

This module recursively calls all elements of modules and returns currently active one.

  • teal_module returns self as a active module.

  • +

    This module recursively calls all elements of modules and returns currently active one.

    +
      +
    • teal_module returns self as a active module.

    • teal_modules also returns module active within self which is determined by the input$active_tab.

    • -
+ +
+ + + + - - + + diff --git a/latest-tag/reference/module_tabs_with_filters.html b/latest-tag/reference/module_tabs_with_filters.html index 5b078ae2fa..77e288b508 100644 --- a/latest-tag/reference/module_tabs_with_filters.html +++ b/latest-tag/reference/module_tabs_with_filters.html @@ -1,12 +1,28 @@ - - + + + + + +Add right filter panel into each of the top-level teal_modules UIs — module_tabs_with_filters • teal +Add right filter panel into each of the top-level teal_modules UIs — module_tabs_with_filters • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
-

Usage

+

Usage +

ui_tabs_with_filters(id, modules, datasets, filter = teal_slices())
 
 srv_tabs_with_filters(
@@ -133,8 +156,10 @@ 

Usage

-

Arguments

-
id
+

Arguments +

+
+
id

(character(1)) module id

@@ -161,15 +186,18 @@

Arguments -

Value

+

Value +

A shiny.tag.list containing the main menu, placeholders for filters and placeholders for the teal modules.

-

Details

+

Details +

The right filter panel's filter choices affect the datasets object. Therefore, all modules using the same datasets share the same filters.

This works with nested modules of depth greater than 2, though the filter @@ -177,17 +205,19 @@

Details

+ +
+ + - - + + diff --git a/latest-tag/reference/module_teal.html b/latest-tag/reference/module_teal.html index 78a55153af..6d0d716340 100644 --- a/latest-tag/reference/module_teal.html +++ b/latest-tag/reference/module_teal.html @@ -1,8 +1,24 @@ - -teal main app module — module_teal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
@@ -114,7 +137,8 @@
-

Usage

+

Usage +

ui_teal(
   id,
   splash_ui = tags$h2("Starting the Teal App"),
@@ -127,8 +151,10 @@ 

Usage

-

Arguments

-
id
+

Arguments +

+
+
id

(character(1)) module id

@@ -171,15 +197,18 @@

Argumentsteal_slices().

-

+ +
-

Value

+

Value +

Returns a reactive expression which returns the currently active module.

-

Details

+

Details +

It displays the splash UI which is used to fetch the data, possibly prompting for a password input to fetch the data. Once the data is ready, the splash screen is replaced by the actual teal UI that is tabsetted and @@ -200,17 +229,19 @@

Details

+ +
+ + - - + + diff --git a/latest-tag/reference/module_teal_with_splash.html b/latest-tag/reference/module_teal_with_splash.html index cbb398bf0f..ae213f7eae 100644 --- a/latest-tag/reference/module_teal_with_splash.html +++ b/latest-tag/reference/module_teal_with_splash.html @@ -1,10 +1,26 @@ - -Add splash screen to teal application — module_teal_with_splash • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
-

Usage

+

Usage +

ui_teal_with_splash(
   id,
   data,
@@ -130,8 +153,10 @@ 

Usage

-

Arguments

-
id
+

Arguments +

+
+
id

(character(1)) module id

@@ -168,15 +193,18 @@

Argumentsteal_slices().

-

+ +
-

Value

+

Value +

Returns a reactive expression containing a teal_data object when data is loaded or NULL when it is not.

-

Details

+

Details +

This module pauses app initialization pending delayed data loading. This is necessary because the filter panel and modules depend on the data to initialize.

teal_with_splash follows the shiny module convention. @@ -186,12 +214,14 @@

Detailsinit to create a standalone application.

-

See also

+

See also +

-

Examples

+

Examples +

teal_modules <- modules(example_module())
 # Shiny app with modular integration of teal
 ui <- fluidPage(
@@ -213,17 +243,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/modules_datasets.html b/latest-tag/reference/modules_datasets.html index 6ff9cbac30..88cd9a5f09 100644 --- a/latest-tag/reference/modules_datasets.html +++ b/latest-tag/reference/modules_datasets.html @@ -1,8 +1,24 @@ - -Create filterable data for modules — modules_datasets • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
-

Usage

+

Usage +

modules_datasets(
   data,
   modules,
@@ -124,8 +147,10 @@ 

Usage

-

Arguments

-
data
+

Arguments +

+
+
data

(teal_data)

@@ -140,9 +165,11 @@

Arguments -

Value

+

Value +

Returns list of same shape as modules, containing FilteredData at every leaf. @@ -150,17 +177,19 @@

Value

+ +
+ + - - + + diff --git a/latest-tag/reference/modules_depth.html b/latest-tag/reference/modules_depth.html index cb78fdfe3c..f7c93abe3c 100644 --- a/latest-tag/reference/modules_depth.html +++ b/latest-tag/reference/modules_depth.html @@ -1,10 +1,26 @@ - -Get module depth — modules_depth • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
-

Usage

+

Usage +

modules_depth(modules, depth = 0L)
-

Arguments

-
modules
+

Arguments +

+
+
modules

(list or teal_modules or teal_module) nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -134,26 +159,30 @@

Arguments -

Value

+

Value +

Depth level for given module.

+ + + + - - + + diff --git a/latest-tag/reference/reexports.html b/latest-tag/reference/reexports.html index 7563220a24..155a10b89d 100644 --- a/latest-tag/reference/reexports.html +++ b/latest-tag/reference/reexports.html @@ -1,5 +1,10 @@ - - + + + + + +Objects exported from other packages — reexports • teal +Objects exported from other packages — reexports • teal + + + + + + + + + + Skip to contents @@ -40,7 +56,8 @@ + + @@ -134,7 +156,8 @@

These objects are imported from other packages. Follow the links below to see their documentation.

-
lifecycle
+
+
lifecycle

badge

@@ -142,21 +165,24 @@

%>%

-
+ + - + + + + - - + + diff --git a/latest-tag/reference/report_card_template.html b/latest-tag/reference/report_card_template.html index 4c0de52f75..6fa5ed937f 100644 --- a/latest-tag/reference/report_card_template.html +++ b/latest-tag/reference/report_card_template.html @@ -1,10 +1,26 @@ - -Template function for TealReportCard creation and customization — report_card_template • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
-

Usage

+

Usage +

report_card_template(
   title,
   label,
@@ -128,8 +151,10 @@ 

Usage

-

Arguments

-
title
+

Arguments +

+
+
title

(character(1)) title of the card (unless overwritten by label)

@@ -149,26 +174,30 @@

Arguments -

Value

+

Value +

(TealReportCard) populated with a title, description and filter state.

+ + + + - - + + diff --git a/latest-tag/reference/reporter_previewer_module.html b/latest-tag/reference/reporter_previewer_module.html index e398feb1dc..ebf6594de5 100644 --- a/latest-tag/reference/reporter_previewer_module.html +++ b/latest-tag/reference/reporter_previewer_module.html @@ -1,20 +1,36 @@ - - + + + + + +Create a teal module for previewing a report — reporter_previewer_module • teal +Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + @@ -132,13 +154,16 @@
-

Usage

+

Usage +

reporter_previewer_module(label = "Report previewer", server_args = list())
-

Arguments

-
label
+

Arguments +

+
+
label

(character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

@@ -147,26 +172,30 @@

Argumentsteal.reporter::reporter_previewer_srv().

-

+ +
-

Value

+

Value +

teal_module (extended with teal_module_previewer class) containing the teal.reporter previewer functionality.

+ + + + - - + + diff --git a/latest-tag/reference/run_js_files.html b/latest-tag/reference/run_js_files.html index 322364b8c3..63bd9ad75d 100644 --- a/latest-tag/reference/run_js_files.html +++ b/latest-tag/reference/run_js_files.html @@ -1,14 +1,30 @@ - - + + + + + +Run JS file from /inst/js/ package directory — run_js_files • teal +Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,41 +145,49 @@
-

Usage

+

Usage +

run_js_files(files)
-

Arguments

-
files
+

Arguments +

+
+
files

(character) vector of filenames.

-
+ +
-

Value

+

Value +

returns NULL, invisibly.

-

Details

+

Details +

system.file should not be used to access files in other packages, it does not work with devtools. Therefore, we redefine this method in each package as needed. Thus, we do not export this method.

+ + + + - - + + diff --git a/latest-tag/reference/show_rcode_modal.html b/latest-tag/reference/show_rcode_modal.html index e5a0bfe14c..c74fd03f67 100644 --- a/latest-tag/reference/show_rcode_modal.html +++ b/latest-tag/reference/show_rcode_modal.html @@ -1,10 +1,26 @@ - -Show R code modal — show_rcode_modal • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
-

Usage

+

Usage +

show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())
-

Arguments

-
title
+

Arguments +

+
+
title

(character(1)) Title of the modal, displayed in the first comment of the R code.

@@ -137,24 +162,28 @@

Argumentsshiny::getDefaultReactiveDomain() is used.

-

+ +
-

References

+

References +

shiny::showModal()

+ + + + - - + + diff --git a/latest-tag/reference/slices_store.html b/latest-tag/reference/slices_store.html index 0c757a7263..4ae609ced8 100644 --- a/latest-tag/reference/slices_store.html +++ b/latest-tag/reference/slices_store.html @@ -1,10 +1,26 @@ - -Store and restore teal_slices object — slices_store • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,15 +139,18 @@
-

Usage

+

Usage +

slices_store(tss, file)
 
 slices_restore(file)
-

Arguments

-
tss
+

Arguments +

+
+
tss

(teal_slices) object to be stored.

@@ -133,9 +158,11 @@

Arguments.

-

+ +
-

Value

+

Value +

slices_store returns NULL, invisibly.

@@ -144,32 +171,39 @@

Value

slices_restore returns a teal_slices object restored from the file.

-

Details

-

Date and date time objects are stored in the following formats:

  • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

  • +

    Details +

    +

    Date and date time objects are stored in the following formats:

    +
      +
    • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

    • POSIX*t classes are converted to character by using format.POSIX*t(usetz = TRUE, tz = "UTC") (YYYY-MM-DD HH:MM:SS UTC, where UTC is the Coordinated Universal Time timezone short-code).

    • -

    This format is assumed during slices_restore. All POSIX*t objects in +

+

This format is assumed during slices_restore. All POSIX*t objects in selected or choices fields of teal_slice objects are always printed in UTC timezone as well.

-

See also

+

See also +

+ + + + - - + + diff --git a/latest-tag/reference/snapshot_manager_module.html b/latest-tag/reference/snapshot_manager_module.html index 0e796660f9..a8c1a14bc1 100644 --- a/latest-tag/reference/snapshot_manager_module.html +++ b/latest-tag/reference/snapshot_manager_module.html @@ -1,8 +1,24 @@ - -Filter state snapshot management — snapshot_manager_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
-

Usage

+

Usage +

snapshot_manager_ui(id)
 
 snapshot_manager_srv(id, slices_global, mapping_matrix, filtered_data_list)
-

Arguments

-
id
+

Arguments +

+
+
id

(character(1)) shiny module id

@@ -140,15 +165,18 @@

Arguments -

Value

+

Value +

Nothing is returned.

-

Details

+

Details +

This module introduces snapshots: stored descriptions of the filter state of the entire application. Snapshots allow the user to save the current filter state of the application for later use in the session, as well as to save it to file in order to share it with an app developer or other users, @@ -160,7 +188,8 @@

Details

-

Server logic

+

Server logic +

Snapshots are basically teal_slices objects, however, since each module is served by a separate instance @@ -175,7 +204,8 @@

Server logic -

Snapshot mechanics

+

Snapshot mechanics +

When a snapshot is captured, the user is prompted to name it. @@ -205,7 +235,8 @@

Snapshot mechanics -

Transferring snapshots

+

Transferring snapshots +

Snapshots uploaded from disk should only be used in the same application they come from, @@ -215,22 +246,25 @@

Transferring snapshots

-

Author

+

Author +

Aleksander Chlebowski

+ + + + - - + + diff --git a/latest-tag/reference/tdata.html b/latest-tag/reference/tdata.html index 7342093efd..21e1cde217 100644 --- a/latest-tag/reference/tdata.html +++ b/latest-tag/reference/tdata.html @@ -1,22 +1,38 @@ - - + + + + + +Create a tdata object — tdata • teal +Create a tdata object — tdata • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + + @@ -126,19 +148,25 @@

[Deprecated]

Create a new object called tdata which contains data, a reactive list of data.frames -(or MultiAssayExperiment), with attributes:

  • code (reactive) containing code used to generate the data

  • +(or MultiAssayExperiment), with attributes:

    +
      +
    • code (reactive) containing code used to generate the data

    • join_keys (join_keys) containing the relationships between the data

    • metadata (named list) containing any metadata associated with the data frames

    • -
+ +
-

Usage

+

Usage +

new_tdata(data, code = "", join_keys = NULL, metadata = NULL)
-

Arguments

-
data
+

Arguments +

+
+
data

(named list) A list of data.frame or MultiAssayExperiment objects, which optionally can be reactive. Inside this object all of these items will be made reactive.

@@ -160,20 +188,24 @@

Arguments -

Value

+

Value +

A tdata object.

-

See also

+

See also +

as_tdata

-

Examples

+

Examples +


 data <- new_tdata(
   data = list(iris = iris, mtcars = reactive(mtcars), dd = data.frame(x = 1:10)),
@@ -354,17 +386,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/tdata2env.html b/latest-tag/reference/tdata2env.html index c72dad4bba..06febce645 100644 --- a/latest-tag/reference/tdata2env.html +++ b/latest-tag/reference/tdata2env.html @@ -1,8 +1,24 @@ - -Function to convert a tdata object to an environment — tdata2env • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
@@ -114,25 +137,31 @@
-

Usage

+

Usage +

tdata2env(data)
-

Arguments

-
data
+

Arguments +

+
+
data

(tdata) object

-
+ +
-

Value

+

Value +

An environment.

-

Examples

+

Examples +


 data <- new_tdata(
   data = list(iris = iris, mtcars = reactive(mtcars)),
@@ -145,17 +174,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/tdata_deprecation.html b/latest-tag/reference/tdata_deprecation.html index ae134a4edd..2e4d7dd162 100644 --- a/latest-tag/reference/tdata_deprecation.html +++ b/latest-tag/reference/tdata_deprecation.html @@ -1,8 +1,24 @@ - -Downgrade teal_data objects in modules for compatibility — as_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,24 +136,30 @@
-

Usage

+

Usage +

as_tdata(x)
-

Arguments

-
x
+

Arguments +

+
+
x

data object, either tdata or teal_data, the latter possibly in a reactive expression

-
+ +
-

Value

+

Value +

Object of class tdata.

-

Details

+

Details +

Recent changes in teal cause modules to fail because modules expect a tdata object to be passed to the data argument but instead they receive a teal_data object, which is additionally wrapped in a reactive expression in the server functions. @@ -140,7 +168,8 @@

Details
-

Examples

+

Examples +

td <- teal_data()
 td <- within(td, iris <- iris) %>% within(mtcars <- mtcars)
 td
@@ -192,17 +221,19 @@ 

Examples

+ +

+ + - - + + diff --git a/latest-tag/reference/teal-package.html b/latest-tag/reference/teal-package.html index c155214b25..e4d7102cae 100644 --- a/latest-tag/reference/teal-package.html +++ b/latest-tag/reference/teal-package.html @@ -1,10 +1,26 @@ - -teal: Interactive exploration of clinical trials data — teal-package • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
@@ -118,21 +141,30 @@
-

Details

+

Details +

To learn mode about the package, visit the project website or read the init() manual page.

-

Author

+

Author +

Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID)

-

Authors:

+ +
+ + + + - - + + diff --git a/latest-tag/reference/teal_data_datanames.html b/latest-tag/reference/teal_data_datanames.html index a0c08f7852..158b9149c0 100644 --- a/latest-tag/reference/teal_data_datanames.html +++ b/latest-tag/reference/teal_data_datanames.html @@ -1,10 +1,26 @@ - -Wrapper on teal.data::datanames — teal_data_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
@@ -117,18 +140,23 @@
-

Usage

+

Usage +

teal_data_datanames(data)
-

Arguments

-
data
+

Arguments +

+
+
data

(teal_data)

-
+ +
-

Value

+

Value +

character

@@ -137,17 +165,19 @@

Value

+ + + + - - + + diff --git a/latest-tag/reference/teal_data_module.html b/latest-tag/reference/teal_data_module.html index 03c24967e5..f59aa39776 100644 --- a/latest-tag/reference/teal_data_module.html +++ b/latest-tag/reference/teal_data_module.html @@ -1,10 +1,26 @@ - -Data module for teal applications — teal_data_module • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
-

Usage

+

Usage +

teal_data_module(ui, server)
 
 # S4 method for teal_data_module,character
@@ -128,8 +151,10 @@ 

Usage

-

Arguments

-
ui
+

Arguments +

+
+
ui

(function(id)) shiny module UI function; must only take id argument

@@ -159,9 +184,11 @@

Arguments -

Value

+

Value +

teal_data_module returns an object of class teal_data_module.

@@ -173,7 +200,8 @@

Value

within returns a teal_data_module object with a delayed evaluation of expr when the module is run.

-

Details

+

Details +

teal_data_module creates a shiny module to supply or modify data in a teal application. The module allows for running data pre-processing code (creation and some modification) after the app starts. The body of the server function will be run in the app rather than in the global environment. @@ -188,12 +216,14 @@

Details... argument: as name:value pairs are passed to ..., name in expr will be replaced with value.

-

Examples

+

Examples +

tdm <- teal_data_module(
   ui = function(id) {
     ns <- NS(id)
@@ -326,17 +356,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/teal_data_to_filtered_data.html b/latest-tag/reference/teal_data_to_filtered_data.html index 495458d944..36154860d7 100644 --- a/latest-tag/reference/teal_data_to_filtered_data.html +++ b/latest-tag/reference/teal_data_to_filtered_data.html @@ -1,8 +1,24 @@ - -Create a FilteredData — teal_data_to_filtered_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
@@ -114,39 +137,46 @@
-

Usage

+

Usage +

teal_data_to_filtered_data(x, datanames = teal_data_datanames(x))
-

Arguments

-
x
+

Arguments +

+
+
x

(teal_data) object

datanames

(character) vector of data set names to include; must be subset of datanames(x)

-
+ +
-

Value

+

Value +

A FilteredData object.

+ + + + - - + + diff --git a/latest-tag/reference/teal_modules.html b/latest-tag/reference/teal_modules.html index cb0f323d76..891b8d42d5 100644 --- a/latest-tag/reference/teal_modules.html +++ b/latest-tag/reference/teal_modules.html @@ -1,10 +1,26 @@ - -Create teal_module and teal_modules objects — teal_modules • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
-

Usage

+

Usage +

module(
   label = "module",
   server = function(id, ...) {
@@ -151,14 +174,19 @@ 

Usage

-

Arguments

-
label
+

Arguments +

+
+
label

(character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

server
-

(function) shiny module with following arguments:

  • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

  • +
    +

    (function) shiny module with following arguments:

    +
      +
    • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

    • input, output, session - (optional; not recommended) When provided, then shiny::callModule() will be used to call a module. From shiny 1.5.0, the recommended way is to use shiny::moduleServer() instead which doesn't require these arguments.

    • @@ -172,14 +200,19 @@

      Argumentsteal.slice::FilterPanelAPI).

    • ... (optional) When provided, server_args elements will be passed to the module named argument or to the ....

    • -

    +
+
ui
-

(function) shiny UI module function with following arguments:

  • id - teal will set proper shiny namespace for this module.

  • +
    +

    (function) shiny UI module function with following arguments:

    +
      +
    • id - teal will set proper shiny namespace for this module.

    • ... (optional) When provided, ui_args elements will be passed to the module named argument or to the ....

    • -
    +
+
filters
@@ -203,7 +236,8 @@

Argumentsformat() and print(): Arguments passed to other methods.

@@ -215,20 +249,26 @@

Arguments -

Value

+

Value +

module() returns an object of class teal_module.

-

modules() returns a teal_modules object which contains following fields:

  • label: taken from the label argument.

  • +

    modules() returns a teal_modules object which contains following fields:

    +
      +
    • label: taken from the label argument.

    • children: a list containing objects passed in .... List elements are named after their label attribute converted to a valid shiny id.

    • -
+ +
-

Details

+

Details +

module() creates an instance of a teal_module that can be placed in a teal application. modules() shapes the structure of a the application by organizing teal_module within the navigation panel. It wraps teal_module and teal_modules objects in a teal_modules object, @@ -241,7 +281,8 @@

Details
-

Examples

+

Examples +

library(shiny)
 
 module_1 <- module(
@@ -298,17 +339,19 @@ 

Examples

+ +

+ + - - + + diff --git a/latest-tag/reference/teal_slices.html b/latest-tag/reference/teal_slices.html index 3d9cf92f1a..7c3c3231cf 100644 --- a/latest-tag/reference/teal_slices.html +++ b/latest-tag/reference/teal_slices.html @@ -1,8 +1,24 @@ - -Filter settings for teal applications — teal_slices • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
-

Usage

+

Usage +

teal_slices(
   ...,
   exclude_varnames = NULL,
@@ -133,8 +156,10 @@ 

Usage

-

Arguments

-
...
+

Arguments +

+
+
...

any number of teal_slice objects. For print and format, additional arguments passed to other functions.

@@ -146,15 +171,19 @@

Arguments[Experimental] +
+

[Experimental] This is a new feature. Do kindly share your opinions on teal.slice's GitHub repository.

(character(1)) string specifying how observations are tallied by these filter states. -Possible options:

  • "none" (default) to have counts of single FilterState to show unfiltered number only.

  • +Possible options:

    +
      +
    • "none" (default) to have counts of single FilterState to show unfiltered number only.

    • "all" to have counts of single FilterState to show number of observation in filtered and unfiltered dataset. Note, that issues were reported when using this option with MultiAssayExperiment. Please make sure that adding new filters doesn't fail on target platform before deploying for production.

    • -
+ +
allow_add
@@ -162,24 +191,32 @@

Arguments[Experimental] +
+

[Experimental] This is a new feature. Do kindly share your opinions on teal's GitHub repository.

(named list) specifies which filters will be active in which modules on app start. Elements should contain character vector of teal_slice ids (see teal.slice::teal_slice). -Names of the list should correspond to teal_module label set in module() function.

  • ids listed under "global_filters will be active in all modules.

  • +Names of the list should correspond to teal_module label set in module() function.

    +
      +
    • ids listed under "global_filters will be active in all modules.

    • If missing, all filters will be applied to all modules.

    • If empty list, all filters will be available to all modules but will start inactive.

    • If module_specific is FALSE, only global_filters will be active on start.

    • -
+ +
app_id
@@ -192,27 +229,32 @@

Arguments -

Value

+

Value +

A teal_slices object.

-

Details

+

Details +

Produces a teal_slices object. The teal_slice components will specify filter states that will be active when the app starts. Attributes (created with the named arguments) will configure the way the app applies filters. See argument descriptions for details.

-

Examples

+

Examples +

filter <- teal_slices(
   teal_slice(dataname = "iris", varname = "Species", id = "species"),
   teal_slice(dataname = "iris", varname = "Sepal.Length", id = "sepal_length"),
@@ -245,17 +287,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/unfold_mapping.html b/latest-tag/reference/unfold_mapping.html index fefc8785ad..1d3354c4b8 100644 --- a/latest-tag/reference/unfold_mapping.html +++ b/latest-tag/reference/unfold_mapping.html @@ -1,8 +1,24 @@ - -Explicitly enumerate global filters. — unfold_mapping • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
-

Usage

+

Usage +

unfold_mapping(mapping, module_names)
-

Arguments

-
mapping
+

Arguments +

+
+
mapping

(named list) as stored in mapping parameter of teal_slices

module_names

(character) vector containing names of all modules in the app

-
+ +
-

Value

+

Value +

A named_list with one element per module, each element containing all filters applied to that module.

+ + + + - - + + diff --git a/latest-tag/reference/validate_app_title_tag.html b/latest-tag/reference/validate_app_title_tag.html index c1a7d8c5dd..ecba517221 100644 --- a/latest-tag/reference/validate_app_title_tag.html +++ b/latest-tag/reference/validate_app_title_tag.html @@ -1,8 +1,24 @@ - -Function for validating the title parameter of teal::init — validate_app_title_tag • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
@@ -114,29 +137,35 @@
-

Usage

+

Usage +

validate_app_title_tag(shiny_tag)
-

Arguments

-
shiny_tag
+

Arguments +

+
+
shiny_tag

(shiny.tag) Object to validate for a valid title.

-
+ +
+ + + + - - + + diff --git a/latest-tag/reference/validate_has_data.html b/latest-tag/reference/validate_has_data.html index f63d174b66..41be8e36df 100644 --- a/latest-tag/reference/validate_has_data.html +++ b/latest-tag/reference/validate_has_data.html @@ -1,8 +1,24 @@ - -Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
-

Usage

+

Usage +

validate_has_data(
   x,
   min_nrow = NULL,
@@ -125,8 +148,10 @@ 

Usage

-

Arguments

-
x
+

Arguments +

+
+
x

(data.frame)

@@ -145,14 +170,17 @@

Arguments -

Details

+

Details +

This function is a wrapper for shiny::validate.

-

Examples

+

Examples +

library(teal)
 ui <- fluidPage(
   sliderInput("len", "Max Length of Sepal",
@@ -181,17 +209,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/validate_has_elements.html b/latest-tag/reference/validate_has_elements.html index bbbbbb76c2..1fa0b9936f 100644 --- a/latest-tag/reference/validate_has_elements.html +++ b/latest-tag/reference/validate_has_elements.html @@ -1,8 +1,24 @@ - -Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
-

Usage

+

Usage +

validate_has_elements(x, msg)
-

Arguments

-
x
+

Arguments +

+
+
x

vector

msg

message to display

-
+ +
-

Details

+

Details +

This function is a wrapper for shiny::validate.

-

Examples

+

Examples +

data <- data.frame(
   id = c(1:10, 11:20, 1:10),
   strata = rep(c("A", "B"), each = 15)
@@ -169,17 +197,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/validate_has_variable.html b/latest-tag/reference/validate_has_variable.html index cfd25d1a0b..6739c20696 100644 --- a/latest-tag/reference/validate_has_variable.html +++ b/latest-tag/reference/validate_has_variable.html @@ -1,8 +1,24 @@ - -Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
-

Usage

+

Usage +

validate_has_variable(data, varname, msg)
-

Arguments

-
data
+

Arguments +

+
+
data

(data.frame)

@@ -131,14 +156,17 @@

Arguments -

Details

+

Details +

This function is a wrapper for shiny::validate.

-

Examples

+

Examples +

data <- data.frame(
   one = rep("a", length.out = 20),
   two = rep(c("a", "b"), length.out = 20)
@@ -165,17 +193,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/validate_in.html b/latest-tag/reference/validate_in.html index d6d95db3ee..ab653781da 100644 --- a/latest-tag/reference/validate_in.html +++ b/latest-tag/reference/validate_in.html @@ -1,8 +1,24 @@ - -Validates that vector includes all expected values — validate_in • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
-

Usage

+

Usage +

validate_in(x, choices, msg)
-

Arguments

-
x
+

Arguments +

+
+
x

Vector of values to test.

@@ -131,14 +156,17 @@

Arguments -

Details

+

Details +

This function is a wrapper for shiny::validate.

-

Examples

+

Examples +

ui <- fluidPage(
   selectInput(
     "species",
@@ -163,17 +191,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/validate_inputs.html b/latest-tag/reference/validate_inputs.html index 86059f2f9c..2e9ac2f514 100644 --- a/latest-tag/reference/validate_inputs.html +++ b/latest-tag/reference/validate_inputs.html @@ -1,10 +1,26 @@ - -Send input validation messages to output — validate_inputs • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
-

Usage

+

Usage +

validate_inputs(..., header = "Some inputs require attention")
-

Arguments

-
...
+

Arguments +

+
+
...

either any number of InputValidator objects or an optionally named, possibly nested list of InputValidator objects, see Details

@@ -132,15 +157,18 @@

Arguments -

Value

+

Value +

Returns NULL if the final validation call passes and a shiny.silent.error if it fails.

-

Details

+

Details +

shiny::validate is used to withhold rendering of an output element until certain conditions are met and to print a validation message in place of the output element. @@ -159,12 +187,14 @@

Detailsheader.

-

Examples

+

Examples +

library(shiny)
 library(shinyvalidate)
 
@@ -238,17 +268,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/validate_n_levels.html b/latest-tag/reference/validate_n_levels.html index 10b89d4741..851e80147f 100644 --- a/latest-tag/reference/validate_n_levels.html +++ b/latest-tag/reference/validate_n_levels.html @@ -1,8 +1,24 @@ - -Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
-

Usage

+

Usage +

validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)
-

Arguments

-
x
+

Arguments +

+
+
x

variable name. If x is not a factor, the unique values are treated as levels.

@@ -137,16 +162,19 @@

Arguments -

Details

+

Details +

If the number of levels of x is less than min_levels or greater than max_levels the validation will fail. This function is a wrapper for shiny::validate.

-

Examples

+

Examples +

data <- data.frame(
   one = rep("a", length.out = 20),
   two = rep(c("a", "b"), length.out = 20),
@@ -181,17 +209,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/validate_no_intersection.html b/latest-tag/reference/validate_no_intersection.html index 8350682688..31fccbc460 100644 --- a/latest-tag/reference/validate_no_intersection.html +++ b/latest-tag/reference/validate_no_intersection.html @@ -1,8 +1,24 @@ - -Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
-

Usage

+

Usage +

validate_no_intersection(x, y, msg)
-

Arguments

-
x
+

Arguments +

+
+
x

vector

@@ -131,14 +156,17 @@

Arguments -

Details

+

Details +

This function is a wrapper for shiny::validate.

-

Examples

+

Examples +

data <- data.frame(
   id = c(1:10, 11:20, 1:10),
   strata = rep(c("A", "B", "C"), each = 10)
@@ -178,17 +206,19 @@ 

Examples

+ +
+ + - - + + diff --git a/latest-tag/reference/validate_one_row_per_id.html b/latest-tag/reference/validate_one_row_per_id.html index 3fbad3eec2..095ac6b44d 100644 --- a/latest-tag/reference/validate_one_row_per_id.html +++ b/latest-tag/reference/validate_one_row_per_id.html @@ -1,8 +1,24 @@ - -Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
-

Usage

+

Usage +

validate_one_row_per_id(x, key = c("USUBJID", "STUDYID"))
-

Arguments

-
x
+

Arguments +

+
+
x

(data.frame)

key

(character) Vector of ID variables from x that identify unique records.

-
+ +
-

Details

+

Details +

This function is a wrapper for shiny::validate.

-

Examples

+

Examples +

iris$id <- rep(1:50, times = 3)
 ui <- fluidPage(
   selectInput(
@@ -161,17 +189,19 @@ 

Examples

+ +
+ + - - + + diff --git a/main/404.html b/main/404.html index 8a7cf2cb63..2a97fe44a3 100644 --- a/main/404.html +++ b/main/404.html @@ -1,5 +1,4 @@ - - + @@ -81,7 +80,24 @@
  • Non-CRAN unit test report
  • - + + + @@ -77,65 +119,80 @@

    Contributor Covenant Code of Conduct

    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    • Demonstrating empathy and kindness toward other people
    • +
        +
      • Demonstrating empathy and kindness toward other people
      • Being respectful of differing opinions, viewpoints, and experiences
      • Giving and gracefully accepting constructive feedback
      • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
      • Focusing on what is best not just for us as individuals, but for the overall community
      • -

      Examples of unacceptable behavior include:

      -
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • +
      +

      Examples of unacceptable behavior include:

      +
        +
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • Trolling, insulting or derogatory comments, and personal or political attacks
      • Public or private harassment
      • Publishing others’ private information, such as a physical or email address, without their explicit permission
      • Other conduct which could reasonably be considered inappropriate in a professional setting
      • -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -143,17 +200,19 @@

    Attribution

    + + - + + - + + diff --git a/main/CONTRIBUTING.html b/main/CONTRIBUTING.html index ea9d5bca4b..2652a70828 100644 --- a/main/CONTRIBUTING.html +++ b/main/CONTRIBUTING.html @@ -1,5 +1,19 @@ - -Contribution Guidelines • teal + + + + + + +Contribution Guidelines • teal + + + + + + + + + Skip to contents @@ -15,11 +29,13 @@ + + @@ -79,7 +121,8 @@

    Contribution Guidelines

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -90,38 +133,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    GitHub Flow

    +

    GitHub Flow +

    This repository uses the GitHub Flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes

        Make sure your code

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR)

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -135,76 +187,93 @@

        GitHub Flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    -

    Coding guidelines

    +

    Coding guidelines +

    This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Dependency management

    +

    Dependency management +

    Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

    -

    Dependency version management

    +

    Dependency version management +

    If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    -
    • Minimum 5% of lines of code authored* (determined by git blame query) OR
    • +
        +
      • Minimum 5% of lines of code authored* (determined by git blame query) OR
      • Being at the top 5 contributors in terms of number of commits OR lines added OR lines removed*
      • -

      *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

      +
    +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + - + + - + + diff --git a/main/LICENSE-text.html b/main/LICENSE-text.html index 746019aa0b..d2cd2643f7 100644 --- a/main/LICENSE-text.html +++ b/main/LICENSE-text.html @@ -1,5 +1,19 @@ - -License • teal + + + + + + +License • teal + + + + + + + + + Skip to contents @@ -15,11 +29,13 @@ + + @@ -89,17 +131,19 @@

    License

    limitations under the License. - + + - + + - + + diff --git a/main/SECURITY.html b/main/SECURITY.html index 98fff22f29..1bc7c71f6d 100644 --- a/main/SECURITY.html +++ b/main/SECURITY.html @@ -1,5 +1,19 @@ - -Security Policy • teal + + + + + + +Security Policy • teal + + + + + + + + + Skip to contents @@ -15,11 +29,13 @@ + + @@ -77,38 +119,44 @@

    Security Policy

    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    -
    • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
    • +
        +
      • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
      • Full paths of source file(s) related to the manifestation of the issue
      • The location of the affected source code (tag/branch/commit or direct URL)
      • Any special configuration required to reproduce the issue
      • Step-by-step instructions to reproduce the issue
      • Proof-of-concept or exploit code (if possible)
      • Impact of the issue, including how an attacker might exploit the issue
      • -

      This information will help us triage your report more quickly.

      +
    +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + - + + - + + diff --git a/main/articles/adding-support-for-reporting.html b/main/articles/adding-support-for-reporting.html index 9fb3e9127c..39028bcfe2 100644 --- a/main/articles/adding-support-for-reporting.html +++ b/main/articles/adding-support-for-reporting.html @@ -1,5 +1,4 @@ - - + @@ -81,7 +80,24 @@
  • Non-CRAN unit test report
  • - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + + @@ -77,67 +119,95 @@

    Articles

    Get started

    -
    Getting Started with teal
    +
    +
    Getting Started with teal
    -
    + +
    + + + + + + + + + +

    📃 Technical blueprint

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    -
    About Technical Blueprint
    +
    +
    About Technical Blueprint
    -
    Introduction
    + +
    Introduction
    -
    Actors
    + +
    Actors
    -
    Data Flow
    + +
    Data Flow
    -
    Product Map
    + +
    Product Map
    -
    + + + + + - + + - + + diff --git a/main/articles/teal-options.html b/main/articles/teal-options.html index 3ba1207562..251846f65f 100644 --- a/main/articles/teal-options.html +++ b/main/articles/teal-options.html @@ -1,5 +1,4 @@ - - + @@ -81,7 +80,24 @@
  • Non-CRAN unit test report
  • - + + + @@ -76,7 +118,8 @@

    Authors and Citation

    Authors

    -
    • +
        +
      • Dawid Kaledkowski. Author, maintainer.

      • @@ -148,7 +191,8 @@

        Authors

        Maximilian Mordig. Contributor.

        -
    + +

    Citation

    @@ -170,17 +214,19 @@

    Citation

    + + - + + - + + diff --git a/main/coverage-report/index.html b/main/coverage-report/index.html index 4a4a0af282..0213cd200b 100644 --- a/main/coverage-report/index.html +++ b/main/coverage-report/index.html @@ -1,23 +1,22 @@ - - + - + - + - - + + - + - + - - - + + + @@ -6430,42 +6429,48 @@

    teal coverage - 59.73%

    164 - 207x + 207x +
      checkmate::assert_string(label)
    165 - 204x + 204x +
      if (label == "global_filters") {
    166 - 1x + 1x +
        stop(
    167 - 1x + 1x +
          sprintf("module(label = \"%s\", ...\n  ", label),
    168 - 1x + 1x +
          "Label 'global_filters' is reserved in teal. Please change to something else.",
    169 - 1x + 1x +
          call. = FALSE
    @@ -6486,7 +6491,8 @@

    teal coverage - 59.73%

    172 - 203x + 203x +
      if (label == "Report previewer") {
    @@ -6549,35 +6555,40 @@

    teal coverage - 59.73%

    181 - 203x + 203x +
      checkmate::assert_function(server)
    182 - 203x + 203x +
      server_formals <- names(formals(server))
    183 - 203x + 203x +
      if (!(
    184 - 203x + 203x +
        "id" %in% server_formals ||
    185 - 203x + 203x +
          all(c("input", "output", "session") %in% server_formals)
    @@ -6591,70 +6602,80 @@

    teal coverage - 59.73%

    187 - 2x + 2x +
        stop(
    188 - 2x + 2x +
          "\nmodule() `server` argument requires a function with following arguments:",
    189 - 2x + 2x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    190 - 2x + 2x +
          "\n - input, output, session (not recommended) - then `shiny::callModule` will be used to call a module.",
    191 - 2x + 2x +
          "\n\nFollowing arguments can be used optionaly:",
    192 - 2x + 2x +
          "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
    193 - 2x + 2x +
          "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
    194 - 2x + 2x +
          "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
    195 - 2x + 2x +
          "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
    196 - 2x + 2x +
          "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
    @@ -6675,42 +6696,48 @@

    teal coverage - 59.73%

    199 - 201x + 201x +
      if ("datasets" %in% server_formals) {
    200 - 2x + 2x +
        warning(
    201 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    202 - 2x + 2x +
          "`datasets` argument in the server is deprecated and will be removed in the next release. ",
    203 - 2x + 2x +
          "Please use `data` instead.",
    204 - 2x + 2x +
          call. = FALSE
    @@ -6752,56 +6779,64 @@

    teal coverage - 59.73%

    210 - 201x + 201x +
      checkmate::assert_function(ui)
    211 - 201x + 201x +
      ui_formals <- names(formals(ui))
    212 - 201x + 201x +
      if (!"id" %in% ui_formals) {
    213 - 1x + 1x +
        stop(
    214 - 1x + 1x +
          "\nmodule() `ui` argument requires a function with following arguments:",
    215 - 1x + 1x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    216 - 1x + 1x +
          "\n\nFollowing arguments can be used optionally:",
    217 - 1x + 1x +
          "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
    @@ -6822,42 +6857,48 @@

    teal coverage - 59.73%

    220 - 200x + 200x +
      if (any(c("data", "datasets") %in% ui_formals)) {
    221 - 2x + 2x +
        stop(
    222 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    223 - 2x + 2x +
          "UI with `data` or `datasets` argument is no longer accepted.\n  ",
    224 - 2x + 2x +
          "If some UI inputs depend on data, please move the logic to your server instead.\n  ",
    225 - 2x + 2x +
          "Possible solutions are renderUI() or updateXyzInput() functions."
    @@ -6899,7 +6940,8 @@

    teal coverage - 59.73%

    231 - 198x + 198x +
      if (!missing(filters)) {
    @@ -6962,21 +7004,24 @@

    teal coverage - 59.73%

    240 - 198x + 198x +
      if (!is.element("data", server_formals) && !is.null(datanames)) {
    241 - 12x + 12x +
        message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
    242 - 12x + 12x +
        datanames <- NULL
    @@ -6990,7 +7035,8 @@

    teal coverage - 59.73%

    244 - 198x + 198x +
      checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
    @@ -7011,49 +7057,56 @@

    teal coverage - 59.73%

    247 - 197x + 197x +
      checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
    248 - 195x + 195x +
      srv_extra_args <- setdiff(names(server_args), server_formals)
    249 - 195x + 195x +
      if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
    250 - 1x + 1x +
        stop(
    251 - 1x + 1x +
          "\nFollowing `server_args` elements have no equivalent in the formals of the server:\n",
    252 - 1x + 1x +
          paste(paste(" -", srv_extra_args), collapse = "\n"),
    253 - 1x + 1x +
          "\n\nUpdate the server arguments by including above or add `...`"
    @@ -7088,49 +7141,56 @@

    teal coverage - 59.73%

    258 - 194x + 194x +
      checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
    259 - 192x + 192x +
      ui_extra_args <- setdiff(names(ui_args), ui_formals)
    260 - 192x + 192x +
      if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
    261 - 1x + 1x +
        stop(
    262 - 1x + 1x +
          "\nFollowing `ui_args` elements have no equivalent in the formals of UI:\n",
    263 - 1x + 1x +
          paste(paste(" -", ui_extra_args), collapse = "\n"),
    264 - 1x + 1x +
          "\n\nUpdate the UI arguments by including above or add `...`"
    @@ -7165,14 +7225,16 @@

    teal coverage - 59.73%

    269 - 191x + 191x +
      if (inherits(transformers, "teal_transform_module")) {
    270 - 1x + 1x +
        transformers <- list(transformers)
    @@ -7186,28 +7248,32 @@

    teal coverage - 59.73%

    272 - 191x + 191x +
      checkmate::assert_list(transformers, types = "teal_transform_module")
    273 - 191x + 191x +
      transformer_datanames <- unlist(lapply(transformers, attr, "datanames"))
    274 - 191x + 191x +
      combined_datanames <- if (identical(datanames, "all")) {
    275 - 142x + 142x +
        "all"
    @@ -7221,7 +7287,8 @@

    teal coverage - 59.73%

    277 - 49x + 49x +
        union(datanames, transformer_datanames)
    @@ -7242,63 +7309,72 @@

    teal coverage - 59.73%

    280 - 191x + 191x +
      structure(
    281 - 191x + 191x +
        list(
    282 - 191x + 191x +
          label = label,
    283 - 191x + 191x +
          server = server,
    284 - 191x + 191x +
          ui = ui,
    285 - 191x + 191x +
          datanames = combined_datanames,
    286 - 191x + 191x +
          server_args = server_args,
    287 - 191x + 191x +
          ui_args = ui_args,
    288 - 191x + 191x +
          transformers = transformers
    @@ -7312,7 +7388,8 @@

    teal coverage - 59.73%

    290 - 191x + 191x +
        class = "teal_module"
    @@ -7368,42 +7445,48 @@

    teal coverage - 59.73%

    298 - 131x + 131x +
      checkmate::assert_string(label)
    299 - 129x + 129x +
      submodules <- list(...)
    300 - 129x + 129x +
      if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
    301 - 2x + 2x +
        stop(
    302 - 2x + 2x +
          "The only character argument to modules() must be 'label' and it must be named, ",
    303 - 2x + 2x +
          "change modules('lab', ...) to modules(label = 'lab', ...)"
    @@ -7431,7 +7514,8 @@

    teal coverage - 59.73%

    307 - 127x + 127x +
      checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -7452,42 +7536,48 @@

    teal coverage - 59.73%

    310 - 124x + 124x +
      labels <- vapply(submodules, function(submodule) submodule$label, character(1))
    311 - 124x + 124x +
      names(submodules) <- get_unique_labels(labels)
    312 - 124x + 124x +
      structure(
    313 - 124x + 124x +
        list(
    314 - 124x + 124x +
          label = label,
    315 - 124x + 124x +
          children = submodules
    @@ -7501,7 +7591,8 @@

    teal coverage - 59.73%

    317 - 124x + 124x +
        class = "teal_modules"
    @@ -7564,7 +7655,8 @@

    teal coverage - 59.73%

    326 - 3x + 3x +
      paste0(paste(rep(" ", indent), collapse = ""), "+ ", x$label, "\n", collapse = "")
    @@ -7669,28 +7761,32 @@

    teal coverage - 59.73%

    341 - 1x + 1x +
      paste(
    342 - 1x + 1x +
        c(
    343 - 1x + 1x +
          paste0(rep(" ", indent), "+ ", x$label, "\n"),
    344 - 1x + 1x +
          unlist(lapply(x$children, format, indent = indent + 1, ...))
    @@ -7704,7 +7800,8 @@

    teal coverage - 59.73%

    346 - 1x + 1x +
        collapse = ""
    @@ -8061,42 +8158,48 @@

    teal coverage - 59.73%

    397 - 8x + 8x +
      checkmate::assert_class(modules, "teal_modules")
    398 - 6x + 6x +
      checkmate::assert_class(module, "teal_module")
    399 - 4x + 4x +
      modules$children <- c(modules$children, list(module))
    400 - 4x + 4x +
      labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
    401 - 4x + 4x +
      names(modules$children) <- get_unique_labels(labels)
    402 - 4x + 4x +
      modules
    @@ -8201,7 +8304,8 @@

    teal coverage - 59.73%

    417 - 22x + 22x +
      if (inherits(modules, class)) {
    @@ -8215,28 +8319,32 @@

    teal coverage - 59.73%

    419 - 22x + 22x +
      } else if (inherits(modules, "teal_module")) {
    420 - 12x + 12x +
        NULL
    421 - 10x + 10x +
      } else if (inherits(modules, "teal_modules")) {
    422 - 10x + 10x +
        Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
    @@ -8446,49 +8554,56 @@

    teal coverage - 59.73%

    452 - 457x + 457x +
      checkmate::assert_string(arg)
    453 - 454x + 454x +
      if (inherits(modules, "teal_modules")) {
    454 - 17x + 17x +
        any(unlist(lapply(modules$children, is_arg_used, arg)))
    455 - 437x + 437x +
      } else if (inherits(modules, "teal_module")) {
    456 - 29x + 29x +
        is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
    457 - 408x + 408x +
      } else if (is.function(modules)) {
    458 - 406x + 406x +
        isTRUE(arg %in% names(formals(modules)))
    @@ -8502,7 +8617,8 @@

    teal coverage - 59.73%

    460 - 2x + 2x +
        stop("is_arg_used function not implemented for this object")
    @@ -8614,28 +8730,32 @@

    teal coverage - 59.73%

    476 - 12x + 12x +
      checkmate::assert_multi_class(modules, c("teal_module", "teal_modules"))
    477 - 12x + 12x +
      checkmate::assert_int(depth, lower = 0)
    478 - 11x + 11x +
      if (inherits(modules, "teal_modules")) {
    479 - 4x + 4x +
        max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
    @@ -8649,7 +8769,8 @@

    teal coverage - 59.73%

    481 - 7x + 7x +
        depth
    @@ -8726,14 +8847,16 @@

    teal coverage - 59.73%

    492 - 179x + 179x +
      if (inherits(modules, "teal_modules")) {
    493 - 77x + 77x +
        lapply(modules$children, module_labels)
    @@ -8747,7 +8870,8 @@

    teal coverage - 59.73%

    495 - 102x + 102x +
        modules$label
    @@ -8824,35 +8948,40 @@

    teal coverage - 59.73%

    506 - 179x + 179x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    507 - 179x + 179x +
      if (inherits(modules, "teal_modules")) {
    508 - 77x + 77x +
        setNames(
    509 - 77x + 77x +
          lapply(modules$children, modules_bookmarkable),
    510 - 77x + 77x +
          vapply(modules$children, `[[`, "label", FUN.VALUE = character(1))
    @@ -8873,7 +9002,8 @@

    teal coverage - 59.73%

    513 - 102x + 102x +
        attr(modules, "teal_bookmarkable", exact = TRUE)
    @@ -9991,35 +10121,40 @@

    teal coverage - 59.73%

    68 - 77x + 77x +
      checkmate::assert_string(id)
    69 - 77x + 77x +
      checkmate::assert_class(slices_global, ".slicesGlobal")
    70 - 77x + 77x +
      moduleServer(id, function(input, output, session) {
    71 - 77x + 77x +
        setBookmarkExclude(c("show_filter_manager"))
    72 - 77x + 77x +
        observeEvent(input$show_filter_manager, {
    @@ -10103,7 +10238,8 @@

    teal coverage - 59.73%

    84 - 77x + 77x +
        srv_filter_manager("filter_manager", slices_global = slices_global)
    @@ -10215,14 +10351,16 @@

    teal coverage - 59.73%

    100 - 77x + 77x +
      checkmate::assert_string(id)
    101 - 77x + 77x +
      checkmate::assert_class(slices_global, ".slicesGlobal")
    @@ -10236,14 +10374,16 @@

    teal coverage - 59.73%

    103 - 77x + 77x +
      moduleServer(id, function(input, output, session) {
    104 - 77x + 77x +
        logger::log_debug("filter_manager_srv initializing.")
    @@ -10264,7 +10404,8 @@

    teal coverage - 59.73%

    107 - 77x + 77x +
        session$onBookmark(function(state) {
    @@ -10320,14 +10461,16 @@

    teal coverage - 59.73%

    115 - 77x + 77x +
        bookmarked_slices <- restoreValue(session$ns("filter_state_on_bookmark"), NULL)
    116 - 77x + 77x +
        if (!is.null(bookmarked_slices)) {
    @@ -10362,7 +10505,8 @@

    teal coverage - 59.73%

    121 - 77x + 77x +
        mapping_table <- reactive({
    @@ -10383,21 +10527,24 @@

    teal coverage - 59.73%

    124 - 86x + 86x +
          module_labels <- setdiff(
    125 - 86x + 86x +
            names(attr(slices_global$all_slices(), "mapping")),
    126 - 86x + 86x +
            "Report previewer"
    @@ -10411,84 +10558,96 @@

    teal coverage - 59.73%

    128 - 86x + 86x +
          isolate({
    129 - 86x + 86x +
            mm <- as.data.frame(
    130 - 86x + 86x +
              sapply(
    131 - 86x + 86x +
                module_labels,
    132 - 86x + 86x +
                simplify = FALSE,
    133 - 86x + 86x +
                function(module_label) {
    134 - 99x + 99x +
                  available_slices <- slices_global$module_slices_api[[module_label]]$get_available_teal_slices()
    135 - 91x + 91x +
                  global_ids <- sapply(slices_global$all_slices(), `[[`, "id", simplify = FALSE)
    136 - 91x + 91x +
                  module_ids <- sapply(slices_global$slices_get(module_label), `[[`, "id", simplify = FALSE)
    137 - 91x + 91x +
                  allowed_ids <- vapply(available_slices, `[[`, character(1L), "id")
    138 - 91x + 91x +
                  active_ids <- global_ids %in% module_ids
    139 - 91x + 91x +
                  setNames(nm = global_ids, ifelse(global_ids %in% allowed_ids, active_ids, NA))
    @@ -10509,7 +10668,8 @@

    teal coverage - 59.73%

    142 - 86x + 86x +
              check.names = FALSE
    @@ -10523,7 +10683,8 @@

    teal coverage - 59.73%

    144 - 78x + 78x +
            colnames(mm)[colnames(mm) == "global_filters"] <- "Global filters"
    @@ -10537,7 +10698,8 @@

    teal coverage - 59.73%

    146 - 78x + 78x +
            mm
    @@ -10565,28 +10727,32 @@

    teal coverage - 59.73%

    150 - 77x + 77x +
        output$slices_table <- renderTable(
    151 - 77x + 77x +
          expr = {
    152 - 86x + 86x +
            logger::log_debug("filter_manager_srv@1 rendering slices_table.")
    153 - 86x + 86x +
            mm <- mapping_table()
    @@ -10607,14 +10773,16 @@

    teal coverage - 59.73%

    156 - 78x + 78x +
            mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
    157 - 78x + 78x +
            mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
    @@ -10635,21 +10803,24 @@

    teal coverage - 59.73%

    160 - 78x + 78x +
            if (nrow(mm) == 0L) {
    161 - 54x + 54x +
              mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
    162 - 54x + 54x +
              rownames(mm) <- ""
    @@ -10663,7 +10834,8 @@

    teal coverage - 59.73%

    164 - 78x + 78x +
            mm
    @@ -10677,7 +10849,8 @@

    teal coverage - 59.73%

    166 - 77x + 77x +
          rownames = TRUE
    @@ -10698,7 +10871,8 @@

    teal coverage - 59.73%

    169 - 77x + 77x +
        mapping_table # for testing purpose
    @@ -10740,21 +10914,24 @@

    teal coverage - 59.73%

    175 - 102x + 102x +
      checkmate::assert_string(id)
    176 - 102x + 102x +
      assert_reactive(module_fd)
    177 - 102x + 102x +
      checkmate::assert_class(slices_global, ".slicesGlobal")
    @@ -10768,14 +10945,16 @@

    teal coverage - 59.73%

    179 - 102x + 102x +
      moduleServer(id, function(input, output, session) {
    180 - 102x + 102x +
        logger::log_debug("srv_module_filter_manager initializing for module: { id }.")
    @@ -10789,14 +10968,16 @@

    teal coverage - 59.73%

    182 - 102x + 102x +
        slices_global_module <- reactive({
    183 - 183x + 183x +
          slices_global$slices_get(module_label = id)
    @@ -10810,7 +10991,8 @@

    teal coverage - 59.73%

    185 - 102x + 102x +
        slices_module <- reactive(req(module_fd())$get_filter_state())
    @@ -10824,7 +11006,8 @@

    teal coverage - 59.73%

    187 - 102x + 102x +
        module_fd_previous <- reactiveVal(NULL)
    @@ -10845,14 +11028,16 @@

    teal coverage - 59.73%

    190 - 102x + 102x +
        obs1 <- observeEvent(module_fd(), priority = 1, {
    191 - 83x + 83x +
          logger::log_debug("srv_module_filter_manager@1 setting initial slices for module: { id }.")
    @@ -10866,7 +11051,8 @@

    teal coverage - 59.73%

    193 - 83x + 83x +
          slices <- slices_global_module()
    @@ -10887,14 +11073,16 @@

    teal coverage - 59.73%

    196 - 3x + 3x +
          if (!is.null(module_fd_previous())) module_fd_previous()$finalize()
    197 - 83x + 83x +
          module_fd_previous(module_fd())
    @@ -10936,7 +11124,8 @@

    teal coverage - 59.73%

    203 - 83x + 83x +
          module_fd()$set_filter_state(slices)
    @@ -10964,7 +11153,8 @@

    teal coverage - 59.73%

    207 - 83x + 83x +
          module_fd()$set_available_teal_slices(slices_global$all_slices)
    @@ -10985,42 +11175,48 @@

    teal coverage - 59.73%

    210 - 83x + 83x +
          slices_global$module_slices_api_set(
    211 - 83x + 83x +
            id,
    212 - 83x + 83x +
            list(
    213 - 83x + 83x +
              get_available_teal_slices = module_fd()$get_available_teal_slices(),
    214 - 83x + 83x +
              set_filter_state = module_fd()$set_filter_state, # for testing purpose
    215 - 83x + 83x +
              get_filter_state = module_fd()$get_filter_state # for testing purpose
    @@ -11062,35 +11258,40 @@

    teal coverage - 59.73%

    221 - 102x + 102x +
        obs2 <- observeEvent(slices_module(), priority = 0, {
    222 - 105x + 105x +
          this_slices <- slices_module()
    223 - 105x + 105x +
          slices_global$slices_append(this_slices) # append new slices to the all_slices list
    224 - 105x + 105x +
          mapping_elem <- setNames(nm = id, list(vapply(this_slices, `[[`, character(1L), "id")))
    225 - 105x + 105x +
          slices_global$slices_active(mapping_elem)
    @@ -11111,28 +11312,32 @@

    teal coverage - 59.73%

    228 - 102x + 102x +
        obs3 <- observeEvent(slices_global_module(), {
    229 - 125x + 125x +
          global_vs_module <- setdiff_teal_slices(slices_global_module(), slices_module())
    230 - 125x + 125x +
          module_vs_global <- setdiff_teal_slices(slices_module(), slices_global_module())
    231 - 116x + 116x +
          if (length(global_vs_module) || length(module_vs_global)) {
    @@ -11167,21 +11372,24 @@

    teal coverage - 59.73%

    236 - 13x + 13x +
            logger::log_debug("srv_module_filter_manager@3 (N.B.) global state has changed for a module:{ id }.")
    237 - 13x + 13x +
            module_fd()$clear_filter_states()
    238 - 13x + 13x +
            module_fd()$set_filter_state(slices_global_module())
    @@ -11209,7 +11417,8 @@

    teal coverage - 59.73%

    242 - 102x + 102x +
        slices_module # returned for testing purpose
    @@ -11328,14 +11537,16 @@

    teal coverage - 59.73%

    259 - 77x + 77x +
          shiny::isolate({
    260 - 77x + 77x +
            checkmate::assert_class(slices, "teal_slices")
    @@ -11349,28 +11560,32 @@

    teal coverage - 59.73%

    262 - 77x + 77x +
            if (isTRUE(attr(slices, "module_specific"))) {
    263 - 11x + 11x +
              old_mapping <- attr(slices, "mapping")
    264 - 11x + 11x +
              new_mapping <- sapply(module_labels, simplify = FALSE, function(module_label) {
    265 - 20x + 20x +
                unique(unlist(old_mapping[c(module_label, "global_filters")]))
    @@ -11384,7 +11599,8 @@

    teal coverage - 59.73%

    267 - 11x + 11x +
              attr(slices, "mapping") <- new_mapping
    @@ -11398,35 +11614,40 @@

    teal coverage - 59.73%

    269 - 77x + 77x +
            .self$all_slices <<- shiny::reactiveVal(slices)
    270 - 77x + 77x +
            .self$module_slices_api <<- shiny::reactiveValues()
    271 - 77x + 77x +
            .self$slices_append(slices)
    272 - 77x + 77x +
            .self$slices_active(attr(slices, "mapping"))
    273 - 77x + 77x +
            invisible(.self)
    @@ -11454,7 +11675,8 @@

    teal coverage - 59.73%

    277 - 268x + 268x +
          isTRUE(attr(.self$all_slices(), "module_specific"))
    @@ -11475,21 +11697,24 @@

    teal coverage - 59.73%

    280 - 83x + 83x +
          shiny::isolate({
    281 - 83x + 83x +
            if (!.self$is_module_specific()) {
    282 - 67x + 67x +
              module_label <- "global_filters"
    @@ -11503,14 +11728,16 @@

    teal coverage - 59.73%

    284 - 83x + 83x +
            if (!identical(.self$module_slices_api[[module_label]], functions_list)) {
    285 - 83x + 83x +
              .self$module_slices_api[[module_label]] <- functions_list
    @@ -11524,7 +11751,8 @@

    teal coverage - 59.73%

    287 - 83x + 83x +
            invisible(.self)
    @@ -11734,21 +11962,24 @@

    teal coverage - 59.73%

    317 - 185x + 185x +
          shiny::isolate({
    318 - 185x + 185x +
            if (.self$is_module_specific()) {
    319 - 36x + 36x +
              new_mapping <- modifyList(attr(.self$all_slices(), "mapping"), mapping_elem)
    @@ -11762,7 +11993,8 @@

    teal coverage - 59.73%

    321 - 149x + 149x +
              new_mapping <- setNames(nm = "global_filters", list(unique(unlist(mapping_elem))))
    @@ -11783,42 +12015,48 @@

    teal coverage - 59.73%

    324 - 185x + 185x +
            if (!identical(new_mapping, attr(.self$all_slices(), "mapping"))) {
    325 - 128x + 128x +
              mapping_modules <- toString(names(new_mapping))
    326 - 128x + 128x +
              logger::log_debug(".slicesGlobal@slices_active: changing mapping for module(s): { mapping_modules }.")
    327 - 128x + 128x +
              new_slices <- .self$all_slices()
    328 - 128x + 128x +
              attr(new_slices, "mapping") <- new_mapping
    329 - 128x + 128x +
              .self$all_slices(new_slices)
    @@ -11839,7 +12077,8 @@

    teal coverage - 59.73%

    332 - 185x + 185x +
            invisible(.self)
    @@ -11881,14 +12120,16 @@

    teal coverage - 59.73%

    338 - 185x + 185x +
          shiny::isolate({
    339 - 185x + 185x +
            if (!is.teal_slices(slices)) {
    @@ -11923,49 +12164,56 @@

    teal coverage - 59.73%

    344 - 185x + 185x +
            new_slices <- setdiff_teal_slices(slices, .self$all_slices())
    345 - 185x + 185x +
            old_mapping <- attr(.self$all_slices(), "mapping")
    346 - 185x + 185x +
            if (length(new_slices)) {
    347 - 6x + 6x +
              new_ids <- vapply(new_slices, `[[`, character(1L), "id")
    348 - 6x + 6x +
              logger::log_debug(".slicesGlobal@slices_append: appending new slice(s): { new_ids }.")
    349 - 6x + 6x +
              slices_ids <- vapply(.self$all_slices(), `[[`, character(1L), "id")
    350 - 6x + 6x +
              lapply(new_slices, function(slice) {
    @@ -11979,14 +12227,16 @@

    teal coverage - 59.73%

    352 - 6x + 6x +
                if (slice$id %in% slices_ids) {
    353 - 1x + 1x +
                  slice$id <- utils::tail(make.unique(c(slices_ids, slice$id), sep = "_"), 1)
    @@ -12014,21 +12264,24 @@

    teal coverage - 59.73%

    357 - 6x + 6x +
              new_slices_all <- c(.self$all_slices(), new_slices)
    358 - 6x + 6x +
              attr(new_slices_all, "mapping") <- old_mapping
    359 - 6x + 6x +
              .self$all_slices(new_slices_all)
    @@ -12049,7 +12302,8 @@

    teal coverage - 59.73%

    362 - 185x + 185x +
            invisible(.self)
    @@ -12077,7 +12331,8 @@

    teal coverage - 59.73%

    366 - 274x + 274x +
          if (missing(module_label)) {
    @@ -12098,28 +12353,32 @@

    teal coverage - 59.73%

    369 - 274x + 274x +
            module_ids <- unlist(attr(.self$all_slices(), "mapping")[c(module_label, "global_filters")])
    370 - 274x + 274x +
            Filter(
    371 - 274x + 274x +
              function(slice) slice$id %in% module_ids,
    372 - 274x + 274x +
              .self$all_slices()
    @@ -12154,14 +12413,16 @@

    teal coverage - 59.73%

    377 - 7x + 7x +
          shiny::isolate({
    378 - 7x + 7x +
            if (!is.teal_slices(slices)) {
    @@ -12182,14 +12443,16 @@

    teal coverage - 59.73%

    381 - 7x + 7x +
            .self$all_slices(slices)
    382 - 7x + 7x +
            invisible(.self)
    @@ -13336,56 +13599,64 @@

    teal coverage - 59.73%

    154 - 179x + 179x +
      checkmate::assert_string(id)
    155 - 179x + 179x +
      assert_reactive(data_rv)
    156 - 179x + 179x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    157 - 179x + 179x +
      assert_reactive(datasets, null.ok = TRUE)
    158 - 179x + 179x +
      checkmate::assert_class(slices_global, ".slicesGlobal")
    159 - 179x + 179x +
      checkmate::assert_class(reporter, "Reporter")
    160 - 179x + 179x +
      assert_reactive(data_load_status)
    161 - 179x + 179x +
      UseMethod("srv_teal_module", modules)
    @@ -13567,14 +13838,16 @@

    teal coverage - 59.73%

    187 - 77x + 77x +
      moduleServer(id = id, module = function(input, output, session) {
    188 - 77x + 77x +
        logger::log_debug("srv_teal_module.teal_modules initializing the module { deparse1(modules$label) }.")
    @@ -13588,63 +13861,72 @@

    teal coverage - 59.73%

    190 - 77x + 77x +
        observeEvent(data_load_status(), {
    191 - 70x + 70x +
          tabs_selector <- sprintf("#%s li a", session$ns("active_tab"))
    192 - 70x + 70x +
          if (identical(data_load_status(), "ok")) {
    193 - 65x + 65x +
            logger::log_debug("srv_teal_module@1 enabling modules tabs.")
    194 - 65x + 65x +
            shinyjs::show("wrapper")
    195 - 65x + 65x +
            shinyjs::enable(selector = tabs_selector)
    196 - 5x + 5x +
          } else if (identical(data_load_status(), "teal_data_module failed")) {
    197 - 5x + 5x +
            logger::log_debug("srv_teal_module@1 disabling modules tabs.")
    198 - 5x + 5x +
            shinyjs::disable(selector = tabs_selector)
    @@ -13693,98 +13975,112 @@

    teal coverage - 59.73%

    205 - 77x + 77x +
        modules_output <- sapply(
    206 - 77x + 77x +
          names(modules$children),
    207 - 77x + 77x +
          function(module_id) {
    208 - 102x + 102x +
            srv_teal_module(
    209 - 102x + 102x +
              id = module_id,
    210 - 102x + 102x +
              data_rv = data_rv,
    211 - 102x + 102x +
              modules = modules$children[[module_id]],
    212 - 102x + 102x +
              datasets = datasets,
    213 - 102x + 102x +
              slices_global = slices_global,
    214 - 102x + 102x +
              reporter = reporter,
    215 - 102x + 102x +
              is_active = reactive(
    216 - 102x + 102x +
                is_active() &&
    217 - 102x + 102x +
                  input$active_tab == module_id &&
    218 - 102x + 102x +
                  identical(data_load_status(), "ok")
    @@ -13812,7 +14108,8 @@

    teal coverage - 59.73%

    222 - 77x + 77x +
          simplify = FALSE
    @@ -13833,7 +14130,8 @@

    teal coverage - 59.73%

    225 - 77x + 77x +
        modules_output
    @@ -13931,21 +14229,24 @@

    teal coverage - 59.73%

    239 - 102x + 102x +
      logger::log_debug("srv_teal_module.teal_module initializing the module: { deparse1(modules$label) }.")
    240 - 102x + 102x +
      moduleServer(id = id, module = function(input, output, session) {
    241 - 102x + 102x +
        module_out <- reactiveVal()
    @@ -13959,14 +14260,16 @@

    teal coverage - 59.73%

    243 - 102x + 102x +
        active_datanames <- reactive({
    244 - 79x + 79x +
          .resolve_module_datanames(data = data_rv(), modules = modules)
    @@ -13980,35 +14283,40 @@

    teal coverage - 59.73%

    246 - 102x + 102x +
        if (is.null(datasets)) {
    247 - 20x + 20x +
          datasets <- eventReactive(data_rv(), {
    248 - 16x + 16x +
            req(inherits(data_rv(), "teal_data"))
    249 - 16x + 16x +
            logger::log_debug("srv_teal_module@1 initializing module-specific FilteredData")
    250 - 16x + 16x +
            teal_data_to_filtered_data(data_rv(), datanames = active_datanames())
    @@ -14071,7 +14379,8 @@

    teal coverage - 59.73%

    259 - 102x + 102x +
        srv_module_filter_manager(modules$label, module_fd = datasets, slices_global = slices_global)
    @@ -14085,49 +14394,56 @@

    teal coverage - 59.73%

    261 - 102x + 102x +
        call_once_when(is_active(), {
    262 - 76x + 76x +
          filtered_teal_data <- srv_filter_data(
    263 - 76x + 76x +
            "filter_panel",
    264 - 76x + 76x +
            datasets = datasets,
    265 - 76x + 76x +
            active_datanames = active_datanames,
    266 - 76x + 76x +
            data_rv = data_rv,
    267 - 76x + 76x +
            is_active = is_active
    @@ -14141,49 +14457,56 @@

    teal coverage - 59.73%

    269 - 76x + 76x +
          is_transformer_failed <- reactiveValues()
    270 - 76x + 76x +
          transformed_teal_data <- srv_transform_data(
    271 - 76x + 76x +
            "data_transform",
    272 - 76x + 76x +
            data = filtered_teal_data,
    273 - 76x + 76x +
            transformers = modules$transformers,
    274 - 76x + 76x +
            modules = modules,
    275 - 76x + 76x +
            is_transformer_failed = is_transformer_failed
    @@ -14197,14 +14520,16 @@

    teal coverage - 59.73%

    277 - 76x + 76x +
          any_transformer_failed <- reactive({
    278 - 76x + 76x +
            any(unlist(reactiveValuesToList(is_transformer_failed)))
    @@ -14225,35 +14550,40 @@

    teal coverage - 59.73%

    281 - 76x + 76x +
          observeEvent(any_transformer_failed(), {
    282 - 76x + 76x +
            if (isTRUE(any_transformer_failed())) {
    283 - 6x + 6x +
              shinyjs::hide("teal_module_ui")
    284 - 6x + 6x +
              shinyjs::hide("validate_datanames")
    285 - 6x + 6x +
              shinyjs::show("transformer_failure_info")
    @@ -14267,21 +14597,24 @@

    teal coverage - 59.73%

    287 - 70x + 70x +
              shinyjs::show("teal_module_ui")
    288 - 70x + 70x +
              shinyjs::show("validate_datanames")
    289 - 70x + 70x +
              shinyjs::hide("transformer_failure_info")
    @@ -14309,35 +14642,40 @@

    teal coverage - 59.73%

    293 - 76x + 76x +
          module_teal_data <- reactive({
    294 - 84x + 84x +
            req(inherits(transformed_teal_data(), "teal_data"))
    295 - 78x + 78x +
            all_teal_data <- transformed_teal_data()
    296 - 78x + 78x +
            module_datanames <- .resolve_module_datanames(data = all_teal_data, modules = modules)
    297 - 78x + 78x +
            .subset_teal_data(all_teal_data, module_datanames)
    @@ -14358,28 +14696,32 @@

    teal coverage - 59.73%

    300 - 76x + 76x +
          srv_validate_reactive_teal_data(
    301 - 76x + 76x +
            "validate_datanames",
    302 - 76x + 76x +
            data = module_teal_data,
    303 - 76x + 76x +
            modules = modules
    @@ -14400,7 +14742,8 @@

    teal coverage - 59.73%

    306 - 76x + 76x +
          summary_table <- srv_data_summary("data_summary", module_teal_data)
    @@ -14421,42 +14764,48 @@

    teal coverage - 59.73%

    309 - 76x + 76x +
          if (!inherits(modules, "teal_module_previewer")) {
    310 - 76x + 76x +
            obs_module <- call_once_when(
    311 - 76x + 76x +
              !is.null(module_teal_data()),
    312 - 76x + 76x +
              ignoreNULL = TRUE,
    313 - 76x + 76x +
              handlerExpr = {
    314 - 70x + 70x +
                module_out(.call_teal_module(modules, datasets, module_teal_data, reporter))
    @@ -14547,7 +14896,8 @@

    teal coverage - 59.73%

    327 - 76x + 76x +
          if ("report" %in% names(module_out)) {
    @@ -14582,7 +14932,8 @@

    teal coverage - 59.73%

    332 - 102x + 102x +
        module_out
    @@ -14631,21 +14982,24 @@

    teal coverage - 59.73%

    339 - 70x + 70x +
      args <- c(list(id = "module"), modules$server_args)
    340 - 70x + 70x +
      if (is_arg_used(modules$server, "reporter")) {
    341 - 1x + 1x +
        args <- c(args, list(reporter = reporter))
    @@ -14666,21 +15020,24 @@

    teal coverage - 59.73%

    344 - 70x + 70x +
      if (is_arg_used(modules$server, "datasets")) {
    345 - 1x + 1x +
        args <- c(args, datasets = datasets())
    346 - 1x + 1x +
        warning("datasets argument is not reactive and therefore it won't be updated when data is refreshed.")
    @@ -14701,14 +15058,16 @@

    teal coverage - 59.73%

    349 - 70x + 70x +
      if (is_arg_used(modules$server, "data")) {
    350 - 66x + 66x +
        args <- c(args, data = list(filtered_teal_data))
    @@ -14729,14 +15088,16 @@

    teal coverage - 59.73%

    353 - 70x + 70x +
      if (is_arg_used(modules$server, "filter_panel_api")) {
    354 - 1x + 1x +
        args <- c(args, filter_panel_api = teal.slice::FilterPanelAPI$new(datasets()))
    @@ -14757,14 +15118,16 @@

    teal coverage - 59.73%

    357 - 70x + 70x +
      if (is_arg_used(modules$server, "id")) {
    358 - 70x + 70x +
        do.call(modules$server, args)
    @@ -14813,21 +15176,24 @@

    teal coverage - 59.73%

    365 - 157x + 157x +
      stopifnot("data_rv must be teal_data object." = inherits(data, "teal_data"))
    366 - 157x + 157x +
      if (is.null(modules$datanames) || identical(modules$datanames, "all")) {
    367 - 131x + 131x +
        .topologically_sort_datanames(ls(teal.code::get_env(data)), teal.data::join_keys(data))
    @@ -14841,21 +15207,24 @@

    teal coverage - 59.73%

    369 - 26x + 26x +
        intersect(
    370 - 26x + 26x +
          .include_parent_datanames(modules$datanames, teal.data::join_keys(data)),
    371 - 26x + 26x +
          ls(teal.code::get_env(data))
    @@ -15016,14 +15385,16 @@

    teal coverage - 59.73%

    394 - 178x + 178x +
      event_quo <- rlang::new_quosure(substitute(eventExpr), env = event.env)
    395 - 178x + 178x +
      handler_quo <- rlang::new_quosure(substitute(handlerExpr), env = handler.env)
    @@ -15044,21 +15415,24 @@

    teal coverage - 59.73%

    398 - 178x + 178x +
      activator <- reactive({
    399 - 178x + 178x +
        if (isTRUE(rlang::eval_tidy(event_quo))) {
    400 - 146x + 146x +
          TRUE
    @@ -15086,28 +15460,32 @@

    teal coverage - 59.73%

    404 - 178x + 178x +
      observeEvent(
    405 - 178x + 178x +
        eventExpr = activator(),
    406 - 178x + 178x +
        once = TRUE,
    407 - 178x + 178x +
        handlerExpr = rlang::eval_tidy(handler_quo),
    @@ -15232,21 +15610,24 @@

    teal coverage - 59.73%

    14 - 78x + 78x +
      script <- sprintf(
    15 - 78x + 78x +
        "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
    16 - 78x + 78x +
        ns("timezone")
    @@ -15260,14 +15641,16 @@

    teal coverage - 59.73%

    18 - 78x + 78x +
      shinyjs::runjs(script) # function does not return anything
    19 - 78x + 78x +
      invisible(NULL)
    @@ -15316,7 +15699,8 @@

    teal coverage - 59.73%

    26 - 4x + 4x +
      bs_theme <- getOption("teal.bs_theme")
    @@ -15330,14 +15714,16 @@

    teal coverage - 59.73%

    28 - 4x + 4x +
      if (is.null(bs_theme)) {
    29 - 1x + 1x +
        return(NULL)
    @@ -15358,35 +15744,40 @@

    teal coverage - 59.73%

    32 - 3x + 3x +
      if (!checkmate::test_class(bs_theme, "bs_theme")) {
    33 - 2x + 2x +
        warning(
    34 - 2x + 2x +
          "Assertion on 'teal.bs_theme' option value failed: ",
    35 - 2x + 2x +
          checkmate::check_class(bs_theme, "bs_theme"),
    36 - 2x + 2x +
          ". The default Shiny Bootstrap theme will be used."
    @@ -15400,7 +15791,8 @@

    teal coverage - 59.73%

    38 - 2x + 2x +
        return(NULL)
    @@ -15421,7 +15813,8 @@

    teal coverage - 59.73%

    41 - 1x + 1x +
      bs_theme
    @@ -15470,49 +15863,56 @@

    teal coverage - 59.73%

    48 - 157x + 157x +
      ordered_datanames <- datanames
    49 - 157x + 157x +
      for (i in datanames) {
    50 - 275x + 275x +
        parents <- character(0)
    51 - 275x + 275x +
        while (length(i) > 0) {
    52 - 288x + 288x +
          parent_i <- teal.data::parent(join_keys, i)
    53 - 288x + 288x +
          parents <- c(parent_i, parents)
    54 - 288x + 288x +
          i <- parent_i
    @@ -15526,7 +15926,8 @@

    teal coverage - 59.73%

    56 - 275x + 275x +
        ordered_datanames <- c(parents, ordered_datanames)
    @@ -15540,7 +15941,8 @@

    teal coverage - 59.73%

    58 - 157x + 157x +
      unique(ordered_datanames)
    @@ -15589,14 +15991,16 @@

    teal coverage - 59.73%

    65 - 131x + 131x +
      datanames_with_parents <- .include_parent_datanames(datanames, join_keys)
    66 - 131x + 131x +
      intersect(datanames, datanames_with_parents)
    @@ -15680,14 +16084,16 @@

    teal coverage - 59.73%

    78 - 73x + 73x +
      checkmate::assert_class(x, "teal_data")
    79 - 73x + 73x +
      checkmate::assert_character(datanames, min.chars = 1L, any.missing = FALSE)
    @@ -15701,28 +16107,32 @@

    teal coverage - 59.73%

    81 - 73x + 73x +
      teal.slice::init_filtered_data(
    82 - 73x + 73x +
        x = Filter(
    83 - 73x + 73x +
          length,
    84 - 73x + 73x +
          sapply(datanames, function(dn) x[[dn]], simplify = FALSE)
    @@ -15736,7 +16146,8 @@

    teal coverage - 59.73%

    86 - 73x + 73x +
        join_keys = teal.data::join_keys(x)
    @@ -15883,35 +16294,40 @@

    teal coverage - 59.73%

    107 - 2x + 2x +
      checkmate::assert_string(title)
    108 - 2x + 2x +
      checkmate::assert_string(label)
    109 - 2x + 2x +
      checkmate::assert_string(description, null.ok = TRUE)
    110 - 2x + 2x +
      checkmate::assert_flag(with_filter)
    111 - 2x + 2x +
      checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
    @@ -15925,49 +16341,56 @@

    teal coverage - 59.73%

    113 - 2x + 2x +
      card <- teal::TealReportCard$new()
    114 - 2x + 2x +
      title <- if (label == "") title else label
    115 - 2x + 2x +
      card$set_name(title)
    116 - 2x + 2x +
      card$append_text(title, "header2")
    117 - 1x + 1x +
      if (!is.null(description)) card$append_text(description, "header3")
    118 - 1x + 1x +
      if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
    119 - 2x + 2x +
      card
    @@ -16072,14 +16495,16 @@

    teal coverage - 59.73%

    134 - 166x + 166x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    135 - 166x + 166x +
      checkmate::assert_character(datanames)
    @@ -16093,7 +16518,8 @@

    teal coverage - 59.73%

    137 - 166x + 166x +
      recursive_check_datanames <- function(modules, datanames) {
    @@ -16107,35 +16533,40 @@

    teal coverage - 59.73%

    139 - 259x + 259x +
        if (inherits(modules, "teal_modules")) {
    140 - 73x + 73x +
          result <- lapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
    141 - 73x + 73x +
          result <- result[vapply(result, Negate(is.null), logical(1L))]
    142 - 73x + 73x +
          if (length(result) == 0) {
    143 - 65x + 65x +
            return(NULL)
    @@ -16149,49 +16580,56 @@

    teal coverage - 59.73%

    145 - 8x + 8x +
          list(
    146 - 8x + 8x +
            string = do.call(c, as.list(unname(sapply(result, function(x) x$string)))),
    147 - 8x + 8x +
            html = function(with_module_name = TRUE) {
    148 - 6x + 6x +
              tagList(
    149 - 6x + 6x +
                lapply(
    150 - 6x + 6x +
                  result,
    151 - 6x + 6x +
                  function(x) x$html(with_module_name = with_module_name)
    @@ -16233,70 +16671,80 @@

    teal coverage - 59.73%

    157 - 186x + 186x +
          extra_datanames <- setdiff(modules$datanames, c("all", datanames))
    158 - 186x + 186x +
          if (length(extra_datanames)) {
    159 - 11x + 11x +
            list(
    160 - 11x + 11x +
              string = build_datanames_error_message(
    161 - 11x + 11x +
                modules$label,
    162 - 11x + 11x +
                datanames,
    163 - 11x + 11x +
                extra_datanames,
    164 - 11x + 11x +
                tags = list(
    165 - 11x + 11x +
                  span = function(..., .noWS = NULL) { # nolint: object_name
    166 - 78x + 78x +
                    trimws(paste(..., sep = ifelse(is.null(.noWS), " ", ""), collapse = " "))
    @@ -16310,7 +16758,8 @@

    teal coverage - 59.73%

    168 - 11x + 11x +
                  code = function(x) toString(dQuote(x, q = FALSE))
    @@ -16324,7 +16773,8 @@

    teal coverage - 59.73%

    170 - 11x + 11x +
                tagList = function(...) trimws(paste(...))
    @@ -16345,42 +16795,48 @@

    teal coverage - 59.73%

    173 - 11x + 11x +
              html = function(with_module_name = TRUE) {
    174 - 9x + 9x +
                tagList(
    175 - 9x + 9x +
                  build_datanames_error_message(
    176 - 9x + 9x +
                    if (with_module_name) modules$label,
    177 - 9x + 9x +
                    datanames,
    178 - 9x + 9x +
                    extra_datanames
    @@ -16394,7 +16850,8 @@

    teal coverage - 59.73%

    180 - 9x + 9x +
                  tags$br(.noWS = "before")
    @@ -16443,21 +16900,24 @@

    teal coverage - 59.73%

    187 - 166x + 166x +
      check_datanames <- recursive_check_datanames(modules, datanames)
    188 - 166x + 166x +
      if (length(check_datanames)) {
    189 - 11x + 11x +
        check_datanames
    @@ -16471,7 +16931,8 @@

    teal coverage - 59.73%

    191 - 155x + 155x +
        TRUE
    @@ -16576,14 +17037,16 @@

    teal coverage - 59.73%

    206 - 73x + 73x +
      checkmate::assert_class(filters, "teal_slices")
    207 - 73x + 73x +
      checkmate::assert_character(datanames)
    @@ -16604,63 +17067,72 @@

    teal coverage - 59.73%

    210 - 73x + 73x +
      out <- unlist(sapply(
    211 - 73x + 73x +
        filters, function(filter) {
    212 - 24x + 24x +
          dataname <- shiny::isolate(filter$dataname)
    213 - 24x + 24x +
          if (!dataname %in% datanames) {
    214 - 3x + 3x +
            sprintf(
    215 - 3x + 3x +
              "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
    216 - 3x + 3x +
              shiny::isolate(filter$id),
    217 - 3x + 3x +
              dQuote(dataname, q = FALSE),
    218 - 3x + 3x +
              toString(dQuote(datanames, q = FALSE))
    @@ -16709,14 +17181,16 @@

    teal coverage - 59.73%

    225 - 73x + 73x +
      if (length(out)) {
    226 - 3x + 3x +
        paste(out, collapse = "\n")
    @@ -16730,7 +17204,8 @@

    teal coverage - 59.73%

    228 - 70x + 70x +
        TRUE
    @@ -16800,70 +17275,80 @@

    teal coverage - 59.73%

    238 - 7x + 7x +
      checkmate::assert_class(shiny_tag, "shiny.tag")
    239 - 7x + 7x +
      checkmate::assert_true(shiny_tag$name == "head")
    240 - 6x + 6x +
      child_names <- vapply(shiny_tag$children, `[[`, character(1L), "name")
    241 - 6x + 6x +
      checkmate::assert_subset(c("title", "link"), child_names, .var.name = "child tags")
    242 - 4x + 4x +
      rel_attr <- shiny_tag$children[[which(child_names == "link")]]$attribs$rel
    243 - 4x + 4x +
      checkmate::assert_subset(
    244 - 4x + 4x +
        rel_attr,
    245 - 4x + 4x +
        c("icon", "shortcut icon"),
    246 - 4x + 4x +
        .var.name = "Link tag's rel attribute",
    247 - 4x + 4x +
        empty.ok = FALSE
    @@ -16982,56 +17467,64 @@

    teal coverage - 59.73%

    264 - 12x + 12x +
      checkmate::assert_string(title, null.ok = TRUE)
    265 - 12x + 12x +
      checkmate::assert_string(favicon, null.ok = TRUE)
    266 - 12x + 12x +
      tags$head(
    267 - 12x + 12x +
        tags$title(title),
    268 - 12x + 12x +
        tags$link(
    269 - 12x + 12x +
          rel = "icon",
    270 - 12x + 12x +
          href = favicon,
    271 - 12x + 12x +
          sizes = "any"
    @@ -17171,14 +17664,16 @@

    teal coverage - 59.73%

    291 - 20x + 20x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    292 - 19x + 19x +
      checkmate::assert_class(modules, "teal_modules")
    @@ -17192,28 +17687,32 @@

    teal coverage - 59.73%

    294 - 18x + 18x +
      data <- if (inherits(data, "teal_data")) {
    295 - 16x + 16x +
        as.list(teal.code::get_env(data))
    296 - 18x + 18x +
      } else if (inherits(data, "teal_data_module")) {
    297 - 2x + 2x +
        deparse1(body(data$server))
    @@ -17227,7 +17726,8 @@

    teal coverage - 59.73%

    299 - 18x + 18x +
      modules <- lapply(modules, defunction)
    @@ -17241,7 +17741,8 @@

    teal coverage - 59.73%

    301 - 18x + 18x +
      rlang::hash(list(data = data, modules = modules))
    @@ -17290,28 +17791,32 @@

    teal coverage - 59.73%

    308 - 219x + 219x +
      if (is.list(x)) {
    309 - 64x + 64x +
        lapply(x, defunction)
    310 - 155x + 155x +
      } else if (is.function(x)) {
    311 - 48x + 48x +
        deparse1(body(x))
    @@ -17325,7 +17830,8 @@

    teal coverage - 59.73%

    313 - 107x + 107x +
        x
    @@ -17423,7 +17929,8 @@

    teal coverage - 59.73%

    327 - 204x + 204x +
      make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
    @@ -17465,7 +17972,8 @@

    teal coverage - 59.73%

    333 - 2x + 2x +
      checkmate::assert_string(string)
    @@ -17479,14 +17987,16 @@

    teal coverage - 59.73%

    335 - 2x + 2x +
      gsub(
    336 - 2x + 2x +
        "(?:(?:\\x{001b}\\[)|\\x{009b})(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\\x{001b}[A-M]",
    @@ -17500,21 +18010,24 @@

    teal coverage - 59.73%

    338 - 2x + 2x +
        string,
    339 - 2x + 2x +
        perl = TRUE,
    340 - 2x + 2x +
        useBytes = TRUE
    @@ -17577,56 +18090,64 @@

    teal coverage - 59.73%

    349 - 38x + 38x +
      checkmate::assert_character(x)
    350 - 38x + 38x +
      do.call(
    351 - 38x + 38x +
        tagList,
    352 - 38x + 38x +
        lapply(seq_along(x), function(.ix) {
    353 - 46x + 46x +
          tagList(
    354 - 46x + 46x +
            tags$code(x[.ix]),
    355 - 46x + 46x +
            if (.ix != length(x)) {
    356 - 8x + 8x +
              tags$span(ifelse(.ix == length(x) - 1, " and ", ", "))
    @@ -17745,49 +18266,56 @@

    teal coverage - 59.73%

    373 - 20x + 20x +
      tags$span(
    374 - 20x + 20x +
        tags$span(ifelse(length(extra_datanames) > 1, "Datasets", "Dataset")),
    375 - 20x + 20x +
        paste_datanames_character(extra_datanames, tags, tagList),
    376 - 20x + 20x +
        tags$span(
    377 - 20x + 20x +
          paste0(
    378 - 20x + 20x +
            ifelse(length(extra_datanames) > 1, "are missing", "is missing"),
    379 - 20x + 20x +
            ifelse(is.null(label), ".", sprintf(" for tab '%s'.", label))
    @@ -17808,63 +18336,72 @@

    teal coverage - 59.73%

    382 - 20x + 20x +
        if (length(datanames) >= 1) {
    383 - 18x + 18x +
          tagList(
    384 - 18x + 18x +
            tags$span(ifelse(length(datanames) > 1, "Datasets", "Dataset")),
    385 - 18x + 18x +
            tags$span("available in data:"),
    386 - 18x + 18x +
            tagList(
    387 - 18x + 18x +
              tags$span(
    388 - 18x + 18x +
                paste_datanames_character(datanames, tags, tagList),
    389 - 18x + 18x +
                tags$span(".", .noWS = "outside"),
    390 - 18x + 18x +
                .noWS = c("outside")
    @@ -17899,7 +18436,8 @@

    teal coverage - 59.73%

    395 - 2x + 2x +
          tags$span("No datasets are available in data.")
    @@ -18969,28 +19507,32 @@

    teal coverage - 59.73%

    149 - 79x + 79x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    150 - 79x + 79x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module", "reactive"))
    151 - 78x + 78x +
      checkmate::assert_class(modules, "teal_modules")
    152 - 78x + 78x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -19004,14 +19546,16 @@

    teal coverage - 59.73%

    154 - 78x + 78x +
      moduleServer(id, function(input, output, session) {
    155 - 78x + 78x +
        logger::log_debug("srv_teal initializing.")
    @@ -19025,7 +19569,8 @@

    teal coverage - 59.73%

    157 - 78x + 78x +
        if (getOption("teal.show_js_log", default = FALSE)) {
    @@ -19053,7 +19598,8 @@

    teal coverage - 59.73%

    161 - 78x + 78x +
        srv_teal_lockfile("lockfile")
    @@ -19067,14 +19613,16 @@

    teal coverage - 59.73%

    163 - 78x + 78x +
        output$identifier <- renderText(
    164 - 78x + 78x +
          paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
    @@ -19095,28 +19643,32 @@

    teal coverage - 59.73%

    167 - 78x + 78x +
        teal.widgets::verbatim_popup_srv(
    168 - 78x + 78x +
          "sessionInfo",
    169 - 78x + 78x +
          verbatim_content = utils::capture.output(utils::sessionInfo()),
    170 - 78x + 78x +
          title = "SessionInfo"
    @@ -19144,7 +19696,8 @@

    teal coverage - 59.73%

    174 - 78x + 78x +
        run_js_files(files = "init.js")
    @@ -19179,35 +19732,40 @@

    teal coverage - 59.73%

    179 - 78x + 78x +
        get_client_timezone(session$ns)
    180 - 78x + 78x +
        observeEvent(
    181 - 78x + 78x +
          eventExpr = input$timezone,
    182 - 78x + 78x +
          once = TRUE,
    183 - 78x + 78x +
          handlerExpr = {
    @@ -19249,42 +19807,48 @@

    teal coverage - 59.73%

    189 - 78x + 78x +
        data_pulled <- srv_init_data("data", data = data)
    190 - 77x + 77x +
        data_validated <- srv_validate_reactive_teal_data(
    191 - 77x + 77x +
          "validate",
    192 - 77x + 77x +
          data = data_pulled,
    193 - 77x + 77x +
          modules = modules,
    194 - 77x + 77x +
          validate_shiny_silent_error = FALSE
    @@ -19298,56 +19862,64 @@

    teal coverage - 59.73%

    196 - 77x + 77x +
        data_rv <- reactive({
    197 - 132x + 132x +
          req(inherits(data_validated(), "teal_data"))
    198 - 65x + 65x +
          is_filter_ok <- check_filter_datanames(filter, ls(teal.code::get_env(data_validated())))
    199 - 65x + 65x +
          if (!isTRUE(is_filter_ok)) {
    200 - 2x + 2x +
            showNotification(
    201 - 2x + 2x +
              "Some filters were not applied because of incompatibility with data. Contact app developer.",
    202 - 2x + 2x +
              type = "warning",
    203 - 2x + 2x +
              duration = 10
    @@ -19361,7 +19933,8 @@

    teal coverage - 59.73%

    205 - 2x + 2x +
            warning(is_filter_ok)
    @@ -19375,7 +19948,8 @@

    teal coverage - 59.73%

    207 - 65x + 65x +
          .add_signature_to_data(data_validated())
    @@ -19396,35 +19970,40 @@

    teal coverage - 59.73%

    210 - 77x + 77x +
        data_load_status <- reactive({
    211 - 70x + 70x +
          if (inherits(data_pulled(), "teal_data")) {
    212 - 65x + 65x +
            "ok"
    213 - 5x + 5x +
          } else if (inherits(data, "teal_data_module")) {
    214 - 5x + 5x +
            "teal_data_module failed"
    @@ -19466,35 +20045,40 @@

    teal coverage - 59.73%

    220 - 77x + 77x +
        datasets_rv <- if (!isTRUE(attr(filter, "module_specific"))) {
    221 - 66x + 66x +
          eventReactive(data_rv(), {
    222 - 56x + 56x +
            req(inherits(data_rv(), "teal_data"))
    223 - 56x + 56x +
            logger::log_debug("srv_teal@1 initializing FilteredData")
    224 - 56x + 56x +
            teal_data_to_filtered_data(data_rv())
    @@ -19522,84 +20106,96 @@

    teal coverage - 59.73%

    228 - 77x + 77x +
        if (inherits(data, "teal_data_module")) {
    229 - 9x + 9x +
          setBookmarkExclude(c("teal_modules-active_tab"))
    230 - 9x + 9x +
          shiny::insertTab(
    231 - 9x + 9x +
            inputId = "teal_modules-active_tab",
    232 - 9x + 9x +
            position = "before",
    233 - 9x + 9x +
            select = TRUE,
    234 - 9x + 9x +
            tabPanel(
    235 - 9x + 9x +
              title = icon("fas fa-database"),
    236 - 9x + 9x +
              value = "teal_data_module",
    237 - 9x + 9x +
              tags$div(
    238 - 9x + 9x +
                ui_init_data(session$ns("data")),
    239 - 9x + 9x +
                ui_validate_reactive_teal_data(session$ns("validate"))
    @@ -19634,21 +20230,24 @@

    teal coverage - 59.73%

    244 - 9x + 9x +
          if (attr(data, "once")) {
    245 - 9x + 9x +
            observeEvent(data_rv(), once = TRUE, {
    246 - 4x + 4x +
              logger::log_debug("srv_teal@2 removing data tab.")
    @@ -19662,7 +20261,8 @@

    teal coverage - 59.73%

    248 - 4x + 4x +
              removeTab("teal_modules-active_tab", target = "teal_data_module")
    @@ -19697,28 +20297,32 @@

    teal coverage - 59.73%

    253 - 68x + 68x +
          insertUI(
    254 - 68x + 68x +
            selector = sprintf("#%s", session$ns("tabpanel_wrapper")),
    255 - 68x + 68x +
            where = "beforeBegin",
    256 - 68x + 68x +
            ui = tags$div(ui_validate_reactive_teal_data(session$ns("validate")), tags$br())
    @@ -19746,63 +20350,72 @@

    teal coverage - 59.73%

    260 - 77x + 77x +
        module_labels <- unlist(module_labels(modules), use.names = FALSE)
    261 - 77x + 77x +
        slices_global <- methods::new(".slicesGlobal", filter, module_labels)
    262 - 77x + 77x +
        modules_output <- srv_teal_module(
    263 - 77x + 77x +
          id = "teal_modules",
    264 - 77x + 77x +
          data_rv = data_rv,
    265 - 77x + 77x +
          datasets = datasets_rv,
    266 - 77x + 77x +
          modules = modules,
    267 - 77x + 77x +
          slices_global = slices_global,
    268 - 77x + 77x +
          data_load_status = data_load_status
    @@ -19816,21 +20429,24 @@

    teal coverage - 59.73%

    270 - 77x + 77x +
        mapping_table <- srv_filter_manager_panel("filter_manager_panel", slices_global = slices_global)
    271 - 77x + 77x +
        snapshots <- srv_snapshot_manager_panel("snapshot_manager_panel", slices_global = slices_global)
    272 - 77x + 77x +
        srv_bookmark_panel("bookmark_manager", modules)
    @@ -19851,7 +20467,8 @@

    teal coverage - 59.73%

    275 - 77x + 77x +
      invisible(NULL)
    @@ -20564,28 +21181,32 @@

    teal coverage - 59.73%

    100 - 77x + 77x +
      moduleServer(id, function(input, output, session) {
    101 - 77x + 77x +
        logger::log_debug("srv_snapshot_manager_panel initializing")
    102 - 77x + 77x +
        setBookmarkExclude(c("show_snapshot_manager"))
    103 - 77x + 77x +
        observeEvent(input$show_snapshot_manager, {
    @@ -20669,7 +21290,8 @@

    teal coverage - 59.73%

    115 - 77x + 77x +
        srv_snapshot_manager("module", slices_global = slices_global)
    @@ -20830,7 +21452,8 @@

    teal coverage - 59.73%

    138 - 77x + 77x +
      checkmate::assert_character(id)
    @@ -20844,14 +21467,16 @@

    teal coverage - 59.73%

    140 - 77x + 77x +
      moduleServer(id, function(input, output, session) {
    141 - 77x + 77x +
        logger::log_debug("srv_snapshot_manager initializing")
    @@ -20879,28 +21504,32 @@

    teal coverage - 59.73%

    145 - 77x + 77x +
        setBookmarkExclude(c(
    146 - 77x + 77x +
          "snapshot_add", "snapshot_load", "snapshot_reset",
    147 - 77x + 77x +
          "snapshot_name_accept", "snaphot_file_accept",
    148 - 77x + 77x +
          "snapshot_name", "snapshot_file"
    @@ -20921,7 +21550,8 @@

    teal coverage - 59.73%

    151 - 77x + 77x +
        session$onBookmark(function(state) {
    @@ -20956,7 +21586,8 @@

    teal coverage - 59.73%

    156 - 77x + 77x +
        ns <- session$ns
    @@ -20977,7 +21608,8 @@

    teal coverage - 59.73%

    159 - 77x + 77x +
        snapshot_history <- reactiveVal({
    @@ -20991,21 +21623,24 @@

    teal coverage - 59.73%

    161 - 77x + 77x +
          restoreValue(
    162 - 77x + 77x +
            ns("snapshot_history"),
    163 - 77x + 77x +
            list("Initial application state" = shiny::isolate(as.list(slices_global$all_slices(), recursive = TRUE)))
    @@ -21047,7 +21682,8 @@

    teal coverage - 59.73%

    169 - 77x + 77x +
        observeEvent(input$snapshot_add, {
    @@ -21145,7 +21781,8 @@

    teal coverage - 59.73%

    183 - 77x + 77x +
        observeEvent(input$snapshot_name_accept, {
    @@ -21362,7 +21999,8 @@

    teal coverage - 59.73%

    214 - 77x + 77x +
        observeEvent(input$snapshot_load, {
    @@ -21495,7 +22133,8 @@

    teal coverage - 59.73%

    233 - 77x + 77x +
        observeEvent(input$snaphot_file_accept, {
    @@ -21831,21 +22470,24 @@

    teal coverage - 59.73%

    281 - 77x + 77x +
        observeEvent(input$snapshot_reset, {
    282 - 2x + 2x +
          logger::log_debug("srv_snapshot_manager: snapshot_reset button clicked, restoring snapshot")
    283 - 2x + 2x +
          s <- "Initial application state"
    @@ -21859,7 +22501,8 @@

    teal coverage - 59.73%

    285 - 2x + 2x +
          snapshot <- snapshot_history()[[s]]
    @@ -21873,21 +22516,24 @@

    teal coverage - 59.73%

    287 - 2x + 2x +
          snapshot_state <- as.teal_slices(snapshot)
    288 - 2x + 2x +
          slices_global$slices_set(snapshot_state)
    289 - 2x + 2x +
          removeModal()
    @@ -21943,21 +22589,24 @@

    teal coverage - 59.73%

    297 - 77x + 77x +
        observers <- reactiveValues()
    298 - 77x + 77x +
        handlers <- reactiveValues()
    299 - 77x + 77x +
        divs <- reactiveValues()
    @@ -21971,21 +22620,24 @@

    teal coverage - 59.73%

    301 - 77x + 77x +
        observeEvent(snapshot_history(), {
    302 - 67x + 67x +
          logger::log_debug("srv_snapshot_manager: snapshot history modified, updating snapshot list")
    303 - 67x + 67x +
          lapply(names(snapshot_history())[-1L], function(s) {
    @@ -22293,42 +22945,48 @@

    teal coverage - 59.73%

    347 - 77x + 77x +
        output$snapshot_list <- renderUI({
    348 - 67x + 67x +
          rows <- rev(reactiveValuesToList(divs))
    349 - 67x + 67x +
          if (length(rows) == 0L) {
    350 - 67x + 67x +
            tags$div(
    351 - 67x + 67x +
              class = "manager_placeholder",
    352 - 67x + 67x +
              "Snapshots will appear here."
    @@ -22377,7 +23035,8 @@

    teal coverage - 59.73%

    359 - 77x + 77x +
        snapshot_history
    @@ -22915,49 +23574,56 @@

    teal coverage - 59.73%

    74 - 77x + 77x +
      checkmate::assert_character(id)
    75 - 77x + 77x +
      checkmate::assert_class(modules, "teal_modules")
    76 - 77x + 77x +
      moduleServer(id, function(input, output, session) {
    77 - 77x + 77x +
        logger::log_debug("bookmark_manager_srv initializing")
    78 - 77x + 77x +
        ns <- session$ns
    79 - 77x + 77x +
        bookmark_option <- get_bookmarking_option()
    80 - 77x + 77x +
        is_unbookmarkable <- need_bookmarking(modules)
    @@ -22985,7 +23651,8 @@

    teal coverage - 59.73%

    84 - 77x + 77x +
        setBookmarkExclude(c("do_bookmark"))
    @@ -22999,14 +23666,16 @@

    teal coverage - 59.73%

    86 - 77x + 77x +
        app_session <- .subset2(session, "parent")
    87 - 77x + 77x +
        app_session$onBookmarked(function(url) {
    @@ -23391,7 +24060,8 @@

    teal coverage - 59.73%

    142 - 77x + 77x +
        observeEvent(input$do_bookmark, {
    @@ -23426,7 +24096,8 @@

    teal coverage - 59.73%

    147 - 77x + 77x +
        invisible(NULL)
    @@ -23475,14 +24146,16 @@

    teal coverage - 59.73%

    154 - 77x + 77x +
      bookmark_option <- getShinyOption("bookmarkStore")
    155 - 77x + 77x +
      if (is.null(bookmark_option) && identical(getOption("shiny.bookmarkStore"), "server")) {
    @@ -23503,7 +24176,8 @@

    teal coverage - 59.73%

    158 - 77x + 77x +
      bookmark_option
    @@ -23538,21 +24212,24 @@

    teal coverage - 59.73%

    163 - 77x + 77x +
      unlist(rapply2(
    164 - 77x + 77x +
        modules_bookmarkable(modules),
    165 - 77x + 77x +
        Negate(isTRUE)
    @@ -23776,28 +24453,32 @@

    teal coverage - 59.73%

    197 - 154x + 154x +
      checkmate::assert_character("value")
    198 - 154x + 154x +
      session_default <- shiny::getDefaultReactiveDomain()
    199 - 154x + 154x +
      session_parent <- .subset2(session_default, "parent")
    200 - 154x + 154x +
      session <- if (is.null(session_parent)) session_default else session_parent
    @@ -23811,7 +24492,8 @@

    teal coverage - 59.73%

    202 - 154x + 154x +
      if (isTRUE(session$restoreContext$active) && exists(value, session$restoreContext$values, inherits = FALSE)) {
    @@ -23832,7 +24514,8 @@

    teal coverage - 59.73%

    205 - 154x + 154x +
        default
    @@ -24651,14 +25334,16 @@

    teal coverage - 59.73%

    322 - 179x + 179x +
      if (inherits(x, "list")) {
    323 - 77x + 77x +
        lapply(x, rapply2, f = f)
    @@ -24672,7 +25357,8 @@

    teal coverage - 59.73%

    325 - 102x + 102x +
        f(x)
    @@ -24979,21 +25665,24 @@

    teal coverage - 59.73%

    41 - 78x + 78x +
      moduleServer(id, function(input, output, session) {
    42 - 78x + 78x +
        logger::log_debug("Initialize srv_teal_lockfile.")
    43 - 78x + 78x +
        enable_lockfile_download <- function() {
    @@ -25098,7 +25787,8 @@

    teal coverage - 59.73%

    58 - 78x + 78x +
        disable_lockfile_download <- function() {
    @@ -25140,28 +25830,32 @@

    teal coverage - 59.73%

    64 - 78x + 78x +
        shiny::onStop(function() {
    65 - 78x + 78x +
          if (file.exists(lockfile_path) && !shiny::isRunning()) {
    66 - 1x + 1x +
            logger::log_debug("Removing lockfile after shutting down the app")
    67 - 1x + 1x +
            file.remove(lockfile_path)
    @@ -25189,14 +25883,16 @@

    teal coverage - 59.73%

    71 - 78x + 78x +
        lockfile_path <- "teal_app.lock"
    72 - 78x + 78x +
        mode <- getOption("teal.lockfile.mode", default = "")
    @@ -25210,7 +25906,8 @@

    teal coverage - 59.73%

    74 - 78x + 78x +
        if (!(mode %in% c("auto", "enabled", "disabled"))) {
    @@ -25238,28 +25935,32 @@

    teal coverage - 59.73%

    78 - 78x + 78x +
        if (mode == "disabled") {
    79 - 1x + 1x +
          logger::log_debug("'teal.lockfile.mode' option is set to 'disabled'. Hiding lockfile download button.")
    80 - 1x + 1x +
          shinyjs::hide("lockFileLink")
    81 - 1x + 1x +
          return(NULL)
    @@ -25280,7 +25981,8 @@

    teal coverage - 59.73%

    84 - 77x + 77x +
        if (file.exists(lockfile_path)) {
    @@ -25322,21 +26024,24 @@

    teal coverage - 59.73%

    90 - 77x + 77x +
        if (mode == "auto" && .is_disabled_lockfile_scenario()) {
    91 - 76x + 76x +
          logger::log_debug(
    92 - 76x + 76x +
            "Automatic lockfile creation disabled. Execution scenario satisfies teal:::.is_disabled_lockfile_scenario()."
    @@ -25350,14 +26055,16 @@

    teal coverage - 59.73%

    94 - 76x + 76x +
          shinyjs::hide("lockFileLink")
    95 - 76x + 76x +
          return(NULL)
    @@ -25378,7 +26085,8 @@

    teal coverage - 59.73%

    98 - 1x + 1x +
        if (!.is_lockfile_deps_installed()) {
    @@ -25441,14 +26149,16 @@

    teal coverage - 59.73%

    107 - 1x + 1x +
        process <- .teal_lockfile_process_invoke(lockfile_path)
    108 - 1x + 1x +
        observeEvent(process$status(), {
    @@ -25602,7 +26312,8 @@

    teal coverage - 59.73%

    130 - 1x + 1x +
        NULL
    @@ -25651,21 +26362,24 @@

    teal coverage - 59.73%

    137 - 1x + 1x +
      mirai_obj <- NULL
    138 - 1x + 1x +
      process <- shiny::ExtendedTask$new(function() {
    139 - 1x + 1x +
        m <- mirai::mirai(
    @@ -25679,35 +26393,40 @@

    teal coverage - 59.73%

    141 - 1x + 1x +
            options(opts)
    142 - 1x + 1x +
            do.call(Sys.setenv, sysenv)
    143 - 1x + 1x +
            .libPaths(libpaths)
    144 - 1x + 1x +
            setwd(wd)
    145 - 1x + 1x +
            run(lockfile_path = lockfile_path)
    @@ -25721,42 +26440,48 @@

    teal coverage - 59.73%

    147 - 1x + 1x +
          run = .renv_snapshot,
    148 - 1x + 1x +
          lockfile_path = lockfile_path,
    149 - 1x + 1x +
          opts = options(),
    150 - 1x + 1x +
          libpaths = .libPaths(),
    151 - 1x + 1x +
          sysenv = as.list(Sys.getenv()),
    152 - 1x + 1x +
          wd = getwd()
    @@ -25770,14 +26495,16 @@

    teal coverage - 59.73%

    154 - 1x + 1x +
        mirai_obj <<- m
    155 - 1x + 1x +
        m
    @@ -25798,14 +26525,16 @@

    teal coverage - 59.73%

    158 - 1x + 1x +
      shiny::onStop(function() {
    159 - 1x + 1x +
        if (mirai::unresolved(mirai_obj)) {
    @@ -25847,14 +26576,16 @@

    teal coverage - 59.73%

    165 - 1x + 1x +
      suppressWarnings({ # 'package:stats' may not be available when loading
    166 - 1x + 1x +
        process$invoke()
    @@ -25875,7 +26606,8 @@

    teal coverage - 59.73%

    169 - 1x + 1x +
      logger::log_debug("Lockfile creation started based on { getwd() }.")
    @@ -25889,7 +26621,8 @@

    teal coverage - 59.73%

    171 - 1x + 1x +
      process
    @@ -25924,42 +26657,48 @@

    teal coverage - 59.73%

    176 - 1x + 1x +
      out <- utils::capture.output(
    177 - 1x + 1x +
        res <- renv::snapshot(
    178 - 1x + 1x +
          lockfile = lockfile_path,
    179 - 1x + 1x +
          prompt = FALSE,
    180 - 1x + 1x +
          force = TRUE,
    181 - 1x + 1x +
          type = renv::settings$snapshot.type() # see the section "Different ways of creating lockfile" above here
    @@ -25987,7 +26726,8 @@

    teal coverage - 59.73%

    185 - 1x + 1x +
      list(out = out, res = res)
    @@ -26022,7 +26762,8 @@

    teal coverage - 59.73%

    190 - 1x + 1x +
      requireNamespace("mirai", quietly = TRUE) && requireNamespace("renv", quietly = TRUE)
    @@ -26057,21 +26798,24 @@

    teal coverage - 59.73%

    195 - 76x + 76x +
      identical(Sys.getenv("CALLR_IS_RUNNING"), "true") || # inside callr process
    196 - 76x + 76x +
        identical(Sys.getenv("TESTTHAT"), "true") || # inside devtools::test
    197 - 76x + 76x +
        !identical(Sys.getenv("QUARTO_PROJECT_ROOT"), "") || # inside Quarto process
    @@ -26085,14 +26829,16 @@

    teal coverage - 59.73%

    199 - 76x + 76x +
          ("CheckExEnv" %in% search()) || any(c("_R_CHECK_TIMINGS_", "_R_CHECK_LICENSE_") %in% names(Sys.getenv()))
    200 - 76x + 76x +
        ) # inside R CMD CHECK
    @@ -26504,28 +27250,32 @@

    teal coverage - 59.73%

    57 - 19x + 19x +
      checkmate::assert_string(id)
    58 - 19x + 19x +
      checkmate::assert_function(data_module, args = "id")
    59 - 19x + 19x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"), null.ok = TRUE)
    60 - 19x + 19x +
      checkmate::assert_class(is_transformer_failed, "reactivevalues")
    @@ -26539,56 +27289,64 @@

    teal coverage - 59.73%

    62 - 19x + 19x +
      moduleServer(id, function(input, output, session) {
    63 - 19x + 19x +
        logger::log_debug("srv_teal_data initializing.")
    64 - 19x + 19x +
        is_transformer_failed[[id]] <- FALSE
    65 - 19x + 19x +
        data_out <- data_module(id = "data")
    66 - 19x + 19x +
        data_handled <- reactive(tryCatch(data_out(), error = function(e) e))
    67 - 19x + 19x +
        observeEvent(data_handled(), {
    68 - 21x + 21x +
          if (!inherits(data_handled(), "teal_data")) {
    69 - 6x + 6x +
            is_transformer_failed[[id]] <- TRUE
    @@ -26602,7 +27360,8 @@

    teal coverage - 59.73%

    71 - 15x + 15x +
            is_transformer_failed[[id]] <- FALSE
    @@ -26630,35 +27389,40 @@

    teal coverage - 59.73%

    75 - 19x + 19x +
        is_previous_failed <- reactive({
    76 - 19x + 19x +
          idx_this <- which(names(is_transformer_failed) == id)
    77 - 19x + 19x +
          is_transformer_failed_list <- reactiveValuesToList(is_transformer_failed)
    78 - 19x + 19x +
          idx_failures <- which(unlist(is_transformer_failed_list))
    79 - 19x + 19x +
          any(idx_failures < idx_this)
    @@ -26679,14 +27443,16 @@

    teal coverage - 59.73%

    82 - 19x + 19x +
        observeEvent(is_previous_failed(), {
    83 - 19x + 19x +
          if (is_previous_failed()) {
    @@ -26707,7 +27473,8 @@

    teal coverage - 59.73%

    86 - 19x + 19x +
            shinyjs::enable("wrapper")
    @@ -26735,42 +27502,48 @@

    teal coverage - 59.73%

    90 - 19x + 19x +
        srv_validate_reactive_teal_data(
    91 - 19x + 19x +
          "validate",
    92 - 19x + 19x +
          data = data_handled,
    93 - 19x + 19x +
          modules = modules,
    94 - 19x + 19x +
          validate_shiny_silent_error = validate_shiny_silent_error,
    95 - 19x + 19x +
          hide_validation_error = is_previous_failed
    @@ -26819,56 +27592,64 @@

    teal coverage - 59.73%

    102 - 77x + 77x +
      ns <- NS(id)
    103 - 77x + 77x +
      tagList(
    104 - 77x + 77x +
        div(
    105 - 77x + 77x +
          id = ns("validate_messages"),
    106 - 77x + 77x +
          class = "teal_validated",
    107 - 77x + 77x +
          ui_validate_error(ns("silent_error")),
    108 - 77x + 77x +
          ui_check_class_teal_data(ns("class_teal_data")),
    109 - 77x + 77x +
          ui_check_shiny_warnings(ns("shiny_warnings"))
    @@ -26882,21 +27663,24 @@

    teal coverage - 59.73%

    111 - 77x + 77x +
        div(
    112 - 77x + 77x +
          class = "teal_validated",
    113 - 77x + 77x +
          uiOutput(ns("previous_failed"))
    @@ -26973,21 +27757,24 @@

    teal coverage - 59.73%

    124 - 172x + 172x +
      checkmate::assert_string(id)
    125 - 172x + 172x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"), null.ok = TRUE)
    126 - 172x + 172x +
      checkmate::assert_flag(validate_shiny_silent_error)
    @@ -27001,7 +27788,8 @@

    teal coverage - 59.73%

    128 - 172x + 172x +
      moduleServer(id, function(input, output, session) {
    @@ -27015,35 +27803,40 @@

    teal coverage - 59.73%

    130 - 172x + 172x +
        srv_validate_error("silent_error", data, validate_shiny_silent_error)
    131 - 172x + 172x +
        srv_check_class_teal_data("class_teal_data", data)
    132 - 172x + 172x +
        srv_check_shiny_warnings("shiny_warnings", data, modules)
    133 - 172x + 172x +
        output$previous_failed <- renderUI({
    134 - 162x + 162x +
          if (hide_validation_error()) {
    @@ -27071,14 +27864,16 @@

    teal coverage - 59.73%

    138 - 162x + 162x +
            shinyjs::show("validate_messages")
    139 - 162x + 162x +
            NULL
    @@ -27106,7 +27901,8 @@

    teal coverage - 59.73%

    143 - 172x + 172x +
        .trigger_on_success(data)
    @@ -27148,14 +27944,16 @@

    teal coverage - 59.73%

    149 - 77x + 77x +
      ns <- NS(id)
    150 - 77x + 77x +
      uiOutput(ns("message"))
    @@ -27190,98 +27988,112 @@

    teal coverage - 59.73%

    155 - 172x + 172x +
      checkmate::assert_string(id)
    156 - 172x + 172x +
      checkmate::assert_flag(validate_shiny_silent_error)
    157 - 172x + 172x +
      moduleServer(id, function(input, output, session) {
    158 - 172x + 172x +
        output$message <- renderUI({
    159 - 175x + 175x +
          is_shiny_silent_error <- inherits(data(), "shiny.silent.error") && identical(data()$message, "")
    160 - 169x + 169x +
          if (inherits(data(), "qenv.error")) {
    161 - 2x + 2x +
            validate(
    162 - 2x + 2x +
              need(
    163 - 2x + 2x +
                FALSE,
    164 - 2x + 2x +
                paste(
    165 - 2x + 2x +
                  "Error when executing the `data` module:",
    166 - 2x + 2x +
                  strip_style(paste(data()$message, collapse = "\n")),
    167 - 2x + 2x +
                  "\nCheck your inputs or contact app developer if error persists.",
    168 - 2x + 2x +
                  collapse = "\n"
    @@ -27309,21 +28121,24 @@

    teal coverage - 59.73%

    172 - 167x + 167x +
          } else if (inherits(data(), "error")) {
    173 - 7x + 7x +
            if (is_shiny_silent_error && !validate_shiny_silent_error) {
    174 - 1x + 1x +
              return(NULL)
    @@ -27337,49 +28152,56 @@

    teal coverage - 59.73%

    176 - 6x + 6x +
            validate(
    177 - 6x + 6x +
              need(
    178 - 6x + 6x +
                FALSE,
    179 - 6x + 6x +
                sprintf(
    180 - 6x + 6x +
                  "Shiny error when executing the `data` module.\n%s\n%s",
    181 - 6x + 6x +
                  data()$message,
    182 - 6x + 6x +
                  "Check your inputs or contact app developer if error persists."
    @@ -27463,14 +28285,16 @@

    teal coverage - 59.73%

    194 - 77x + 77x +
      ns <- NS(id)
    195 - 77x + 77x +
      uiOutput(ns("message"))
    @@ -27505,49 +28329,56 @@

    teal coverage - 59.73%

    200 - 172x + 172x +
      checkmate::assert_string(id)
    201 - 172x + 172x +
      moduleServer(id, function(input, output, session) {
    202 - 172x + 172x +
        output$message <- renderUI({
    203 - 175x + 175x +
          validate(
    204 - 175x + 175x +
            need(
    205 - 175x + 175x +
              inherits(data(), c("teal_data", "error")),
    206 - 175x + 175x +
              "Did not receive `teal_data` object. Cannot proceed further."
    @@ -27610,14 +28441,16 @@

    teal coverage - 59.73%

    215 - 77x + 77x +
      ns <- NS(id)
    216 - 77x + 77x +
      uiOutput(NS(id, "message"))
    @@ -27652,63 +28485,72 @@

    teal coverage - 59.73%

    221 - 172x + 172x +
      checkmate::assert_string(id)
    222 - 172x + 172x +
      moduleServer(id, function(input, output, session) {
    223 - 172x + 172x +
        output$message <- renderUI({
    224 - 175x + 175x +
          if (inherits(data(), "teal_data")) {
    225 - 158x + 158x +
            is_modules_ok <- check_modules_datanames(modules = modules, datanames = ls(teal.code::get_env(data())))
    226 - 158x + 158x +
            if (!isTRUE(is_modules_ok)) {
    227 - 9x + 9x +
              tags$div(
    228 - 9x + 9x +
                class = "teal-output-warning",
    229 - 9x + 9x +
                is_modules_ok$html(
    @@ -27722,7 +28564,8 @@

    teal coverage - 59.73%

    231 - 9x + 9x +
                  grepl(sprintf("data-teal_data_module-%s", id), session$ns(NULL), fixed = TRUE)
    @@ -27792,35 +28635,40 @@

    teal coverage - 59.73%

    241 - 172x + 172x +
      out <- reactiveVal(NULL)
    242 - 172x + 172x +
      observeEvent(data(), {
    243 - 169x + 169x +
        if (inherits(data(), "teal_data")) {
    244 - 158x + 158x +
          if (!identical(data(), out())) {
    245 - 158x + 158x +
            out(data())
    @@ -27855,7 +28703,8 @@

    teal coverage - 59.73%

    250 - 172x + 172x +
      out
    @@ -28504,21 +29353,24 @@

    teal coverage - 59.73%

    28 - 76x + 76x +
      assert_reactive(datasets)
    29 - 76x + 76x +
      moduleServer(id, function(input, output, session) {
    30 - 76x + 76x +
        active_corrected <- reactive(intersect(active_datanames(), datasets()$datanames()))
    @@ -28532,21 +29384,24 @@

    teal coverage - 59.73%

    32 - 76x + 76x +
        output$panel <- renderUI({
    33 - 78x + 78x +
          req(inherits(datasets(), "FilteredData"))
    34 - 78x + 78x +
          isolate({
    @@ -28567,28 +29422,32 @@

    teal coverage - 59.73%

    37 - 78x + 78x +
            logger::log_debug("srv_filter_panel rendering filter panel.")
    38 - 78x + 78x +
            if (length(active_corrected())) {
    39 - 77x + 77x +
              datasets()$srv_active("filters", active_datanames = active_corrected)
    40 - 77x + 77x +
              datasets()$ui_active(session$ns("filters"), active_datanames = active_corrected)
    @@ -28623,7 +29482,8 @@

    teal coverage - 59.73%

    45 - 76x + 76x +
        trigger_data <- .observe_active_filter_changed(datasets, is_active, active_corrected, data_rv)
    @@ -28637,14 +29497,16 @@

    teal coverage - 59.73%

    47 - 76x + 76x +
        eventReactive(trigger_data(), {
    48 - 79x + 79x +
          .make_filtered_teal_data(modules, data = data_rv(), datasets = datasets(), datanames = active_corrected())
    @@ -28693,49 +29555,56 @@

    teal coverage - 59.73%

    55 - 79x + 79x +
      data <- eval_code(
    56 - 79x + 79x +
        data,
    57 - 79x + 79x +
        paste0(
    58 - 79x + 79x +
          ".raw_data <- list2env(list(",
    59 - 79x + 79x +
          toString(sprintf("%1$s = %1$s", sapply(datanames, as.name))),
    60 - 79x + 79x +
          "))\n",
    61 - 79x + 79x +
          "lockEnvironment(.raw_data) # @linksto .raw_data" # this is environment and it is shared by qenvs. CAN'T MODIFY!
    @@ -28756,35 +29625,40 @@

    teal coverage - 59.73%

    64 - 79x + 79x +
      filtered_code <- .get_filter_expr(datasets = datasets, datanames = datanames)
    65 - 79x + 79x +
      filtered_teal_data <- .append_evaluated_code(data, filtered_code)
    66 - 79x + 79x +
      filtered_datasets <- sapply(datanames, function(x) datasets$get_data(x, filtered = TRUE), simplify = FALSE)
    67 - 79x + 79x +
      filtered_teal_data <- .append_modified_data(filtered_teal_data, filtered_datasets)
    68 - 79x + 79x +
      filtered_teal_data
    @@ -28819,42 +29693,48 @@

    teal coverage - 59.73%

    73 - 76x + 76x +
      previous_signature <- reactiveVal(NULL)
    74 - 76x + 76x +
      filter_changed <- reactive({
    75 - 175x + 175x +
        req(inherits(datasets(), "FilteredData"))
    76 - 175x + 175x +
        new_signature <- c(
    77 - 175x + 175x +
          teal.code::get_code(data_rv()),
    78 - 175x + 175x +
          .get_filter_expr(datasets = datasets(), datanames = active_datanames())
    @@ -28868,21 +29748,24 @@

    teal coverage - 59.73%

    80 - 175x + 175x +
        if (!identical(previous_signature(), new_signature)) {
    81 - 84x + 84x +
          previous_signature(new_signature)
    82 - 84x + 84x +
          TRUE
    @@ -28896,7 +29779,8 @@

    teal coverage - 59.73%

    84 - 91x + 91x +
          FALSE
    @@ -28924,42 +29808,48 @@

    teal coverage - 59.73%

    88 - 76x + 76x +
      trigger_data <- reactiveVal(NULL)
    89 - 76x + 76x +
      observe({
    90 - 188x + 188x +
        if (isTRUE(is_active() && filter_changed())) {
    91 - 84x + 84x +
          isolate({
    92 - 84x + 84x +
            if (is.null(trigger_data())) {
    93 - 76x + 76x +
              trigger_data(0)
    @@ -28973,7 +29863,8 @@

    teal coverage - 59.73%

    95 - 8x + 8x +
              trigger_data(trigger_data() + 1)
    @@ -29015,7 +29906,8 @@

    teal coverage - 59.73%

    101 - 76x + 76x +
      trigger_data
    @@ -29050,14 +29942,16 @@

    teal coverage - 59.73%

    106 - 254x + 254x +
      if (length(datanames)) {
    107 - 251x + 251x +
        teal.slice::get_filter_expr(datasets = datasets, datanames = datanames)
    @@ -29071,7 +29965,8 @@

    teal coverage - 59.73%

    109 - 3x + 3x +
        NULL
    @@ -29630,35 +30525,40 @@

    teal coverage - 59.73%

    77 - 154x + 154x +
      shiny::isolate({
    78 - 154x + 154x +
        checkmate::assert_flag(allow_add)
    79 - 154x + 154x +
        checkmate::assert_flag(module_specific)
    80 - 50x + 50x +
        if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
    81 - 151x + 151x +
        checkmate::assert_string(app_id, null.ok = TRUE)
    @@ -29672,14 +30572,16 @@

    teal coverage - 59.73%

    83 - 151x + 151x +
        slices <- list(...)
    84 - 151x + 151x +
        all_slice_id <- vapply(slices, `[[`, character(1L), "id")
    @@ -29693,21 +30595,24 @@

    teal coverage - 59.73%

    86 - 151x + 151x +
        if (missing(mapping)) {
    87 - 104x + 104x +
          mapping <- if (length(all_slice_id)) {
    88 - 26x + 26x +
            list(global_filters = all_slice_id)
    @@ -29721,7 +30626,8 @@

    teal coverage - 59.73%

    90 - 78x + 78x +
            list()
    @@ -29749,14 +30655,16 @@

    teal coverage - 59.73%

    94 - 151x + 151x +
        if (!module_specific) {
    95 - 132x + 132x +
          mapping[setdiff(names(mapping), "global_filters")] <- NULL
    @@ -29777,42 +30685,48 @@

    teal coverage - 59.73%

    98 - 151x + 151x +
        failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
    99 - 151x + 151x +
        if (length(failed_slice_id)) {
    100 - 1x + 1x +
          stop(sprintf(
    101 - 1x + 1x +
            "Filters in mapping don't match any available filter.\n %s not in %s",
    102 - 1x + 1x +
            toString(failed_slice_id),
    103 - 1x + 1x +
            toString(all_slice_id)
    @@ -29840,7 +30754,8 @@

    teal coverage - 59.73%

    107 - 150x + 150x +
        tss <- teal.slice::teal_slices(
    @@ -29854,28 +30769,32 @@

    teal coverage - 59.73%

    109 - 150x + 150x +
          exclude_varnames = exclude_varnames,
    110 - 150x + 150x +
          include_varnames = include_varnames,
    111 - 150x + 150x +
          count_type = count_type,
    112 - 150x + 150x +
          allow_add = allow_add
    @@ -29889,35 +30808,40 @@

    teal coverage - 59.73%

    114 - 150x + 150x +
        attr(tss, "mapping") <- mapping
    115 - 150x + 150x +
        attr(tss, "module_specific") <- module_specific
    116 - 150x + 150x +
        attr(tss, "app_id") <- app_id
    117 - 150x + 150x +
        class(tss) <- c("modules_teal_slices", class(tss))
    118 - 150x + 150x +
        tss
    @@ -29987,14 +30911,16 @@

    teal coverage - 59.73%

    128 - 12x + 12x +
      checkmate::assert_list(x)
    129 - 12x + 12x +
      lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
    @@ -30008,21 +30934,24 @@

    teal coverage - 59.73%

    131 - 12x + 12x +
      attrs <- attributes(unclass(x))
    132 - 12x + 12x +
      ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
    133 - 12x + 12x +
      do.call(teal_slices, c(ans, attrs))
    @@ -30085,14 +31014,16 @@

    teal coverage - 59.73%

    142 - 6x + 6x +
      x <- list(...)
    143 - 6x + 6x +
      checkmate::assert_true(all(vapply(x, is.teal_slices, logical(1L))), .var.name = "all arguments are teal_slices")
    @@ -30106,21 +31037,24 @@

    teal coverage - 59.73%

    145 - 6x + 6x +
      all_attributes <- lapply(x, attributes)
    146 - 6x + 6x +
      all_attributes <- coalesce_r(all_attributes)
    147 - 6x + 6x +
      all_attributes <- all_attributes[names(all_attributes) != "class"]
    @@ -30134,35 +31068,40 @@

    teal coverage - 59.73%

    149 - 6x + 6x +
      do.call(
    150 - 6x + 6x +
        teal_slices,
    151 - 6x + 6x +
        c(
    152 - 6x + 6x +
          unique(unlist(x, recursive = FALSE)),
    153 - 6x + 6x +
          all_attributes
    @@ -30274,28 +31213,32 @@

    teal coverage - 59.73%

    169 - 1x + 1x +
      checkmate::assert_class(filter, "teal_slices")
    170 - 1x + 1x +
      shiny::isolate({
    171 - 1x + 1x +
        filter_copy <- lapply(filter, function(slice) {
    172 - 2x + 2x +
          teal.slice::as.teal_slice(as.list(slice))
    @@ -30309,14 +31252,16 @@

    teal coverage - 59.73%

    174 - 1x + 1x +
        attributes(filter_copy) <- attributes(filter)
    175 - 1x + 1x +
        filter_copy
    @@ -31050,7 +31995,8 @@

    teal coverage - 59.73%

    102 - 11x + 11x +
      logger::log_debug("init initializing teal app with: data ('{ class(data) }').")
    @@ -31078,7 +32024,8 @@

    teal coverage - 59.73%

    106 - 11x + 11x +
      if (inherits(data, "TealData")) {
    @@ -31148,14 +32095,16 @@

    teal coverage - 59.73%

    116 - 11x + 11x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    117 - 11x + 11x +
      checkmate::assert_class(landing_popup, "teal_module_landing", null.ok = TRUE)
    @@ -31176,28 +32125,32 @@

    teal coverage - 59.73%

    120 - 11x + 11x +
      checkmate::assert(
    121 - 11x + 11x +
        .var.name = "modules",
    122 - 11x + 11x +
        checkmate::check_multi_class(modules, c("teal_modules", "teal_module")),
    123 - 11x + 11x +
        checkmate::check_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -31211,14 +32164,16 @@

    teal coverage - 59.73%

    125 - 11x + 11x +
      if (inherits(modules, "teal_module")) {
    126 - 1x + 1x +
        modules <- list(modules)
    @@ -31232,14 +32187,16 @@

    teal coverage - 59.73%

    128 - 11x + 11x +
      if (checkmate::test_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))) {
    129 - 5x + 5x +
        modules <- do.call(teal::modules, modules)
    @@ -31267,7 +32224,8 @@

    teal coverage - 59.73%

    133 - 11x + 11x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -31288,28 +32246,32 @@

    teal coverage - 59.73%

    136 - 10x + 10x +
      checkmate::assert(
    137 - 10x + 10x +
        .var.name = "title",
    138 - 10x + 10x +
        checkmate::check_string(title),
    139 - 10x + 10x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -31323,28 +32285,32 @@

    teal coverage - 59.73%

    141 - 10x + 10x +
      checkmate::assert(
    142 - 10x + 10x +
        .var.name = "header",
    143 - 10x + 10x +
        checkmate::check_string(header),
    144 - 10x + 10x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -31358,28 +32324,32 @@

    teal coverage - 59.73%

    146 - 10x + 10x +
      checkmate::assert(
    147 - 10x + 10x +
        .var.name = "footer",
    148 - 10x + 10x +
        checkmate::check_string(footer),
    149 - 10x + 10x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -31393,7 +32363,8 @@

    teal coverage - 59.73%

    151 - 10x + 10x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -31414,7 +32385,8 @@

    teal coverage - 59.73%

    154 - 10x + 10x +
      teal.logger::log_system_info()
    @@ -31442,14 +32414,16 @@

    teal coverage - 59.73%

    158 - 10x + 10x +
      landing <- extract_module(modules, "teal_module_landing")
    159 - 10x + 10x +
      if (length(landing) == 1L) {
    @@ -31526,7 +32500,8 @@

    teal coverage - 59.73%

    170 - 10x + 10x +
      } else if (length(landing) > 1L) {
    @@ -31561,7 +32536,8 @@

    teal coverage - 59.73%

    175 - 10x + 10x +
      if (is.null(attr(filter, "app_id", exact = TRUE))) attr(filter, "app_id") <- create_app_id(data, modules)
    @@ -31582,7 +32558,8 @@

    teal coverage - 59.73%

    178 - 10x + 10x +
      filter <- as.teal_slices(as.list(filter))
    @@ -31610,7 +32587,8 @@

    teal coverage - 59.73%

    182 - 10x + 10x +
      if (isTRUE(attr(filter, "module_specific"))) {
    @@ -31799,21 +32777,24 @@

    teal coverage - 59.73%

    209 - 10x + 10x +
      if (inherits(data, "teal_data")) {
    210 - 9x + 9x +
        if (length(ls(teal.code::get_env(data))) == 0) {
    211 - 1x + 1x +
          stop("The environment of `data` is empty.")
    @@ -31834,21 +32815,24 @@

    teal coverage - 59.73%

    214 - 8x + 8x +
        is_modules_ok <- check_modules_datanames(modules, ls(teal.code::get_env(data)))
    215 - 8x + 8x +
        if (!isTRUE(is_modules_ok) && length(unlist(extract_transformers(modules))) == 0) {
    216 - 1x + 1x +
          lapply(is_modules_ok$string, warning, call. = FALSE)
    @@ -31869,21 +32853,24 @@

    teal coverage - 59.73%

    219 - 8x + 8x +
        is_filter_ok <- check_filter_datanames(filter, ls(teal.code::get_env(data)))
    220 - 8x + 8x +
        if (!isTRUE(is_filter_ok)) {
    221 - 1x + 1x +
          warning(is_filter_ok)
    @@ -31925,14 +32912,16 @@

    teal coverage - 59.73%

    227 - 9x + 9x +
      reporter <- teal.reporter::Reporter$new()$set_id(attr(filter, "app_id"))
    228 - 9x + 9x +
      if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
    @@ -31981,7 +32970,8 @@

    teal coverage - 59.73%

    235 - 9x + 9x +
      ns <- NS(id)
    @@ -31995,14 +32985,16 @@

    teal coverage - 59.73%

    237 - 9x + 9x +
      res <- list(
    238 - 9x + 9x +
        ui = function(request) {
    @@ -32065,7 +33057,8 @@

    teal coverage - 59.73%

    247 - 9x + 9x +
        server = function(input, output, session) {
    @@ -32121,7 +33114,8 @@

    teal coverage - 59.73%

    255 - 9x + 9x +
      logger::log_debug("init teal app has been initialized.")
    @@ -32135,7 +33129,8 @@

    teal coverage - 59.73%

    257 - 9x + 9x +
      res
    @@ -32267,70 +33262,80 @@

    teal coverage - 59.73%

    17 - 37x + 37x +
      checkmate::assert_string(label)
    18 - 37x + 37x +
      ans <- module(
    19 - 37x + 37x +
        label,
    20 - 37x + 37x +
        server = function(id, data) {
    21 - 2x + 2x +
          checkmate::assert_class(isolate(data()), "teal_data")
    22 - 2x + 2x +
          moduleServer(id, function(input, output, session) {
    23 - 2x + 2x +
            datanames_rv <- reactive(ls(teal.code::get_env((req(data())))))
    24 - 2x + 2x +
            observeEvent(datanames_rv(), {
    25 - 2x + 2x +
              selected <- input$dataname
    26 - 2x + 2x +
              if (identical(selected, "")) {
    @@ -32344,7 +33349,8 @@

    teal coverage - 59.73%

    28 - 2x + 2x +
              } else if (isFALSE(selected %in% datanames_rv())) {
    @@ -32365,35 +33371,40 @@

    teal coverage - 59.73%

    31 - 2x + 2x +
              updateSelectInput(
    32 - 2x + 2x +
                session = session,
    33 - 2x + 2x +
                inputId = "dataname",
    34 - 2x + 2x +
                choices = datanames_rv(),
    35 - 2x + 2x +
                selected = selected
    @@ -32421,14 +33432,16 @@

    teal coverage - 59.73%

    39 - 2x + 2x +
            output$text <- renderPrint({
    40 - 2x + 2x +
              req(input$dataname)
    @@ -32456,28 +33469,32 @@

    teal coverage - 59.73%

    44 - 2x + 2x +
            teal.widgets::verbatim_popup_srv(
    45 - 2x + 2x +
              id = "rcode",
    46 - 2x + 2x +
              verbatim_content = reactive(teal.code::get_code(data())),
    47 - 2x + 2x +
              title = "Example Code"
    @@ -32505,7 +33522,8 @@

    teal coverage - 59.73%

    51 - 37x + 37x +
        ui = function(id) {
    @@ -32575,14 +33593,16 @@

    teal coverage - 59.73%

    61 - 37x + 37x +
        datanames = datanames,
    62 - 37x + 37x +
        transformers = transformers
    @@ -32596,14 +33616,16 @@

    teal coverage - 59.73%

    64 - 37x + 37x +
      attr(ans, "teal_bookmarkable") <- TRUE
    65 - 37x + 37x +
      ans
    @@ -32819,28 +33841,32 @@

    teal coverage - 59.73%

    29 - 9x + 9x +
      teal_data_module(
    30 - 9x + 9x +
        ui = function(id) {
    31 - 1x + 1x +
          ns <- NS(id)
    32 - 1x + 1x +
          object$ui(ns("mutate_inner"))
    @@ -32854,28 +33880,32 @@

    teal coverage - 59.73%

    34 - 9x + 9x +
        server = function(id) {
    35 - 7x + 7x +
          moduleServer(id, function(input, output, session) {
    36 - 7x + 7x +
            teal_data_rv <- object$server("mutate_inner")
    37 - 6x + 6x +
            td <- eventReactive(teal_data_rv(),
    @@ -32889,14 +33919,16 @@

    teal coverage - 59.73%

    39 - 6x + 6x +
                if (inherits(teal_data_rv(), c("teal_data", "qenv.error"))) {
    40 - 4x + 4x +
                  eval_code(teal_data_rv(), code)
    @@ -32910,7 +33942,8 @@

    teal coverage - 59.73%

    42 - 2x + 2x +
                  teal_data_rv()
    @@ -32931,7 +33964,8 @@

    teal coverage - 59.73%

    45 - 6x + 6x +
              ignoreNULL = FALSE
    @@ -32945,7 +33979,8 @@

    teal coverage - 59.73%

    47 - 6x + 6x +
            td
    @@ -32994,7 +34029,8 @@

    teal coverage - 59.73%

    54 - 1x + 1x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -33022,7 +34058,8 @@

    teal coverage - 59.73%

    58 - 2x + 2x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -33434,112 +34471,128 @@

    teal coverage - 59.73%

    57 - 76x + 76x +
      checkmate::assert_string(id)
    58 - 76x + 76x +
      assert_reactive(data)
    59 - 76x + 76x +
      checkmate::assert_list(transformers, "teal_transform_module")
    60 - 76x + 76x +
      checkmate::assert_class(modules, "teal_module")
    61 - 76x + 76x +
      labels <- lapply(transformers, function(x) attr(x, "label"))
    62 - 76x + 76x +
      ids <- get_unique_labels(labels)
    63 - 76x + 76x +
      names(transformers) <- ids
    64 - 76x + 76x +
      moduleServer(id, function(input, output, session) {
    65 - 76x + 76x +
        logger::log_debug("srv_teal_data_modules initializing.")
    66 - 76x + 76x +
        Reduce(
    67 - 76x + 76x +
          function(previous_result, name) {
    68 - 19x + 19x +
            srv_teal_data(
    69 - 19x + 19x +
              id = name,
    70 - 19x + 19x +
              data_module = function(id) transformers[[name]]$server(id, previous_result),
    71 - 19x + 19x +
              modules = modules,
    72 - 19x + 19x +
              is_transformer_failed = is_transformer_failed
    @@ -33560,14 +34613,16 @@

    teal coverage - 59.73%

    75 - 76x + 76x +
          x = names(transformers),
    76 - 76x + 76x +
          init = data
    @@ -33769,56 +34824,64 @@

    teal coverage - 59.73%

    25 - 4x + 4x +
          checkmate::assert_character(src, min.len = 0, max.len = 1)
    26 - 4x + 4x +
          params <- list(...)
    27 - 4x + 4x +
          params$eval <- FALSE
    28 - 4x + 4x +
          rblock <- RcodeBlock$new(src)
    29 - 4x + 4x +
          rblock$set_params(params)
    30 - 4x + 4x +
          self$append_content(rblock)
    31 - 4x + 4x +
          self$append_metadata("SRC", src)
    32 - 4x + 4x +
          invisible(self)
    @@ -33888,28 +34951,32 @@

    teal coverage - 59.73%

    42 - 5x + 5x +
          checkmate::assert_class(fs, "teal_slices")
    43 - 4x + 4x +
          self$append_text("Filter State", "header3")
    44 - 4x + 4x +
          if (length(fs)) {
    45 - 3x + 3x +
            self$append_content(TealSlicesBlock$new(fs))
    @@ -33923,7 +34990,8 @@

    teal coverage - 59.73%

    47 - 1x + 1x +
            self$append_text("No filters specified.")
    @@ -33937,7 +35005,8 @@

    teal coverage - 59.73%

    49 - 4x + 4x +
          invisible(self)
    @@ -34014,56 +35083,64 @@

    teal coverage - 59.73%

    60 - 4x + 4x +
          checkmate::assert_list(encodings)
    61 - 4x + 4x +
          self$append_text("Selected Options", "header3")
    62 - 4x + 4x +
          if (requireNamespace("yaml", quietly = TRUE)) {
    63 - 4x + 4x +
            self$append_text(yaml::as.yaml(encodings, handlers = list(
    64 - 4x + 4x +
              POSIXct = function(x) format(x, "%Y-%m-%d"),
    65 - 4x + 4x +
              POSIXlt = function(x) format(x, "%Y-%m-%d"),
    66 - 4x + 4x +
              Date = function(x) format(x, "%Y-%m-%d")
    67 - 4x + 4x +
            )), "verbatim")
    @@ -34091,14 +35168,16 @@

    teal coverage - 59.73%

    71 - 4x + 4x +
          self$append_metadata("Encodings", encodings)
    72 - 4x + 4x +
          invisible(self)
    @@ -34301,21 +35380,24 @@

    teal coverage - 59.73%

    101 - 9x + 9x +
          self$set_content(content)
    102 - 8x + 8x +
          self$set_style(style)
    103 - 8x + 8x +
          invisible(self)
    @@ -34406,56 +35488,64 @@

    teal coverage - 59.73%

    116 - 9x + 9x +
          checkmate::assert_class(content, "teal_slices")
    117 - 8x + 8x +
          if (length(content) != 0) {
    118 - 6x + 6x +
            states_list <- lapply(content, function(x) {
    119 - 6x + 6x +
              x_list <- shiny::isolate(as.list(x))
    120 - 6x + 6x +
              if (
    121 - 6x + 6x +
                inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
    122 - 6x + 6x +
                  length(x_list$choices) == 2 &&
    123 - 6x + 6x +
                  length(x_list$selected) == 2
    @@ -34490,7 +35580,8 @@

    teal coverage - 59.73%

    128 - 6x + 6x +
              if (!is.null(x_list$arg)) {
    @@ -34518,14 +35609,16 @@

    teal coverage - 59.73%

    132 - 6x + 6x +
              x_list <- x_list[
    133 - 6x + 6x +
                c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
    @@ -34539,21 +35632,24 @@

    teal coverage - 59.73%

    135 - 6x + 6x +
              names(x_list) <- c(
    136 - 6x + 6x +
                "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
    137 - 6x + 6x +
                "Selected Values", "Selected range", "Include NA values", "Include Inf values"
    @@ -34574,7 +35670,8 @@

    teal coverage - 59.73%

    140 - 6x + 6x +
              Filter(Negate(is.null), x_list)
    @@ -34595,14 +35692,16 @@

    teal coverage - 59.73%

    143 - 6x + 6x +
            if (requireNamespace("yaml", quietly = TRUE)) {
    144 - 6x + 6x +
              super$set_content(yaml::as.yaml(states_list))
    @@ -34637,14 +35736,16 @@

    teal coverage - 59.73%

    149 - 8x + 8x +
          private$teal_slices <- content
    150 - 8x + 8x +
          invisible(self)
    @@ -34742,35 +35843,40 @@

    teal coverage - 59.73%

    164 - 1x + 1x +
          checkmate::assert_list(x)
    165 - 1x + 1x +
          checkmate::assert_names(names(x), must.include = c("text", "style"))
    166 - 1x + 1x +
          super$set_content(x$text)
    167 - 1x + 1x +
          super$set_style(x$style)
    168 - 1x + 1x +
          invisible(self)
    @@ -34847,28 +35953,32 @@

    teal coverage - 59.73%

    179 - 2x + 2x +
          content <- self$get_content()
    180 - 2x + 2x +
          list(
    181 - 2x + 2x +
            text = if (length(content)) content else "",
    182 - 2x + 2x +
            style = self$get_style()
    @@ -35686,14 +36796,16 @@

    teal coverage - 59.73%

    108 - 36x + 36x +
      dots <- list(...)
    109 - 2x + 2x +
      if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
    @@ -35707,21 +36819,24 @@

    teal coverage - 59.73%

    111 - 34x + 34x +
      messages <- extract_validator(dots, header)
    112 - 34x + 34x +
      failings <- if (!any_names(dots)) {
    113 - 29x + 29x +
        add_header(messages, header)
    @@ -35735,7 +36850,8 @@

    teal coverage - 59.73%

    115 - 5x + 5x +
        unlist(messages)
    @@ -35756,7 +36872,8 @@

    teal coverage - 59.73%

    118 - 34x + 34x +
      shiny::validate(shiny::need(is.null(failings), failings))
    @@ -35826,7 +36943,8 @@

    teal coverage - 59.73%

    128 - 118x + 118x +
      all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
    @@ -35889,7 +37007,8 @@

    teal coverage - 59.73%

    137 - 49x + 49x +
      x$.__enclos_env__$private$enabled
    @@ -35945,14 +37064,16 @@

    teal coverage - 59.73%

    145 - 113x + 113x +
      if (inherits(iv, "InputValidator")) {
    146 - 49x + 49x +
        add_header(gather_messages(iv), header)
    @@ -35966,14 +37087,16 @@

    teal coverage - 59.73%

    148 - 58x + 58x +
        if (is.null(names(iv))) names(iv) <- rep("", length(iv))
    149 - 64x + 64x +
        mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
    @@ -36036,28 +37159,32 @@

    teal coverage - 59.73%

    158 - 49x + 49x +
      if (validator_enabled(iv)) {
    159 - 46x + 46x +
        status <- iv$validate()
    160 - 46x + 46x +
        failing_inputs <- Filter(Negate(is.null), status)
    161 - 46x + 46x +
        unique(lapply(failing_inputs, function(x) x[["message"]]))
    @@ -36071,14 +37198,16 @@

    teal coverage - 59.73%

    163 - 3x + 3x +
        warning("Validator is disabled and will be omitted.")
    164 - 3x + 3x +
        list()
    @@ -36134,21 +37263,24 @@

    teal coverage - 59.73%

    172 - 78x + 78x +
      ans <- unlist(messages)
    173 - 78x + 78x +
      if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
    174 - 31x + 31x +
        ans <- c(paste0(header, "\n"), ans, "\n")
    @@ -36162,7 +37294,8 @@

    teal coverage - 59.73%

    176 - 78x + 78x +
      ans
    @@ -36211,21 +37344,24 @@

    teal coverage - 59.73%

    183 - 103x + 103x +
      any(
    184 - 103x + 103x +
        if (is.list(x)) {
    185 - 58x + 58x +
          if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
    @@ -36239,7 +37375,8 @@

    teal coverage - 59.73%

    187 - 40x + 40x +
          FALSE
    @@ -36588,56 +37725,64 @@

    teal coverage - 59.73%

    46 - 17x + 17x +
      checkmate::assert_string(msg, null.ok = TRUE)
    47 - 15x + 15x +
      checkmate::assert_data_frame(x)
    48 - 15x + 15x +
      if (!is.null(min_nrow)) {
    49 - 15x + 15x +
        if (complete) {
    50 - 5x + 5x +
          complete_index <- stats::complete.cases(x)
    51 - 5x + 5x +
          validate(need(
    52 - 5x + 5x +
            sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
    53 - 5x + 5x +
            paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
    @@ -36658,35 +37803,40 @@

    teal coverage - 59.73%

    56 - 10x + 10x +
          validate(need(
    57 - 10x + 10x +
            nrow(x) >= min_nrow,
    58 - 10x + 10x +
            paste(
    59 - 10x + 10x +
              c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
    60 - 10x + 10x +
              collapse = "\n"
    @@ -36721,28 +37871,32 @@

    teal coverage - 59.73%

    65 - 10x + 10x +
        if (!allow_inf) {
    66 - 6x + 6x +
          validate(need(
    67 - 6x + 6x +
            all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
    68 - 6x + 6x +
            "Dataframe contains Inf values which is not allowed."
    @@ -39373,91 +40527,104 @@

    teal coverage - 59.73%

    64 - 33x + 33x +
      checkmate::assert_function(ui, args = "id", nargs = 1)
    65 - 32x + 32x +
      checkmate::assert_function(server, args = "id", nargs = 1)
    66 - 30x + 30x +
      checkmate::assert_string(label)
    67 - 30x + 30x +
      checkmate::assert_flag(once)
    68 - 30x + 30x +
      structure(
    69 - 30x + 30x +
        list(
    70 - 30x + 30x +
          ui = ui,
    71 - 30x + 30x +
          server = function(id) {
    72 - 23x + 23x +
            data_out <- server(id)
    73 - 22x + 22x +
            decorate_err_msg(
    74 - 22x + 22x +
              assert_reactive(data_out),
    75 - 22x + 22x +
              pre = sprintf("From: 'teal_data_module()':\nA 'teal_data_module' with \"%s\" label:", label),
    76 - 22x + 22x +
              post = "Please make sure that this module returns a 'reactive` object containing 'teal_data' class of object." # nolint: line_length_linter.
    @@ -39485,21 +40652,24 @@

    teal coverage - 59.73%

    80 - 30x + 30x +
        label = label,
    81 - 30x + 30x +
        class = "teal_data_module",
    82 - 30x + 30x +
        once = once
    @@ -39954,56 +41124,64 @@

    teal coverage - 59.73%

    147 - 19x + 19x +
      checkmate::assert_function(ui, args = "id", nargs = 1)
    148 - 19x + 19x +
      checkmate::assert_function(server, args = c("id", "data"), nargs = 2)
    149 - 19x + 19x +
      checkmate::assert_string(label)
    150 - 19x + 19x +
      checkmate::assert_character(datanames)
    151 - 19x + 19x +
      if (identical(datanames, "all")) {
    152 - 1x + 1x +
        stop(
    153 - 1x + 1x +
          "teal_transform_module can't have datanames property equal to 'all'. Set `datanames = character(0)` instead.",
    154 - 1x + 1x +
          call. = FALSE
    @@ -40024,35 +41202,40 @@

    teal coverage - 59.73%

    157 - 18x + 18x +
      structure(
    158 - 18x + 18x +
        list(
    159 - 18x + 18x +
          ui = ui,
    160 - 18x + 18x +
          server = function(id, data) {
    161 - 19x + 19x +
            data_out <- server(id, data)
    @@ -40066,7 +41249,8 @@

    teal coverage - 59.73%

    163 - 19x + 19x +
            if (inherits(data_out, "reactive.event")) {
    @@ -40080,42 +41264,48 @@

    teal coverage - 59.73%

    165 - 1x + 1x +
              warning(
    166 - 1x + 1x +
                "teal_transform_module() ",
    167 - 1x + 1x +
                "Using eventReactive in teal_transform module server code should be avoided as it ",
    168 - 1x + 1x +
                "may lead to unexpected behavior. See the vignettes for more information  ",
    169 - 1x + 1x +
                "(`vignette(\"data-transform-as-shiny-module\", package = \"teal\")`).",
    170 - 1x + 1x +
                call. = FALSE
    @@ -40143,28 +41333,32 @@

    teal coverage - 59.73%

    174 - 19x + 19x +
            decorate_err_msg(
    175 - 19x + 19x +
              assert_reactive(data_out),
    176 - 19x + 19x +
              pre = sprintf("From: 'teal_transform_module()':\nA 'teal_transform_module' with \"%s\" label:", label),
    177 - 19x + 19x +
              post = "Please make sure that this module returns a 'reactive` object containing 'teal_data' class of object." # nolint: line_length_linter.
    @@ -40192,21 +41386,24 @@

    teal coverage - 59.73%

    181 - 18x + 18x +
        label = label,
    182 - 18x + 18x +
        datanames = datanames,
    183 - 18x + 18x +
        class = c("teal_transform_module", "teal_data_module")
    @@ -40283,28 +41480,32 @@

    teal coverage - 59.73%

    194 - 4x + 4x +
      if (inherits(modules, "teal_module")) {
    195 - 2x + 2x +
        modules$transformers
    196 - 2x + 2x +
      } else if (inherits(modules, "teal_modules")) {
    197 - 2x + 2x +
        lapply(modules$children, extract_transformers)
    @@ -40723,21 +41924,24 @@

    teal coverage - 59.73%

    57 - 78x + 78x +
      checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
    58 - 78x + 78x +
      lapply(files, function(file) {
    59 - 78x + 78x +
        shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
    @@ -40751,7 +41955,8 @@

    teal coverage - 59.73%

    61 - 78x + 78x +
      invisible(NULL)
    @@ -41065,49 +42270,56 @@

    teal coverage - 59.73%

    22 - 79x + 79x +
      checkmate::assert_class(data, "teal_data")
    23 - 79x + 79x +
      data@code <- c(data@code, code)
    24 - 79x + 79x +
      data@id <- c(data@id, max(data@id) + 1L + seq_along(code))
    25 - 79x + 79x +
      data@messages <- c(data@messages, rep("", length(code)))
    26 - 79x + 79x +
      data@warnings <- c(data@warnings, rep("", length(code)))
    27 - 79x + 79x +
      methods::validObject(data)
    28 - 79x + 79x +
      data
    @@ -41142,42 +42354,48 @@

    teal coverage - 59.73%

    33 - 79x + 79x +
      checkmate::assert_class(data, "teal_data")
    34 - 79x + 79x +
      checkmate::assert_class(objects, "list")
    35 - 79x + 79x +
      new_env <- list2env(objects, parent = .GlobalEnv)
    36 - 79x + 79x +
      rlang::env_coalesce(new_env, teal.code::get_env(data))
    37 - 79x + 79x +
      data@env <- new_env
    38 - 79x + 79x +
      data
    @@ -41212,42 +42430,48 @@

    teal coverage - 59.73%

    43 - 78x + 78x +
      checkmate::assert_class(data, "teal_data")
    44 - 78x + 78x +
      checkmate::assert_class(datanames, "character")
    45 - 78x + 78x +
      datanames_corrected <- intersect(datanames, ls(teal.code::get_env(data)))
    46 - 78x + 78x +
      datanames_corrected_with_raw <- c(datanames_corrected, ".raw_data")
    47 - 78x + 78x +
      if (!length(datanames_corrected)) {
    48 - 1x + 1x +
        return(teal_data())
    @@ -41268,49 +42492,56 @@

    teal coverage - 59.73%

    51 - 77x + 77x +
      new_data <- do.call(
    52 - 77x + 77x +
        teal.data::teal_data,
    53 - 77x + 77x +
        args = c(
    54 - 77x + 77x +
          mget(x = datanames_corrected_with_raw, envir = teal.code::get_env(data)),
    55 - 77x + 77x +
          list(
    56 - 77x + 77x +
            code = teal.code::get_code(data, names = datanames_corrected_with_raw),
    57 - 77x + 77x +
            join_keys = teal.data::join_keys(data)[datanames_corrected]
    @@ -41338,21 +42569,24 @@

    teal coverage - 59.73%

    61 - 77x + 77x +
      new_data@verified <- data@verified
    62 - 77x + 77x +
      teal.data::datanames(new_data) <- datanames_corrected
    63 - 77x + 77x +
      new_data
    @@ -41561,14 +42795,16 @@

    teal coverage - 59.73%

    28 - 9x + 9x +
      checkmate::assert_class(tss, "teal_slices")
    29 - 9x + 9x +
      checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
    @@ -41582,7 +42818,8 @@

    teal coverage - 59.73%

    31 - 9x + 9x +
      cat(format(tss, trim_lines = FALSE), "\n", file = file)
    @@ -41631,7 +42868,8 @@

    teal coverage - 59.73%

    38 - 9x + 9x +
      checkmate::assert_file_exists(file, access = "r", extension = "json")
    @@ -41645,56 +42883,64 @@

    teal coverage - 59.73%

    40 - 9x + 9x +
      tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
    41 - 9x + 9x +
      tss_json$slices <-
    42 - 9x + 9x +
        lapply(tss_json$slices, function(slice) {
    43 - 9x + 9x +
          for (field in c("selected", "choices")) {
    44 - 18x + 18x +
            if (!is.null(slice[[field]])) {
    45 - 12x + 12x +
              if (length(slice[[field]]) > 0) {
    46 - 9x + 9x +
                date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
    47 - 9x + 9x +
                time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
    @@ -41708,35 +42954,40 @@

    teal coverage - 59.73%

    49 - 9x + 9x +
                slice[[field]] <-
    50 - 9x + 9x +
                  if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
    51 - 3x + 3x +
                    as.Date(slice[[field]])
    52 - 9x + 9x +
                  } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
    53 - 3x + 3x +
                    as.POSIXct(slice[[field]], tz = "UTC")
    @@ -41750,7 +43001,8 @@

    teal coverage - 59.73%

    55 - 3x + 3x +
                    slice[[field]]
    @@ -41771,7 +43023,8 @@

    teal coverage - 59.73%

    58 - 3x + 3x +
                slice[[field]] <- character(0)
    @@ -41799,7 +43052,8 @@

    teal coverage - 59.73%

    62 - 9x + 9x +
          slice
    @@ -41820,7 +43074,8 @@

    teal coverage - 59.73%

    65 - 9x + 9x +
      tss_elements <- lapply(tss_json$slices, as.teal_slice)
    @@ -41834,7 +43089,8 @@

    teal coverage - 59.73%

    67 - 9x + 9x +
      do.call(teal_slices, c(tss_elements, tss_json$attributes))
    @@ -42246,35 +43502,40 @@

    teal coverage - 59.73%

    57 - 76x + 76x +
      assert_reactive(teal_data)
    58 - 76x + 76x +
      moduleServer(
    59 - 76x + 76x +
        id = id,
    60 - 76x + 76x +
        function(input, output, session) {
    61 - 76x + 76x +
          logger::log_debug("srv_data_summary initializing")
    @@ -42288,28 +43549,32 @@

    teal coverage - 59.73%

    63 - 76x + 76x +
          summary_table <- reactive({
    64 - 84x + 84x +
            req(inherits(teal_data(), "teal_data"))
    65 - 78x + 78x +
            if (!length(ls(teal.code::get_env(teal_data())))) {
    66 - 1x + 1x +
              return(NULL)
    @@ -42330,14 +43595,16 @@

    teal coverage - 59.73%

    69 - 77x + 77x +
            filter_overview <- get_filter_overview(teal_data)
    70 - 77x + 77x +
            names(filter_overview)[[1]] <- "Data Name"
    @@ -42351,28 +43618,32 @@

    teal coverage - 59.73%

    72 - 77x + 77x +
            filter_overview$Obs <- ifelse(
    73 - 77x + 77x +
              !is.na(filter_overview$obs),
    74 - 77x + 77x +
              sprintf("%s/%s", filter_overview$obs_filtered, filter_overview$obs),
    75 - 77x + 77x +
              ifelse(!is.na(filter_overview$obs_filtered), sprintf("%s", filter_overview$obs_filtered), "")
    @@ -42393,21 +43664,24 @@

    teal coverage - 59.73%

    78 - 77x + 77x +
            filter_overview$Subjects <- ifelse(
    79 - 77x + 77x +
              !is.na(filter_overview$subjects),
    80 - 77x + 77x +
              sprintf("%s/%s", filter_overview$subjects_filtered, filter_overview$subjects),
    @@ -42435,14 +43709,16 @@

    teal coverage - 59.73%

    84 - 77x + 77x +
            filter_overview <- filter_overview[, colnames(filter_overview) %in% c("Data Name", "Obs", "Subjects")]
    85 - 77x + 77x +
            Filter(function(col) !all(col == ""), filter_overview)
    @@ -42463,21 +43739,24 @@

    teal coverage - 59.73%

    88 - 76x + 76x +
          output$table <- renderUI({
    89 - 84x + 84x +
            summary_table_out <- try(summary_table(), silent = TRUE)
    90 - 84x + 84x +
            if (inherits(summary_table_out, "try-error")) {
    @@ -42491,7 +43770,8 @@

    teal coverage - 59.73%

    92 - 6x + 6x +
              if (!inherits(attr(summary_table_out, "condition"), "shiny.silent.error")) {
    @@ -42512,14 +43792,16 @@

    teal coverage - 59.73%

    95 - 78x + 78x +
            } else if (is.null(summary_table_out)) {
    96 - 1x + 1x +
              "no datasets to show"
    @@ -42533,98 +43815,112 @@

    teal coverage - 59.73%

    98 - 77x + 77x +
              body_html <- apply(
    99 - 77x + 77x +
                summary_table_out,
    100 - 77x + 77x +
                1,
    101 - 77x + 77x +
                function(x) {
    102 - 139x + 139x +
                  tags$tr(
    103 - 139x + 139x +
                    tagList(
    104 - 139x + 139x +
                      tags$td(
    105 - 139x + 139x +
                        if (all(x[-1] == "")) {
    106 - 5x + 5x +
                          icon(
    107 - 5x + 5x +
                            name = "fas fa-exclamation-triangle",
    108 - 5x + 5x +
                            title = "Unsupported dataset",
    109 - 5x + 5x +
                            `data-container` = "body",
    110 - 5x + 5x +
                            `data-toggle` = "popover",
    111 - 5x + 5x +
                            `data-content` = "object not supported by the data_summary module"
    @@ -42645,7 +43941,8 @@

    teal coverage - 59.73%

    114 - 139x + 139x +
                        x[1]
    @@ -42659,7 +43956,8 @@

    teal coverage - 59.73%

    116 - 139x + 139x +
                      lapply(x[-1], tags$td)
    @@ -42701,14 +43999,16 @@

    teal coverage - 59.73%

    122 - 77x + 77x +
              header_labels <- names(summary_table())
    123 - 77x + 77x +
              header_html <- tags$tr(tagList(lapply(header_labels, tags$td)))
    @@ -42722,28 +44022,32 @@

    teal coverage - 59.73%

    125 - 77x + 77x +
              table_html <- tags$table(
    126 - 77x + 77x +
                class = "table custom-table",
    127 - 77x + 77x +
                tags$thead(header_html),
    128 - 77x + 77x +
                tags$tbody(body_html)
    @@ -42757,7 +44061,8 @@

    teal coverage - 59.73%

    130 - 77x + 77x +
              table_html
    @@ -42785,7 +44090,8 @@

    teal coverage - 59.73%

    134 - 76x + 76x +
          summary_table # testing purpose
    @@ -42834,14 +44140,16 @@

    teal coverage - 59.73%

    141 - 77x + 77x +
      datanames <- teal.data::datanames(teal_data())
    142 - 77x + 77x +
      joinkeys <- teal.data::join_keys(teal_data())
    @@ -42855,28 +44163,32 @@

    teal coverage - 59.73%

    144 - 77x + 77x +
      filtered_data_objs <- sapply(
    145 - 77x + 77x +
        datanames,
    146 - 77x + 77x +
        function(name) teal.code::get_var(teal_data(), name),
    147 - 77x + 77x +
        simplify = FALSE
    @@ -42890,7 +44202,8 @@

    teal coverage - 59.73%

    149 - 77x + 77x +
      unfiltered_data_objs <- teal.code::get_var(teal_data(), ".raw_data")
    @@ -42904,28 +44217,32 @@

    teal coverage - 59.73%

    151 - 77x + 77x +
      rows <- lapply(
    152 - 77x + 77x +
        datanames,
    153 - 77x + 77x +
        function(dataname) {
    154 - 139x + 139x +
          parent <- teal.data::parent(joinkeys, dataname)
    @@ -42974,14 +44291,16 @@

    teal coverage - 59.73%

    161 - 139x + 139x +
          subject_keys <- if (length(parent) > 0) {
    162 - 7x + 7x +
            names(joinkeys[dataname, parent])
    @@ -42995,7 +44314,8 @@

    teal coverage - 59.73%

    164 - 132x + 132x +
            joinkeys[dataname, dataname]
    @@ -43009,35 +44329,40 @@

    teal coverage - 59.73%

    166 - 139x + 139x +
          get_object_filter_overview(
    167 - 139x + 139x +
            filtered_data = filtered_data_objs[[dataname]],
    168 - 139x + 139x +
            unfiltered_data = unfiltered_data_objs[[dataname]],
    169 - 139x + 139x +
            dataname = dataname,
    170 - 139x + 139x +
            subject_keys = subject_keys
    @@ -43072,14 +44397,16 @@

    teal coverage - 59.73%

    175 - 77x + 77x +
      unssuported_idx <- vapply(rows, function(x) all(is.na(x[-1])), logical(1)) # this is mainly for vectors
    176 - 77x + 77x +
      do.call(rbind, c(rows[!unssuported_idx], rows[unssuported_idx]))
    @@ -43135,21 +44462,24 @@

    teal coverage - 59.73%

    184 - 139x + 139x +
      if (inherits(filtered_data, c("data.frame", "DataFrame", "array", "Matrix", "SummarizedExperiment"))) {
    185 - 134x + 134x +
        get_object_filter_overview_array(filtered_data, unfiltered_data, dataname, subject_keys)
    186 - 5x + 5x +
      } else if (inherits(filtered_data, "MultiAssayExperiment")) {
    @@ -43170,42 +44500,48 @@

    teal coverage - 59.73%

    189 - 5x + 5x +
        data.frame(
    190 - 5x + 5x +
          dataname = dataname,
    191 - 5x + 5x +
          obs = NA,
    192 - 5x + 5x +
          obs_filtered = NA,
    193 - 5x + 5x +
          subjects = NA,
    194 - 5x + 5x +
          subjects_filtered = NA
    @@ -43275,49 +44611,56 @@

    teal coverage - 59.73%

    204 - 134x + 134x +
      if (length(subject_keys) == 0) {
    205 - 121x + 121x +
        data.frame(
    206 - 121x + 121x +
          dataname = dataname,
    207 - 121x + 121x +
          obs = ifelse(!is.null(nrow(unfiltered_data)), nrow(unfiltered_data), NA),
    208 - 121x + 121x +
          obs_filtered = nrow(filtered_data),
    209 - 121x + 121x +
          subjects = NA,
    210 - 121x + 121x +
          subjects_filtered = NA
    @@ -43338,42 +44681,48 @@

    teal coverage - 59.73%

    213 - 13x + 13x +
        data.frame(
    214 - 13x + 13x +
          dataname = dataname,
    215 - 13x + 13x +
          obs = ifelse(!is.null(nrow(unfiltered_data)), nrow(unfiltered_data), NA),
    216 - 13x + 13x +
          obs_filtered = nrow(filtered_data),
    217 - 13x + 13x +
          subjects = nrow(unique(unfiltered_data[subject_keys])),
    218 - 13x + 13x +
          subjects_filtered = nrow(unique(filtered_data[subject_keys]))
    @@ -44016,35 +45365,40 @@

    teal coverage - 59.73%

    41 - 9x + 9x +
      ns <- shiny::NS(id)
    42 - 9x + 9x +
      shiny::div(
    43 - 9x + 9x +
        id = ns("content"),
    44 - 9x + 9x +
        style = "display: inline-block; width: 100%;",
    45 - 9x + 9x +
        uiOutput(ns("data"))
    @@ -44086,14 +45440,16 @@

    teal coverage - 59.73%

    51 - 78x + 78x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    52 - 78x + 78x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module", "reactive"))
    @@ -44107,14 +45463,16 @@

    teal coverage - 59.73%

    54 - 78x + 78x +
      moduleServer(id, function(input, output, session) {
    55 - 78x + 78x +
        logger::log_debug("srv_data initializing.")
    @@ -44135,49 +45493,56 @@

    teal coverage - 59.73%

    58 - 78x + 78x +
        data_out <- if (inherits(data, "teal_data_module")) {
    59 - 10x + 10x +
          output$data <- renderUI(data$ui(id = session$ns("teal_data_module")))
    60 - 10x + 10x +
          data$server("teal_data_module")
    61 - 78x + 78x +
        } else if (inherits(data, "teal_data")) {
    62 - 39x + 39x +
          reactiveVal(data)
    63 - 78x + 78x +
        } else if (test_reactive(data)) {
    64 - 29x + 29x +
          data
    @@ -44198,14 +45563,16 @@

    teal coverage - 59.73%

    67 - 77x + 77x +
        data_handled <- reactive({
    68 - 70x + 70x +
          tryCatch(data_out(), error = function(e) e)
    @@ -44233,63 +45600,72 @@

    teal coverage - 59.73%

    72 - 77x + 77x +
        observeEvent(data_handled(), {
    73 - 70x + 70x +
          if (inherits(data_handled(), "teal_data")) {
    74 - 65x + 65x +
            app_session <- .subset2(shiny::getDefaultReactiveDomain(), "parent")
    75 - 65x + 65x +
            setBookmarkExclude(
    76 - 65x + 65x +
              session$ns(
    77 - 65x + 65x +
                grep(
    78 - 65x + 65x +
                  pattern = "teal_data_module-",
    79 - 65x + 65x +
                  x = names(reactiveValuesToList(input)),
    80 - 65x + 65x +
                  value = TRUE
    @@ -44310,7 +45686,8 @@

    teal coverage - 59.73%

    83 - 65x + 65x +
              session = app_session
    @@ -44345,7 +45722,8 @@

    teal coverage - 59.73%

    88 - 77x + 77x +
        data_handled
    @@ -44408,7 +45786,8 @@

    teal coverage - 59.73%

    97 - 65x + 65x +
      hashes <- .get_hashes_code(data)
    @@ -44422,70 +45801,80 @@

    teal coverage - 59.73%

    99 - 65x + 65x +
      tdata <- do.call(
    100 - 65x + 65x +
        teal.data::teal_data,
    101 - 65x + 65x +
        c(
    102 - 65x + 65x +
          list(code = trimws(c(teal.code::get_code(data), hashes), which = "right")),
    103 - 65x + 65x +
          list(join_keys = teal.data::join_keys(data)),
    104 - 65x + 65x +
          sapply(
    105 - 65x + 65x +
            ls(teal.code::get_env(data)),
    106 - 65x + 65x +
            teal.code::get_var,
    107 - 65x + 65x +
            object = data,
    108 - 65x + 65x +
            simplify = FALSE
    @@ -44520,14 +45909,16 @@

    teal coverage - 59.73%

    113 - 65x + 65x +
      tdata@verified <- data@verified
    114 - 65x + 65x +
      tdata
    @@ -44611,28 +46002,32 @@

    teal coverage - 59.73%

    126 - 65x + 65x +
      vapply(
    127 - 65x + 65x +
        datanames,
    128 - 65x + 65x +
        function(dataname, datasets) {
    129 - 115x + 115x +
          x <- data[[dataname]]
    @@ -44646,21 +46041,24 @@

    teal coverage - 59.73%

    131 - 115x + 115x +
          code <- if (is.function(x) && !is.primitive(x)) {
    132 - 4x + 4x +
            x <- deparse1(x)
    133 - 4x + 4x +
            bquote(rlang::hash(deparse1(.(as.name(dataname)))))
    @@ -44674,7 +46072,8 @@

    teal coverage - 59.73%

    135 - 111x + 111x +
            bquote(rlang::hash(.(as.name(dataname))))
    @@ -44688,35 +46087,40 @@

    teal coverage - 59.73%

    137 - 115x + 115x +
          sprintf(
    138 - 115x + 115x +
            "stopifnot(%s == %s) # @linksto %s",
    139 - 115x + 115x +
            deparse1(code),
    140 - 115x + 115x +
            deparse1(rlang::hash(x)),
    141 - 115x + 115x +
            dataname
    @@ -44737,14 +46141,16 @@

    teal coverage - 59.73%

    144 - 65x + 65x +
        character(1L),
    145 - 65x + 65x +
        USE.NAMES = TRUE
    @@ -44820,28 +46226,32 @@

    teal coverage - 59.73%

    8 - 1x + 1x +
      libraries <- vapply(
    9 - 1x + 1x +
        utils::sessionInfo()$otherPkgs,
    10 - 1x + 1x +
        function(x) {
    11 - 6x + 6x +
          paste0("library(", x$Package, ")")
    @@ -44855,7 +46265,8 @@

    teal coverage - 59.73%

    13 - 1x + 1x +
        character(1)
    @@ -44869,7 +46280,8 @@

    teal coverage - 59.73%

    15 - 1x + 1x +
      paste0(paste0(rev(libraries), sep = "\n"), collapse = "")
    @@ -44918,21 +46330,24 @@

    teal coverage - 59.73%

    22 - 5x + 5x +
      code_string <- getOption("teal.load_nest_code")
    23 - 5x + 5x +
      if (is.character(code_string)) {
    24 - 2x + 2x +
        code_string
    @@ -44946,7 +46361,8 @@

    teal coverage - 59.73%

    26 - 3x + 3x +
        "# Add any code to install/load your NEST environment here\n"
    @@ -45162,14 +46578,16 @@

    teal coverage - 59.73%

    28 - 2x + 2x +
      expr <- substitute(expr)
    29 - 2x + 2x +
      extras <- list(...)
    @@ -45190,14 +46608,16 @@

    teal coverage - 59.73%

    32 - 2x + 2x +
      if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
    33 - 2x + 2x +
        expr <- call("{", expr)
    @@ -45218,7 +46638,8 @@

    teal coverage - 59.73%

    36 - 2x + 2x +
      calls <- as.list(expr)[-1]
    @@ -45239,7 +46660,8 @@

    teal coverage - 59.73%

    39 - 2x + 2x +
      calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
    @@ -45253,7 +46675,8 @@

    teal coverage - 59.73%

    41 - 2x + 2x +
      eval_code(object = data, code = as.expression(calls))
    @@ -45699,14 +47122,16 @@

    teal coverage - 59.73%

    22 - 2x + 2x +
      packageStartupMessage(
    23 - 2x + 2x +
        "\nYou are using teal version ",
    @@ -45727,7 +47152,8 @@

    teal coverage - 59.73%

    26 - 2x + 2x +
        read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
    @@ -45985,21 +47411,24 @@

    teal coverage - 59.73%

    23 - 7x + 7x +
      checkmate::assert_string(label)
    24 - 5x + 5x +
      checkmate::assert_list(server_args, names = "named")
    25 - 5x + 5x +
      checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
    @@ -46013,7 +47442,8 @@

    teal coverage - 59.73%

    27 - 3x + 3x +
      message("Initializing reporter_previewer_module")
    @@ -46027,7 +47457,8 @@

    teal coverage - 59.73%

    29 - 3x + 3x +
      srv <- function(id, reporter, ...) {
    @@ -46055,7 +47486,8 @@

    teal coverage - 59.73%

    33 - 3x + 3x +
      ui <- function(id, ...) {
    @@ -46083,28 +47515,32 @@

    teal coverage - 59.73%

    37 - 3x + 3x +
      module <- module(
    38 - 3x + 3x +
        label = "temporary label",
    39 - 3x + 3x +
        server = srv, ui = ui,
    40 - 3x + 3x +
        server_args = server_args, ui_args = list(), datanames = NULL
    @@ -46132,28 +47568,32 @@

    teal coverage - 59.73%

    44 - 3x + 3x +
      class(module) <- c(class(module), "teal_module_previewer")
    45 - 3x + 3x +
      module$label <- label
    46 - 3x + 3x +
      attr(module, "teal_bookmarkable") <- TRUE
    47 - 3x + 3x +
      module
    @@ -46215,42 +47655,48 @@

    teal coverage - 59.73%

    7 - 938x + 938x +
      if (!isTRUE(checkmate::test_class(x, classes = "reactive", null.ok = null.ok))) {
    8 - 4x + 4x +
        cl <- class(x)
    9 - 4x + 4x +
        return(sprintf(
    10 - 4x + 4x +
          "Must be a reactive (i.e. inherit from 'reactive' class) but has class%s '%s'",
    11 - 4x + 4x +
          if (length(cl) > 1L) "es" else "",
    12 - 4x + 4x +
          paste0(cl, collapse = "','")
    @@ -46271,7 +47717,8 @@

    teal coverage - 59.73%

    15 - 934x + 934x +
      return(TRUE)
    @@ -46299,7 +47746,8 @@

    teal coverage - 59.73%

    19 - 29x + 29x +
      isTRUE(check_reactive(x, null.ok = null.ok))
    @@ -46404,77 +47852,88 @@

    teal coverage - 59.73%

    34 - 40x + 40x +
      tryCatch(
    35 - 40x + 40x +
        x,
    36 - 40x + 40x +
        error = function(e) {
    37 - 2x + 2x +
          stop(
    38 - 2x + 2x +
            "\n",
    39 - 2x + 2x +
            pre,
    40 - 2x + 2x +
            "\n",
    41 - 2x + 2x +
            e$message,
    42 - 2x + 2x +
            "\n",
    43 - 2x + 2x +
            post,
    44 - 2x + 2x +
            call. = FALSE
    @@ -46502,7 +47961,8 @@

    teal coverage - 59.73%

    48 - 38x + 38x +
      x
    diff --git a/main/index.html b/main/index.html index 1bee88da24..e351b21440 100644 --- a/main/index.html +++ b/main/index.html @@ -1,5 +1,4 @@ - - + @@ -83,7 +82,24 @@
  • Non-CRAN unit test report
  • - + + + @@ -75,62 +117,96 @@

    Changelog

    -

    teal 0.15.2.9078

    +

    teal 0.15.2.9078 +

    -

    New features

    -
    • Possible to call ui_teal and srv_teal directly in any application by delivering data argument as a reactive returning teal_data object. #669
    • -
    • Introduced teal_transform_module to provide a way to interactively modify data delivered to teal_module’s server. #1228
    • +

      New features +

      +
        +
      • Possible to call ui_teal and srv_teal directly in any application by delivering data argument as a reactive returning teal_data object. #669 +
      • +
      • Introduced teal_transform_module to provide a way to interactively modify data delivered to teal_module’s server. #1228 +
      • Introduced a new argument once = FALSE in teal_data_module to possibly reload data during a run time.
      • -
      • Possibility to download lockfile to restore app session for reproducibility. #479
      • +
      • Possibility to download lockfile to restore app session for reproducibility. #479 +
      • Introduced a function set_datanames() to change a datanames of the teal_module.
      • Datasets which name starts with . are ignored when module’s datanames is set as "all".
      • -
    + +
    -

    Breaking changes

    -
    • Setting datanames() on data passed to teal application no longer has effect. In order to change teal_module’s datanames one should modify module$datanames.
    • +

      Breaking changes +

      +
        +
      • Setting datanames() on data passed to teal application no longer has effect. In order to change teal_module’s datanames one should modify module$datanames.
      • The landing_popup_module() needs to be passed as the landing_popup argument of init instead of being passed as a module of the modules argument of init.
      • teal no longer re-export %>%. Please load library(magrittr) instead or use |> from base.
      • -
    + +
    -

    Enhancement

    -
    • Enhanced a system of data validation and a display of error messages.
    • -
    • Easier way of to call javascript events by setting $(document).ready(function() { ... }). #1114
    • +

      Enhancement +

      +
        +
      • Enhanced a system of data validation and a display of error messages.
      • +
      • Easier way of to call javascript events by setting $(document).ready(function() { ... }). #1114 +
      • Provided progress bar for modules loading and data filtering during teal app startup.
      • Filter mapping display has a separate icon in the tab.
      • Environment of the data passed to the teal_module’s server consists unfiltered datasets contained in .raw_data.
      • -
    + +
    -

    teal 0.15.2

    CRAN release: 2024-03-07

    -
    -

    Bug fixes

    -
    • Fixed a bug in handling datanames of modules that crashed module-specific applications when filtering child datasets.
    • -
    +

    teal 0.15.2 +

    +

    CRAN release: 2024-03-07

    +
    +

    Bug fixes +

    +
      +
    • Fixed a bug in handling datanames of modules that crashed module-specific applications when filtering child datasets.
    • +
    +
    -

    teal 0.15.1

    CRAN release: 2024-02-22

    -
    -

    Bug fixes

    -
    • Fixed a bug that stopped the module_specific feature when a teal module specified datanames of length more than 1.
    • -
    +

    teal 0.15.1 +

    +

    CRAN release: 2024-02-22

    +
    +

    Bug fixes +

    +
      +
    • Fixed a bug that stopped the module_specific feature when a teal module specified datanames of length more than 1.
    • +
    +
    -

    Miscellaneous

    -
    • Updated links in vignettes
    • -
    +

    Miscellaneous +

    +
      +
    • Updated links in vignettes
    • +
    +
    -

    teal 0.15.0

    CRAN release: 2024-02-08

    -
    -

    New features

    -
    • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
    • +

      teal 0.15.0 +

      +

      CRAN release: 2024-02-08

      +
      +

      New features +

      +
        +
      • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
      • Filter state snapshots can now be uploaded from file. See ?snapshot.
      • Added as_tdata function to facilitate migration of modules to the new teal_data class.
      • Added build_app_title function to facilitate adding favicons to app title.
      • -
      +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • data argument in init now accepts only teal_data and teal_data_module.
      • tdata has been deprecated and replaced with teal_data. Support for tdata passed to the data argument in module(server) will be removed in the next release.
      • @@ -139,114 +215,166 @@

        Breaking changes -

        Miscellaneous

        -
        • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
        • +

          Miscellaneous +

          +
            +
          • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
          • Added argument to teal_slices and made modifications to init to enable tagging teal_slices with an app id to safely upload snapshots from disk.
          • FilteredData no longer stores pre-processing code in specific slots. Code is now attached as attribute. Adjusted appropriately.
          • -

    + +
    -

    Bug fixes

    -
    • Removed Report previewer module from mapping matrix display in filter manager.
    • +

      Bug fixes +

      +
        +
      • Removed Report previewer module from mapping matrix display in filter manager.
      • Specified minimal version of package dependencies.
      • -
    + +
    -

    teal 0.14.0

    +

    teal 0.14.0 +

    -

    New features

    -
    • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
    • +

      New features +

      +
        +
      • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
      • Enabled capturing and resetting application filter state with snapshots. See ?snapshot.
      • Enabled reporter_previewer_module to customize default values through srv_args.
      • Enabled passing own reporter_previewer_module in a list of modules to override default one.
      • -
    + +
    -

    Breaking changes

    -
    • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
    • +

      Breaking changes +

      +
        +
      • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
      • Soft deprecated filters argument in module and replaced it with datanames. Details in documentation of teal::module
      • -
    + +
    -

    Miscellaneous

    -
    • Removed scda package dependency from examples.
    • +

      Miscellaneous +

      +
        +
      • Removed scda package dependency from examples.
      • Updated the header tag style to enhance element containment.
      • -
    + +
    -

    teal 0.13.0

    +

    teal 0.13.0 +

    -

    Breaking changes

    -
    • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
    • +

      Breaking changes +

      +
        +
      • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
      • Due to deprecation of chunks in teal.code, the teal framework now uses their replacement (qenv) instead. The documentation in teal has been updated to reflect this and custom modules written with chunks should be updated to use qenv.
      • Due to deprecation of chunks in teal.code, get_rcode, get_rcode_srv, and get_rcode_ui have been removed.
      • -
    + +
    -

    New features

    -
    • Added the validate_inputs function that transfers input validation messages to app output.
    • +

      New features +

      +
        +
      • Added the validate_inputs function that transfers input validation messages to app output.
      • modules argument of init accepts teal_module type of object. There is no need to wrap up a single module in modules() or list().
      • Updated module_nested_tabs so that only active modules are calculated in a teal app.
      • -
    + +
    -

    Miscellaneous

    -
    • Updated examples to use scda.2022.
    • +

      Miscellaneous +

      +
        +
      • Updated examples to use scda.2022.
      • Added R session information into a link in the footer of teal applications.
      • Added data hashing step using rlang instead of digest package to calculate the hash (which has been moved from teal.data and teal.slice). There is now an explicit hashing check in the reproducible code output.
      • Removed deprecated functions: root_modules, default_filter, bookmarkableShinyApp, as well as deprecated logging mechanism, including the functions log_app_usage and .log.
      • Updated the “Teal and Bootstrap Themes” vignette to provide more details customizing a teal app with bslib::run_with_themer.
      • Removed outdated diagram from srv_nested_tabs documentation.
      • Changed default values of header and footer arguments in init to empty text.
      • -
    + +
    -

    teal 0.12.0

    -
    -

    New features

    -
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • -
    +

    teal 0.12.0 +

    +
    +

    New features +

    +
      +
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • +
    +
    -

    Enhancements

    -
    • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
    • +

      Enhancements +

      +
        +
      • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
      • Updated teal_module to have data argument which receives a list of reactive filter data with "code" and "join_keys" attributes.
      • Updated teal_module to have filter_panel_api argument which receives a FilterPanelAPI object.
      • Updated the internals of module_teal to reflect changes in teal.slice.
      • -
    + +
    -

    Breaking changes

    -
    • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
    • +

      Breaking changes +

      +
        +
      • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
      • Deprecated merge_expression argument in get_rcode_srv function and removed it in get_rcode function.
      • Deprecated session argument in get_rcode function.
      • -
    + +
    -

    Miscellaneous

    -
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • -
    +

    Miscellaneous +

    +
      +
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • +
    +
    -

    teal 0.11.1

    +

    teal 0.11.1 +

    -

    Enhancements

    -
    • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
    • +

      Enhancements +

      +
        +
      • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
      • Updated teal to support modules which include reporting. If any module which supports reporting is included then a reporter_previewer_module is included.
      • Added default arguments to module() and the server argument is now a function where the second argument can be ... or datasets.
      • -
    + +
    -

    Breaking changes

    -
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • -
    +

    Breaking changes +

    +
      +
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • +
    +
    -

    Miscellaneous

    -
    • Added a template to the pkgdown configuration.
    • +

      Miscellaneous +

      +
        +
      • Added a template to the pkgdown configuration.
      • Removed unneeded shinytest app tests.
      • Updated package authors.
      • Added package vignettes.
      • -
    + +
    -

    teal 0.11.0

    -
    +

    The teal package contains the code to create apps (teal::init), to create a module (teal::module) and to group modules in the app (teal::modules). teal depends on teal.transform and teal.data which contain the functions that teal app creators are likely to need. The other package teal only imports from and therefore teal module creators should either fully specify functions from these packages when required or import them into custom packages as library(teal) will not load them.

    +
    +

    New features +

    +
      +
    • A simple new teal module named example_module has been included in the package.
    • +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • teal package has been split into multiple smaller packages, see above.
      • Deprecated root_modules function, users should use modules directly inside init.
      • Due to deprecation of root_modules any label argument to modules must be explicitly named. For example modules("lab", mod1, mod2) should be replaced with modules(label = "lab", mod1, mod2).
      • -
    + +
    -

    Miscellaneous

    -
    • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
    • +

      Miscellaneous +

      +
        +
      • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
      • MultiAssayExperiment is now suggested packages, not required. Objects dependent on MultiAssayExperiment are changed to lazy-load this now suggested package.
      • -
    + +
    -

    Bug fixes

    -
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • -
    +

    Bug fixes +

    +
      +
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • +
    +
    -

    teal 0.10.1

    +

    teal 0.10.1 +

    -

    Breaking changes

    -
    • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
    • +

      Breaking changes +

      +
        +
      • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
      • Deprecated all functions related to connectors that have been moved to their own separate packages.
      • Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational.
      • Removed rcd_connection and rcd_data; scda_dataset_connectors can be passed into cdisc_data and teal_data directly.
      • Replaced rcd_dataset_connector and rcd_cdisc_dataset_connector with scda_dataset_connector and scda_cdisc_dataset_connector respectively.
      • Renamed teal_show_js_log option into teal.show_js_log to match options naming convention.
      • Removed %is_in% and stop_shiny internal utility functions.
      • -
    + +
    -

    New features

    +

    New features +

    -
    Logging
    -
    • Added support for logging using the logger package.
    • +
      Logging +
      +
        +
      • Added support for logging using the logger package.
      • Added a new function register_logger, which registers a logger in a given namespace.
      • Added trace and info levels log messages to the teal framework.
      • Added pid and shiny session token into footnote so app developers can identify logs for apps.
      • -
    + +
    -
    Other
    -
    • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

    • +
      Other +
      +
        +
      • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

      • Added public facing constructor functions for CDISCDataConnector, RelationalDataConnector, and DataConnection classes.

      • Modified data_extract_spec to allow both the filter and select parameters to be NULL, which results in the data_extract_ui acting as if a filter_spec with all variables as possible choices had been supplied as the filter argument and a select_spec with the multiple parameter set to TRUE had been supplied as the select argument.

      • Added support of the full screen for a module when the filters argument is equal NULL.

      • @@ -313,11 +464,14 @@
        Other -

        Bug fixes

        -
    + +
    -

    teal 0.10.0

    +

    teal 0.10.0 +

    -

    New features

    -
    • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
    • +

      New features +

      +
        +
      • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
      • Refactored filter panel to use MultiAssayExperiment objects. Filters can be set on a subject level (colData of MAE object) and on a experiment level (colData and rowData of an assay).
      • Added cdse_dataset_connector to create delayed data objects from CDSE.
      • Added datasetdb_dataset_connector to create delayed data objects from DataSetDB.
      • Added ricepass_connection to create delayed data objects from entimICE via ricepass.
      • Refactor of the filter panel: -
        • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
        • +
            +
          • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
          • Dataset type determines an appearance and a functionality of related filters and filters summary.
          • Datasets are passed (by reference) from DDL to FilteredData skipping extracting data and their attributes.
          • Redesigned variable filter labels in “Active Filter Variables” panel.
          • Fully testable server functions.
          • -
          -
    + + + +
    -

    Bug fixes

    -
    • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
    • +

      Bug fixes +

      +
        +
      • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
      • Fixed a bug that caused the output of get_code function to not reproduce its raw data set.
      • Changed filter_spec to allow no variable selection upon app initialization, where the first possible value was previously selected.
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal 0.9.5

    +

    teal 0.9.5 +

    -

    Enhancements

    -
    • Added informational stop message when using mutate_data with RelationalDataConnector.
    • +

      Enhancements +

      +
        +
      • Added informational stop message when using mutate_data with RelationalDataConnector.
      • Modified as_cdisc to behave similarly to cdisc_dataset when called on a Dataset object.
      • Changed the displayed format of the data name and the column name in data_extract_spec UI elements. Both are now compressed to <data name>.<column name> if they don’t change during runtime of the app.
      • Added ADSAFTTE to the list of recognized ADaM dataset names.
      • Added another example to data_extract_spec’s doc string showcasing app users can choose a variable used for filtering in the encoding panel.
      • Added CSS styling to tool tips in teal modules.
      • -
    + +
    -

    Bug fixes

    -
    • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
    • +

      Bug fixes +

      +
        +
      • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
      • Fixed a bug that crashes app whenever a Date or datetime column is selected from a filter_spec.
      • -
    + +
    -

    teal 0.9.4

    +

    teal 0.9.4 +

    -

    Enhancements

    -
    • Released snowflake connection and connectors.
    • +

      Enhancements +

      +
        +
      • Released snowflake connection and connectors.
      • Changed ordering of datasets to be more intuitive (topologically first for CDISC datasets only and then according to input datasets order).
      • When closing a teal app (ending a user shiny session), all DataConnections will now try to close their connections.
      • Added ADHY keys to configuration file.
      • Extended the filter_spec function: the parameter choices is no longer mandatory (the function will take all possible choices by default) and the vars parameter additionally accepts the choices_selected and allows to change the variables for filtering using the UI elements in the encoding panel.
      • -
    + +
    -

    Bug fixes

    -
    • Cleaned up imports in the package.
    • -
    • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
    • +

      Bug fixes +

      +
        +
      • Cleaned up imports in the package.
      • +
      • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
        +
      • Fixed issue with cloning Callable class.
      • -
    + +
    -

    teal 0.9.3

    +

    teal 0.9.3 +

    -

    New Features

    -
    • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
    • +

      New Features +

      +
        +
      • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
      • New JoinKeys class (with join_keys() constructors and join_key() constructor for its elements) to store joining key columns between datasets.
      • Refactored the most basic dataset() constructor, added cdisc_dataset() constructor and as_cdisc() conversion function.
      • Soft-deprecate removed class constructors and obsolete functions (e.g. keys()).
      • Added get_keys() and set_keys() functions to extract and manipulate datasets primary keys respectively.
      • Unexported filtered_data_new, filtered_data_set and filtered_data_set_filters.
      • -
    + +
    -

    Bug fixes

    -
    • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
    • +

      Bug fixes +

      +
        +
      • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
      • Added ability to press “Enter” key without having to set focus to the Submit button for delayed data loading.
      • Allow variable_choices to use datasets with missing labels.
      • Fixed bug that ignores input of NULL to selected argument of select_spec function.
      • -
    + +
    -

    Enhancements

    -
    • Added button to remove all active filters from the Filter Panel.
    • -
    +

    Enhancements +

    +
      +
    • Added button to remove all active filters from the Filter Panel.
    • +
    +
    -

    teal 0.9.2

    +

    teal 0.9.2 +

    -

    New Features

    -
    • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
    • +

      New Features +

      +
        +
      • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
      • NOTE: python_dataset_connector is not yet ready to be deployed on RSConnect because it does not contain numpy and pandas, which are Python libraries used in python_dataset_connector.
      • Added support for filtering on Date and Datetime variables in the Filter Panel.
      • Added buttons for date and datetime filter widgets to reset the value to the original.
      • Added new function check_key_duplicates, which creates a short summary about rows with duplicated primary key (row numbers and the number of duplicates)
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    • Removed include_factors option in get_class_colnames in RawDataset.
    • -
    +

    Miscellaneous +

    +
      +
    • Removed include_factors option in get_class_colnames in RawDataset.
    • +
    +
    -

    teal 0.9.1

    -
    • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
    • +

      teal 0.9.1 +

      +
        +
      • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
      • Nested tabs module now has better alignment with the filter panel on the page.
      • Allow width argument in optionalSelectInput.
      • Added lifecycle badges to all exported functions.
      • @@ -494,10 +704,13 @@

        teal 0.9.1 -

        teal 0.9.0

        -
        • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

        • +

          teal 0.9.0 +

          +
            +
          • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

          • A new teal_data function to include datasets and connectors into teal application.

          • cdisc_data function to include datasets and connectors into teal application where a check argument still could be used and other consistency tests are performed.

          • get_raw_data can be used to derive raw data from R6 objects e.g. (RelationalDataset).

          • @@ -518,91 +731,133 @@

            teal 0.9.0 -

            Refactor of FilteredData (for developers)

            -
            • +
            +
            +

            Refactor of FilteredData (for developers) +

            +
              +
            • FilteredData is now fully reactive. Now filtered data is lazy evaluated as per need. This further opens the door to bookmarking teal apps (bookmarking currently works for the right filtering panel, but we will make this feature more sophisticated in a future release, each module must be reviewed and adapted if it contains reactiveValues).
            • Datasets and materialized connectors are provided to FilteredData by set_datasets_data function located in init_datasets.R file.
            • Renamed get_dataset() method to get_data().
            • Renamed get_filter_call() method to get_filter_expr(); returns an expression rather than a list.
            • Removed argument isolate from get_data() method and similar methods. You must isolate it yourself as needed. If you want to temporarily deactivate shiny errors due to missing errors, you can set options(shiny.suppressMissingContextError = TRUE). In general, avoid isolate as this breaks reactivity.
            • We added a development module to add several filters at once, e.g. safety filters. This is to be evaluated before it is converted into a proper module and made available to end-users.
            • -
            +

          +

    -

    teal 0.8.5

    -
    • UI bug fix to hide filter elements for not used datasets.
    • -
    +

    teal 0.8.5 +

    +
      +
    • UI bug fix to hide filter elements for not used datasets.
    • +
    +
    -

    teal 0.8.4

    -
    • Progress bar for UI creation in delayed loading module.
    • +

      teal 0.8.4 +

      +
        +
      • Progress bar for UI creation in delayed loading module.
      • Change output of keys function to keys object.
      • Delayed version of choices_selected.
      • Fix an error in choices_selected when selected is not in choices.
      • Fix pickerInput not to display column name as label if it’s missing.
      • -
    + +
    -

    teal 0.8.3

    -
    • Enable teal app to initialize without data. The data are then loaded from within the teal app.
    • +

      teal 0.8.3 +

      +
        +
      • Enable teal app to initialize without data. The data are then loaded from within the teal app.
      • New classes (DatasetConnector, DataConnector) to connect to various data sources, including: * connector to rice API - rice_data and rice_dataset_connector * connector to RDS files - rds_data and rds_dataset_connector
      • Message appears at bottom right of shiny app when shiny is busy to update the views.
      • Remove labels argument of cdisc_data function. Labels should now already be present in the data passed to the cdisc_data function. This can be achieved using the var_relabel function.
      • -
    + +
    -

    teal 0.8.2

    -
    • Fixed several BUGS in optionalSelectInput and improved inputs look.
    • +

      teal 0.8.2 +

      +
        +
      • Fixed several BUGS in optionalSelectInput and improved inputs look.
      • Added get_data_labels function to FilteredData class.
      • Improved sep passing within data_extract_spec.
      • -
    + +
    -

    teal 0.8.1

    -
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • -
    +

    teal 0.8.1 +

    +
      +
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • +
    +
    -

    teal 0.8.0

    -
    • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
    • +

      teal 0.8.0 +

      +
        +
      • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
      • Possibility to load custom .css and .js files.
      • Renamed columns_spec to select_spec.
      • Show number of observations on filter panel.
      • Add labeling functions variable_choices and value_choices.
      • -
    + +
    -

    teal 0.7.0

    -
    • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
    • +

      teal 0.7.0 +

      +
        +
      • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
      • Moved teal.utils functions to teal: log_app_usage, stop_shiny.
      • Added *_spec functions.
      • Improvements on usage of PickerInput and SelectInput.
      • -
    + +
    -

    teal 0.6.0

    -
    • Removed deprecated functions tab*.
    • +

      teal 0.6.0 +

      +
        +
      • Removed deprecated functions tab*.
      • Removed data generation functions including generate_sample_data.
      • Incorporate shinyjs package.
      • Added “Copy R code to clipboard” button.
      • -
    + +
    -

    teal 0.0.5

    -
    • Added limit to data_table with scrolling, preventing overlap of UI elements.
    • +

      teal 0.0.5 +

      +
        +
      • Added limit to data_table with scrolling, preventing overlap of UI elements.
      • Boolean filtering.
      • -
    + +
    -

    teal 0.0.4

    -
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • -
    +

    teal 0.0.4 +

    +
      +
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • +
    +
    -

    teal 0.0.3

    -
    • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
    • -
    -
    New features
    -
    • +

      teal 0.0.3 +

      +
        +
      • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
      • +
      +
      +
      New features +
      +
        +
      • tm_scatterplot module.
      • tm_table module.
      • -
      +
    +
    -
    Changes
    -
    • All tabs arguments were renamed to modules.
    • +
      Changes +
      +
        +
      • All tabs arguments were renamed to modules.
      • tab_item function is now called module.
      • @@ -615,30 +870,39 @@
        Changes -

        teal 0.0.2

        -
        • New ‘01_getting_started’ vignette.
        • +

          teal 0.0.2 +

          +
            +
          • New ‘01_getting_started’ vignette.
          • Datanames in FilteredData are now case sensitive.
          • -
    + +
    -

    teal 0.0.1

    -
    • March 28, 2016 - Initial Release.
    • -
    +

    teal 0.0.1 +

    +
      +
    • March 28, 2016 - Initial Release.
    • +
    + + + - + + - + + diff --git a/main/reference/TealAppDriver.html b/main/reference/TealAppDriver.html index 732a806680..f44d4dde73 100644 --- a/main/reference/TealAppDriver.html +++ b/main/reference/TealAppDriver.html @@ -1,7 +1,23 @@ - -Drive a teal application — TealAppDriver • teal + + + + + + +Drive a teal application — TealAppDriver • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -84,21 +128,26 @@

    Drive a teal application

    -

    Details

    +

    Details +

    Extension of the shinytest2::AppDriver class with methods for driving a teal application for performing interactions for shinytest2 tests.

    -

    Super class

    +

    Super class +

    shinytest2::AppDriver -> TealAppDriver

    +

    Inherited methods


    -

    Method new()

    -

    Initialize a TealAppDriver object for testing a teal application.

    -

    Usage

    -

    TealAppDriver$new(
    +

    +
    +
    +

    Method new() +

    +

    Initialize a TealAppDriver object for testing a teal application.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$new(
       data,
       modules,
       filter = teal_slices(),
    @@ -174,95 +233,168 @@ 

    Usage

    timeout = rlang::missing_arg(), load_timeout = rlang::missing_arg(), ... -)

    +)
    +

    +
    -

    Arguments

    -

    data, modules, filter, title, header, footer, landing_popup
    +

    Arguments +

    +

    +
    +
    +
    data, modules, filter, title, header, footer, landing_popup

    arguments passed to init

    timeout
    -

    (numeric) Default number of milliseconds for any timeout or +

    +

    (numeric) Default number of milliseconds for any timeout or timeout_ parameter in the TealAppDriver class. Defaults to 20s.

    See shinytest2::AppDriver new method for more details on how to change it -via options or environment variables.

    +via options or environment variables.

    +
    load_timeout
    -

    (numeric) How long to wait for the app to load, in ms. +

    +

    (numeric) How long to wait for the app to load, in ms. This includes the time to start R. Defaults to 100s.

    See shinytest2::AppDriver new method for more details on how to change it -via options or environment variables

    +via options or environment variables

    +
    ...

    Additional arguments to be passed to shinytest2::AppDriver$new

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    Object of class TealAppDriver

    -


    -

    Method click()

    -

    Append parent shinytest2::AppDriver click method with a call to waif_for_idle() method.

    -

    Usage

    -

    TealAppDriver$click(...)

    +
    +

    +
    +
    +

    Method click() +

    +

    Append parent shinytest2::AppDriver click method with a call to waif_for_idle() method.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$click(...)
    +

    +
    -

    Arguments

    -

    ...
    +

    Arguments +

    +

    +
    +
    +
    ...

    arguments passed to parent shinytest2::AppDriver click() method.

    -

    +
    +

    +
    -


    -

    Method expect_no_shiny_error()

    +
    +

    +
    +
    +

    Method expect_no_shiny_error() +

    Check if the app has shiny errors. This checks for global shiny errors. Note that any shiny errors dependent on shiny server render will only be captured after the teal module tab is visited because shiny will not trigger server computations when the tab is invisible. So, navigate to the module tab you want to test before calling this function. -Although, this catches errors hidden in the other module tabs if they are already rendered.

    -

    Usage

    -

    TealAppDriver$expect_no_shiny_error()

    +Although, this catches errors hidden in the other module tabs if they are already rendered.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$expect_no_shiny_error()
    +

    +
    -


    -

    Method expect_no_validation_error()

    -

    Check if the app has no validation errors. This checks for global shiny validation errors.

    -

    Usage

    -

    TealAppDriver$expect_no_validation_error()

    +
    +

    +
    +
    +

    Method expect_no_validation_error() +

    +

    Check if the app has no validation errors. This checks for global shiny validation errors.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$expect_no_validation_error()
    +

    +
    -


    -

    Method expect_validation_error()

    -

    Check if the app has validation errors. This checks for global shiny validation errors.

    -

    Usage

    -

    TealAppDriver$expect_validation_error()

    +
    +

    +
    +
    +

    Method expect_validation_error() +

    +

    Check if the app has validation errors. This checks for global shiny validation errors.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$expect_validation_error()
    +

    +
    -


    -

    Method set_input()

    -

    Set the input in the teal app.

    -

    Usage

    -

    TealAppDriver$set_input(input_id, value, ...)

    +
    +

    +
    +
    +

    Method set_input() +

    +

    Set the input in the teal app.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$set_input(input_id, value, ...)
    +

    +
    -

    Arguments

    -

    input_id
    +

    Arguments +

    +

    +
    +
    +
    input_id

    (character) The shiny input id with it's complete name space.

    @@ -274,23 +406,40 @@

    Arguments -

    Returns

    +

    Returns +

    The TealAppDriver object invisibly.

    -


    -

    Method navigate_teal_tab()

    -

    Navigate the teal tabs in the teal app.

    -

    Usage

    -

    TealAppDriver$navigate_teal_tab(tabs)

    +
    +

    +
    +
    +

    Method navigate_teal_tab() +

    +

    Navigate the teal tabs in the teal app.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$navigate_teal_tab(tabs)
    +

    +
    -

    Arguments

    -

    tabs
    +

    Arguments +

    +

    +
    +
    +
    tabs

    (character) Labels of tabs to navigate to. The order of the tabs is important, and it should start with the most parent level tab. Note: In case the teal tab group has duplicate names, the first tab will be selected, @@ -298,174 +447,320 @@

    Arguments

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    The TealAppDriver object invisibly.

    -


    -

    Method active_ns()

    -

    Get the active shiny name space for different components of the teal app.

    -

    Usage

    -

    TealAppDriver$active_ns()

    +
    +

    +
    +
    +

    Method active_ns() +

    +

    Get the active shiny name space for different components of the teal app.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$active_ns()
    +

    +
    -

    Returns

    +

    Returns +

    (list) The list of active shiny name space of the teal components.

    -


    -

    Method active_module_ns()

    -

    Get the active shiny name space for interacting with the module content.

    -

    Usage

    -

    TealAppDriver$active_module_ns()

    +
    +

    +
    +
    +

    Method active_module_ns() +

    +

    Get the active shiny name space for interacting with the module content.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$active_module_ns()
    +

    +
    -

    Returns

    +

    Returns +

    (string) The active shiny name space of the component.

    -


    -

    Method active_module_element()

    -

    Get the active shiny name space bound with a custom element name.

    -

    Usage

    -

    TealAppDriver$active_module_element(element)

    +
    +

    +
    +
    +

    Method active_module_element() +

    +

    Get the active shiny name space bound with a custom element name.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$active_module_element(element)
    +

    +
    -

    Arguments

    -

    element
    +

    Arguments +

    +

    +
    +
    +
    element

    character(1) custom element name.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    (string) The active shiny name space of the component bound with the input element.

    -


    -

    Method active_module_element_text()

    -

    Get the text of the active shiny name space bound with a custom element name.

    -

    Usage

    -

    TealAppDriver$active_module_element_text(element)

    +
    +

    +
    +
    +

    Method active_module_element_text() +

    +

    Get the text of the active shiny name space bound with a custom element name.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$active_module_element_text(element)
    +

    +
    -

    Arguments

    -

    element
    +

    Arguments +

    +

    +
    +
    +
    element

    character(1) the text of the custom element name.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    (string) The text of the active shiny name space of the component bound with the input element.

    -


    -

    Method active_filters_ns()

    -

    Get the active shiny name space for interacting with the filter panel.

    -

    Usage

    -

    TealAppDriver$active_filters_ns()

    +
    +

    +
    +
    +

    Method active_filters_ns() +

    +

    Get the active shiny name space for interacting with the filter panel.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$active_filters_ns()
    +

    +
    -

    Returns

    +

    Returns +

    (string) The active shiny name space of the component.

    -


    -

    Method active_data_summary_ns()

    -

    Get the active shiny name space for interacting with the data-summary panel.

    -

    Usage

    -

    TealAppDriver$active_data_summary_ns()

    +
    +

    +
    +
    +

    Method active_data_summary_ns() +

    +

    Get the active shiny name space for interacting with the data-summary panel.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$active_data_summary_ns()
    +

    +
    -

    Returns

    +

    Returns +

    (string) The active shiny name space of the data-summary component.

    -


    -

    Method active_data_summary_element()

    -

    Get the active shiny name space bound with a custom element name.

    -

    Usage

    -

    TealAppDriver$active_data_summary_element(element)

    +
    +

    +
    +
    +

    Method active_data_summary_element() +

    +

    Get the active shiny name space bound with a custom element name.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$active_data_summary_element(element)
    +

    +
    -

    Arguments

    -

    element
    +

    Arguments +

    +

    +
    +
    +
    element

    character(1) custom element name.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    (string) The active shiny name space of the component bound with the input element.

    -


    -

    Method get_active_module_input()

    +
    +

    +
    +
    +

    Method get_active_module_input() +

    Get the input from the module in the teal app. -This function will only access inputs from the name space of the current active teal module.

    -

    Usage

    -

    TealAppDriver$get_active_module_input(input_id)

    +This function will only access inputs from the name space of the current active teal module.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$get_active_module_input(input_id)
    +

    +
    -

    Arguments

    -

    input_id
    +

    Arguments +

    +

    +
    +
    +
    input_id

    (character) The shiny input id to get the value from.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    The value of the shiny input.

    -


    -

    Method get_active_module_output()

    +
    +

    +
    +
    +

    Method get_active_module_output() +

    Get the output from the module in the teal app. -This function will only access outputs from the name space of the current active teal module.

    -

    Usage

    -

    TealAppDriver$get_active_module_output(output_id)

    +This function will only access outputs from the name space of the current active teal module.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$get_active_module_output(output_id)
    +

    +
    -

    Arguments

    -

    output_id
    +

    Arguments +

    +

    +
    +
    +
    output_id

    (character) The shiny output id to get the value from.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    The value of the shiny output.

    -


    -

    Method get_active_module_table_output()

    +
    +

    +
    +
    +

    Method get_active_module_table_output() +

    Get the output from the module's teal.widgets::table_with_settings or DT::DTOutput in the teal app. -This function will only access outputs from the name space of the current active teal module.

    -

    Usage

    -

    TealAppDriver$get_active_module_table_output(table_id, which = 1)

    +This function will only access outputs from the name space of the current active teal module.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$get_active_module_table_output(table_id, which = 1)
    +

    +
    -

    Arguments

    -

    table_id
    +

    Arguments +

    +

    +
    +
    +
    table_id

    (character(1)) The id of the table in the active teal module's name space.

    @@ -474,45 +769,79 @@

    Argumentsteal.widgets::table_with_settings.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    The data.frame with table contents.

    -


    -

    Method get_active_module_plot_output()

    +
    +

    +
    +
    +

    Method get_active_module_plot_output() +

    Get the output from the module's teal.widgets::plot_with_settings in the teal app. -This function will only access plots from the name space of the current active teal module.

    -

    Usage

    -

    TealAppDriver$get_active_module_plot_output(plot_id)

    +This function will only access plots from the name space of the current active teal module.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$get_active_module_plot_output(plot_id)
    +

    +
    -

    Arguments

    -

    plot_id
    +

    Arguments +

    +

    +
    +
    +
    plot_id

    (character(1)) The id of the plot in the active teal module's name space.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    The src attribute as character(1) vector.

    -


    -

    Method set_active_module_input()

    +
    +

    +
    +
    +

    Method set_active_module_input() +

    Set the input in the module in the teal app. -This function will only set inputs in the name space of the current active teal module.

    -

    Usage

    -

    TealAppDriver$set_active_module_input(input_id, value, ...)

    +This function will only set inputs in the name space of the current active teal module.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$set_active_module_input(input_id, value, ...)
    +

    +
    -

    Arguments

    -

    input_id
    +

    Arguments +

    +

    +
    +
    +
    input_id

    (character) The shiny input id to get the value from.

    @@ -524,48 +853,86 @@

    Arguments -

    Returns

    +

    Returns +

    The TealAppDriver object invisibly.

    -


    -

    Method get_active_filter_vars()

    -

    Get the active datasets that can be accessed via the filter panel of the current active teal module.

    -

    Usage

    -

    TealAppDriver$get_active_filter_vars()

    +
    +

    +
    +
    +

    Method get_active_filter_vars() +

    +

    Get the active datasets that can be accessed via the filter panel of the current active teal module.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$get_active_filter_vars()
    +

    +
    -


    -

    Method get_active_data_summary_table()

    -

    Get the active data summary table

    -

    Usage

    -

    TealAppDriver$get_active_data_summary_table()

    +
    +

    +
    +
    +

    Method get_active_data_summary_table() +

    +

    Get the active data summary table

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$get_active_data_summary_table()
    +

    +
    -

    Returns

    +

    Returns +

    data.frame

    -


    -

    Method is_visible()

    -

    Test if DOM elements are visible on the page with a JavaScript call.

    -

    Usage

    -

    TealAppDriver$is_visible(
    +
    +

    +
    +
    +

    Method is_visible() +

    +

    Test if DOM elements are visible on the page with a JavaScript call.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$is_visible(
       selector,
       content_visibility_auto = FALSE,
       opacity_property = FALSE,
       visibility_property = FALSE
    -)

    +)
    +

    +
    -

    Arguments

    -

    selector
    +

    Arguments +

    +

    +
    +
    +
    selector

    (character(1)) CSS selector to check visibility. A CSS id will return only one element if the UI is well formed.

    @@ -575,40 +942,73 @@

    Argumentshttps://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    Logical vector with all occurrences of the selector.

    -


    -

    Method get_active_data_filters()

    -

    Get the active filter variables from a dataset in the teal app.

    -

    Usage

    -

    TealAppDriver$get_active_data_filters(dataset_name = NULL)

    +
    +

    +
    +
    +

    Method get_active_data_filters() +

    +

    Get the active filter variables from a dataset in the teal app.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$get_active_data_filters(dataset_name = NULL)
    +

    +
    -

    Arguments

    -

    dataset_name
    +

    Arguments +

    +

    +
    +
    +
    dataset_name

    (character) The name of the dataset to get the filter variables from. If NULL, the filter variables for all the datasets will be returned in a list.

    -

    +
    +

    +
    -


    -

    Method add_filter_var()

    -

    Add a new variable from the dataset to be filtered.

    -

    Usage

    -

    TealAppDriver$add_filter_var(dataset_name, var_name, ...)

    +
    +

    +
    +
    +

    Method add_filter_var() +

    +

    Add a new variable from the dataset to be filtered.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$add_filter_var(dataset_name, var_name, ...)
    +

    +
    -

    Arguments

    -

    dataset_name
    +

    Arguments +

    +

    +
    +
    +
    dataset_name

    (character) The name of the dataset to add the filter variable to.

    @@ -620,23 +1020,40 @@

    Arguments -

    Returns

    +

    Returns +

    The TealAppDriver object invisibly.

    -


    -

    Method remove_filter_var()

    -

    Remove an active filter variable of a dataset from the active filter variables panel.

    -

    Usage

    -

    TealAppDriver$remove_filter_var(dataset_name = NULL, var_name = NULL)

    +
    +

    +
    +
    +

    Method remove_filter_var() +

    +

    Remove an active filter variable of a dataset from the active filter variables panel.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$remove_filter_var(dataset_name = NULL, var_name = NULL)
    +

    +
    -

    Arguments

    -

    dataset_name
    +

    Arguments +

    +

    +
    +
    +
    dataset_name

    (character) The name of the dataset to remove the filter variable from. If NULL, all the filter variables will be removed.

    @@ -646,23 +1063,40 @@

    Arguments -

    Returns

    +

    Returns +

    The TealAppDriver object invisibly.

    -


    -

    Method set_active_filter_selection()

    -

    Set the active filter values for a variable of a dataset in the active filter variable panel.

    -

    Usage

    -

    TealAppDriver$set_active_filter_selection(dataset_name, var_name, input, ...)

    +
    +

    +
    +
    +

    Method set_active_filter_selection() +

    +

    Set the active filter values for a variable of a dataset in the active filter variable panel.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$set_active_filter_selection(dataset_name, var_name, input, ...)
    +

    +
    -

    Arguments

    -

    dataset_name
    +

    Arguments +

    +

    +
    +
    +
    dataset_name

    (character) The name of the dataset to set the filter value for.

    @@ -678,23 +1112,40 @@

    Arguments -

    Returns

    +

    Returns +

    The TealAppDriver object invisibly.

    -


    -

    Method get_attr()

    -

    Extract html attribute (found by a selector).

    -

    Usage

    -

    TealAppDriver$get_attr(selector, attribute)

    +
    +

    +
    +
    +

    Method get_attr() +

    +

    Extract html attribute (found by a selector).

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$get_attr(selector, attribute)
    +

    +
    -

    Arguments

    -

    selector
    +

    Arguments +

    +

    +
    +
    +
    selector

    (character(1)) specifying the selector to be used to get the content of a specific node.

    @@ -702,64 +1153,108 @@

    Arguments -

    Returns

    +

    Returns +

    The character vector.

    -


    -

    Method get_html_rvest()

    -

    Wrapper around get_html that passes the output directly to rvest::read_html.

    -

    Usage

    -

    TealAppDriver$get_html_rvest(selector)

    +
    +

    +
    +
    +

    Method get_html_rvest() +

    +

    Wrapper around get_html that passes the output directly to rvest::read_html.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$get_html_rvest(selector)
    +

    +
    -

    Arguments

    -

    selector
    +

    Arguments +

    +

    +
    +
    +
    selector

    (character(1)) passed to get_html.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    An XML document. Wrapper around get_url() method that opens the app in the browser.

    -


    -

    Method open_url()

    +
    +

    +
    +
    +

    Method open_url() +

    -

    Usage

    -

    TealAppDriver$open_url()

    +

    Usage +

    +

    +
    +
    TealAppDriver$open_url()
    +

    +
    -

    Returns

    +

    Returns +

    Nothing. Opens the underlying teal app in the browser.

    -


    -

    Method wait_for_active_module_value()

    +
    +

    +
    +
    +

    Method wait_for_active_module_value() +

    Waits until a specified input, output, or export value. This function serves as a wrapper around the wait_for_value method, -providing a more flexible interface for waiting on different types of values within the active module namespace.

    -

    Usage

    -

    TealAppDriver$wait_for_active_module_value(
    +providing a more flexible interface for waiting on different types of values within the active module namespace.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$wait_for_active_module_value(
       input = rlang::missing_arg(),
       output = rlang::missing_arg(),
       export = rlang::missing_arg(),
       ...
    -)

    +)
    +

    +
    -

    Arguments

    -

    input, output, export
    +

    Arguments +

    +

    +
    +
    +
    input, output, export

    A name of an input, output, or export value. Only one of these parameters may be used.

    @@ -769,23 +1264,41 @@

    Arguments
    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealAppDriver$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealAppDriver$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -793,17 +1306,19 @@

    Arguments

    + +

    - + +
    - + + diff --git a/main/reference/TealReportCard.html b/main/reference/TealReportCard.html index d7467193df..0bddaec886 100644 --- a/main/reference/TealReportCard.html +++ b/main/reference/TealReportCard.html @@ -1,13 +1,29 @@ - -TealReportCard — TealReportCard • teal + + + + + +TealReportCard — TealReportCard • teal + + + + + + + +meta data."> + + + + Skip to contents @@ -23,11 +39,13 @@ + +
    @@ -93,20 +137,27 @@

    TealReportCard

    -

    Super class

    +

    Super class +

    teal.reporter::ReportCard -> TealReportCard

    +

    Inherited methods


    -

    Method append_src()

    -

    Appends the source code to the content meta data of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_src(src, ...)

    +

    +
    +
    +

    Method append_src() +

    +

    Appends the source code to the content meta data of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_src(src, ...)
    +

    +
    -

    Arguments

    -

    src
    +

    Arguments +

    +

    +
    +
    +
    src

    (character(1)) code as text.

    @@ -138,85 +202,148 @@

    Arguments -

    Returns

    +

    Returns +

    Object of class TealReportCard, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_src(
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_src(
       "plot(iris)"
     )
    -card$get_content()[[1]]$get_content()

    +card$get_content()[[1]]$get_content()
    +

    +
    -


    -

    Method append_fs()

    +
    +

    +
    +
    +

    Method append_fs() +

    Appends the filter state list to the content and metadata of this TealReportCard. If the filter state list has an attribute named formatted, it appends it to the card otherwise it uses the default yaml::as.yaml to format the list. -If the filter state list is empty, nothing is appended to the content.

    -

    Usage

    -

    TealReportCard$append_fs(fs)

    +If the filter state list is empty, nothing is appended to the content.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_fs(fs)
    +

    +
    -

    Arguments

    -

    fs
    +

    Arguments +

    +

    +
    +
    +
    fs

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method append_encodings()

    -

    Appends the encodings list to the content and metadata of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_encodings(encodings)

    +
    +

    +
    +
    +

    Method append_encodings() +

    +

    Appends the encodings list to the content and metadata of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_encodings(encodings)
    +

    +
    -

    Arguments

    -

    encodings
    +

    Arguments +

    +

    +
    +
    +
    encodings

    (list) list of encodings selections of the teal app.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
     card$get_content()[[1]]$get_content()
    -

    +
    +

    +
    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealReportCard$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -224,7 +351,8 @@

    Arguments -

    Examples

    +

    Examples +

    
     ## ------------------------------------------------
     ## Method `TealReportCard$append_src`
    @@ -247,17 +375,19 @@ 

    Examples

    + +
    - + +
    - + + diff --git a/main/reference/TealSlicesBlock.html b/main/reference/TealSlicesBlock.html index 7f952d5fb2..b6cd750ce8 100644 --- a/main/reference/TealSlicesBlock.html +++ b/main/reference/TealSlicesBlock.html @@ -1,5 +1,21 @@ - -TealSlicesBlock — TealSlicesBlock • teal + + + + + + +TealSlicesBlock — TealSlicesBlock • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + +
    @@ -81,34 +125,54 @@

    TealSlicesBlock

    -

    Super classes

    +

    Super classes +

    teal.reporter::ContentBlock -> teal.reporter::TextBlock -> TealSlicesBlock

    +

    Inherited methods


    -

    Method new()

    -

    Returns a TealSlicesBlock object.

    -

    Usage

    -

    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")

    +

    +
    +
    +

    Method new() +

    +

    Returns a TealSlicesBlock object.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    @@ -116,105 +180,180 @@

    Arguments -

    Details

    +

    Details +

    Returns a TealSlicesBlock object with no content and no parameters.

    -

    Returns

    +

    Returns +

    Object of class TealSlicesBlock, invisibly.

    -


    -

    Method set_content()

    +
    +

    +
    +
    +

    Method set_content() +

    Sets content of this TealSlicesBlock. Sets content as YAML text which represents a list generated from teal_slices. The list displays limited number of fields from teal_slice objects, but this list is sufficient to conclude which filters were applied. -When selected field in teal_slice object is a range, then it is displayed as a "min"

    -

    Usage

    -

    TealSlicesBlock$set_content(content)

    +When selected field in teal_slice object is a range, then it is displayed as a "min"

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$set_content(content)
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method from_list()

    -

    Create the TealSlicesBlock from a list.

    -

    Usage

    -

    TealSlicesBlock$from_list(x)

    +
    +

    +
    +
    +

    Method from_list() +

    +

    Create the TealSlicesBlock from a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$from_list(x)
    +

    +
    -

    Arguments

    -

    x
    +

    Arguments +

    +

    +
    +
    +
    x

    (named list) with two fields text and style. Use the get_available_styles method to get all possible styles.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -

    Examples

    -

    TealSlicesBlock <- getFromNamespace("TealSlicesBlock", "teal")
    +

    Examples +

    +

    +
    +
    TealSlicesBlock <- getFromNamespace("TealSlicesBlock", "teal")
     block <- TealSlicesBlock$new()
     block$from_list(list(text = "sth", style = "default"))
    -

    +
    +

    +
    -


    -

    Method to_list()

    -

    Convert the TealSlicesBlock to a list.

    -

    Usage

    -

    TealSlicesBlock$to_list()

    +
    +

    +
    +
    +

    Method to_list() +

    +

    Convert the TealSlicesBlock to a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$to_list()
    +

    +
    -

    Returns

    +

    Returns +

    named list with a text and style.

    -

    Examples

    -

    TealSlicesBlock <- getFromNamespace("TealSlicesBlock", "teal")
    +

    Examples +

    +

    +
    +
    TealSlicesBlock <- getFromNamespace("TealSlicesBlock", "teal")
     block <- TealSlicesBlock$new()
     block$to_list()
    -

    +
    +

    +
    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealSlicesBlock$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -222,7 +361,8 @@

    Arguments -

    Examples

    +

    Examples +

    
     ## ------------------------------------------------
     ## Method `TealSlicesBlock$from_list`
    @@ -250,17 +390,19 @@ 

    Examples

    + +
    - + +
    - + + diff --git a/main/reference/append_module.html b/main/reference/append_module.html index 5028ee2f92..a12c21e6b3 100644 --- a/main/reference/append_module.html +++ b/main/reference/append_module.html @@ -1,5 +1,21 @@ - -Append a teal_module to children of a teal_modules object — append_module • teal + + + + + + +Append a teal_module to children of a teal_modules object — append_module • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + +
    @@ -80,39 +124,48 @@

    Append a teal_module to children of a teal_m

    -

    Usage

    +

    Usage +

    append_module(modules, module)
    -

    Arguments

    +

    Arguments +

    -
    modules
    +
    +
    modules +

    (teal_modules)

    -
    module
    +
    module +

    (teal_module) object to be appended onto the children of modules

    -
    + +
    -

    Value

    +

    Value +

    A teal_modules object with module appended.

    + +
    - + +
    - + + diff --git a/main/reference/bookmarks_identical.html b/main/reference/bookmarks_identical.html index d874062c3d..31184caf5d 100644 --- a/main/reference/bookmarks_identical.html +++ b/main/reference/bookmarks_identical.html @@ -1,5 +1,21 @@ - -Compare bookmarks. — bookmarks_identical • teal + + + + + + +Compare bookmarks. — bookmarks_identical • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + +
    @@ -80,26 +124,33 @@

    Compare bookmarks.

    -

    Usage

    +

    Usage +

    bookmarks_identical(book1, book2)
    -

    Arguments

    +

    Arguments +

    -
    book1, book2
    +
    +
    book1, book2 +

    bookmark directories stored in shiny_bookmarks/; default to the two most recently modified directories

    -
    + +
    -

    Value

    +

    Value +

    Invisible NULL if bookmarks are identical or if there are no bookmarks to test. FALSE if inconsistencies are detected.

    -

    Details

    +

    Details +

    input environments are compared one variable at a time and if not identical, values in both bookmarks are reported. States of datatables are stripped of the time element before comparing because the time stamp is always different. @@ -109,7 +160,8 @@

    Detailsvalues environments are compared with all.equal.

    -

    How to use

    +

    How to use +

    Open an application, change relevant inputs (typically, all of them), and create a bookmark. @@ -118,17 +170,19 @@

    How to use

    + +
    - + +
    - + + diff --git a/main/reference/build_app_title.html b/main/reference/build_app_title.html index af6eee9f82..eea10ae25c 100644 --- a/main/reference/build_app_title.html +++ b/main/reference/build_app_title.html @@ -1,5 +1,21 @@ - -Build app title with favicon — build_app_title • teal + + + + + + +Build app title with favicon — build_app_title • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + +
    @@ -80,7 +124,8 @@

    Build app title with favicon

    -

    Usage

    +

    Usage +

    build_app_title(
       title = "teal app",
       favicon =
    @@ -89,35 +134,43 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    title
    +
    +
    title +

    (character) The browser title for the teal app.

    -
    favicon
    +
    favicon +

    (character) The path for the icon for the title. The image/icon path can be remote or the static path accessible by shiny, like the www/

    -
    + +
    -

    Value

    +

    Value +

    A shiny.tag containing the element that adds the title and logo to the shiny app.

    + +
    - + +
    - + + diff --git a/main/reference/call_once_when.html b/main/reference/call_once_when.html index 64db7088e7..f2c26f0fc5 100644 --- a/main/reference/call_once_when.html +++ b/main/reference/call_once_when.html @@ -1,7 +1,23 @@ - -Calls expression when condition is met — call_once_when • teal + + + + + + +Calls expression when condition is met — call_once_when • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + +
    @@ -83,7 +127,8 @@

    Calls expression when condition is met

    -

    Usage

    +

    Usage +

    call_once_when(
       eventExpr,
       handlerExpr,
    @@ -94,57 +139,68 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    eventExpr
    +
    +
    eventExpr +

    A (quoted or unquoted) logical expression that represents the event; this can be a simple reactive value like input$click, a call to a reactive expression like dataset(), or even a complex expression inside curly braces.

    -
    handlerExpr
    +
    handlerExpr +

    The expression to call whenever eventExpr is invalidated. This should be a side-effect-producing action (the return value will be ignored). It will be executed within an isolate() scope.

    -
    event.env
    +
    event.env +

    The parent environment for the reactive expression. By default, this is the calling environment, the same as when defining an ordinary non-reactive expression. If eventExpr is a quosure and event.quoted is TRUE, then event.env is ignored.

    -
    handler.env
    +
    handler.env +

    The parent environment for the reactive expression. By default, this is the calling environment, the same as when defining an ordinary non-reactive expression. If handlerExpr is a quosure and handler.quoted is TRUE, then handler.env is ignored.

    -
    ...
    +
    ... +

    additional arguments passed to observeEvent with the exception of eventExpr that is not allowed.

    -
    + +
    -

    Value

    +

    Value +

    An observer.

    + +
    - + +
    - + + diff --git a/main/reference/check_filter_datanames.html b/main/reference/check_filter_datanames.html index 569e1e70e4..5da2bc780b 100644 --- a/main/reference/check_filter_datanames.html +++ b/main/reference/check_filter_datanames.html @@ -1,7 +1,23 @@ - -Check datanames in filters — check_filter_datanames • teal + + + + + + +Check datanames in filters — check_filter_datanames • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + +
    @@ -83,39 +127,48 @@

    Check datanames in filters

    -

    Usage

    +

    Usage +

    check_filter_datanames(filters, datanames)
    -

    Arguments

    +

    Arguments +

    -
    filters
    +
    +
    filters +

    (teal_slices) object

    -
    datanames
    +
    datanames +

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + +
    - + +
    - + + diff --git a/main/reference/check_modules_datanames.html b/main/reference/check_modules_datanames.html index 935c7d1c79..a124c72839 100644 --- a/main/reference/check_modules_datanames.html +++ b/main/reference/check_modules_datanames.html @@ -1,17 +1,33 @@ - -Check datanames in modules — check_modules_datanames • teal + + + + + +Check datanames in modules — check_modules_datanames • teal + + + + + + + +"> + + + + Skip to contents @@ -27,11 +43,13 @@ + +
    @@ -90,46 +134,58 @@

    Check datanames in modules

    These functions check if specified datanames in modules match those in the data object, returning error messages or TRUE for successful validation. Two functions return error message -in different forms:

    • check_modules_datanames returns character(1) for basic assertion usage

    • +in different forms:

      +
        +
      • check_modules_datanames returns character(1) for basic assertion usage

      • check_modules_datanames_html returns shiny.tag.list to display it in the app.

      • -
    + +
    -

    Usage

    +

    Usage +

    check_modules_datanames(modules, datanames)
     
     check_modules_datanames_html(modules, datanames)
    -

    Arguments

    +

    Arguments +

    -
    modules
    +
    +
    modules +

    (teal_modules) object

    -
    datanames
    +
    datanames +

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    TRUE if validation passes, otherwise character(1) or shiny.tag.list

    + +
    - + +
    - + + diff --git a/main/reference/check_reactive.html b/main/reference/check_reactive.html index 3c6dbd8200..3436981634 100644 --- a/main/reference/check_reactive.html +++ b/main/reference/check_reactive.html @@ -1,5 +1,21 @@ - -Check that argument is reactive. — check_reactive • teal + + + + + + +Check that argument is reactive. — check_reactive • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,7 +124,8 @@

    Check that argument is reactive.

    -

    Usage

    +

    Usage +

    check_reactive(x, null.ok = FALSE)
     
     test_reactive(x, null.ok = FALSE)
    @@ -94,33 +139,41 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    [any]
    Object to check.

    -
    null.ok
    +
    null.ok +

    [logical(1)]
    If set to TRUE, x may also be NULL. In this case only a type check of x is performed, all additional checks are disabled.

    -
    .var.name
    +
    .var.name +

    [character(1)]
    Name of the checked object to print in assertions. Defaults to the heuristic implemented in vname.

    -
    add
    +
    add +

    [AssertCollection]
    Collection to store assertion messages. See AssertCollection.

    -
    + +
    -

    Value

    +

    Value +

    Depending on the function prefix: If the check is successful, the functions assertClass/assert_class return @@ -140,17 +193,19 @@

    Value

    + + - + + - + + diff --git a/main/reference/create_app_id.html b/main/reference/create_app_id.html index 5fea07f479..649b14b5c7 100644 --- a/main/reference/create_app_id.html +++ b/main/reference/create_app_id.html @@ -1,5 +1,21 @@ - -Application ID — create_app_id • teal + + + + + + +Application ID — create_app_id • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,45 +124,55 @@

    Application ID

    -

    Usage

    +

    Usage +

    create_app_id(data, modules)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (teal_data or teal_data_module) as accepted by init

    -
    modules
    +
    modules +

    (teal_modules) object as accepted by init

    -
    + +
    -

    Value

    +

    Value +

    A single character string.

    -

    Details

    +

    Details +

    Calculate app ID that will be used to stamp filter state snapshots. App ID is a hash of the app's data and modules. See "transferring snapshots" section in ?snapshot.

    + + - + + - + + diff --git a/main/reference/decorate_err_msg.html b/main/reference/decorate_err_msg.html index 9476a2902a..25e51cf402 100644 --- a/main/reference/decorate_err_msg.html +++ b/main/reference/decorate_err_msg.html @@ -1,5 +1,21 @@ - -Capture error and decorate error message. — decorate_err_msg • teal + + + + + + +Capture error and decorate error message. — decorate_err_msg • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,43 +124,53 @@

    Capture error and decorate error message.

    -

    Usage

    +

    Usage +

    decorate_err_msg(x, pre = character(0), post = character(0))
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    object to evaluate

    -
    pre
    +
    pre +

    (character(1)) A string to prepend to error message

    -
    post
    +
    post +

    (character(1)) A string to append to error message

    -
    + +
    -

    Value

    +

    Value +

    x if no error, otherwise throws error with decorated message

    + + - + + - + + diff --git a/main/reference/deep_copy_filter.html b/main/reference/deep_copy_filter.html index 34c0c61e04..7edd7627e9 100644 --- a/main/reference/deep_copy_filter.html +++ b/main/reference/deep_copy_filter.html @@ -1,11 +1,27 @@ - -Deep copy teal_slices — deep_copy_filter • teal + + + + + +Deep copy teal_slices — deep_copy_filter • teal + + + + + + + +shiny session starts."> + + + + Skip to contents @@ -21,11 +37,13 @@ + + @@ -76,7 +120,8 @@
    @@ -89,35 +134,43 @@

    Deep copy teal_slices

    -

    Usage

    +

    Usage +

    deep_copy_filter(filter)
    -

    Arguments

    +

    Arguments +

    -
    filter
    +
    +
    filter +

    (teal_slices)

    -
    + +
    -

    Value

    +

    Value +

    teal_slices

    + + - + + - + + diff --git a/main/reference/dot-add_signature_to_data.html b/main/reference/dot-add_signature_to_data.html index 9955d7c428..dcc92e985b 100644 --- a/main/reference/dot-add_signature_to_data.html +++ b/main/reference/dot-add_signature_to_data.html @@ -1,5 +1,21 @@ - -Adds signature protection to the datanames in the data — .add_signature_to_data • teal + + + + + + +Adds signature protection to the datanames in the data — .add_signature_to_data • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,35 +124,43 @@

    Adds signature protection to the datanames in the data

    -

    Usage

    +

    Usage +

    .add_signature_to_data(data)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (teal_data)

    -
    + +
    -

    Value

    +

    Value +

    teal_data with additional code that has signature of the datanames

    + + - + + - + + diff --git a/main/reference/dot-get_hashes_code.html b/main/reference/dot-get_hashes_code.html index 4dca43c54a..c2f55d0f27 100644 --- a/main/reference/dot-get_hashes_code.html +++ b/main/reference/dot-get_hashes_code.html @@ -1,5 +1,21 @@ - -Get code that tests the integrity of the reproducible data — .get_hashes_code • teal + + + + + + +Get code that tests the integrity of the reproducible data — .get_hashes_code • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,39 +124,48 @@

    Get code that tests the integrity of the reproducible data

    -

    Usage

    +

    Usage +

    .get_hashes_code(data, datanames = ls(teal.code::get_env(data)))
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (teal_data) object holding the data

    -
    datanames
    +
    datanames +

    (character) names of datasets

    -
    + +
    -

    Value

    +

    Value +

    A character vector with the code lines.

    + + - + + - + + diff --git a/main/reference/example_module.html b/main/reference/example_module.html index 63e4a147b1..ca4fc61e37 100644 --- a/main/reference/example_module.html +++ b/main/reference/example_module.html @@ -1,5 +1,21 @@ - -An example teal module — example_module • teal + + + + + + +An example teal module — example_module • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,7 +124,8 @@

    An example teal module

    -

    Usage

    +

    Usage +

    example_module(
       label = "example teal module",
       datanames = "all",
    @@ -89,36 +134,48 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    label
    +
    +
    label +

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    -
    datanames
    -

    (character) Names of the datasets relevant to the item. -There are 2 reserved values that have specific behaviors:

    • The keyword "all" includes all datasets available in the data passed to the teal application.

    • +
      datanames +
      +
      +

      (character) Names of the datasets relevant to the item. +There are 2 reserved values that have specific behaviors:

      +
        +
      • The keyword "all" includes all datasets available in the data passed to the teal application.

      • NULL hides the sidebar panel completely.

      • If transformers are specified, their datanames are automatically added to this datanames argument.

      • -
      +
    +
    -
    transformers
    +
    transformers +

    (list of teal_data_module) that will be applied to transform the data. Each transform module UI will appear in the teal's sidebar panel. Transformers' datanames are added to the datanames. See teal_transform_module().

    -
    + +
    -

    Value

    +

    Value +

    A teal module which can be included in the modules argument to init().

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(IRIS = iris, MTCARS = mtcars),
       modules = example_module()
    @@ -129,17 +186,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/extract_transformers.html b/main/reference/extract_transformers.html index 88def254c5..0ac17263df 100644 --- a/main/reference/extract_transformers.html +++ b/main/reference/extract_transformers.html @@ -1,5 +1,21 @@ - -Extract all transformers from modules. — extract_transformers • teal + + + + + + +Extract all transformers from modules. — extract_transformers • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,35 +124,43 @@

    Extract all transformers from modules.

    -

    Usage

    +

    Usage +

    extract_transformers(modules)
    -

    Arguments

    +

    Arguments +

    -
    modules
    +
    +
    modules +

    teal_modules or teal_module

    -
    + +
    -

    Value

    +

    Value +

    A list of teal_transform_module nested in the same way as input modules.

    + + - + + - + + diff --git a/main/reference/get_client_timezone.html b/main/reference/get_client_timezone.html index 139daffca5..a29c3c8140 100644 --- a/main/reference/get_client_timezone.html +++ b/main/reference/get_client_timezone.html @@ -1,7 +1,23 @@ - -Get client timezone — get_client_timezone • teal + + + + + + +Get client timezone — get_client_timezone • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -83,36 +127,44 @@

    Get client timezone

    -

    Usage

    +

    Usage +

    get_client_timezone(ns)
    -

    Arguments

    +

    Arguments +

    -
    ns
    +
    +
    ns +

    (function) namespace function passed from the session object in the shiny server. For shiny modules this will allow for proper name spacing of the registered input.

    -
    + +
    -

    Value

    +

    Value +

    NULL, invisibly.

    + + - + + - + + diff --git a/main/reference/get_rcode_libraries.html b/main/reference/get_rcode_libraries.html index a9c4156851..f724c2a73f 100644 --- a/main/reference/get_rcode_libraries.html +++ b/main/reference/get_rcode_libraries.html @@ -1,5 +1,21 @@ - -Generates library calls from current session info — get_rcode_libraries • teal + + + + + + +Generates library calls from current session info — get_rcode_libraries • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,27 +124,31 @@

    Generates library calls from current session info

    -

    Usage

    +

    Usage +

    get_rcode_libraries()
    -

    Value

    +

    Value +

    Character vector of library(<package>) calls.

    + + - + + - + + diff --git a/main/reference/get_unique_labels.html b/main/reference/get_unique_labels.html index 4dbeb008ab..352c4cbb2a 100644 --- a/main/reference/get_unique_labels.html +++ b/main/reference/get_unique_labels.html @@ -1,5 +1,21 @@ - -Get unique labels — get_unique_labels • teal + + + + + + +Get unique labels — get_unique_labels • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,35 +124,43 @@

    Get unique labels

    -

    Usage

    +

    Usage +

    get_unique_labels(labels)
    -

    Arguments

    +

    Arguments +

    -
    labels
    +
    +
    labels +

    (character) vector of labels

    -
    + +
    -

    Value

    +

    Value +

    (character) vector of unique labels

    + + - + + - + + diff --git a/main/reference/include_css_files.html b/main/reference/include_css_files.html index 55eeec02f0..951a947bd9 100644 --- a/main/reference/include_css_files.html +++ b/main/reference/include_css_files.html @@ -1,9 +1,25 @@ - -Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + + + +as needed. Thus, we do not export this method."> + + + + Skip to contents @@ -19,11 +35,13 @@ + + @@ -86,35 +130,43 @@

    Include CSS files from /inst/css/ package director
    -

    Usage

    +

    Usage +

    include_css_files(pattern = "*")
    -

    Arguments

    +

    Arguments +

    -
    pattern
    +
    +
    pattern +

    (character) pattern of files to be included

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes CSS files.

    + + - + + - + + diff --git a/main/reference/include_js_files.html b/main/reference/include_js_files.html index bca2a6b2d6..73c7381c11 100644 --- a/main/reference/include_js_files.html +++ b/main/reference/include_js_files.html @@ -1,9 +1,25 @@ - -Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + +Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + + + +as needed. Thus, we do not export this method"> + + + + Skip to contents @@ -19,11 +35,13 @@ + + @@ -86,39 +130,48 @@

    Include JS files from /inst/js/ package directory
    -

    Usage

    +

    Usage +

    include_js_files(pattern = NULL, except = NULL)
    -

    Arguments

    +

    Arguments +

    -
    pattern
    +
    +
    pattern +

    (character) pattern of files to be included, passed to system.file

    -
    except
    +
    except +

    (character) vector of basename filenames to be excluded

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes JS files.

    + + - + + - + + diff --git a/main/reference/include_teal_css_js.html b/main/reference/include_teal_css_js.html index 65f70dd644..f80673858f 100644 --- a/main/reference/include_teal_css_js.html +++ b/main/reference/include_teal_css_js.html @@ -1,13 +1,29 @@ - -Code to include teal CSS and JavaScript files — include_teal_css_js • teal + + + + + +Code to include teal CSS and JavaScript files — include_teal_css_js • teal + + + + + + + +Also initializes shinyjs so you can use it."> + + + + Skip to contents @@ -23,11 +39,13 @@ + + @@ -92,31 +136,36 @@

    Code to include teal CSS and JavaScript
    -

    Usage

    +

    Usage +

    include_teal_css_js()
    -

    Value

    +

    Value +

    A shiny.tag.list.

    -

    Details

    +

    Details +

    Simply add include_teal_css_js() as one of the UI elements.

    + + - + + - + + diff --git a/main/reference/index.html b/main/reference/index.html index df2d53d76b..eb63e72c5a 100644 --- a/main/reference/index.html +++ b/main/reference/index.html @@ -1,5 +1,19 @@ - -Package index • teal + + + + + + +Package index • teal + + + + + + + + + Skip to contents @@ -15,11 +29,13 @@ + + @@ -74,239 +116,311 @@

    Package index

    -

    Core teal functions

    +

    Core teal functions +

    Main functions needed to build a teal app

    -
    +
    +
    -
    +
    +
    init() stable
    Create the server and UI function for the shiny app
    -
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>) experimental
    Data module for teal applications
    -
    +
    +
    +
    teal_transform_module() experimental
    Data module for teal transformers.
    -
    +
    +
    +
    ui_teal_with_splash() srv_teal_with_splash() deprecated
    -
    UI and server modules of teal
    -
    +
    UI and server modules of teal +
    +
    +
    +
    ui_teal() srv_teal() stable
    -
    teal main module
    -
    +
    +teal main module
    +
    +
    +
    module() modules() format(<teal_module>) print(<teal_module>) format(<teal_modules>) set_datanames() print(<teal_modules>) stable
    Create teal_module and teal_modules objects
    -
    +
    +
    +
    teal_slices() as.teal_slices() c(<teal_slices>)
    Filter settings for teal applications
    -
    -

    Helper Functions

    + +
    +
    +

    Helper Functions +

    Helper functions for teal

    -
    +
    +
    -
    +
    +
    build_app_title()
    Build app title with favicon
    -
    -

    Example module

    + +
    +
    +

    Example module +

    A simple teal module

    -
    +
    +
    -
    +
    +
    example_module() experimental
    An example teal module
    -
    -

    Creating reports

    + +
    +
    +

    Creating reports +

    -
    +
    +
    -
    +
    +
    reporter_previewer_module() experimental
    Create a teal module for previewing a report
    -
    +
    +
    +
    TealReportCard experimental
    TealReportCard
    -
    +
    +
    +
    report_card_template()
    Template function for TealReportCard creation and customization
    -
    -

    Landing popup

    + +
    +
    +

    Landing popup +

    -
    +
    +
    -
    +
    +
    landing_popup_module()
    Landing popup module
    -
    -

    Functions for module developers

    + +
    +
    +

    Functions for module developers +

    -
    +
    +
    -
    +
    +
    new_tdata() tdata2env() get_code_tdata() join_keys(<tdata>) get_metadata() as_tdata() superseded
    Create a tdata object
    -
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>) experimental
    Data module for teal applications
    -
    +
    +
    +
    show_rcode_modal() deprecated
    Show R code modal
    -
    -

    Validation functions

    + +
    +
    +

    Validation functions +

    -
    +
    +
    -
    +
    +
    validate_has_data() stable
    Validate that dataset has a minimum number of observations
    -
    +
    +
    +
    validate_has_elements() stable
    Validates that vector has length greater than 0
    -
    +
    +
    +
    validate_has_variable() stable
    Validates that dataset contains specific variable
    -
    +
    +
    +
    validate_in() stable
    Validates that vector includes all expected values
    -
    +
    +
    +
    validate_inputs()
    Send input validation messages to output
    -
    +
    +
    +
    validate_n_levels() stable
    Validate that variables has expected number of levels
    -
    +
    +
    +
    validate_no_intersection() stable
    Validates no intersection between two vectors
    -
    +
    +
    +
    validate_one_row_per_id() stable
    Validate that dataset has unique rows for key variables
    -
    + + + + - + + - + + diff --git a/main/reference/init.html b/main/reference/init.html index a579ca7816..f2036c8e89 100644 --- a/main/reference/init.html +++ b/main/reference/init.html @@ -1,9 +1,25 @@ - -Create the server and UI function for the shiny app — init • teal + + + + + +Create the server and UI function for the shiny app — init • teal + + + + + + + +teal app that is composed of teal modules."> + + + + Skip to contents @@ -19,11 +35,13 @@ + + @@ -86,7 +130,8 @@

    Create the server and UI function for the shiny app

    -

    Usage

    +

    Usage +

    init(
       data,
       modules,
    @@ -100,16 +145,20 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (teal_data or teal_data_module) For constructing the data object, refer to teal_data() and teal_data_module(). If datanames are not set for the teal_data object, defaults from the teal_data environment will be used.

    -
    modules
    +
    modules +

    (list or teal_modules or teal_module) Nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -117,46 +166,55 @@

    Argumentsfilter +
    filter +

    (teal_slices) Optionally, specifies the initial filter using teal_slices().

    -
    title
    +
    title +

    (shiny.tag or character(1)) Optionally, the browser window title. Defaults to a title "teal app" with the icon of NEST. Can be created using the build_app_title() or by passing a valid shiny.tag which is a head tag with title and link tag.

    -
    header
    +
    header +

    (shiny.tag or character(1)) Optionally, the header of the app.

    - +

    (shiny.tag or character(1)) Optionally, the footer of the app.

    -
    id
    +
    id +

    (character) Optionally, a string specifying the shiny module id in cases it is used as a shiny module rather than a standalone shiny app. This is a legacy feature.

    -
    landing_popup
    +
    landing_popup +

    (teal_module_landing) Optionally, a landing_popup_module to show up as soon as the teal app is initialized.

    -

    + +
    -

    Value

    +

    Value +

    Named list containing server and UI functions.

    -

    Examples

    +

    Examples +

    app <- init(
       data = within(
         teal_data(),
    @@ -210,17 +268,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/is_arg_used.html b/main/reference/is_arg_used.html index 7d26f0243c..a8872ee248 100644 --- a/main/reference/is_arg_used.html +++ b/main/reference/is_arg_used.html @@ -1,5 +1,21 @@ - -Does the object make use of the arg — is_arg_used • teal + + + + + + +Does the object make use of the arg — is_arg_used • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -70,7 +114,8 @@
    @@ -80,39 +125,48 @@

    Does the object make use of the arg

    -

    Usage

    +

    Usage +

    is_arg_used(modules, arg)
    -

    Arguments

    +

    Arguments +

    -
    modules
    +
    +
    modules +

    (teal_module or teal_modules) object

    -
    arg
    +
    arg +

    (character(1)) names of the arguments to be checked against formals of teal modules.

    -
    + +
    -

    Value

    +

    Value +

    logical whether the object makes use of arg.

    + + - + + - + + diff --git a/main/reference/landing_popup_module.html b/main/reference/landing_popup_module.html index 88f86731aa..8a27812886 100644 --- a/main/reference/landing_popup_module.html +++ b/main/reference/landing_popup_module.html @@ -1,9 +1,25 @@ - -Landing popup module — landing_popup_module • teal + + + + + +Landing popup module — landing_popup_module • teal + + + + + + + +The dialog blocks access to the application and must be closed with a button before the application can be viewed."> + + + + Skip to contents @@ -19,11 +35,13 @@ + + @@ -86,7 +130,8 @@

    Landing popup module

    -

    Usage

    +

    Usage +

    landing_popup_module(
       label = "Landing Popup",
       title = NULL,
    @@ -96,33 +141,42 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    label
    +
    +
    label +

    (character(1)) Label of the module.

    -
    title
    +
    title +

    (character(1)) Text to be displayed as popup title.

    -
    content
    +
    content +

    (character(1), shiny.tag or shiny.tag.list) with the content of the popup. Passed to ... of shiny::modalDialog. See examples.

    -
    buttons
    +
    buttons +

    (shiny.tag or shiny.tag.list) Typically a modalButton or actionButton. See examples.

    -
    + +
    -

    Value

    +

    Value +

    A teal_module (extended with teal_landing_module class) to be used in teal applications.

    -

    Examples

    +

    Examples +

    app1 <- init(
       data = teal_data(iris = iris),
       modules = modules(
    @@ -169,17 +223,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/module_bookmark_manager.html b/main/reference/module_bookmark_manager.html index 71e3ae03e1..9b30b3ed28 100644 --- a/main/reference/module_bookmark_manager.html +++ b/main/reference/module_bookmark_manager.html @@ -1,7 +1,23 @@ - -App state management. — module_bookmark_manager • teal + + + + + + +App state management. — module_bookmark_manager • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -83,7 +127,8 @@

    App state management.

    -

    Usage

    +

    Usage +

    ui_bookmark_panel(id, modules)
     
     srv_bookmark_panel(id, modules)
    @@ -94,29 +139,36 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    id
    +
    +
    id +

    (character) Optionally, a string specifying the shiny module id in cases it is used as a shiny module rather than a standalone shiny app. This is a legacy feature.

    -
    modules
    +
    modules +

    (list or teal_modules or teal_module) Nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which will be displayed in the teal application. See modules() and module() for more details.

    -
    + +
    -

    Value

    +

    Value +

    Invisible NULL.

    -

    Details

    +

    Details +

    This module introduces bookmarks into teal apps: the shiny bookmarking mechanism becomes enabled and server-side bookmarks can be created.

    The bookmark manager presents a button with the bookmark icon and is placed in the tab-bar. @@ -128,7 +180,8 @@

    Detailsteal_bookmarkable attribute to TRUE.

    -

    Server logic

    +

    Server logic +

    A bookmark is a URL that contains the app address with a /?_state_id_=<bookmark_dir> suffix. @@ -136,25 +189,31 @@

    Server logic -

    Note

    +

    Note +

    -

    To enable bookmarking use either:

    • shiny app by using shinyApp(..., enableBookmarking = "server") (not supported in shinytest2)

    • +

      To enable bookmarking use either:

      +
        +
      • shiny app by using shinyApp(..., enableBookmarking = "server") (not supported in shinytest2)

      • set options(shiny.bookmarkStore = "server") before running the app

      • -
    + + + + - + + - + + diff --git a/main/reference/module_data_summary.html b/main/reference/module_data_summary.html index 2fffa67eac..3484f8d462 100644 --- a/main/reference/module_data_summary.html +++ b/main/reference/module_data_summary.html @@ -1,5 +1,21 @@ - -Data summary — module_data_summary • teal + + + + + + +Data summary — module_data_summary • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,7 +124,8 @@

    Data summary

    -

    Usage

    +

    Usage +

    ui_data_summary(id)
     
     srv_data_summary(id, teal_data)
    @@ -109,54 +154,69 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    id
    +
    +
    id +

    (character(1)) shiny module instance id.

    -
    teal_data
    +
    teal_data +

    (reactive returning teal_data)

    -
    filtered_data
    +
    filtered_data +

    (list) of filtered objects

    -
    unfiltered_data
    +
    unfiltered_data +

    (list) of unfiltered objects

    -
    dataname
    +
    dataname +

    (character(1))

    -
    + +
    -

    Value

    +

    Value +

    NULL.

    -

    Details

    +

    Details +

    Handling different data classes: -get_object_filter_overview() is a pseudo S3 method which has variants for:

    • array (data.frame, DataFrame, array, Matrix and SummarizedExperiment): Method variant +get_object_filter_overview() is a pseudo S3 method which has variants for:

      +
        +
      • array (data.frame, DataFrame, array, Matrix and SummarizedExperiment): Method variant can be applied to any two-dimensional objects on which ncol() can be used.

      • MultiAssayExperiment: for which summary contains counts for colData and all experiments.

      • -
    + + + + - + + - + + diff --git a/main/reference/module_filter_data.html b/main/reference/module_filter_data.html index f4664c3b17..78db282266 100644 --- a/main/reference/module_filter_data.html +++ b/main/reference/module_filter_data.html @@ -1,13 +1,29 @@ - -Filter panel module in teal — module_filter_data • teal + + + + + +Filter panel module in teal — module_filter_data • teal + + + + + + + +currently displayed."> + + + + Skip to contents @@ -23,11 +39,13 @@ + + @@ -92,7 +136,8 @@

    Filter panel module in teal

    -

    Usage

    +

    Usage +

    ui_filter_data(id)
     
     srv_filter_data(id, datasets, active_datanames, data_rv, is_active)
    @@ -105,56 +150,70 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    id
    +
    +
    id +

    (character) Optionally, a string specifying the shiny module id in cases it is used as a shiny module rather than a standalone shiny app. This is a legacy feature.

    -
    datasets
    +
    datasets +

    (reactive returning FilteredData or NULL) When datasets is passed from the parent module (srv_teal) then dataset is a singleton which implies in filter-panel to be "global". When NULL then filter-panel is "module-specific".

    -
    active_datanames
    +
    active_datanames +

    (reactive returning character) this module's data names

    -
    data_rv
    +
    data_rv +

    (reactive returning teal_data)

    -
    modules
    +
    modules +

    (list or teal_modules or teal_module) Nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which will be displayed in the teal application. See modules() and module() for more details.

    -
    + +
    -

    Value

    +

    Value +

    A eventReactive containing teal_data containing filtered objects and filter code. -eventReactive triggers only if all conditions are met:

    • tab is selected (is_active)

    • +eventReactive triggers only if all conditions are met:

      +
        +
      • tab is selected (is_active)

      • when filters are changed (get_filter_expr is different than previous)

      • -
    + + + + - + + - + + diff --git a/main/reference/module_filter_manager.html b/main/reference/module_filter_manager.html index 0a0f6e588d..63aedfaa90 100644 --- a/main/reference/module_filter_manager.html +++ b/main/reference/module_filter_manager.html @@ -1,5 +1,21 @@ - -Manage multiple FilteredData objects — module_filter_manager • teal + + + + + + +Manage multiple FilteredData objects — module_filter_manager • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,7 +124,8 @@

    Manage multiple FilteredData objects

    -

    Usage

    +

    Usage +

    ui_filter_manager_panel(id)
     
     srv_filter_manager_panel(id, slices_global)
    @@ -93,71 +138,95 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    id
    +
    +
    id +

    (character(1)) shiny module instance id.

    -
    slices_global
    +
    slices_global +

    (reactiveVal) containing teal_slices.

    -
    module_fd
    +
    module_fd +

    (FilteredData) Object containing the data to be filtered in a single teal module.

    -
    + +
    -

    Value

    +

    Value +

    Module returns a slices_global (reactiveVal) containing a teal_slices object with mapping.

    -

    Slices global

    +

    Slices global +

    The key role in maintaining the module-specific filter states is played by the .slicesGlobal -object. It is a reference class that holds the following fields:

    • all_slices (reactiveVal) - reactive value containing all filters registered in an app.

    • +object. It is a reference class that holds the following fields:

      +
        +
      • all_slices (reactiveVal) - reactive value containing all filters registered in an app.

      • module_slices_api (reactiveValues) - reactive field containing references to each modules' FilteredData object methods. At this moment it is used only in srv_filter_manager to display the filter states in a table combining informations from all_slices and from FilteredData$get_available_teal_slices().

      • -

      During a session only new filters are added to all_slices unless module_snapshot_manager is +

    +

    During a session only new filters are added to all_slices unless module_snapshot_manager is used to restore previous state. Filters from all_slices can be activated or deactivated in a -module which is linked (both ways) by attr(, "mapping") so that:

    • If module's filter is added or removed in its FilteredData object, this information is passed +module which is linked (both ways) by attr(, "mapping") so that:

      +
        +
      • If module's filter is added or removed in its FilteredData object, this information is passed to SlicesGlobal which updates attr(, "mapping") accordingly.

      • When mapping changes in a SlicesGlobal, filters are set or removed from module's FilteredData.

      • -
    + +
    -

    Filter manager

    +

    Filter manager +

    -

    Filter-manager is split into two parts:

    1. ui/srv_filter_manager_panel - Called once for the whole app. This module observes changes in +

      Filter-manager is split into two parts:

      +
        +
      1. ui/srv_filter_manager_panel - Called once for the whole app. This module observes changes in the filters in slices_global and displays them in a table utilizing information from mapping:

      2. -
      • (TRUE) - filter is active in the module

      • +
    +
      +
    • (TRUE) - filter is active in the module

    • (FALSE) - filter is inactive in the module

    • (NA) - filter is not available in the module

    • -
    1. ui/srv_module_filter_manager - Called once for each teal_module. Handling filter states + +

        +
      1. ui/srv_module_filter_manager - Called once for each teal_module. Handling filter states for of single module and keeping module FilteredData consistent with slices_global, so that local filters are always reflected in the slices_global and its mapping and vice versa.

      2. -
    + + + + - + + - + + diff --git a/main/reference/module_init_data.html b/main/reference/module_init_data.html index 45848ef95d..70250959c3 100644 --- a/main/reference/module_init_data.html +++ b/main/reference/module_init_data.html @@ -1,15 +1,31 @@ - -Data Module for teal — module_init_data • teal + + + + + +Data Module for teal — module_init_data • teal + + + + + + + +"> + + + + Skip to contents @@ -25,11 +41,13 @@ + + @@ -87,51 +131,66 @@

    Data Module for teal

    This module manages the data argument for srv_teal. The teal framework uses teal_data(), -which can be provided in various ways:

    1. Directly as a teal.data::teal_data() object. This will automatically convert it into a reactive teal_data.

    2. +which can be provided in various ways:

      +
        +
      1. Directly as a teal.data::teal_data() object. This will automatically convert it into a reactive teal_data.

      2. As a reactive object that returns a teal.data::teal_data() object.

      3. -
    + +
    -

    Usage

    +

    Usage +

    ui_init_data(id)
     
     srv_init_data(id, data)
    -

    Arguments

    +

    Arguments +

    -
    id
    +
    +
    id +

    (character) Optionally, a string specifying the shiny module id in cases it is used as a shiny module rather than a standalone shiny app. This is a legacy feature.

    -
    data
    +
    data +

    (teal_data, teal_data_module, or reactive returning teal_data) The data which application will depend on.

    -
    + +
    -

    Value

    +

    Value +

    A reactive object that returns: Output of the data. If data fails then returned error is handled (after tryCatch()) so that rest of the application can respond to this respectively.

    -

    Details

    +

    Details +

    -

    Reactive teal_data:

    +

    Reactive teal_data: +

    The data in the application can be reactively updated, prompting srv_teal() to rebuild the -content accordingly. There are two methods for creating interactive teal_data:

    1. Using a reactive object provided from outside the teal application. In this scenario, +content accordingly. There are two methods for creating interactive teal_data:

      +
        +
      1. Using a reactive object provided from outside the teal application. In this scenario, reactivity is controlled by an external module, and srv_teal responds to changes.

      2. Using teal_data_module(), which is embedded within the teal application, allowing data to be resubmitted by the user as needed.

      3. -

      Since the server of teal_data_module() must return a reactive teal_data object, both +

    +

    Since the server of teal_data_module() must return a reactive teal_data object, both methods (1 and 2) produce the same reactive behavior within a teal application. The distinction lies in data control: the first method involves external control, while the second method involves control from a custom module within the app.

    @@ -141,17 +200,19 @@

    Reactive teal_data:

    + +
    - + + - + + diff --git a/main/reference/module_labels.html b/main/reference/module_labels.html index 2e10bd0c49..4e5983e70f 100644 --- a/main/reference/module_labels.html +++ b/main/reference/module_labels.html @@ -1,5 +1,21 @@ - -Retrieve labels from teal_modules — module_labels • teal + + + + + + +Retrieve labels from teal_modules — module_labels • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -70,7 +114,8 @@
    @@ -80,36 +125,44 @@

    Retrieve labels from teal_modules

    -

    Usage

    +

    Usage +

    module_labels(modules)
    -

    Arguments

    +

    Arguments +

    -
    modules
    +
    +
    modules +

    (teal_modules)

    -
    + +
    -

    Value

    +

    Value +

    A list containing the labels of the modules. If the modules are nested, the function returns a nested list of labels.

    + + - + + - + + diff --git a/main/reference/module_management.html b/main/reference/module_management.html index eb07af1653..e9f2ce024d 100644 --- a/main/reference/module_management.html +++ b/main/reference/module_management.html @@ -1,5 +1,21 @@ - -Extract/Remove module(s) of specific class — extract_module • teal + + + + + + +Extract/Remove module(s) of specific class — extract_module • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,44 +124,55 @@

    Extract/Remove module(s) of specific class

    -

    Usage

    +

    Usage +

    extract_module(modules, class)
     
     drop_module(modules, class)
    -

    Arguments

    +

    Arguments +

    -
    modules
    +
    +
    modules +

    (teal_modules)

    -
    class
    +
    class +

    The class name of teal_module to be extracted or dropped.

    -
    + +
    -

    Value

    +

    Value +

    -
    • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

    • +
        +
      • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

      • For drop_module, the opposite, which is all teal_modules of class other than class.

      • -

      teal_modules

      +
    +

    teal_modules

    + + - + + - + + diff --git a/main/reference/module_snapshot_manager.html b/main/reference/module_snapshot_manager.html index 84cf293a7b..9054ed9635 100644 --- a/main/reference/module_snapshot_manager.html +++ b/main/reference/module_snapshot_manager.html @@ -1,5 +1,21 @@ - -Filter state snapshot management — module_snapshot_manager • teal + + + + + + +Filter state snapshot management — module_snapshot_manager • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,7 +124,8 @@

    Filter state snapshot management

    -

    Usage

    +

    Usage +

    ui_snapshot_manager_panel(id)
     
     srv_snapshot_manager_panel(id, slices_global)
    @@ -91,24 +136,31 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    id
    +
    +
    id +

    (character(1)) shiny module instance id.

    -
    slices_global
    +
    slices_global +

    (reactiveVal) that contains a teal_slices object containing all teal_slices existing in the app, both active and inactive.

    -
    + +
    -

    Value

    +

    Value +

    list containing the snapshot history, where each element is an unlisted teal_slices object.

    -

    Details

    +

    Details +

    This module introduces snapshots: stored descriptions of the filter state of the entire application. Snapshots allow the user to save the current filter state of the application for later use in the session, as well as to save it to file in order to share it with an app developer or other users, @@ -120,7 +172,8 @@

    Details

    -

    Server logic

    +

    Server logic +

    Snapshots are basically teal_slices objects, however, since each module is served by a separate instance @@ -135,7 +188,8 @@

    Server logic -

    Snapshot mechanics

    +

    Snapshot mechanics +

    When a snapshot is captured, the user is prompted to name it. @@ -165,7 +219,8 @@

    Snapshot mechanics -

    Transferring snapshots

    +

    Transferring snapshots +

    Snapshots uploaded from disk should only be used in the same application they come from, @@ -175,7 +230,8 @@

    Transferring snapshots

    -

    Bookmarks

    +

    Bookmarks +

    An onBookmark callback creates a snapshot of the current filter state. @@ -184,22 +240,25 @@

    Bookmarks -

    Author

    +

    Author +

    Aleksander Chlebowski

    + + - + + - + + diff --git a/main/reference/module_teal.html b/main/reference/module_teal.html index 26e74a1a14..06845b48cf 100644 --- a/main/reference/module_teal.html +++ b/main/reference/module_teal.html @@ -1,11 +1,27 @@ - -teal main module — module_teal • teal + + + + + +teal main module — module_teal • teal + + + + + + + +automatically, which is not a case when calling ui/srv_teal directly."> + + + + Skip to contents @@ -21,11 +37,13 @@ + + @@ -76,7 +120,8 @@
    @@ -89,7 +134,8 @@

    teal main module

    -

    Usage

    +

    Usage +

    ui_teal(
       id,
       modules,
    @@ -102,16 +148,20 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    id
    +
    +
    id +

    (character) Optionally, a string specifying the shiny module id in cases it is used as a shiny module rather than a standalone shiny app. This is a legacy feature.

    -
    modules
    +
    modules +

    (list or teal_modules or teal_module) Nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -119,55 +169,69 @@

    Argumentstitle +
    title +

    (shiny.tag or character(1)) Optionally, the browser window title. Defaults to a title "teal app" with the icon of NEST. Can be created using the build_app_title() or by passing a valid shiny.tag which is a head tag with title and link tag.

    -
    header
    +
    header +

    (shiny.tag or character(1)) Optionally, the header of the app.

    - +

    (shiny.tag or character(1)) Optionally, the footer of the app.

    -
    data
    +
    data +

    (teal_data, teal_data_module, or reactive returning teal_data) The data which application will depend on.

    -
    filter
    +
    filter +

    (teal_slices) Optionally, specifies the initial filter using teal_slices().

    -

    + +
    -

    Value

    +

    Value +

    NULL invisibly

    -

    Details

    +

    Details +

    Module is responsible for creating the main shiny app layout and initializing all the necessary components. This module establishes reactive connection between the input data and every other component in the app. Reactive change of the data passed as an argument, reloads the app and -possibly keeps all input settings the same so the user can continue where one left off.

    -

    data flow in teal application

    +possibly keeps all input settings the same so the user can continue where one left off.

    +
    +

    data flow in teal application +

    This module supports multiple data inputs but eventually, they are all converted to reactive returning teal_data in this module. On this reactive teal_data object several actions are -performed:

    + +
    -

    Fallback on failure

    +

    Fallback on failure +

    teal is designed in such way that app will never crash if the error is introduced in any @@ -179,17 +243,19 @@

    Fallback on failure

    + +
    - + + - + + diff --git a/main/reference/module_teal_data.html b/main/reference/module_teal_data.html index f81c7e3954..8931493267 100644 --- a/main/reference/module_teal_data.html +++ b/main/reference/module_teal_data.html @@ -1,11 +1,27 @@ - -Execute and validate teal_data_module — module_teal_data • teal + + + + + +Execute and validate teal_data_module — module_teal_data • teal + + + + + + + +teal_data() which is a standard data class in whole teal framework."> + + + + Skip to contents @@ -21,11 +37,13 @@ + + @@ -76,7 +120,8 @@
    @@ -89,7 +134,8 @@

    Execute and validate teal_data_module

    -

    Usage

    +

    Usage +

    ui_teal_data(id, data_module = function(id) NULL)
     
     srv_teal_data(
    @@ -112,68 +158,84 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    id
    +
    +
    id +

    (character(1)) Module id

    -
    data_module
    +
    data_module +

    (teal_data_module)

    -
    modules
    +
    modules +

    (teal_modules or teal_module) For datanames validation purpose

    -
    validate_shiny_silent_error
    +
    validate_shiny_silent_error +

    (logical) If TRUE, then shiny.silent.error is validated and

    -
    is_transformer_failed
    +
    is_transformer_failed +

    (reactiveValues) contains logical flags named after each transformer. Help to determine if any previous transformer failed, so that following transformers can be disabled and display a generic failure message.

    -
    data
    +
    data +

    (reactive teal_data)

    -
    + +
    -

    Value

    +

    Value +

    reactive teal_data

    -

    data validation

    +

    data validation +

    Executed teal_data_module() is validated and output is validated for consistency. -Output data is invalid if:

    1. teal_data_module() is invalid if server doesn't return reactive. Immediately crashes an app!

    2. +Output data is invalid if:

      +
        +
      1. teal_data_module() is invalid if server doesn't return reactive. Immediately crashes an app!

      2. reactive throws a shiny.error - happens when module creating teal_data() fails.

      3. reactive returns qenv.error - happens when teal_data() evaluates a failing code.

      4. reactive object doesn't return teal_data().

      5. teal_data() object lacks any datanames specified in the modules argument.

      6. -

      teal (observers in srv_teal) always waits to render an app until reactive teal_data is +

    +

    teal (observers in srv_teal) always waits to render an app until reactive teal_data is returned. If error 2-4 occurs, relevant error message is displayed to the app user. Once the issue is resolved, the app will continue to run. teal guarantees that errors in data don't crash the app (except error 1).

    + + - + + - + + diff --git a/main/reference/module_teal_lockfile.html b/main/reference/module_teal_lockfile.html index 436ffd64ef..d6b0a9ef69 100644 --- a/main/reference/module_teal_lockfile.html +++ b/main/reference/module_teal_lockfile.html @@ -1,5 +1,21 @@ - -Generate lockfile for application's environment reproducibility — module_teal_lockfile • teal + + + + + + +Generate lockfile for application's environment reproducibility — module_teal_lockfile • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,7 +124,8 @@

    Generate lockfile for application's environment reproducibility

    -

    Usage

    +

    Usage +

    ui_teal_lockfile(id)
     
     srv_teal_lockfile(id)
    @@ -95,22 +140,30 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    lockfile_path
    +
    +
    lockfile_path +

    (character) path to the lockfile.

    -
    + +
    -

    Value

    +

    Value +

    NULL

    -

    Different ways of creating lockfile

    +

    Different ways of creating lockfile +

    -

    teal leverages renv::snapshot(), which offers multiple methods for lockfile creation.

    • Working directory lockfile: teal, by default, will create an implicit type lockfile that uses +

      teal leverages renv::snapshot(), which offers multiple methods for lockfile creation.

      +
        +
      • Working directory lockfile: teal, by default, will create an implicit type lockfile that uses renv::dependencies() to detect all R packages in the current project's working directory.

      • DESCRIPTION-based lockfile: To generate a lockfile based on a DESCRIPTION file in your working directory, set renv::settings$snapshot.type("explicit"). The naming convention for type follows @@ -118,30 +171,35 @@

        Different ways of creating lockfile DESCRIPTION fields included in the lockfile.

      • Custom files-based lockfile: To specify custom files as the basis for the lockfile, set renv::settings$snapshot.type("custom") and configure the renv.snapshot.filter option.

      • -
    + +
    -

    lockfile usage

    +

    lockfile usage +

    After creating the lockfile, you can restore the application's environment using renv::restore().

    -

    See also

    +

    See also +

    + + - + + - + + diff --git a/main/reference/module_teal_module.html b/main/reference/module_teal_module.html index aa7d130738..ed20ca089d 100644 --- a/main/reference/module_teal_module.html +++ b/main/reference/module_teal_module.html @@ -1,9 +1,25 @@ - -Calls all modules — module_teal_module • teal + + + + + +Calls all modules — module_teal_module • teal + + + + + + + +reflect nested structure of modules argument."> + + + + Skip to contents @@ -19,11 +35,13 @@ + + @@ -74,7 +118,8 @@
    @@ -86,7 +131,8 @@

    Calls all modules

    -

    Usage

    +

    Usage +

    ui_teal_module(id, modules, depth = 0L)
     
     # Default S3 method
    @@ -147,16 +193,20 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    id
    +
    +
    id +

    (character) Optionally, a string specifying the shiny module id in cases it is used as a shiny module rather than a standalone shiny app. This is a legacy feature.

    -
    modules
    +
    modules +

    (list or teal_modules or teal_module) Nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -164,53 +214,69 @@

    Argumentsdepth +
    depth +

    (integer(1)) number which helps to determine depth of the modules nesting.

    -
    data_rv
    +
    data_rv +

    (reactive returning teal_data)

    -
    datasets
    +
    datasets +

    (reactive returning FilteredData or NULL) When datasets is passed from the parent module (srv_teal) then dataset is a singleton which implies in filter-panel to be "global". When NULL then filter-panel is "module-specific".

    -
    slices_global
    +
    slices_global +

    (reactiveVal returning modules_teal_slices) see module_filter_manager

    -
    data_load_status
    -

    (reactive returning character) -Determines action dependent on a data loading status:

    • "ok" when teal_data is returned from the data loading.

    • +
      data_load_status +
      +
      +

      (reactive returning character) +Determines action dependent on a data loading status:

      +
        +
      • "ok" when teal_data is returned from the data loading.

      • "teal_data_module failed" when teal_data_module() didn't return teal_data. Disables tabs buttons.

      • "external failed" when a reactive passed to srv_teal(data) didn't return teal_data. Hides the whole tab panel.

      • -
      +
    +
    -

    + +
    -

    Value

    -

    output of currently active module.

    • srv_teal_module.teal_module returns reactiveVal containing output of the called module.

    • +

      Value +

      +

      output of currently active module.

      +
        +
      • srv_teal_module.teal_module returns reactiveVal containing output of the called module.

      • srv_teal_module.teal_modules returns output of module selected by input$active_tab.

      • -
    + + + + - + + - + + diff --git a/main/reference/module_teal_with_splash.html b/main/reference/module_teal_with_splash.html index 3518ba0c4f..fc580d2936 100644 --- a/main/reference/module_teal_with_splash.html +++ b/main/reference/module_teal_with_splash.html @@ -1,7 +1,23 @@ - -UI and server modules of teal — module_teal_with_splash • teal + + + + + + +UI and server modules of teal — module_teal_with_splash • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -72,7 +116,8 @@
    @@ -83,7 +128,8 @@

    UI and server modules of teal

    -

    Usage

    +

    Usage +

    ui_teal_with_splash(
       id,
       data,
    @@ -96,38 +142,46 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    id
    +
    +
    id +

    (character) Optionally, a string specifying the shiny module id in cases it is used as a shiny module rather than a standalone shiny app. This is a legacy feature.

    -
    data
    +
    data +

    (teal_data, teal_data_module, or reactive returning teal_data) The data which application will depend on.

    -
    title
    +
    title +

    (shiny.tag or character(1)) Optionally, the browser window title. Defaults to a title "teal app" with the icon of NEST. Can be created using the build_app_title() or by passing a valid shiny.tag which is a head tag with title and link tag.

    -
    header
    +
    header +

    (shiny.tag or character(1)) Optionally, the header of the app.

    - +

    (shiny.tag or character(1)) Optionally, the footer of the app.

    -
    modules
    +
    modules +

    (list or teal_modules or teal_module) Nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -135,28 +189,33 @@

    Argumentsfilter +
    filter +

    (teal_slices) Optionally, specifies the initial filter using teal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression containing a teal_data object when data is loaded or NULL when it is not.

    + + - + + - + + diff --git a/main/reference/module_transform_data.html b/main/reference/module_transform_data.html index 7a3f5ca086..13c9e0bb83 100644 --- a/main/reference/module_transform_data.html +++ b/main/reference/module_transform_data.html @@ -1,7 +1,23 @@ - -Module to transform reactive teal_data — module_transform_data • teal + + + + + + +Module to transform reactive teal_data — module_transform_data • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -72,7 +116,8 @@
    @@ -83,7 +128,8 @@

    Module to transform reactive teal_data

    -

    Usage

    +

    Usage +

    ui_transform_data(id, transformers = list(), class = "well")
     
     srv_transform_data(
    @@ -96,50 +142,61 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    id
    +
    +
    id +

    (character(1)) Module id

    -
    transformers
    +
    transformers +

    (list of teal_data_module) that will be applied to transform the data. Each transform module UI will appear in the teal's sidebar panel. Transformers' datanames are added to the datanames. See teal_transform_module().

    -
    data
    +
    data +

    (reactive teal_data)

    -
    modules
    +
    modules +

    (teal_modules or teal_module) For datanames validation purpose

    -
    is_transformer_failed
    +
    is_transformer_failed +

    (reactiveValues) contains logical flags named after each transformer. Help to determine if any previous transformer failed, so that following transformers can be disabled and display a generic failure message.

    -
    + +
    -

    Value

    +

    Value +

    reactive teal_data

    + + - + + - + + diff --git a/main/reference/modules_bookmarkable.html b/main/reference/modules_bookmarkable.html index 2756e8e26a..bd7872a359 100644 --- a/main/reference/modules_bookmarkable.html +++ b/main/reference/modules_bookmarkable.html @@ -1,5 +1,21 @@ - -Retrieve teal_bookmarkable attribute from teal_modules — modules_bookmarkable • teal + + + + + + +Retrieve teal_bookmarkable attribute from teal_modules — modules_bookmarkable • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -70,7 +114,8 @@
    @@ -80,36 +125,44 @@

    Retrieve teal_bookmarkable attribute from teal_modules
    -

    Usage

    +

    Usage +

    modules_bookmarkable(modules)
    -

    Arguments

    +

    Arguments +

    -
    modules
    +
    +
    modules +

    (teal_modules or teal_module) object

    -
    + +

    -

    Value

    +

    Value +

    named list of the same structure as modules with TRUE or FALSE values indicating whether the module is bookmarkable.

    + + - + + - + + diff --git a/main/reference/modules_depth.html b/main/reference/modules_depth.html index a43153f5b1..3287a39d2f 100644 --- a/main/reference/modules_depth.html +++ b/main/reference/modules_depth.html @@ -1,7 +1,23 @@ - -Get module depth — modules_depth • teal + + + + + + +Get module depth — modules_depth • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -83,15 +127,19 @@

    Get module depth

    -

    Usage

    +

    Usage +

    modules_depth(modules, depth = 0L)
    -

    Arguments

    +

    Arguments +

    -
    modules
    +
    +
    modules +

    (list or teal_modules or teal_module) Nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -99,27 +147,32 @@

    Argumentsdepth +
    depth +

    optional integer determining current depth level

    -

    + +
    -

    Value

    +

    Value +

    Depth level for given module.

    + + - + + - + + diff --git a/main/reference/report_card_template.html b/main/reference/report_card_template.html index fbf727e11b..34aec606c0 100644 --- a/main/reference/report_card_template.html +++ b/main/reference/report_card_template.html @@ -1,7 +1,23 @@ - -Template function for TealReportCard creation and customization — report_card_template • teal + + + + + + +Template function for TealReportCard creation and customization — report_card_template • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -83,7 +127,8 @@

    Template function for TealReportCard creation and customization
    -

    Usage

    +

    Usage +

    report_card_template(
       title,
       label,
    @@ -94,47 +139,58 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    title
    +
    +
    title +

    (character(1)) title of the card (unless overwritten by label)

    -
    label
    +
    label +

    (character(1)) label provided by the user when adding the card

    -
    description
    +
    description +

    (character(1)) optional, additional description

    -
    with_filter
    +
    with_filter +

    (logical(1)) flag indicating to add filter state

    -
    filter_panel_api
    +
    filter_panel_api +

    (FilterPanelAPI) object with API that allows the generation of the filter state in the report

    -
    + +
    -

    Value

    +

    Value +

    (TealReportCard) populated with a title, description and filter state.

    + + - + + - + + diff --git a/main/reference/reporter_previewer_module.html b/main/reference/reporter_previewer_module.html index 8236402b38..db3f1d961b 100644 --- a/main/reference/reporter_previewer_module.html +++ b/main/reference/reporter_previewer_module.html @@ -1,17 +1,33 @@ - -Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + +Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + + + +support report generation."> + + + + Skip to contents @@ -27,11 +43,13 @@ + + @@ -98,41 +142,50 @@

    Create a teal module for previewing a report

    -

    Usage

    +

    Usage +

    reporter_previewer_module(label = "Report previewer", server_args = list())
    -

    Arguments

    +

    Arguments +

    -
    label
    +
    +
    label +

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    -
    server_args
    +
    server_args +

    (named list) Arguments passed to teal.reporter::reporter_previewer_srv().

    -
    + +
    -

    Value

    +

    Value +

    teal_module (extended with teal_module_previewer class) containing the teal.reporter previewer functionality.

    + + - + + - + + diff --git a/main/reference/restoreValue.html b/main/reference/restoreValue.html index 3fd2fcb000..0cc86feee2 100644 --- a/main/reference/restoreValue.html +++ b/main/reference/restoreValue.html @@ -1,5 +1,21 @@ - -Restore value from bookmark. — restoreValue • teal + + + + + + +Restore value from bookmark. — restoreValue • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,30 +124,38 @@

    Restore value from bookmark.

    -

    Usage

    +

    Usage +

    restoreValue(value, default)
    -

    Arguments

    +

    Arguments +

    -
    value
    +
    +
    value +

    (character(1)) name of value to restore

    -
    default
    +
    default +

    fallback value

    -
    + +
    -

    Value

    +

    Value +

    In an application restored from a server-side bookmark, the variable specified by value from the values environment. Otherwise default.

    -

    Details

    +

    Details +

    Bookmarks can store not only inputs but also arbitrary values. These values are stored by onBookmark callbacks and restored by onBookmarked callbacks, and they are placed in the values environment in the session$restoreContext field. @@ -115,17 +167,19 @@

    Details

    + + - + + - + + diff --git a/main/reference/run_js_files.html b/main/reference/run_js_files.html index f902376dcc..b1d52d1a97 100644 --- a/main/reference/run_js_files.html +++ b/main/reference/run_js_files.html @@ -1,11 +1,27 @@ - -Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + +Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + + + +the run_js actually executes JavaScript functions."> + + + + Skip to contents @@ -21,11 +37,13 @@ + + @@ -89,41 +133,50 @@

    Run JS file from /inst/js/ package directory

    -

    Usage

    +

    Usage +

    run_js_files(files)
    -

    Arguments

    +

    Arguments +

    -
    files
    +
    +
    files +

    (character) vector of filenames.

    -
    + +
    -

    Value

    +

    Value +

    NULL, invisibly.

    -

    Details

    +

    Details +

    system.file should not be used to access files in other packages, it does not work with devtools. Therefore, we redefine this method in each package as needed. Thus, we do not export this method.

    + + - + + - + + diff --git a/main/reference/show_rcode_modal.html b/main/reference/show_rcode_modal.html index 1294c037fe..cb9758065f 100644 --- a/main/reference/show_rcode_modal.html +++ b/main/reference/show_rcode_modal.html @@ -1,7 +1,23 @@ - -Show R code modal — show_rcode_modal • teal + + + + + + +Show R code modal — show_rcode_modal • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -83,46 +127,56 @@

    Show R code modal

    -

    Usage

    +

    Usage +

    show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())
    -

    Arguments

    +

    Arguments +

    -
    title
    +
    +
    title +

    (character(1)) Title of the modal, displayed in the first comment of the R code.

    -
    rcode
    +
    rcode +

    (character) vector with R code to show inside the modal.

    -
    session
    +
    session +

    (ShinySession) optional shiny session object, defaults to shiny::getDefaultReactiveDomain().

    -
    + +
    -

    References

    +

    References +

    shiny::showModal()

    + + - + + - + + diff --git a/main/reference/slices_store.html b/main/reference/slices_store.html index 32b4c13820..0fd1a4d90e 100644 --- a/main/reference/slices_store.html +++ b/main/reference/slices_store.html @@ -1,7 +1,23 @@ - -Store and restore teal_slices object — slices_store • teal + + + + + + +Store and restore teal_slices object — slices_store • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -83,57 +127,71 @@

    Store and restore teal_slices object

    -

    Usage

    +

    Usage +

    slices_store(tss, file)
     
     slices_restore(file)
    -

    Arguments

    +

    Arguments +

    -
    tss
    +
    +
    tss +

    (teal_slices) object to be stored.

    -
    file
    +
    file +

    (character(1)) file path where teal_slices object will be saved and restored. The file extension should be ".json".

    -
    + +
    -

    Value

    +

    Value +

    slices_store returns NULL, invisibly.

    slices_restore returns a teal_slices object restored from the file.

    -

    Details

    -

    Date and date time objects are stored in the following formats:

    • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

    • +

      Details +

      +

      Date and date time objects are stored in the following formats:

      +
        +
      • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

      • POSIX*t classes are converted to character by using format.POSIX*t(usetz = TRUE, tz = "UTC") (YYYY-MM-DD HH:MM:SS UTC, where UTC is the Coordinated Universal Time timezone short-code).

      • -

      This format is assumed during slices_restore. All POSIX*t objects in +

    +

    This format is assumed during slices_restore. All POSIX*t objects in selected or choices fields of teal_slice objects are always printed in UTC timezone as well.

    -

    See also

    +

    See also +

    + + - + + - + + diff --git a/main/reference/tdata.html b/main/reference/tdata.html index 93a700a846..3bbafeae6c 100644 --- a/main/reference/tdata.html +++ b/main/reference/tdata.html @@ -1,15 +1,31 @@ - -Create a tdata object — tdata • teal + + + + + +Create a tdata object — tdata • teal + + + + + + + +use this function to downgrade the data argument."> + + + + Skip to contents @@ -25,11 +41,13 @@ + + @@ -95,7 +139,8 @@

    Create a tdata object

    -

    Usage

    +

    Usage +

    new_tdata(...)
     
     tdata2env(...)
    @@ -111,30 +156,37 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    ...
    +
    +
    ... +

    ignored

    -
    + +
    -

    Value

    +

    Value +

    nothing

    + + - + + - + + diff --git a/main/reference/teal-package.html b/main/reference/teal-package.html index 437251a050..e0c2f7a6b3 100644 --- a/main/reference/teal-package.html +++ b/main/reference/teal-package.html @@ -1,7 +1,23 @@ - -teal: Interactive exploration of clinical trials data — teal-package • teal + + + + + + +teal: Interactive exploration of clinical trials data — teal-package • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -72,7 +116,8 @@
    @@ -84,21 +129,30 @@

    teal: Interactive exploration of clinical trials data

    -

    Details

    +

    Details +

    To learn mode about the package, visit the project website or read the init() manual page.

    -

    Author

    +

    Author +

    Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID)

    -

    Authors:

    + +
    + + - + + - + + diff --git a/main/reference/teal_data_module.html b/main/reference/teal_data_module.html index 173e7c1d59..b5558c9afe 100644 --- a/main/reference/teal_data_module.html +++ b/main/reference/teal_data_module.html @@ -1,7 +1,23 @@ - -Data module for teal applications — teal_data_module • teal + + + + + + +Data module for teal applications — teal_data_module • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -83,7 +127,8 @@

    Data module for teal applications

    -

    Usage

    +

    Usage +

    teal_data_module(ui, server, label = "data module", once = TRUE)
     
     # S4 method for class 'teal_data_module,character'
    @@ -94,25 +139,31 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    ui
    +
    +
    ui +

    (function(id)) shiny module UI function; must only take id argument

    -
    server
    +
    server +

    (function(id)) shiny module server function; must only take id argument; must return reactive expression containing teal_data object

    -
    label
    +
    label +

    (character(1)) Label of the module.

    -
    once
    +
    once +

    (logical(1)) If TRUE, the data module will be shown only once and will disappear after successful data loading. App user will no longer be able to interact with this module anymore. @@ -120,35 +171,43 @@

    Argumentsobject +
    object +

    (teal_data_module)

    -
    code
    +
    code +

    (character or language) code to evaluate. If character, comments are retained.

    -
    data
    +
    data +

    (teal_data_module) object

    -
    expr
    +
    expr +

    (expression) to evaluate. Must be inline code. See

    -
    ...
    +
    ... +

    See Details.

    -

    + +
    -

    Value

    +

    Value +

    teal_data_module returns a list of class teal_data_module containing two elements, ui and server provided via arguments.

    eval_code returns a teal_data_module object with a delayed evaluation of code when the module is run.

    within returns a teal_data_module object with a delayed evaluation of expr when the module is run.

    -

    Details

    +

    Details +

    teal_data_module creates a shiny module to interactively supply or modify data in a teal application. The module allows for running any code (creation and some modification) after the app starts or reloads. The body of the server function will be run in the app rather than in the global environment. @@ -163,12 +222,14 @@

    Details... argument: as name:value pairs are passed to ..., name in expr will be replaced with value.

    -

    Examples

    +

    Examples +

    tdm <- teal_data_module(
       ui = function(id) {
         ns <- NS(id)
    @@ -274,17 +335,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/teal_data_to_filtered_data.html b/main/reference/teal_data_to_filtered_data.html index d81c039ec3..de8e9a8027 100644 --- a/main/reference/teal_data_to_filtered_data.html +++ b/main/reference/teal_data_to_filtered_data.html @@ -1,5 +1,21 @@ - -Create a FilteredData — teal_data_to_filtered_data • teal + + + + + + +Create a FilteredData — teal_data_to_filtered_data • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -70,7 +114,8 @@
    @@ -80,39 +125,48 @@

    Create a FilteredData

    -

    Usage

    +

    Usage +

    teal_data_to_filtered_data(x, datanames = ls(teal.code::get_env(x)))
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (teal_data) object

    -
    datanames
    +
    datanames +

    (character) vector of data set names to include; must be subset of datanames(x)

    -
    + +
    -

    Value

    +

    Value +

    A FilteredData object.

    + + - + + - + + diff --git a/main/reference/teal_data_utilities.html b/main/reference/teal_data_utilities.html index 82df00db72..6215ab5f87 100644 --- a/main/reference/teal_data_utilities.html +++ b/main/reference/teal_data_utilities.html @@ -1,15 +1,31 @@ - -teal_data utils — teal_data_utilities • teal + + + + + +teal_data utils — teal_data_utilities • teal + + + + + + + +"> + + + + Skip to contents @@ -25,11 +41,13 @@ + + @@ -80,19 +124,24 @@
    -

    In teal we need to recreate the teal_data object due to two operations:

    • we need to append filter-data code and objects which have been evaluated in FilteredData and +

      In teal we need to recreate the teal_data object due to two operations:

      +
        +
      • we need to append filter-data code and objects which have been evaluated in FilteredData and we want to avoid double-evaluation.

      • we need to subset teal_data to datanames used by the module, to shorten obtainable R-code

      • -
    + +
    -

    Usage

    +

    Usage +

    .append_evaluated_code(data, code)
     
     .append_modified_data(data, objects)
    @@ -101,47 +150,58 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (teal_data)

    -
    code
    +
    code +

    (character) code to append to data@code

    -
    objects
    +
    objects +

    (list) objects to append to data@env

    -
    datanames
    +
    datanames +

    (character) names of the datasets

    -
    + +
    -

    Value

    +

    Value +

    modified teal_data

    -

    Details

    +

    Details +

    Due to above recreation of teal_data object can't be done simply by using public teal.code and teal.data methods.

    + + - + + - + + diff --git a/main/reference/teal_modules.html b/main/reference/teal_modules.html index a3b15d295e..1a278958e3 100644 --- a/main/reference/teal_modules.html +++ b/main/reference/teal_modules.html @@ -1,7 +1,23 @@ - -Create teal_module and teal_modules objects — teal_modules • teal + + + + + + +Create teal_module and teal_modules objects — teal_modules • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -83,7 +127,8 @@

    Create teal_module and teal_modules objects

    -

    Usage

    +

    Usage +

    module(
       label = "module",
       server = function(id, data, ...) moduleServer(id, function(input, output, session)
    @@ -114,16 +159,23 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    label
    +
    +
    label +

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    -
    server
    -

    (function) shiny module with following arguments:

    • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

    • +
      server +
      +
      +

      (function) shiny module with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

      • input, output, session - (optional; not recommended) When provided, then shiny::callModule() will be used to call a module. From shiny 1.5.0, the recommended way is to use shiny::moduleServer() instead which doesn't require these arguments.

      • @@ -137,70 +189,96 @@

        Argumentsteal.slice::FilterPanelAPI).

      • ... (optional) When provided, server_args elements will be passed to the module named argument or to the ....

      • -

      +
    +
    -
    ui
    -

    (function) shiny UI module function with following arguments:

    • id - teal will set proper shiny namespace for this module.

    • +
      ui +
      +
      +

      (function) shiny UI module function with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module.

      • ... (optional) When provided, ui_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    -
    filters
    +
    filters +

    (character) Deprecated. Use datanames instead.

    -
    datanames
    -

    (character) Names of the datasets relevant to the item. -There are 2 reserved values that have specific behaviors:

    • The keyword "all" includes all datasets available in the data passed to the teal application.

    • +
      datanames +
      +
      +

      (character) Names of the datasets relevant to the item. +There are 2 reserved values that have specific behaviors:

      +
        +
      • The keyword "all" includes all datasets available in the data passed to the teal application.

      • NULL hides the sidebar panel completely.

      • If transformers are specified, their datanames are automatically added to this datanames argument.

      • -
      +
    +
    -
    server_args
    +
    server_args +

    (named list) with additional arguments passed on to the server function.

    -
    ui_args
    +
    ui_args +

    (named list) with additional arguments passed on to the UI function.

    -
    transformers
    +
    transformers +

    (list of teal_data_module) that will be applied to transform the data. Each transform module UI will appear in the teal's sidebar panel. Transformers' datanames are added to the datanames. See teal_transform_module().

    -
    ...
    -
    • For modules(): (teal_module or teal_modules) Objects to wrap into a tab.

    • +
      ... +
      +
        +
      • For modules(): (teal_module or teal_modules) Objects to wrap into a tab.

      • For format() and print(): Arguments passed to other methods.

      -
      x
      +
      x +

      (teal_module or teal_modules) Object to format/print.

      -
      indent
      +
      indent +

      (integer(1)) Indention level; each nested element is indented one level more.

      -
      modules
      +
      modules +

      (teal_module or teal_modules)

      -
    + +
    -

    Value

    +

    Value +

    module() returns an object of class teal_module.

    -

    modules() returns a teal_modules object which contains following fields:

    • label: taken from the label argument.

    • +

      modules() returns a teal_modules object which contains following fields:

      +
        +
      • label: taken from the label argument.

      • children: a list containing objects passed in .... List elements are named after their label attribute converted to a valid shiny id.

      • -
    + +
    -

    Details

    +

    Details +

    module() creates an instance of a teal_module that can be placed in a teal application. modules() shapes the structure of a the application by organizing teal_module within the navigation panel. It wraps teal_module and teal_modules objects in a teal_modules object, @@ -212,29 +290,39 @@

    Detailsreporter_previewer_module(), respectively.

    -

    Restricting datasets used by teal_module:

    +

    Restricting datasets used by teal_module: +

    The datanames argument controls which datasets are used by the module’s server. These datasets, passed via server's data argument, are the only ones shown in the module's tab.

    When datanames is set to "all", all datasets in the data object are treated as relevant. -However, this may include unnecessary datasets, such as:

    • Proxy variables for column modifications

    • +However, this may include unnecessary datasets, such as:

      +
        +
      • Proxy variables for column modifications

      • Temporary datasets used to create final versions

      • Connection objects

      • -

      To exclude irrelevant datasets, use the set_datanames() function to change datanames from +

    +

    To exclude irrelevant datasets, use the set_datanames() function to change datanames from "all" to specific names. Trying to modify non-"all" values with set_datanames() will result in a warning. Datasets with names starting with . are ignored globally unless explicitly listed in datanames.

    -

    datanames with transformers

    +

    +datanames with transformers +

    When transformers are specified, their datanames are added to the module’s datanames, which -changes the behavior as follows:

    • If module(datanames) is NULL and the transformers have defined datanames, the sidebar +changes the behavior as follows:

      +
        +
      • If module(datanames) is NULL and the transformers have defined datanames, the sidebar will appear showing the transformers' datasets, instead of being hidden.

      • If module(datanames) is set to specific values and any transformer has datanames = "all", the module may receive extra datasets that could be unnecessary

      • -
    + +
    -

    Examples

    +

    Examples +

    library(shiny)
     
     module_1 <- module(
    @@ -307,17 +395,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/teal_slices.html b/main/reference/teal_slices.html index 9fb25e0aac..a013cdb73a 100644 --- a/main/reference/teal_slices.html +++ b/main/reference/teal_slices.html @@ -1,5 +1,21 @@ - -Filter settings for teal applications — teal_slices • teal + + + + + + +Filter settings for teal applications — teal_slices • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,7 +124,8 @@

    Filter settings for teal applications

    -

    Usage

    +

    Usage +

    teal_slices(
       ...,
       exclude_varnames = NULL,
    @@ -99,85 +144,112 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    ...
    +
    +
    ... +

    any number of teal_slice objects.

    -
    include_varnames, exclude_varnames
    +
    include_varnames, exclude_varnames +

    (named lists of character) where list names match names of data sets and vector elements match variable names in respective data sets; specify which variables are allowed to be filtered; see Details.

    -
    count_type
    -

    [Experimental] +

    count_type +
    +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal.slice's GitHub repository.

    (character(1)) string specifying how observations are tallied by these filter states. -Possible options:

    • "none" (default) to have counts of single FilterState to show unfiltered number only.

    • +Possible options:

      +
        +
      • "none" (default) to have counts of single FilterState to show unfiltered number only.

      • "all" to have counts of single FilterState to show number of observation in filtered and unfiltered dataset. Note, that issues were reported when using this option with MultiAssayExperiment. Please make sure that adding new filters doesn't fail on target platform before deploying for production.

      • -
    + + -
    allow_add
    +
    allow_add +

    (logical(1)) logical flag specifying whether the user will be able to add new filters

    -
    module_specific
    -

    (logical(1)) optional,

    • FALSE (default) when one filter panel applied to all modules. +

      module_specific +
      +
      +

      (logical(1)) optional,

      +
        +
      • FALSE (default) when one filter panel applied to all modules. All filters will be shared by all modules.

      • TRUE when filter panel module-specific. Modules can have different set of filters specified - see mapping argument.

      • -
      +
    +
    -
    mapping
    -

    [Experimental] +

    mapping +
    +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal's GitHub repository.

    (named list) specifies which filters will be active in which modules on app start. Elements should contain character vector of teal_slice ids (see teal.slice::teal_slice). -Names of the list should correspond to teal_module label set in module() function.

    • ids listed under "global_filters will be active in all modules.

    • +Names of the list should correspond to teal_module label set in module() function.

      +
        +
      • ids listed under "global_filters will be active in all modules.

      • If missing, all filters will be applied to all modules.

      • If empty list, all filters will be available to all modules but will start inactive.

      • If module_specific is FALSE, only global_filters will be active on start.

      • -
    + + -
    app_id
    +
    app_id +

    (character(1)) For internal use only, do not set manually. Added by init so that a teal_slices can be matched to the app in which it was used. Used for verifying snapshots uploaded from file. See snapshot.

    -
    x
    +
    x +

    (list) of lists to convert to teal_slices

    -
    + +
    -

    Value

    +

    Value +

    A teal_slices object.

    -

    Details

    +

    Details +

    Produces a teal_slices object. The teal_slice components will specify filter states that will be active when the app starts. Attributes (created with the named arguments) will configure the way the app applies filters. See argument descriptions for details.

    -

    Examples

    +

    Examples +

    filter <- teal_slices(
       teal_slice(dataname = "iris", varname = "Species", id = "species"),
       teal_slice(dataname = "iris", varname = "Sepal.Length", id = "sepal_length"),
    @@ -208,17 +280,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/teal_transform_module.html b/main/reference/teal_transform_module.html index 84c728d42b..51f0e25d7f 100644 --- a/main/reference/teal_transform_module.html +++ b/main/reference/teal_transform_module.html @@ -1,9 +1,25 @@ - -Data module for teal transformers. — teal_transform_module • teal + + + + + +Data module for teal transformers. — teal_transform_module • teal + + + + + + + +before passing the data into the module."> + + + + Skip to contents @@ -19,11 +35,13 @@ + + @@ -86,7 +130,8 @@

    Data module for teal transformers.

    -

    Usage

    +

    Usage +

    teal_transform_module(
       ui = function(id) NULL,
       server = function(id, data) data,
    @@ -96,36 +141,46 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    ui
    +
    +
    ui +

    (function(id)) shiny module UI function; must only take id argument

    -
    server
    -

    (function(id, data)) +

    server +
    +
    +

    (function(id, data)) shiny module server function; that takes id and data argument, where the id is the module id and data is the reactive teal_data input. The server function must return reactive expression containing teal_data object.

    The server function definition should not use eventReactive as it may lead to unexpected behavior. -See vignettes("data-transform-as-shiny-module") for more information.

    +See vignettes("data-transform-as-shiny-module") for more information.

    + -
    label
    +
    label +

    (character(1)) Label of the module.

    -
    datanames
    +
    datanames +

    (character) Names of the datasets that are relevant for this module to evaluate. If set to character(0) then module would receive modules() datanames.

    -
    + +
    -

    Details

    +

    Details +

    teal_transform_module creates a teal_data_module object to transform data in a teal application. This transformation happens after the data has passed through the filtering activity in teal. The transformed data is then sent to the server of the teal_module().

    @@ -133,7 +188,8 @@

    Details
    -

    Examples

    +

    Examples +

    my_transformers <- list(
       teal_transform_module(
         label = "Custom transform for iris",
    @@ -162,17 +218,19 @@ 

    Examples

    + +

    - + + - + + diff --git a/main/reference/validate_app_title_tag.html b/main/reference/validate_app_title_tag.html index ac13e83096..5c555cf156 100644 --- a/main/reference/validate_app_title_tag.html +++ b/main/reference/validate_app_title_tag.html @@ -1,5 +1,21 @@ - -Function for validating the title parameter of teal::init — validate_app_title_tag • teal + + + + + + +Function for validating the title parameter of teal::init — validate_app_title_tag • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -70,7 +114,8 @@
    @@ -80,31 +125,38 @@

    Function for validating the title parameter of teal::init

    -

    Usage

    +

    Usage +

    validate_app_title_tag(shiny_tag)
    -

    Arguments

    +

    Arguments +

    -
    shiny_tag
    +
    +
    shiny_tag +

    (shiny.tag) Object to validate for a valid title.

    -
    + + + + - + + - + + diff --git a/main/reference/validate_has_data.html b/main/reference/validate_has_data.html index b065200127..7ddc5d012f 100644 --- a/main/reference/validate_has_data.html +++ b/main/reference/validate_has_data.html @@ -1,5 +1,21 @@ - -Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + +Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,7 +124,8 @@

    Validate that dataset has a minimum number of observations

    -

    Usage

    +

    Usage +

    validate_has_data(
       x,
       min_nrow = NULL,
    @@ -91,36 +136,46 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (data.frame)

    -
    min_nrow
    +
    min_nrow +

    (numeric(1)) Minimum allowed number of rows in x.

    -
    complete
    +
    complete +

    (logical(1)) Flag specifying whether to check only complete cases. Defaults to FALSE.

    -
    allow_inf
    +
    allow_inf +

    (logical(1)) Flag specifying whether to allow infinite values. Defaults to TRUE.

    -
    msg
    +
    msg +

    (character(1)) Additional message to display alongside the default message.

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(teal)
     ui <- fluidPage(
       sliderInput("len", "Max Length of Sepal",
    @@ -149,17 +204,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/validate_has_elements.html b/main/reference/validate_has_elements.html index 7bbc7c9717..6e7c7f8e8a 100644 --- a/main/reference/validate_has_elements.html +++ b/main/reference/validate_has_elements.html @@ -1,5 +1,21 @@ - -Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + +Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,29 +124,37 @@

    Validates that vector has length greater than 0

    -

    Usage

    +

    Usage +

    validate_has_elements(x, msg)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    vector

    -
    msg
    +
    msg +

    message to display

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B"), each = 15)
    @@ -137,17 +189,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/validate_has_variable.html b/main/reference/validate_has_variable.html index f4f319e5da..94551ec752 100644 --- a/main/reference/validate_has_variable.html +++ b/main/reference/validate_has_variable.html @@ -1,5 +1,21 @@ - -Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + +Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,33 +124,42 @@

    Validates that dataset contains specific variable

    -

    Usage

    +

    Usage +

    validate_has_variable(data, varname, msg)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (data.frame)

    -
    varname
    +
    varname +

    (character(1)) name of variable to check for in data

    -
    msg
    +
    msg +

    (character(1)) message to display if data does not include varname

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20)
    @@ -133,17 +186,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/validate_in.html b/main/reference/validate_in.html index 98c6a76026..ec2b0457c6 100644 --- a/main/reference/validate_in.html +++ b/main/reference/validate_in.html @@ -1,5 +1,21 @@ - -Validates that vector includes all expected values — validate_in • teal + + + + + + +Validates that vector includes all expected values — validate_in • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,33 +124,42 @@

    Validates that vector includes all expected values

    -

    Usage

    +

    Usage +

    validate_in(x, choices, msg)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    Vector of values to test.

    -
    choices
    +
    choices +

    Vector to test against.

    -
    msg
    +
    msg +

    (character(1)) Error message to display if some elements of x are not elements of choices.

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    ui <- fluidPage(
       selectInput(
         "species",
    @@ -131,17 +184,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/validate_inputs.html b/main/reference/validate_inputs.html index 09cf8ecb7d..e8885a4229 100644 --- a/main/reference/validate_inputs.html +++ b/main/reference/validate_inputs.html @@ -1,7 +1,23 @@ - -Send input validation messages to output — validate_inputs • teal + + + + + + +Send input validation messages to output — validate_inputs • teal + + + + + + + + + + + Skip to contents @@ -17,11 +33,13 @@ + + @@ -83,30 +127,38 @@

    Send input validation messages to output

    -

    Usage

    +

    Usage +

    validate_inputs(..., header = "Some inputs require attention")
    -

    Arguments

    +

    Arguments +

    -
    ...
    +
    +
    ... +

    either any number of InputValidator objects or an optionally named, possibly nested list of InputValidator objects, see Details

    -
    header
    +
    header +

    (character(1)) generic validation message; set to NULL to omit

    -
    + +
    -

    Value

    +

    Value +

    Returns NULL if the final validation call passes and a shiny.silent.error if it fails.

    -

    Details

    +

    Details +

    shiny::validate is used to withhold rendering of an output element until certain conditions are met and to print a validation message in place of the output element. @@ -125,12 +177,14 @@

    Detailsheader.

    -

    Examples

    +

    Examples +

    library(shiny)
     library(shinyvalidate)
     
    @@ -203,17 +257,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/validate_n_levels.html b/main/reference/validate_n_levels.html index a3ba58e087..02c1601c51 100644 --- a/main/reference/validate_n_levels.html +++ b/main/reference/validate_n_levels.html @@ -1,5 +1,21 @@ - -Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + +Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,41 +124,51 @@

    Validate that variables has expected number of levels

    -

    Usage

    +

    Usage +

    validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    variable name. If x is not a factor, the unique values are treated as levels.

    -
    min_levels
    +
    min_levels +

    cutoff for minimum number of levels of x

    -
    max_levels
    +
    max_levels +

    cutoff for maximum number of levels of x

    -
    var_name
    +
    var_name +

    name of variable being validated for use in validation message

    -
    + +
    -

    Details

    +

    Details +

    If the number of levels of x is less than min_levels or greater than max_levels the validation will fail. This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20),
    @@ -149,17 +203,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/validate_no_intersection.html b/main/reference/validate_no_intersection.html index cde10405ce..e6adf693a6 100644 --- a/main/reference/validate_no_intersection.html +++ b/main/reference/validate_no_intersection.html @@ -1,5 +1,21 @@ - -Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + +Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,33 +124,42 @@

    Validates no intersection between two vectors

    -

    Usage

    +

    Usage +

    validate_no_intersection(x, y, msg)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    vector

    -
    y
    +
    y +

    vector

    -
    msg
    +
    msg +

    (character(1)) message to display if x and y intersect

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B", "C"), each = 10)
    @@ -146,17 +199,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/validate_one_row_per_id.html b/main/reference/validate_one_row_per_id.html index 8a9346df24..c9e04ae63e 100644 --- a/main/reference/validate_one_row_per_id.html +++ b/main/reference/validate_one_row_per_id.html @@ -1,5 +1,21 @@ - -Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + +Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + + + + + + Skip to contents @@ -15,11 +31,13 @@ + + @@ -80,29 +124,37 @@

    Validate that dataset has unique rows for key variables

    -

    Usage

    +

    Usage +

    validate_one_row_per_id(x, key = c("USUBJID", "STUDYID"))
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (data.frame)

    -
    key
    +
    key +

    (character) Vector of ID variables from x that identify unique records.

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    iris$id <- rep(1:50, times = 3)
     ui <- fluidPage(
       selectInput(
    @@ -129,17 +181,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/search.json b/main/search.json index ed193b7743..641765f4a0 100644 --- a/main/search.json +++ b/main/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://insightsengineering.github.io/teal/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/teal/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/teal/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/teal/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/teal/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/teal/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/teal/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/teal/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/teal/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/teal/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/teal/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/adding-support-for-reporting.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Adding Support for Reporting to Custom Modules","text":"teal package offers integrated reporting feature utilizing teal.reporter package. comprehensive explanation reporting functionality , please refer documentation therein. article intended module developers aims provide guidance enhancing custom teal module automatic reporting feature. enhancement enables users incorporate snapshots module outputs report can reviewed another module automatically provided teal. Thus app user can interact report. responsibilities module developer include: Adding support reporting module. Specifying outputs constitute snapshot module. entire life cycle objects involved creating report configuring module preview report handled teal.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/adding-support-for-reporting.html","id":"custom-module","dir":"Articles","previous_headings":"","what":"Custom module","title":"Adding Support for Reporting to Custom Modules","text":"Let us consider example module, based example module teal: Using teal, can launch example module following:","code":"library(teal) my_module <- function(label = \"example teal module\") { module( label = label, server = function(id, data) { assert_reactive(data) checkmate::assert_class(isolate(data()), \"teal_data\") moduleServer(id, function(input, output, session) { updateSelectInput(session, \"dataname\", choices = isolate(datanames(data()))) output$dataset <- renderPrint({ req(input$dataname) data()[[input$dataname]] }) }) }, ui = function(id) { ns <- NS(id) sidebarLayout( sidebarPanel(selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL)), mainPanel(verbatimTextOutput(ns(\"dataset\"))) ) } ) } app <- init( data = teal_data(IRIS = iris, MTCARS = mtcars), modules = my_module() ) if (interactive()) shinyApp(app$ui, app$server)"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/articles/adding-support-for-reporting.html","id":"modify-the-declaration-of-the-server-function","dir":"Articles","previous_headings":"Add support for reporting","what":"Modify the declaration of the server function","title":"Adding Support for Reporting to Custom Modules","text":"first step add additional argument server function declaration - reporter. informs teal module requires reporter, included module called. See : modifications, module now ready launched teal: teal adds another tab application, titled Report previewer. However, visible change module operates appears user add content report module. requires inserting UI server elements teal.reporter module module body.","code":"my_module_with_reporting <- function(label = \"example teal module\") { module( label = label, server = function(id, data, reporter) { moduleServer(id, function(input, output, session) { updateSelectInput(session, \"dataname\", choices = isolate(datanames(data()))) output$dataset <- renderPrint({ req(input$dataname) data()[[input$dataname]] }) }) }, ui = function(id) { ns <- NS(id) sidebarLayout( sidebarPanel(selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL)), mainPanel(verbatimTextOutput(ns(\"dataset\"))) ) } ) } app <- init( data = teal_data(IRIS = iris, MTCARS = mtcars), modules = my_module_with_reporting() ) ## Initializing reporter_previewer_module if (interactive()) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/articles/adding-support-for-reporting.html","id":"insert-teal-reporter-module","dir":"Articles","previous_headings":"Add support for reporting","what":"Insert teal.reporter module","title":"Adding Support for Reporting to Custom Modules","text":"UI server logic necessary adding cards my_module_with_reporting report provided teal.reporter::simple_reporter_ui teal.reporter::simple_reporter_srv. updated module now ready launched: new piece UI added, buttons clickable. user can now add card report view Report previewer module preview still empty since instructed module put card.","code":"my_module_with_reporting <- function(label = \"example teal module\") { module( label = label, server = function(id, data, reporter) { moduleServer(id, function(input, output, session) { teal.reporter::simple_reporter_srv( id = \"reporter\", reporter = reporter, card_fun = function(card) card ) updateSelectInput(session, \"dataname\", choices = isolate(datanames(data()))) output$dataset <- renderPrint({ req(input$dataname) data()[[input$dataname]] }) }) }, ui = function(id) { ns <- NS(id) sidebarLayout( sidebarPanel( teal.reporter::simple_reporter_ui(ns(\"reporter\")), selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL) ), mainPanel(verbatimTextOutput(ns(\"dataset\"))) ) } ) } app <- init( data = teal_data(IRIS = iris, MTCARS = mtcars), modules = my_module_with_reporting() ) ## Initializing reporter_previewer_module if (interactive()) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/articles/adding-support-for-reporting.html","id":"add-content-to-the-card","dir":"Articles","previous_headings":"Add support for reporting","what":"Add content to the card","title":"Adding Support for Reporting to Custom Modules","text":"add content card, utilize public API exposed TealReportCard class. teal.reporter::simple_reporter_srv module accepts card_fun argument determines appearance output custom module. ReportCard derivatives allow sequential addition content according order method calls. explore content, can use $get_content method. details, refer documentation TealReportCard teal.reporter::ReportCard. add simple text card modifying card_fun argument passed teal.reporter::simple_reporter_srv. function must return card object, otherwise errors may occur teal. Now, application user can see text added custom_function Report previewer module.","code":"custom_function <- function(card = teal.reporter::ReportCard$new()) { card$append_text(\"This is content from a custom teal module!\") card } my_module_with_reporting <- function(label = \"example teal module\") { module( label = label, server = function(id, data, reporter) { moduleServer(id, function(input, output, session) { teal.reporter::simple_reporter_srv( id = \"reporter\", reporter = reporter, card_fun = custom_function ) updateSelectInput(session, \"dataname\", choices = isolate(datanames(data()))) output$dataset <- renderPrint({ req(input$dataname) data()[[input$dataname]] }) }) }, ui = function(id) { ns <- NS(id) sidebarLayout( sidebarPanel( teal.reporter::simple_reporter_ui(ns(\"reporter\")), selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL) ), mainPanel(verbatimTextOutput(ns(\"dataset\"))) ) } ) } app <- init( data = teal_data(IRIS = iris, MTCARS = mtcars), modules = my_module_with_reporting() ) ## Initializing reporter_previewer_module if (interactive()) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/articles/adding-support-for-reporting.html","id":"add-non-text-content-to-the-card","dir":"Articles","previous_headings":"Add support for reporting","what":"Add non-text content to the card","title":"Adding Support for Reporting to Custom Modules","text":"teal.reporter supports addition tables, charts, . information, explore API teal.reporter::ReportCard learn supported content types.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/adding-support-for-reporting.html","id":"tealreportcard","dir":"Articles","previous_headings":"Add support for reporting","what":"TealReportCard","title":"Adding Support for Reporting to Custom Modules","text":"teal exports TealReportCard class, extends teal.reporter::ReportCard class provides several convenient methods facilitate working teal features like filter panel source code. details, refer documentation TealReportCard. support TealReportCard, function passed teal.reporter::simple_reporter_srv must define default value card, shown : Without definition, API TealReportCard available within function.","code":"custom_function <- function(card = TealReportCard$new()) { # ... some code ... # card }"},{"path":"https://insightsengineering.github.io/teal/articles/adding-support-for-reporting.html","id":"example","dir":"Articles","previous_headings":"","what":"Example","title":"Adding Support for Reporting to Custom Modules","text":"conclusion, demonstrated build standard teal app code reproducibility reporter functionalities. Note server function requires filter_panel_api argument filter panel state can added report. final example, incorporated teal.code snippets. teal.code R library offers utilities storing code associating execution environment. allows ReporterCard store code necessary generate table along table . learn teal.code see vignette qenv teal.code.","code":"library(teal) library(teal.reporter) ## example_reporter_module <- function(label = \"Example\") { module( label = label, server = function(id, data, reporter, filter_panel_api) { with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, \"FilterPanelApi\") moduleServer(id, function(input, output, session) { updateSelectInput(session, \"dataname\", choices = isolate(datanames(data()))) dat <- reactive(data()[[input$dataname]]) observe({ req(dat()) updateSliderInput(session, \"nrow\", max = nrow(dat()), value = floor(nrow(dat()) / 5)) }) table_q <- reactive({ req(input$dataname) req(input$nrow) within( data(), result <- head(dataset, nrows), dataset = as.name(input$dataname), nrows = input$nrow ) }) output$table <- renderTable(table_q()[[\"result\"]]) ### REPORTER card_fun <- function(card = teal.reporter::ReportCard$new(), comment) { card$set_name(\"Table Module\") card$append_text(paste(\"Selected dataset\", input$dataname), \"header2\") card$append_text(\"Selected Filters\", \"header3\") if (with_filter) { card$append_text(filter_panel_api$get_filter_state(), \"verbatim\") } card$append_text(\"Encoding\", \"header3\") card$append_text( yaml::as.yaml( stats::setNames( lapply(c(\"dataname\", \"nrow\"), function(x) input[[x]]), c(\"dataname\", \"nrow\") ) ), \"verbatim\" ) card$append_text(\"Module Table\", \"header3\") card$append_table(table_q()[[\"result\"]]) card$append_text(\"Show R Code\", \"header3\") card$append_text(teal.code::get_code(table_q()), \"verbatim\") if (!comment == \"\") { card$append_text(\"Comment\", \"header3\") card$append_text(comment) } card } teal.reporter::add_card_button_srv( \"addReportCard\", reporter = reporter, card_fun = card_fun ) teal.reporter::download_report_button_srv(\"downloadButton\", reporter = reporter) teal.reporter::reset_report_button_srv(\"resetButton\", reporter) ### }) }, ui = function(id) { ns <- NS(id) sidebarLayout( sidebarPanel(selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL)), mainPanel( teal.reporter::simple_reporter_ui(ns(\"reporter\")), verbatimTextOutput(ns(\"dataset\")) ) ) sidebarLayout( sidebarPanel( tags$div( teal.reporter::add_card_button_ui(ns(\"addReportCard\")), teal.reporter::download_report_button_ui(ns(\"downloadButton\")), teal.reporter::reset_report_button_ui(ns(\"resetButton\")) ), selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL), sliderInput(ns(\"nrow\"), \"Number of rows\", min = 1, max = 1, value = 1, step = 1) ), mainPanel(tableOutput(ns(\"table\"))) ) } ) } app <- init( data = teal_data(AIR = airquality, IRIS = iris), modules = list( example_reporter_module(label = \"with Reporter\"), my_module(label = \"without Reporter\") ), filter = teal_slices(teal_slice(dataname = \"AIR\", varname = \"Temp\", selected = c(72, 85))), header = \"Example teal app with reporter\" ) ## Initializing reporter_previewer_module if (interactive()) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/actors.html","id":"teal-app-developer","dir":"Articles > Blueprint","previous_headings":"","what":"teal app developer","title":"Actors","text":"primary responsibility teal app developer leverage available building blocks teal framework create functional teal app analyses data. expedite app creation process, developers can take advantage pre-existing teal modules found R packages like teal.modules.general teal.modules.clinical. modules designed focus standardization versatility, making suitable wide range use cases. developing teal app, developer select appropriate teal modules integrate app’s interface ensure seamless usability end-users. learn existing modules, visit teal.gallery, contains several demo applications source code.","code":"%% This is a mermaid diagram, if you see this the plot failed to render. Sorry. graph LR A[teal App Developer]--utilizes--> B[teal modules] B--to create--> C[teal app] D[app user]--uses--> C style A fill:lightblue style C fill:gold style D fill:pink"},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/actors.html","id":"teal-module-developer","dir":"Articles > Blueprint","previous_headings":"","what":"teal module developer","title":"Actors","text":"main duty teal module developer construct compatible teal module can utilized within teal framework. Several factors influence scope requirements building teal module. creating reusable teal module, ’s advisable focus making general adaptable feasible maximize possibilities re-used future. However, developers freedom create teal module customized suit specific demands project. Ultimately, one teal modules employed construct teal app. learn creating custom modules follow Tutorial Creating Custom Module.","code":"%% This is a mermaid diagram, if you see this the plot failed to render. Sorry. graph LR A[Teal App Developer]--utilizes--> B[teal modules] E[Teal Module Developer]--develops--> B B--to create--> C[teal app] D[app user]--uses--> C style A fill:lightblue style E fill:lightgreen style D fill:pink style C fill:gold"},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/actors.html","id":"workflow-in-a-clinical-trial-study","dir":"Articles > Blueprint","previous_headings":"","what":"Workflow in a clinical trial study","title":"Actors","text":"clinical trial study setting, unique study teal app developer assigned study team accountable developing tailored teal app respective study. study teal app developer initially leverage existing teal modules R packages created teal module developers. cases need create new modules tailored study, study teal module developer need involved. Upon completion, study team designated teal app tailored specific study.","code":"%% This is a mermaid diagram, if you see this the plot failed to render. Sorry. %%| fig-width: 7.5 graph LR subgraph Study B A2[Study Teal App Developer]--utilizes--> B2[teal modules] E2[Study Teal Module Developer]-.develops.-> B2 B2--to create--> C2[study teal app] D2[study app user]--uses--> C2 end E3[Teal Module Developer]--develops--> B E3--develops-->B2 subgraph Study A A[Study Teal App Developer]--utilizes--> B[teal modules] E[Study Teal Module Developer]-.develops.-> B B--to create--> C[study teal app] D[study app user]--uses--> C end style A fill:lightblue style A2 fill:lightblue style E fill:limegreen style E2 fill:limegreen style E3 fill:lightgreen style D fill:pink style D2 fill:pink style C fill:gold style C2 fill:gold"},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/filter_panel.html","id":"introduction","dir":"Articles > Blueprint","previous_headings":"","what":"Introduction","title":"Filter Panel","text":"teal.slice package provides teal applications filter panel, powerful tool exploring analyzing data, key component teal framework. One great things filter panel comes built-teal, requiring programming knowledge use. filter panel provides convenient way users subset data, simplifying process exploration comprehension. Moreover, users can activate deactivate filter states interactively, either individually globally, using filter panel.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/filter_panel.html","id":"filter-flow","dir":"Articles > Blueprint","previous_headings":"","what":"Filter flow","title":"Filter Panel","text":"filter panel creates subsets data. Subsetting achieved creating filter states, holds logical predicate (filter condition) applied single variables. filter conditions composed single expression, call particular function (e.g. dplyr::filter), expression evaluated create filtered data subset. process entirely interactive. Filter states can created, removed, changed , however, app developer may choose constrain even restrict . filter state created, filter panel generates filter card shiny inputs appropriate type variable, e.g. range selectors numeric columns sets checkboxes drop-menus categorical ones. users interact filter cards, subsetting complete expression updated filtered data recomputed. filtered data passed teal modules downstream analysis. subsetting expression returned along data, ensuring unbroken track record entire analysis. Signature data also stored ensure reproducible results.","code":"%% This is a mermaid diagram, if you see this the plot failed to render. Sorry. sequenceDiagram autonumber data->teal.slice: processed by teal.slice->>shiny inputs: creates Note over teal.slice,shiny inputs: based on data type shiny inputs->>reactive dataset: updates reactive dataset->>teal modules: processed by"},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/in_app_data.html","id":"building-data-in-the-app","dir":"Articles > Blueprint","previous_headings":"","what":"Building data in the App","title":"In-App Data","text":"Typically data passed teal application available app run. However, always true cases data built app started. good example pulling data external repository, like database, uploading file. Additional authentication may required.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/in_app_data.html","id":"teal_data_module","dir":"Articles > Blueprint","previous_headings":"Building data in the App","what":"teal_data_module","title":"In-App Data","text":"Preprocessing actions can performed -app using teal_data_module. Rather passing teal_data object app, one may pass shiny module returns teal_data object (wrapped reactive expression). allows app developer include user actions data creation, fetching, even pre-filtering modification.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/in_app_data.html","id":"further-reading","dir":"Articles > Blueprint","previous_headings":"","what":"Further reading","title":"In-App Data","text":"complete explanation using teal_data_module can found teal vignette","code":""},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/input_data.html","id":"introduction","dir":"Articles > Blueprint","previous_headings":"","what":"Introduction","title":"Input Data","text":"Reproducibility paramount pharmaceutical industry. Accurate consistent results essential ensure high-quality research safety patients. prioritizing reproducibility, researchers can validate methods, confirm findings, contribute advancement field. teal.code package provides qenv class facilitates code reproducibility. Code passed qenv object, evaluated specific environment. qenv also stores code can retrieved request. teal_data class, serves primary data interface teal applications, inherits code tracking behavior qenv.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/input_data.html","id":"preparing-data-for-a-teal-application","dir":"Articles > Blueprint","previous_headings":"","what":"Preparing data for a teal application","title":"Input Data","text":"teal applications run data provided teal_data object. Data objects stored modified within environment teal_data object R code used tracked, allows code evaluated executed teal application, reproduced outside teal application. includes data loading, preprocessing, filtering, transformations, plotting, etc. teal_data object makes easy users reproduce validate results analyses. Learn use teal_data teal.data package vignettes.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/input_data.html","id":"show-r-code-and-reporter","dir":"Articles > Blueprint","previous_headings":"","what":"Show R Code and Reporter","title":"Input Data","text":"teal.modules.clinical teal.modules.general packages, ’ll find modules include convenient Show R Code button. button clicked, modal window appears, revealing R code responsible generating module’s output. functionality achieved inspecting teal_data object retrieving code . Show R Code button, users can easily copy independently run code reproduce analysis presented teal module. Reporter feature also leverages teal_data object operation. Much like Show R Code mechanism, code displayed Reporter Card extracted teal_data object. learn Reporter feature, please visit teal.reporter documentation. Overall, qenv teal.code child class, teal_data, powerful tools ensuring code reproducibility promoting high-quality research R programming language.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/module_encapsulation.html","id":"introduction","dir":"Articles > Blueprint","previous_headings":"","what":"Introduction","title":"Module Encapsulation","text":"teal framework leverages shiny module concept enable encapsulation analytical actions teal modules, maintaining seamless communication modules application.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/module_encapsulation.html","id":"benefits","dir":"Articles > Blueprint","previous_headings":"","what":"Benefits","title":"Module Encapsulation","text":"implementing modular app technique shiny module creation teal module, several benefits realized: Streamlined maintenance development teal module becomes manageable, can function independently teal framework. separation allows developers maintain module ease. approach successfully applied R packages dedicated teal module development, teal.modules.general teal.modules.clinical. Enhanced focus outputteal module developers can concentrate solely refining parameters encoding, output aspects (data summarization visualization) without need concern intricacies teal framework. developed correctly, module seamlessly integrates teal. Facilitated collaborationteal module development becomes accessible entry point developers interested collaborating. approach encourages user collaboration improvement teal modules, developers gain deeper understanding mechanics teal framework.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/blueprint/product_map.html","id":"why-so-many-packages","dir":"Articles > Blueprint","previous_headings":"","what":"Why so many packages?","title":"Product Map","text":"breaking teal features, modules, calculations dedicated packages, maintenance made significantly manageable.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Bootstrap Themes in teal","text":"offer easy application custom Bootstrap theme teal app. teal uses bslib R package provides tools customizing Bootstrap themes, including shiny apps.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"usage","dir":"Articles","previous_headings":"","what":"Usage","title":"Bootstrap Themes in teal","text":"teal app developers can specify custom Bootstrap themes setting teal.bs_theme R option, set bslib::bs_theme object. bslib::bs_theme(...) function creates Bootstrap theme object, one specifies (major) Bootstrap version (default one 3, 4, 5). Optionally one can choose bootswatch theme customize app CSS functions like bslib::bs_add_rules. Please read custom themes bslib getting started vignette. teal.bs_theme R option specified top code script. Please install bslib package run code .","code":""},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"teal-bs_theme-r-option","dir":"Articles","previous_headings":"Usage","what":"teal.bs_theme R option","title":"Bootstrap Themes in teal","text":"","code":"options(\"teal.bs_theme\" = bslib::bs_theme(\"Custom Options\")) ####################### # teal::init() app code #######################"},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"bootstrap-version-and-themes","dir":"Articles","previous_headings":"Usage","what":"Bootstrap version and themes","title":"Bootstrap Themes in teal","text":"best recommended ways explore Bootstrap themes use bslib::run_with_themer(shinyApp(app$ui, app$server)) bslib::bs_theme_preview(), offer interactive explore mode (supported Bootstrap 3). bslib::bs_theme_preview() recommended end user shiny app yet. already shiny app want test different Bootstrap themes (CSS styling) bslib::run_with_themer(shinyApp(app$ui, app$server)) recommended. Available Bootstrap versions checked bslib::versions() Bootstrap themes (bootswatch) bslib::bootswatch_themes(version = \"5\").","code":"# bslib::versions() # bslib::bootswatch_themes(version = \"5\") options(\"teal.bs_theme\" = bslib::bs_theme(version = \"5\", bootswatch = \"lux\")) # or options(\"teal.bs_theme\" = bslib::bs_theme_update(bslib::bs_theme(version = \"5\"), bootswatch = \"lux\"))"},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"default-bootstrap-theme","dir":"Articles","previous_headings":"Usage","what":"Default Bootstrap theme","title":"Bootstrap Themes in teal","text":"using default bslib theme version (3, 4 5), styling might expected. Please run interactive themer (recommended) apply custom theme explore theme options. many scenarios updating theme might enough e.g. font color specifications updated .","code":"# instead of options(\"teal.bs_theme\" = bslib::bs_theme(version = \"5\")) # try non-default themes options(\"teal.bs_theme\" = bslib::bs_theme(version = \"5\", bootswatch = \"THEME NAME\". ...)) # or run the app inside bslib::run_with_themer"},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"reset-the-bootstrap-theme","dir":"Articles","previous_headings":"Usage","what":"Reset the Bootstrap theme","title":"Bootstrap Themes in teal","text":"Please use options(\"teal.bs_theme\" = NULL) call return default shiny Bootstrap teal apps.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"theme-not-updated","dir":"Articles","previous_headings":"Usage","what":"Theme not updated","title":"Bootstrap Themes in teal","text":"One reason theme updated web browser caches previous one, especially different themes run one another. Please, use Cmd+Shift+R (Mac) Ctrl+F5 (Windows) hard refresh webpage.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"custom-teal-css","dir":"Articles","previous_headings":"Usage","what":"Custom teal CSS","title":"Bootstrap Themes in teal","text":"important HTML tags teal specific id class, can directly styled. bslib::bs_add_rules function used around bslib::bs_theme object apply custom CSS rules. bslib::bs_add_* family functions used specify low-level Bootstrap elements.","code":"library(magrittr) options(\"teal.bs_theme\" = bslib::bs_add_rules( bslib::bs_theme(version = \"5\"), \"Anything understood by sass::as_sass()\" ))"},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"bootstrap-null-vs-bootstrap-3","dir":"Articles","previous_headings":"Usage","what":"Bootstrap NULL vs Bootstrap 3","title":"Bootstrap Themes in teal","text":"important note statements options(\"teal.bs_theme\" = NULL) options(\"teal.bs_theme\" = bslib::bs_theme(version = \"3\") equivalent bslib approximation default shiny theme Bootstrap version 3 can introduce discrepancies. One important difference using bslib::bs_theme(version = \"3\", bootswatch = \"THEME NAME\") one can apply custom Bootstrap theme. Another one usage bslib::bs_theme(version = \"3\") requires installation shinyWidgets package minimum version 0.7.4.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"regular-shinyfluidpage","dir":"Articles","previous_headings":"Usage","what":"Regular shiny::fluidPage","title":"Bootstrap Themes in teal","text":"want update theme regular shiny::fluidPage-like app, need teal.bs_theme option. Simply provide bslib::bs_theme directly: shiny::fluidPage(theme = bslib::bs_theme(...), ...).","code":""},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"interactive-theming-guide","dir":"Articles","previous_headings":"Usage","what":"Interactive theming guide","title":"Bootstrap Themes in teal","text":"section provide step--step guide customizing teal application theme interactively bslib::run_with_themer(). recommend starting simple case satisfied, verifying full application. end use teal application . example assume want use Bootstrap 5. start, launch app bslib::run_with_themer(app$ui, app$server) instead shiny::shinyApp. gives us following. Note Theme Customizer section right hand side. added bslib customize theme.","code":"options(\"teal.bs_theme\" = bslib::bs_theme(version = \"5\")) library(teal) app <- init( data = teal_data(IRIS = iris), filter = teal_slices(teal_slice(\"IRIS\", \"Sepal.Length\", selected = c(5, 7))), modules = modules(example_module(), example_module()), header = \"My first teal application\" ) bslib::run_with_themer(shinyApp(app$ui, app$server))"},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"set-overall-app-theme","dir":"Articles","previous_headings":"Usage > Interactive theming guide","what":"Set overall app theme","title":"Bootstrap Themes in teal","text":"Instead starting scratch, want start Bootswatch theme. Let us select Minty theme “Overall theme” drop-. bslib updated CSS styles use new theme, including customizer theme. Additionally, look R console, see helpful guide provides code update theme. teal applications don’t actually use bs_theme_update opt bs_theme instead. However, printed code still helpful.","code":"#### Update your bs_theme() R code with: ##### bs_theme_update(theme, bootswatch = \"minty\")"},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"customize-a-bootswatch-theme","dir":"Articles","previous_headings":"Usage > Interactive theming guide","what":"Customize a bootswatch theme","title":"Bootstrap Themes in teal","text":"base theme (Minty) close want let’s make modifications. start, increase base font size. , choose “Fonts” section customizer theme set value “Base font size” input. use 1.25 , means fonts increased factor 1.25. check R console, see bslib printed bs_theme_update(theme, font_scale = 1.25, bootswatch = \"minty\"), now includes font size adjustment. Finally, suppose want borders rounded. customizer theme, can go “Options” uncheck “Rounded corners” box. expected, corners longer rounded. look R console, now see bs_theme_update(theme, font_scale = 1.25,enable-rounded= FALSE, bootswatch = \"minty\").","code":""},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"apply-the-customized-theme","dir":"Articles","previous_headings":"Usage > Interactive theming guide","what":"Apply the customized theme","title":"Bootstrap Themes in teal","text":"customization complete, apply changes application. , use option teal.bs_theme like time expand bslib::bs_theme call include changes. Luckily, arguments printed R console running app themer can plugged right . Now application custom theme applied. Please note interactive themer contains commonly applied options. customization options, review bslib documentation.","code":"options( \"teal.bs_theme\" = bslib::bs_theme( version = \"5\", font_scale = 1.25, `enable-rounded` = FALSE, bootswatch = \"minty\" ) ) library(teal) app <- init( data = teal_data(IRIS = iris), filter = teal_slices(teal_slice(\"IRIS\", \"Sepal.Length\", selected = c(5, 7))), modules = modules(example_module(), example_module()) ) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/articles/bootstrap-themes-in-teal.html","id":"sources","dir":"Articles","previous_headings":"","what":"Sources","title":"Bootstrap Themes in teal","text":"https://rstudio.github.io/bslib/","code":""},{"path":"https://insightsengineering.github.io/teal/articles/creating-custom-modules.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Creating Custom Modules","text":"teal framework provides large catalog plug--ready analysis modules incorporated teal applications. However, also possible create modules using module function.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/articles/creating-custom-modules.html","id":"ui-function","dir":"Articles","previous_headings":"Components of a module","what":"UI function","title":"Creating Custom Modules","text":"function contains UI required module. function least argument id. See server section details.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/creating-custom-modules.html","id":"server-function","dir":"Articles","previous_headings":"Components of a module","what":"Server function","title":"Creating Custom Modules","text":"function contains shiny server logic module form: data arrives module teal_data object, data container used throughout teal application. teal_data passed init function building application , filtering filter panel, passed modules, wrapped reactive expression. teal_data class allows modules track R code execute module outputs can reproduced. See teal.data package detailed explanation.","code":"function( id, data, # optional; use if module needs access to application data filter_panel_api, # optional; use if module needs access to filter panel; see teal.slice reporter, # optional; use if module supports reporting; see reporting vignette ...) { moduleServer(id, function(input, output, session) { # module code here }) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/articles/creating-custom-modules.html","id":"viewing-data","dir":"Articles","previous_headings":"Example modules","what":"Viewing data","title":"Creating Custom Modules","text":"minimal module allows user select view one dataset time. default, filtering enabled datasets. Note dataset choices specified datanames property teal_data container.","code":"library(teal) my_module <- function(label = \"example teal module\") { checkmate::assert_string(label) module( label = label, server = function(id, data) { moduleServer(id, function(input, output, session) { updateSelectInput(session, \"dataname\", choices = isolate(datanames(data()))) output$dataset <- renderPrint({ req(input$dataname) data()[[input$dataname]] }) }) }, ui = function(id) { ns <- NS(id) sidebarLayout( sidebarPanel(selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL)), mainPanel(verbatimTextOutput(ns(\"dataset\"))) ) } ) }"},{"path":"https://insightsengineering.github.io/teal/articles/creating-custom-modules.html","id":"interacting-with-data-and-viewing-code","dir":"Articles","previous_headings":"Example modules","what":"Interacting with data and viewing code","title":"Creating Custom Modules","text":"example allows user interact data create simple visualization. addition, prints code can used reproduce visualization. module ready used teal app.","code":"library(teal) # ui function for the module # allows for selecting dataset and one of its numeric variables ui_histogram_example <- function(id) { ns <- NS(id) sidebarLayout( sidebarPanel( selectInput(ns(\"datasets\"), \"select dataset\", choices = NULL), selectInput(ns(\"numerics\"), \"select numeric variable\", choices = NULL) ), mainPanel( plotOutput(ns(\"plot\")), verbatimTextOutput(ns(\"code\")) ), ) } # server function for the module # presents datasets and numeric variables for selection # displays a histogram of the selected variable # displays code to reproduce the histogram srv_histogram_example <- function(id, data) { moduleServer(id, function(input, output, session) { # update dataset and variable choices # each selection stored in separate reactive expression updateSelectInput(inputId = \"datasets\", choices = isolate(datanames(data()))) observe({ req(dataset()) nums <- vapply(data()[[dataset()]], is.numeric, logical(1L)) updateSelectInput(inputId = \"numerics\", choices = names(nums[nums])) }) dataset <- reactive(input$datasets) selected <- reactive(input$numerics) # add plot code plot_code_q <- reactive({ validate(need(length(dataset()) == 1L, \"Please select a dataset\")) validate(need(length(selected()) == 1L, \"Please select a variable\")) req(selected() %in% names(data()[[dataset()]])) # evaluate plotting expression within data # inject input values into plotting expression within( data(), p <- hist(dataset[, selected], las = 1), dataset = as.name(dataset()), selected = selected() ) }) # view plot output$plot <- renderPlot({ plot_code_q()[[\"p\"]] }) # view code output$code <- renderText({ get_code(plot_code_q()) }) }) } # function that creates module instance to use in `teal` app tm_histogram_example <- function(label) { module( label = label, server = srv_histogram_example, ui = ui_histogram_example, datanames = \"all\" ) } app <- init( data = teal_data(IRIS = iris, NPK = npk), modules = tm_histogram_example(label = \"Histogram Module\"), header = \"Simple app with custom histogram module\" ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/articles/creating-custom-modules.html","id":"adding-reporting-to-a-module","dir":"Articles","previous_headings":"","what":"Adding reporting to a module","title":"Creating Custom Modules","text":"Refer vignette read adding support reporting teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/creating-custom-modules.html","id":"using-standard-widgets-in-your-custom-module","dir":"Articles","previous_headings":"","what":"Using standard widgets in your custom module","title":"Creating Custom Modules","text":"teal.widgets package provides various widgets can leveraged quickly create standard elements custom module.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/data-as-shiny-module.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Data as shiny Module","text":"Proper functioning teal application requires presence teal_data object. Typically, teal_data object created global environment passed data argument init. teal_data object contain elements necessary successful execution application’s modules. scenarios, however, application developers may opt postpone data operations application runtime. can done passing special shiny module data argument. teal_data_module function used build module following components: UI function; accepts one argument, id; defines user interface elements data module server function: accepts one argument, id; defines server logic data module, including data creation; must return reactive expression containing teal_data object teal run module application starts resulting teal_data object used throughout teal (analytic) modules.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/data-as-shiny-module.html","id":"creating-data-in-app","dir":"Articles","previous_headings":"","what":"Creating data in-app","title":"Data as shiny Module","text":"One case postponing data operations datasets dynamic, frequently updated. data created kept global environment. Using teal_data_module enables creating dataset scratch every time user starts application. See ?qenv detailed explanation use within method.","code":"library(teal) data_module <- teal_data_module( ui = function(id) tags$div(), server = function(id) { moduleServer(id, function(input, output, session) { reactive({ data <- within( teal_data(), { dataset1 <- iris dataset2 <- mtcars } ) datanames(data) <- c(\"dataset1\", \"dataset2\") # optional data }) }) } ) app <- init( data = data_module, modules = example_module() ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/articles/data-as-shiny-module.html","id":"modification-of-data-in-app","dir":"Articles","previous_headings":"","what":"Modification of data in-app","title":"Data as shiny Module","text":"Another reason postpone data operations involve application user preprocessing stage. initial, constant form data can created global environment modified app starts. following example illustrates teal_data_module can utilized subset data based user inputs: Note running preprocessing code module opposed global environment increase app loading times. recommended keep constant code global environment move dynamic parts data module.","code":"data <- within(teal_data(), { dataset1 <- iris dataset2 <- mtcars }) datanames(data) <- c(\"dataset1\", \"dataset2\") data_module <- teal_data_module( ui = function(id) { ns <- NS(id) tags$div( selectInput(ns(\"species\"), \"Select species to keep\", choices = unique(iris$Species), multiple = TRUE ), actionButton(ns(\"submit\"), \"Submit\") ) }, server = function(id) { moduleServer(id, function(input, output, session) { eventReactive(input$submit, { data_modified <- within( data, dataset1 <- subset(dataset1, Species %in% selected), selected = input$species ) data_modified }) }) } ) app <- init( data = data_module, modules = example_module() ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/articles/data-as-shiny-module.html","id":"warning","dir":"Articles","previous_headings":"","what":"Data as shiny Module","title":"Data as shiny Module","text":"using teal_data_module modify pre-existing teal_data object, crucial server function data object defined environment, otherwise server function able access data object. means server functions defined packages used.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/data-as-shiny-module.html","id":"extending-existing-teal_data_modules","dir":"Articles","previous_headings":"Modification of data in-app","what":"Extending existing teal_data_modules","title":"Data as shiny Module","text":"server logic teal_data_module can modified used app, using within function. allows teal_data object created teal_data_module processed . previous example, data_module takes predefined teal_data object allows app user select subset. following example modifies data_module new columns added data retrieved.","code":"data_module_2 <- within( data_module, { # Create new column with Ratio of Sepal.Width and Petal.Width dataset1$Ratio.Sepal.Petal.Width <- round(dataset1$Sepal.Width / dataset1$Petal.Width, digits = 2L) # Create new column that converts Miles per Galon to Liter per 100 Km dataset2$lp100km <- round(dataset2$mpg * 0.42514371, digits = 2L) } ) app <- init( data = data_module_2, modules = example_module() ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/articles/data-transform-as-shiny-module.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Data Transformations as shiny Module","text":"teal version 0.16 introduced new argument teal::module called transformers. argument allows pass list teal_data_module objects created using teal_transform_module() function. main benefit teal_transform_module() ability transform data passing module. feature allows extend regular behavior existing modules specifying custom data operations data inside module. teal_transform_module() Shiny module takes ui server arguments. provided, teal execute data transformations specified module loaded whenever data changes. server extend logic behind data manipulations, ui extends filter panel new UI elements orchestrate transformer inputs. vignette presents way manage custom data transformations teal apps.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/data-transform-as-shiny-module.html","id":"creating-your-first-custom-data-transformation-module","dir":"Articles","previous_headings":"","what":"Creating your first custom data transformation module","title":"Data Transformations as shiny Module","text":"initialize simple teal app pass iris mtcars input datasets.","code":"library(teal) data <- within(teal_data(), { iris <- iris mtcars <- mtcars }) app <- init( data = data, modules = teal::example_module() ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/articles/data-transform-as-shiny-module.html","id":"single-transformer","dir":"Articles","previous_headings":"Creating your first custom data transformation module","what":"Single Transformer","title":"Data Transformations as shiny Module","text":"Let’s create simple teal_transform_module returns first n number rows iris based user input. creating ui numericInput user input number rows displayed. server function take reactive data perform transformation return new reactive data. Note: recommended return reactive() teal_data() server code teal_transform_module robust maintaining reactivity Shiny. planning using eventReactive() server, event include data() (example eventReactive(list(input$, data()), {...})). discussion.","code":"data <- within(teal_data(), { iris <- iris mtcars <- mtcars }) datanames(data) <- c(\"iris\", \"mtcars\") my_transformers <- list( teal_transform_module( label = \"Custom transform for iris\", ui = function(id) { ns <- NS(id) tags$div( numericInput(ns(\"n_rows\"), \"Number of rows to subset\", value = 6, min = 1, max = 150, step = 1) ) }, server = function(id, data) { moduleServer(id, function(input, output, session) { reactive({ within(data(), { iris <- head(iris, num_rows) }, num_rows = input$n_rows ) }) }) } ) ) app <- init( data = data, modules = teal::example_module(transformers = my_transformers) ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/articles/data-transform-as-shiny-module.html","id":"multiple-transformers","dir":"Articles","previous_headings":"Creating your first custom data transformation module","what":"Multiple Transformers","title":"Data Transformations as shiny Module","text":"Note can add multiple teal transformers including teal_transform_module list. Let’s add another transformation mtcars dataset creates column rownames mtcars. Note module interactive UI elements.","code":"data <- within(teal_data(), { iris <- iris mtcars <- mtcars }) datanames(data) <- c(\"iris\", \"mtcars\") my_transformers <- list( teal_transform_module( label = \"Custom transform for iris\", ui = function(id) { ns <- NS(id) tags$div( numericInput(ns(\"n_rows\"), \"Number of rows to subset\", value = 6, min = 1, max = 150, step = 1) ) }, server = function(id, data) { moduleServer(id, function(input, output, session) { reactive({ within(data(), { iris <- head(iris, num_rows) }, num_rows = input$n_rows ) }) }) } ), teal_transform_module( label = \"Custom transform for mtcars\", ui = function(id) { ns <- NS(id) tags$div( \"Adding rownames column to mtcars\" ) }, server = function(id, data) { moduleServer(id, function(input, output, session) { reactive({ within(data(), { mtcars$rownames <- rownames(mtcars) rownames(mtcars) <- NULL }) }) }) } ) ) app <- init( data = data, modules = teal::example_module(transformers = my_transformers) ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/articles/filter-panel.html","id":"teal-apps-with-the-filter-panel","dir":"Articles","previous_headings":"","what":"teal apps with the filter panel","title":"Filter Panel","text":"filter panel integral part teal applications included right side. Based selections made filter panel, filter expressions executed passing data teal modules. technical details filter panel extensively described teal.slice documentation. default, init initializes filter panel without active filters allows user add filters column. start teal application predefined filters, one must specify filter argument. following example four filters specified using teal_slice function wrapped together teal_slices.","code":"library(teal) app <- init( data = teal_data(IRIS = iris, CARS = mtcars), modules = example_module(), filter = teal_slices( teal_slice(dataname = \"IRIS\", varname = \"Sepal.Length\"), teal_slice(dataname = \"IRIS\", varname = \"Species\", selected = \"setosa\"), teal_slice(dataname = \"CARS\", varname = \"mpg\", selected = c(20, Inf)), teal_slice(dataname = \"CARS\", expr = \"qsec < 20\", title = \"1/4 mile under 20 sec\", id = \"qsec_20\") ) ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/articles/filter-panel.html","id":"filter-panel-respective-to-teal_module","dir":"Articles","previous_headings":"Extending teal.slice","what":"Filter panel respective to teal_module","title":"Filter Panel","text":"teal_module (see ?module) object contains datanames attribute determines data sets sent module. filter panel display data sets hide rest module active.","code":"library(teal) app <- init( data = teal_data(IRIS = iris, CARS = mtcars), modules = modules( example_module(label = \"all datasets\"), example_module(label = \"IRIS only\", datanames = \"IRIS\"), example_module(label = \"CARS only\", datanames = \"CARS\"), example_module(label = \"no filter panel\", datanames = NULL) ) ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/articles/filter-panel.html","id":"global-and-module-specific-filter-panel","dir":"Articles","previous_headings":"Extending teal.slice","what":"Global and module specific filter panel","title":"Filter Panel","text":"teal contains teal_slices function extends original teal_slices found teal.slice adding two arguments: module_specific mapping. default init initializes app “global” filter panel, modules use filters. Setting module_specific = TRUE switches “module-specific” filter panel, module can different set filters active time. still possible set global filters shared among modules. One possible scenario depicted figure : filter 1 shared modules filter 2 shared module 1 module 3 filter 3 used module 2 filter 4 used module 1 filter 5 filter 6 active modules achieve described setup, one must set module_specific argument TRUE use mapping argument match filters modules. mapping takes named list element names correspond module labels, elements vectors teal_slice ids applied module startup. teal_slices listed element called \"global_filters\" applied modules. detailed explanation filter states, see teal.slice vignette.","code":"library(teal) app <- init( data = teal_data(mtcars = mtcars), modules = modules( example_module(label = \"module 1\"), example_module(label = \"module 2\"), example_module(label = \"module 3\"), example_module(label = \"module 4\") ), filter = teal_slices( # filters created with id teal_slice(dataname = \"mtcars\", varname = \"mpg\", id = \"filter 1\"), teal_slice(dataname = \"mtcars\", varname = \"cyl\", id = \"filter 2\"), teal_slice(dataname = \"mtcars\", varname = \"disp\", id = \"filter 3\"), teal_slice(dataname = \"mtcars\", varname = \"hp\", id = \"filter 4\"), teal_slice(dataname = \"mtcars\", varname = \"drat\", id = \"filter 5\"), teal_slice(dataname = \"mtcars\", varname = \"wt\", id = \"filter 6\"), # module-specific filtering enabled module_specific = TRUE, # filters mapped to modules mapping = list( \"module 1\" = c(\"filter 2\", \"filter 4\"), \"module 2\" = \"filter 3\", \"module 3\" = \"filter 2\", global_filters = \"filter 1\" ) ) ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/articles/getting-started-with-teal.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Getting Started with teal","text":"teal shiny-based interactive exploration framework analyzing data, particular emphasis CDISC clinical trial data. teal applications allow users : “Pull” data external data sources Dynamically filter data used analyses Generate reproducible code regenerate -screen analyses Create download reports containing results analyses (analysis modules support reporting) addition, teal framework provides application developers : large suite custom-made standard analysis modules included applications logging framework facilitate debugging applications advanced users framework can also create new analysis modules can added teal applications.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/getting-started-with-teal.html","id":"your-first-teal-application","dir":"Articles","previous_headings":"","what":"Your first teal application:","title":"Getting Started with teal","text":"simple teal application takes iris mtcars datasets displays contents: Hovering image shows teal application generated code. Every teal application composed following elements, can controlled app developer passing arguments init function: Application Title (browser’s tab title): title application. Application Header Footer (top bottom app): content placed top bottom application. example code: two modules named “Module 1” “Module 2”. Module Content (panel middle): outputs currently active module. example code: filter panel initialized filter Species variable iris dataset.","code":"library(teal) app <- init( data = teal_data(IRIS = iris, MTCARS = mtcars), modules = modules( example_module(\"Module 1\"), example_module(\"Module 2\") ), filter = teal_slices( teal_slice(dataname = \"IRIS\", varname = \"Species\", selected = \"setosa\") ), title = build_app_title(title = \"My first teal app\"), header = h3(\"My first teal application\"), footer = tags$div(a(\"Powered by teal\", href = \"https://insightsengineering.github.io/teal/latest-tag/\")) ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/articles/getting-started-with-teal.html","id":"creating-your-own-applications","dir":"Articles","previous_headings":"","what":"Creating your own applications","title":"Getting Started with teal","text":"key function use create teal application init, requires two mandatory arguments: data modules. optional arguments init, can used customize application. Please refer documentation init details.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/getting-started-with-teal.html","id":"application-data","dir":"Articles","previous_headings":"Creating your own applications","what":"Application data","title":"Getting Started with teal","text":"data argument init function specifies data used application. datasets used teal application must passed teal_data object. also possible specify relationships datasets using join_keys argument case datasets related. See vignette details. data available pulled remote source, init must receive teal_data_module specifies obtain desired datasets put teal_data object. See vignette details. order use CDISC clinical trial data teal application cdisc_data function used instead. Custom SDTM standards can handled teal_data join_keys. details, recommend exploring teal.data package documentation.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/getting-started-with-teal.html","id":"modules","dir":"Articles","previous_headings":"Creating your own applications","what":"Modules","title":"Getting Started with teal","text":"modules argument init consists list teal modules (can wrapped together using function modules). Core teal developers created several universal teal modules can useful teal application. learn create modules, please explore Creating Custom Modules vignette. use predefined modules, see references links modules.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/getting-started-with-teal.html","id":"defining-filters","dir":"Articles","previous_headings":"Creating your own applications","what":"Defining filters","title":"Getting Started with teal","text":"optional filter argument init allows initialize application predefined filters. details see Filter Panel vignette .","code":""},{"path":"https://insightsengineering.github.io/teal/articles/getting-started-with-teal.html","id":"reporting","dir":"Articles","previous_headings":"Creating your own applications","what":"Reporting","title":"Getting Started with teal","text":"modules teal application support reporting (see teal.reporter details), users application can add outputs modules report. report can downloaded special Report Previewer module added application additional tab, users can view configure reports downloading . See details vignette.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/getting-started-with-teal.html","id":"reproducible-code","dir":"Articles","previous_headings":"Creating your own applications","what":"Reproducible code","title":"Getting Started with teal","text":"teal hands data reproducible code every module included application. Note teal display code, modules’ responsibility. example, example_module function used shows code main panel together outputs. details see vignette.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/getting-started-with-teal.html","id":"where-to-go-next","dir":"Articles","previous_headings":"","what":"Where to go next","title":"Getting Started with teal","text":"learn teal framework recommend first exploring available analysis modules. example see: general analysis modules clinical trial reporting modules modules analyzing MultiAssayExperiment objects demo teal apps see: gallery sample apps based teal catalog Tables, Listings Graphs catalog Biomarker Analysis Templates Tables Graphs teal framework relies set supporting packages whose documentation provides -depth information. packages interest defining tealapplications : teal.data: defining data teal application. teal.slice: defining data filtering passing teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/including-data-in-teal-applications.html","id":"data-in-teal-applications","dir":"Articles","previous_headings":"","what":"Data in teal Applications","title":"Including Data in teal Applications","text":"teal framework readily accepts general, non-relational data. Modules defined teal.modules.general package designed work well kind data. Relational data handled just well mechanism passing data applications virtually . includes clinical data conforms ADaM standard. working making framework extendable support data structures can added relative ease. Currently support offered MultiAssayExperiment class. applications use teal_data class data container. teal_data objects passed init build application, modified filter panel (applicable) passed modules. Thus, first step building teal app creating teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/including-data-in-teal-applications.html","id":"general-data","dir":"Articles","previous_headings":"Data in teal Applications","what":"General data","title":"Including Data in teal Applications","text":"teal_data object created calling teal_data function passing data objects name:value pairs. Note iris cars added datanames property data (see datanames property). sufficient run teal app.","code":"library(teal) # create teal_data data <- teal_data(iris = iris, cars = mtcars) # build app app <- init( data = data, modules = example_module() ) # run app shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/articles/including-data-in-teal-applications.html","id":"reproducible-data","dir":"Articles","previous_headings":"Data in teal Applications","what":"Reproducible data","title":"Including Data in teal Applications","text":"teal_data object stores data separate environment. Therefore, modifying stored datasets requires processing code evaluated environment. Following logic, one can create empty teal_data object populate evaluating code. can done using eval_code function , conveniently, using within function. key difference eval_code within former accepts code character vector language objects (calls expressions), within accepts inline code. See ?qenv details. Note first example data created passing data objects, code used create data objects unknown therefore process reproduced. Inspecting code app created reveals note preprocessing code absent. necessary code can supplied code argument teal_data function. Keep mind code executed teal_data’s environment, may reproduce environment. object considered unverified (see verified property). reproducibility required, recommend creating empty teal_data object evaluating code.","code":"# create empty object data_empty <- teal_data() # run code in the object data_populated_1 <- eval_code(data_empty, code = \"iris <- iris cars <- mtcars\") # alternative data_populated_2 <- within(data_empty, { iris <- iris cars <- mtcars }) data_with_code <- teal_data( iris = iris, cars = mtcars, code = \"iris <- iris cars <- mtcars\" )"},{"path":"https://insightsengineering.github.io/teal/articles/including-data-in-teal-applications.html","id":"code-from-file","dir":"Articles","previous_headings":"Data in teal Applications > Reproducible data","what":"code from file","title":"Including Data in teal Applications","text":"ability pass code character vector eval_code opens door using code stored file.","code":"# not run data_from_file <- teal_data() data_from_file <- eval_code(data, readLines(\"\"))"},{"path":"https://insightsengineering.github.io/teal/articles/including-data-in-teal-applications.html","id":"creating-data-in-app","dir":"Articles","previous_headings":"Data in teal Applications","what":"Creating data in-app","title":"Including Data in teal Applications","text":"one departure passing teal_data object init data exist environment app run, e.g. pulled remote source. cases teal_data_module must used. See vignette detailed description.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/including-data-in-teal-applications.html","id":"clinical-data","dir":"Articles","previous_headings":"","what":"Clinical data","title":"Including Data in teal Applications","text":"Currently teal supports two specialized data formats.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/including-data-in-teal-applications.html","id":"adam-data","dir":"Articles","previous_headings":"Clinical data","what":"ADaM data","title":"Including Data in teal Applications","text":"ADaM data model, defined CDISC standards, specifies relationships subject-level parent dataset observation-level child datasets. cdisc_data function takes advantage fact automatically set default joining keys (see join_keys property). example , two standard ADaM datasets (ADSL ADTTE) passed cdisc_data.","code":"# create cdisc_data data_cdisc <- cdisc_data(ADSL = teal.data::rADSL, ADTTE = teal.data::rADSL) datanames(data_cdisc) #> [1] \"ADSL\" \"ADTTE\" join_keys(data_cdisc) #> A join_keys object containing foreign keys between 2 datasets: #> ADSL: [STUDYID, USUBJID] #> <-- ADTTE: [STUDYID, USUBJID] #> ADTTE: [STUDYID, USUBJID, PARAMCD] #> --> ADSL: [STUDYID, USUBJID] app <- init( data = data_cdisc, modules = example_module() ) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/articles/including-data-in-teal-applications.html","id":"multiassayexperiment-data","dir":"Articles","previous_headings":"Clinical data","what":"MultiAssayExperiment data","title":"Including Data in teal Applications","text":"MultiAssayExperiment package offers data structure representing analyzing multi-omics experiments involve multi-modal, high-dimensionality data, DNA mutations, protein RNA abundance, chromatin occupancy, etc., biological specimens. MultiAssayExperiment class described detail . MultiAssayExperiment objects (MAEs) placed teal_data just like normal objects. Due unique structure MAE, teal requires special considerations building teal modules. Therefore, guarantee modules work properly MAEs. package teal.modules.hermes developed specifically MAE mind reliable. filter panel supports MAEs box.","code":"library(MultiAssayExperiment) utils::data(miniACC) data_mae <- teal_data(MAE = miniACC) app <- init( data = data_mae, modules = example_module() ) shinyApp(app$ui, app$server)"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/articles/including-data-in-teal-applications.html","id":"join_keys","dir":"Articles","previous_headings":"teal_data properties","what":"join_keys","title":"Including Data in teal Applications","text":"Using relational data requires specifying joining keys pair datasets. Primary keys unique row identifiers individual datasets thus specified dataset. Foreign keys describe mapping variables datasets. Joining keys stored join_keys property, can set creating teal_data object, using join_keys argument, using join_keys function. detailed explanation join keys, see teal.data vignette. (back ADaM Data)","code":"ds1 <- data.frame( id = seq(1, 10), group = rep(c(\"A\", \"B\"), each = 5) ) ds2 <- data.frame( group = c(\"A\", \"B\"), condition = c(\"condition1\", \"condition2\") ) keys <- join_keys( join_key(\"DS1\", keys = \"id\"), join_key(\"DS2\", keys = \"group\"), join_key(\"DS1\", \"DS2\", keys = c(\"group\" = \"group\")) ) data_relational1 <- teal_data(DS1 = ds1, DS2 = ds2, join_keys = keys) data_relational2 <- teal_data(DS1 = ds1, DS2 = ds2) join_keys(data_relational2) <- keys"},{"path":"https://insightsengineering.github.io/teal/articles/including-data-in-teal-applications.html","id":"verified","dir":"Articles","previous_headings":"teal_data properties","what":"verified","title":"Including Data in teal Applications","text":"teal_data allows tracking code data creation data filtering data analysis whole process can reproduced. verified property designates whether reproducibility confirmed. teal_data objects created empty modified evaluating code within considered verified default. created data objects alone data objects code verified default, can become verified running verify function. detailed explanation verification, see teal.data vignette. (back Reproducible Data)","code":"data_with_code #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • cars: [L] #> • iris: [L] data_with_objects_and_code <- teal_data(iris = iris, cars = mtcars, code = expression(iris <- iris, cars <- mtcars)) data_with_objects_and_code #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • cars: [L] #> • iris: [L] data_with_objects_and_code_ver <- verify(data_with_objects_and_code) data_with_objects_and_code_ver #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • cars: [L] #> • iris: [L]"},{"path":"https://insightsengineering.github.io/teal/articles/including-data-in-teal-applications.html","id":"further-reading","dir":"Articles","previous_headings":"","what":"Further reading","title":"Including Data in teal Applications","text":"complete guide teal_data class, please refer teal.data package.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"motivation","dir":"Articles","previous_headings":"","what":"Motivation","title":"Modifying a teal Application With R Options","text":"R packages use options modify runtime behavior. usually specify sensible default values internal function arguments determine responses users actions. example, testthat uses option testthat.progress.max_fails define default number failed expectations testing functions terminate execution. adjustable values can exposed function parameters, confined option. vignette details options available package teal ’s supporting packages teal.logger, teal.widgets, teal.slice.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"setting-an-option","dir":"Articles","previous_headings":"","what":"Setting an option","title":"Modifying a teal Application With R Options","text":"time interactive session, can change option using: way change options execution specific block code withr package like : line run option, digits, go back value line run. function getOption allows inspect value option: set, value option persists session, returns default value new session. Make sure change options teal-related packages loaded initialize options overwrite custom values.","code":"options(option_to_set = \"value\") withr::with_options(list(digits = 3), print(pi)) ## [1] 3.14 getOption(\"option_to_set\") ## [1] \"value\""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"teal-bs_theme-bslibbs_theme-object","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.bs_theme (bslib::bs_theme object)","title":"Modifying a teal Application With R Options","text":"option controls bootstrap theme version used teal apps. Achieve better UX customized UI app. Please see vignette Bootstrap themes read functionality. Default: NULL","code":""},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"teal-load_nest_code-character","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.load_nest_code (character)","title":"Modifying a teal Application With R Options","text":"value option appended top code rendered using Show R Code modal button. Default: \"# Add code install/load NEST environment \".","code":""},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"teal-threshold_slider_vs_checkboxgroup-numeric","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.threshold_slider_vs_checkboxgroup (numeric)","title":"Modifying a teal Application With R Options","text":"threshold determines variable treated factor filter panel. number unique values variable less threshold variable treated factor instead original class. example, imagine teal.threshold_slider_vs_checkboxgroup equals 2. numeric variable c(1, 1, 1), one unique value, treated factor filter panel (filter panel !). filter panel creates checkbox widget filter values variable, factor variable, instead usual numeric range selector. Default: 5.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"teal-basic_table_args-basic_table_args-object","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.basic_table_args (basic_table_args object)","title":"Modifying a teal Application With R Options","text":"specifies list arguments passed every call rtables::basic_table made teal application. can used format rtables without making changes application code. See documentation teal.widgets::basic_table_args information. Default: teal.widgets::basic_table_args().","code":""},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"teal-ggplot2_args-ggplot2_args-object","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.ggplot2_args (ggplot2_args object)","title":"Modifying a teal Application With R Options","text":"option allows modifying labels themes ggplot2 plots teal application. See documentation teal.widgets::ggplot2_args information. Default: teal.widgets::ggplot2_args().","code":""},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"teal-plot_dpi-integer-value-24-or-larger","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.plot_dpi (integer value 24 or larger)","title":"Modifying a teal Application With R Options","text":"option controls dots per inch graphs rendered downloaded using module plot_with_settings teal.widgets package. Default: 72","code":""},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"teal-log_layout-character","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.log_layout (character)","title":"Modifying a teal Application With R Options","text":"defines layout log message used teal application. teal uses layout format emitted log messages. Read documentation teal.logger::register_logger information. must set loading teal package(s). case option set attaching packages, please re-attach packages use correctly. Default: \"[{level}] {format(time, \\\"%Y-%m-%d %H:%M:%OS4\\\")} pid:{pid} token:[{token}] {ans} {msg}\". Note layout formatted glue package.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"teal-log_level-character","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.log_level (character)","title":"Modifying a teal Application With R Options","text":"logging level threshold used teal application. teal application emit logs level. See documentation logger::TRACE possible values logging threshold information . must set loading teal package(s). case option set attaching packages, please re-attach packages use correctly. Default: \"INFO\". Note two levels considered less severe \"INFO\": \"DEBUG\" \"TRACE\". order see log messages two levels well, change log level default \"TRACE\", least severe log level.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"teal-show_js_log-logical","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.show_js_log (logical)","title":"Modifying a teal Application With R Options","text":"indicates whether print JavaScript console logs R console. set TRUE, logs printed; otherwise, won’t. Default: FALSE.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"teal-lockfile-mode-character","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.lockfile.mode (character)","title":"Modifying a teal Application With R Options","text":"enables compute renv lockfile shows button \"download lockfile\" footer. Values: \"auto\" - auto detect whether compute lockfile \"enabled\" - compute lockfile show \"download lockfile\" footer \"disabled\" - compute lockfile show \"download lockfile\" footer Default: \"auto\". read lockfile usage creation check ?teal::module_teal_lockfile.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"teal_logging","dir":"Articles","previous_headings":"Deprecated options","what":"teal_logging","title":"Modifying a teal Application With R Options","text":"Deprecated favor using teal.logger package logging.","code":""},{"path":"https://insightsengineering.github.io/teal/articles/teal-options.html","id":"teal_show_js_log","dir":"Articles","previous_headings":"Deprecated options","what":"teal_show_js_log","title":"Modifying a teal Application With R Options","text":"Deprecated favor teal.show_js_log (see ).","code":""},{"path":"https://insightsengineering.github.io/teal/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dawid Kaledkowski. Author, maintainer. Pawel Rucki. Author. Aleksander Chlebowski. Author. Andre Verissimo. Author. Kartikeya Kirar. Author. Vedha Viyash. Author. Marcin Kosinski. Author. Adrian Waddell. Author. Chendi Liao. Reviewer. Dony Unardi. Reviewer. Nikolas Burkoff. Author. Mahmoud Hallal. Author. Maciej Nasinski. Author. Konrad Pagacz. Author. Junlue Zhao. Author. Tadeusz Lewandowski. Author. F. Hoffmann-La Roche AG. Copyright holder, funder. Maximilian Mordig. Contributor.","code":""},{"path":"https://insightsengineering.github.io/teal/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kaledkowski D, Rucki P, Chlebowski , Verissimo , Kirar K, Viyash V, Kosinski M, Waddell , Burkoff N, Hallal M, Nasinski M, Pagacz K, Zhao J, Lewandowski T (2024). teal: Exploratory Web Apps Analyzing Clinical Trials Data. R package version 0.15.2.9078, https://github.com/insightsengineering/teal/, https://insightsengineering.github.io/teal/.","code":"@Manual{, title = {teal: Exploratory Web Apps for Analyzing Clinical Trials Data}, author = {Dawid Kaledkowski and Pawel Rucki and Aleksander Chlebowski and Andre Verissimo and Kartikeya Kirar and Vedha Viyash and Marcin Kosinski and Adrian Waddell and Nikolas Burkoff and Mahmoud Hallal and Maciej Nasinski and Konrad Pagacz and Junlue Zhao and Tadeusz Lewandowski}, year = {2024}, note = {R package version 0.15.2.9078, https://github.com/insightsengineering/teal/}, url = {https://insightsengineering.github.io/teal/}, }"},{"path":"https://insightsengineering.github.io/teal/index.html","id":"teal-interactive-exploratory-data-analysis-with-shiny-web-applications-","dir":"","previous_headings":"","what":"Exploratory Web Apps for Analyzing Clinical Trials Data","title":"Exploratory Web Apps for Analyzing Clinical Trials Data","text":"teal shiny-based interactive exploration framework analyzing data. teal applications require app developers specify: CDISC data, commonly used clinical trial reporting Independent datasets, example data.frame Related datasets, example set data.frames key columns enable data joins MultiAssayExperiment objects R data structures representing analyzing multi-omics experiments teal.modules.general: general modules exploring relational/independent/CDISC data teal.modules.clinical: modules specific CDISC data clinical trial reporting teal.modules.hermes: modules analyzing MultiAssayExperiment objects lot functionality teal framework derives following packages: teal.data: creating loading data needed teal applications. teal.widgets: shiny components used within teal. teal.slice: provides filtering panel allow filtering data. teal.code: handles reproducibility outputs. teal.logger: standardizes logging within teal framework. teal.reporter: allows teal applications generate reports. Dive deeper teal comprehensive video guide. Please click image start learning:","code":""},{"path":"https://insightsengineering.github.io/teal/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Exploratory Web Apps for Analyzing Clinical Trials Data","text":"Alternatively, might also use development version.","code":"install.packages(\"teal\") # install.packages(\"pak\") pak::pak(\"insightsengineering/teal\")"},{"path":"https://insightsengineering.github.io/teal/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Exploratory Web Apps for Analyzing Clinical Trials Data","text":"Please see teal.gallery TLG Catalog see examples teal apps. Please start “Technical Blueprint” article, “Getting Started” article, package vignettes detailed guide.","code":"library(teal) app <- init( data = teal_data(iris = iris), modules = list( module( label = \"iris histogram\", server = function(input, output, session, data) { updateSelectInput(session = session, inputId = \"var\", choices = names(data()[[\"iris\"]])[1:4]) output$hist <- renderPlot({ req(input$var) hist(x = data()[[\"iris\"]][[input$var]]) }) }, ui = function(id) { ns <- NS(id) list( selectInput(inputId = ns(\"var\"), label = \"Column name\", choices = NULL), plotOutput(outputId = ns(\"hist\")) ) } ) ) ) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"Exploratory Web Apps for Analyzing Clinical Trials Data","text":"encounter bug feature request, please file issue. questions, discussions, updates, use teal channel pharmaverse slack workspace.","code":""},{"path":"https://insightsengineering.github.io/teal/index.html","id":"acknowledgment","dir":"","previous_headings":"","what":"Acknowledgment","title":"Exploratory Web Apps for Analyzing Clinical Trials Data","text":"package result joint efforts many developers stakeholders. like thank everyone contributed far!","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":null,"dir":"Reference","previous_headings":"","what":"Drive a teal application — TealAppDriver","title":"Drive a teal application — TealAppDriver","text":"Drive teal application Drive teal application","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Drive a teal application — TealAppDriver","text":"Extension shinytest2::AppDriver class methods driving teal application performing interactions shinytest2 tests.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Drive a teal application — TealAppDriver","text":"shinytest2::AppDriver -> TealAppDriver","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Drive a teal application — TealAppDriver","text":"shinytest2::AppDriver$expect_download() shinytest2::AppDriver$expect_html() shinytest2::AppDriver$expect_js() shinytest2::AppDriver$expect_screenshot() shinytest2::AppDriver$expect_text() shinytest2::AppDriver$expect_unique_names() shinytest2::AppDriver$expect_values() shinytest2::AppDriver$get_chromote_session() shinytest2::AppDriver$get_dir() shinytest2::AppDriver$get_download() shinytest2::AppDriver$get_html() shinytest2::AppDriver$get_js() shinytest2::AppDriver$get_logs() shinytest2::AppDriver$get_screenshot() shinytest2::AppDriver$get_text() shinytest2::AppDriver$get_url() shinytest2::AppDriver$get_value() shinytest2::AppDriver$get_values() shinytest2::AppDriver$get_variant() shinytest2::AppDriver$get_window_size() shinytest2::AppDriver$log_message() shinytest2::AppDriver$run_js() shinytest2::AppDriver$set_inputs() shinytest2::AppDriver$set_window_size() shinytest2::AppDriver$stop() shinytest2::AppDriver$upload_file() shinytest2::AppDriver$view() shinytest2::AppDriver$wait_for_idle() shinytest2::AppDriver$wait_for_js() shinytest2::AppDriver$wait_for_value()","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver$new() TealAppDriver$click() TealAppDriver$expect_no_shiny_error() TealAppDriver$expect_no_validation_error() TealAppDriver$expect_validation_error() TealAppDriver$set_input() TealAppDriver$navigate_teal_tab() TealAppDriver$active_ns() TealAppDriver$active_module_ns() TealAppDriver$active_module_element() TealAppDriver$active_module_element_text() TealAppDriver$active_filters_ns() TealAppDriver$active_data_summary_ns() TealAppDriver$active_data_summary_element() TealAppDriver$get_active_module_input() TealAppDriver$get_active_module_output() TealAppDriver$get_active_module_table_output() TealAppDriver$get_active_module_plot_output() TealAppDriver$set_active_module_input() TealAppDriver$get_active_filter_vars() TealAppDriver$get_active_data_summary_table() TealAppDriver$is_visible() TealAppDriver$get_active_data_filters() TealAppDriver$add_filter_var() TealAppDriver$remove_filter_var() TealAppDriver$set_active_filter_selection() TealAppDriver$get_attr() TealAppDriver$get_html_rvest() TealAppDriver$open_url() TealAppDriver$wait_for_active_module_value() TealAppDriver$clone()","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Drive a teal application — TealAppDriver","text":"Initialize TealAppDriver object testing teal application.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$new( data, modules, filter = teal_slices(), title = build_app_title(), header = tags$p(), footer = tags$p(), landing_popup = NULL, timeout = rlang::missing_arg(), load_timeout = rlang::missing_arg(), ... )"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"data, modules, filter, title, header, footer, landing_popup arguments passed init timeout (numeric) Default number milliseconds timeout timeout_ parameter TealAppDriver class. Defaults 20s. See shinytest2::AppDriver new method details change via options environment variables. load_timeout (numeric) long wait app load, ms. includes time start R. Defaults 100s. See shinytest2::AppDriver new method details change via options environment variables ... Additional arguments passed shinytest2::AppDriver$new","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"Object class TealAppDriver","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-click-","dir":"Reference","previous_headings":"","what":"Method click()","title":"Drive a teal application — TealAppDriver","text":"Append parent shinytest2::AppDriver click method call waif_for_idle() method.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$click(...)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"... arguments passed parent shinytest2::AppDriver click() method.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-expect-no-shiny-error-","dir":"Reference","previous_headings":"","what":"Method expect_no_shiny_error()","title":"Drive a teal application — TealAppDriver","text":"Check app shiny errors. checks global shiny errors. Note shiny errors dependent shiny server render captured teal module tab visited shiny trigger server computations tab invisible. , navigate module tab want test calling function. Although, catches errors hidden module tabs already rendered.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$expect_no_shiny_error()"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-expect-no-validation-error-","dir":"Reference","previous_headings":"","what":"Method expect_no_validation_error()","title":"Drive a teal application — TealAppDriver","text":"Check app validation errors. checks global shiny validation errors.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$expect_no_validation_error()"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-expect-validation-error-","dir":"Reference","previous_headings":"","what":"Method expect_validation_error()","title":"Drive a teal application — TealAppDriver","text":"Check app validation errors. checks global shiny validation errors.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$expect_validation_error()"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-set-input-","dir":"Reference","previous_headings":"","what":"Method set_input()","title":"Drive a teal application — TealAppDriver","text":"Set input teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$set_input(input_id, value, ...)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"input_id (character) shiny input id complete name space. value value set input . ... Additional arguments passed shinytest2::AppDriver$set_inputs","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver object invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-navigate-teal-tab-","dir":"Reference","previous_headings":"","what":"Method navigate_teal_tab()","title":"Drive a teal application — TealAppDriver","text":"Navigate teal tabs teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$navigate_teal_tab(tabs)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"tabs (character) Labels tabs navigate . order tabs important, start parent level tab. Note: case teal tab group duplicate names, first tab selected, wish select second tab name, use suffix \"_1\". wish select third tab name, use suffix \"_2\" .","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver object invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-active-ns-","dir":"Reference","previous_headings":"","what":"Method active_ns()","title":"Drive a teal application — TealAppDriver","text":"Get active shiny name space different components teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-7","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_ns()"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-3","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(list) list active shiny name space teal components.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-active-module-ns-","dir":"Reference","previous_headings":"","what":"Method active_module_ns()","title":"Drive a teal application — TealAppDriver","text":"Get active shiny name space interacting module content.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-8","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_module_ns()"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-4","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(string) active shiny name space component.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-active-module-element-","dir":"Reference","previous_headings":"","what":"Method active_module_element()","title":"Drive a teal application — TealAppDriver","text":"Get active shiny name space bound custom element name.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-9","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_module_element(element)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-4","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"element character(1) custom element name.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-5","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(string) active shiny name space component bound input element.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-active-module-element-text-","dir":"Reference","previous_headings":"","what":"Method active_module_element_text()","title":"Drive a teal application — TealAppDriver","text":"Get text active shiny name space bound custom element name.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-10","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_module_element_text(element)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-5","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"element character(1) text custom element name.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-6","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(string) text active shiny name space component bound input element.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-active-filters-ns-","dir":"Reference","previous_headings":"","what":"Method active_filters_ns()","title":"Drive a teal application — TealAppDriver","text":"Get active shiny name space interacting filter panel.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-11","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_filters_ns()"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-7","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(string) active shiny name space component.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-active-data-summary-ns-","dir":"Reference","previous_headings":"","what":"Method active_data_summary_ns()","title":"Drive a teal application — TealAppDriver","text":"Get active shiny name space interacting data-summary panel.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-12","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_data_summary_ns()"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-8","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(string) active shiny name space data-summary component.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-active-data-summary-element-","dir":"Reference","previous_headings":"","what":"Method active_data_summary_element()","title":"Drive a teal application — TealAppDriver","text":"Get active shiny name space bound custom element name.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-13","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_data_summary_element(element)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-6","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"element character(1) custom element name.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-9","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(string) active shiny name space component bound input element.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-get-active-module-input-","dir":"Reference","previous_headings":"","what":"Method get_active_module_input()","title":"Drive a teal application — TealAppDriver","text":"Get input module teal app. function access inputs name space current active teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-14","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_module_input(input_id)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-7","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"input_id (character) shiny input id get value .","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-10","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"value shiny input.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-get-active-module-output-","dir":"Reference","previous_headings":"","what":"Method get_active_module_output()","title":"Drive a teal application — TealAppDriver","text":"Get output module teal app. function access outputs name space current active teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-15","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_module_output(output_id)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-8","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"output_id (character) shiny output id get value .","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-11","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"value shiny output.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-get-active-module-table-output-","dir":"Reference","previous_headings":"","what":"Method get_active_module_table_output()","title":"Drive a teal application — TealAppDriver","text":"Get output module's teal.widgets::table_with_settings DT::DTOutput teal app. function access outputs name space current active teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-16","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_module_table_output(table_id, which = 1)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-9","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"table_id (character(1)) id table active teal module's name space. (integer) one table, extracted. default look table built using teal.widgets::table_with_settings.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-12","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"data.frame table contents.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-get-active-module-plot-output-","dir":"Reference","previous_headings":"","what":"Method get_active_module_plot_output()","title":"Drive a teal application — TealAppDriver","text":"Get output module's teal.widgets::plot_with_settings teal app. function access plots name space current active teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-17","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_module_plot_output(plot_id)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-10","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"plot_id (character(1)) id plot active teal module's name space.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-13","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"src attribute character(1) vector.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-set-active-module-input-","dir":"Reference","previous_headings":"","what":"Method set_active_module_input()","title":"Drive a teal application — TealAppDriver","text":"Set input module teal app. function set inputs name space current active teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-18","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$set_active_module_input(input_id, value, ...)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-11","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"input_id (character) shiny input id get value . value value set input . ... Additional arguments passed shinytest2::AppDriver$set_inputs","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-14","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver object invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-get-active-filter-vars-","dir":"Reference","previous_headings":"","what":"Method get_active_filter_vars()","title":"Drive a teal application — TealAppDriver","text":"Get active datasets can accessed via filter panel current active teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-19","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_filter_vars()"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-get-active-data-summary-table-","dir":"Reference","previous_headings":"","what":"Method get_active_data_summary_table()","title":"Drive a teal application — TealAppDriver","text":"Get active data summary table","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-20","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_data_summary_table()"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-15","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"data.frame","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-is-visible-","dir":"Reference","previous_headings":"","what":"Method is_visible()","title":"Drive a teal application — TealAppDriver","text":"Test DOM elements visible page JavaScript call.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-21","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$is_visible( selector, content_visibility_auto = FALSE, opacity_property = FALSE, visibility_property = FALSE )"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-12","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"selector (character(1)) CSS selector check visibility. CSS id return one element UI well formed. content_visibility_auto, opacity_property, visibility_property (logical(1)) See information https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-16","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"Logical vector occurrences selector.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-get-active-data-filters-","dir":"Reference","previous_headings":"","what":"Method get_active_data_filters()","title":"Drive a teal application — TealAppDriver","text":"Get active filter variables dataset teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-22","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_data_filters(dataset_name = NULL)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-13","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"dataset_name (character) name dataset get filter variables . NULL, filter variables datasets returned list.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-add-filter-var-","dir":"Reference","previous_headings":"","what":"Method add_filter_var()","title":"Drive a teal application — TealAppDriver","text":"Add new variable dataset filtered.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-23","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$add_filter_var(dataset_name, var_name, ...)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-14","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"dataset_name (character) name dataset add filter variable . var_name (character) name variable add filter panel. ... Additional arguments passed shinytest2::AppDriver$set_inputs","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-17","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver object invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-remove-filter-var-","dir":"Reference","previous_headings":"","what":"Method remove_filter_var()","title":"Drive a teal application — TealAppDriver","text":"Remove active filter variable dataset active filter variables panel.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-24","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$remove_filter_var(dataset_name = NULL, var_name = NULL)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-15","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"dataset_name (character) name dataset remove filter variable . NULL, filter variables removed. var_name (character) name variable remove filter panel. NULL, filter variables dataset removed.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-18","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver object invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-set-active-filter-selection-","dir":"Reference","previous_headings":"","what":"Method set_active_filter_selection()","title":"Drive a teal application — TealAppDriver","text":"Set active filter values variable dataset active filter variable panel.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-25","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$set_active_filter_selection(dataset_name, var_name, input, ...)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-16","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"dataset_name (character) name dataset set filter value . var_name (character) name variable set filter value . input value set filter . ... Additional arguments passed shinytest2::AppDriver$set_inputs","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-19","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver object invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-get-attr-","dir":"Reference","previous_headings":"","what":"Method get_attr()","title":"Drive a teal application — TealAppDriver","text":"Extract html attribute (found selector).","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-26","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_attr(selector, attribute)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-17","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"selector (character(1)) specifying selector used get content specific node. attribute (character(1)) name attribute retrieve node specified selector.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-20","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"character vector.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-get-html-rvest-","dir":"Reference","previous_headings":"","what":"Method get_html_rvest()","title":"Drive a teal application — TealAppDriver","text":"Wrapper around get_html passes output directly rvest::read_html.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-27","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_html_rvest(selector)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-18","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"selector (character(1)) passed get_html.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-21","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"XML document. Wrapper around get_url() method opens app browser.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-28","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$open_url()"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"returns-22","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"Nothing. Opens underlying teal app browser.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-wait-for-active-module-value-","dir":"Reference","previous_headings":"","what":"Method wait_for_active_module_value()","title":"Drive a teal application — TealAppDriver","text":"Waits specified input, output, export value. function serves wrapper around wait_for_value method, providing flexible interface waiting different types values within active module namespace.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-29","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$wait_for_active_module_value( input = rlang::missing_arg(), output = rlang::missing_arg(), export = rlang::missing_arg(), ... )"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-19","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"input, output, export name input, output, export value. one parameters may used. ... Must empty. Allows parameter expansion. Parameter additional value passed wait_for_value.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Drive a teal application — TealAppDriver","text":"objects class cloneable method.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"usage-30","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$clone(deep = FALSE)"},{"path":"https://insightsengineering.github.io/teal/reference/TealAppDriver.html","id":"arguments-20","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"deep Whether make deep clone.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":null,"dir":"Reference","previous_headings":"","what":"TealReportCard — TealReportCard","title":"TealReportCard — TealReportCard","text":"Child class ReportCard used teal specific applications. addition parent methods, supports rendering teal specific elements source code, encodings panel content filter panel content part meta data.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"TealReportCard — TealReportCard","text":"teal.reporter::ReportCard -> TealReportCard","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"TealReportCard — TealReportCard","text":"teal.reporter::ReportCard$append_content() teal.reporter::ReportCard$append_metadata() teal.reporter::ReportCard$append_plot() teal.reporter::ReportCard$append_rcode() teal.reporter::ReportCard$append_table() teal.reporter::ReportCard$append_text() teal.reporter::ReportCard$from_list() teal.reporter::ReportCard$get_content() teal.reporter::ReportCard$get_metadata() teal.reporter::ReportCard$get_name() teal.reporter::ReportCard$initialize() teal.reporter::ReportCard$reset() teal.reporter::ReportCard$set_name() teal.reporter::ReportCard$to_list()","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"TealReportCard — TealReportCard","text":"TealReportCard$append_src() TealReportCard$append_fs() TealReportCard$append_encodings() TealReportCard$clone()","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"method-append-src-","dir":"Reference","previous_headings":"","what":"Method append_src()","title":"TealReportCard — TealReportCard","text":"Appends source code content meta data TealReportCard.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"TealReportCard — TealReportCard","text":"","code":"TealReportCard$append_src(src, ...)"},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealReportCard — TealReportCard","text":"src (character(1)) code text. ... rmarkdown R chunk parameter value. eval parameter always set FALSE.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"TealReportCard — TealReportCard","text":"Object class TealReportCard, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"TealReportCard — TealReportCard","text":"","code":"card <- TealReportCard$new()$append_src( \"plot(iris)\" ) card$get_content()[[1]]$get_content()"},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"method-append-fs-","dir":"Reference","previous_headings":"","what":"Method append_fs()","title":"TealReportCard — TealReportCard","text":"Appends filter state list content metadata TealReportCard. filter state list attribute named formatted, appends card otherwise uses default yaml::.yaml format list. filter state list empty, nothing appended content.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"TealReportCard — TealReportCard","text":"","code":"TealReportCard$append_fs(fs)"},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealReportCard — TealReportCard","text":"fs (teal_slices) object returned teal_slices() function.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"TealReportCard — TealReportCard","text":"self, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"method-append-encodings-","dir":"Reference","previous_headings":"","what":"Method append_encodings()","title":"TealReportCard — TealReportCard","text":"Appends encodings list content metadata TealReportCard.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"TealReportCard — TealReportCard","text":"","code":"TealReportCard$append_encodings(encodings)"},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealReportCard — TealReportCard","text":"encodings (list) list encodings selections teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"TealReportCard — TealReportCard","text":"self, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"examples-1","dir":"Reference","previous_headings":"","what":"Examples","title":"TealReportCard — TealReportCard","text":"","code":"card <- TealReportCard$new()$append_encodings(list(variable1 = \"X\")) card$get_content()[[1]]$get_content()"},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"TealReportCard — TealReportCard","text":"objects class cloneable method.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"TealReportCard — TealReportCard","text":"","code":"TealReportCard$clone(deep = FALSE)"},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealReportCard — TealReportCard","text":"deep Whether make deep clone.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealReportCard.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"TealReportCard — TealReportCard","text":"","code":"## ------------------------------------------------ ## Method `TealReportCard$append_src` ## ------------------------------------------------ card <- TealReportCard$new()$append_src( \"plot(iris)\" ) card$get_content()[[1]]$get_content() #> [1] \"plot(iris)\" ## ------------------------------------------------ ## Method `TealReportCard$append_encodings` ## ------------------------------------------------ card <- TealReportCard$new()$append_encodings(list(variable1 = \"X\")) card$get_content()[[1]]$get_content() #> [1] \"Selected Options\""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":null,"dir":"Reference","previous_headings":"","what":"TealSlicesBlock — TealSlicesBlock","title":"TealSlicesBlock — TealSlicesBlock","text":"Specialized TealSlicesBlock block managing filter panel content reports.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"TealSlicesBlock — TealSlicesBlock","text":"teal.reporter::ContentBlock -> teal.reporter::TextBlock -> TealSlicesBlock","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"TealSlicesBlock — TealSlicesBlock","text":"teal.reporter::ContentBlock$get_content() teal.reporter::TextBlock$get_available_styles() teal.reporter::TextBlock$get_style() teal.reporter::TextBlock$set_style()","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"TealSlicesBlock — TealSlicesBlock","text":"TealSlicesBlock$new() TealSlicesBlock$set_content() TealSlicesBlock$from_list() TealSlicesBlock$to_list() TealSlicesBlock$clone()","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"TealSlicesBlock — TealSlicesBlock","text":"Returns TealSlicesBlock object.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock$new(content = teal_slices(), style = \"verbatim\")"},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealSlicesBlock — TealSlicesBlock","text":"content (teal_slices) object returned teal_slices() function. style (character(1)) string specifying style apply.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"TealSlicesBlock — TealSlicesBlock","text":"Returns TealSlicesBlock object content parameters.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"TealSlicesBlock — TealSlicesBlock","text":"Object class TealSlicesBlock, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"method-set-content-","dir":"Reference","previous_headings":"","what":"Method set_content()","title":"TealSlicesBlock — TealSlicesBlock","text":"Sets content TealSlicesBlock. Sets content YAML text represents list generated teal_slices. list displays limited number fields teal_slice objects, list sufficient conclude filters applied. selected field teal_slice object range, displayed \"min\"","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock$set_content(content)"},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealSlicesBlock — TealSlicesBlock","text":"content (teal_slices) object returned teal_slices() function.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"TealSlicesBlock — TealSlicesBlock","text":"self, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"method-from-list-","dir":"Reference","previous_headings":"","what":"Method from_list()","title":"TealSlicesBlock — TealSlicesBlock","text":"Create TealSlicesBlock list.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock$from_list(x)"},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealSlicesBlock — TealSlicesBlock","text":"x (named list) two fields text style. Use get_available_styles method get possible styles.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"TealSlicesBlock — TealSlicesBlock","text":"self, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock <- getFromNamespace(\"TealSlicesBlock\", \"teal\") block <- TealSlicesBlock$new() block$from_list(list(text = \"sth\", style = \"default\"))"},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"method-to-list-","dir":"Reference","previous_headings":"","what":"Method to_list()","title":"TealSlicesBlock — TealSlicesBlock","text":"Convert TealSlicesBlock list.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock$to_list()"},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"returns-3","dir":"Reference","previous_headings":"","what":"Returns","title":"TealSlicesBlock — TealSlicesBlock","text":"named list text style.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"examples-1","dir":"Reference","previous_headings":"","what":"Examples","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock <- getFromNamespace(\"TealSlicesBlock\", \"teal\") block <- TealSlicesBlock$new() block$to_list()"},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"TealSlicesBlock — TealSlicesBlock","text":"objects class cloneable method.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock$clone(deep = FALSE)"},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealSlicesBlock — TealSlicesBlock","text":"deep Whether make deep clone.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/TealSlicesBlock.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"## ------------------------------------------------ ## Method `TealSlicesBlock$from_list` ## ------------------------------------------------ TealSlicesBlock <- getFromNamespace(\"TealSlicesBlock\", \"teal\") block <- TealSlicesBlock$new() block$from_list(list(text = \"sth\", style = \"default\")) ## ------------------------------------------------ ## Method `TealSlicesBlock$to_list` ## ------------------------------------------------ TealSlicesBlock <- getFromNamespace(\"TealSlicesBlock\", \"teal\") block <- TealSlicesBlock$new() block$to_list() #> $text #> [1] \"\" #> #> $style #> [1] \"verbatim\" #>"},{"path":"https://insightsengineering.github.io/teal/reference/append_module.html","id":null,"dir":"Reference","previous_headings":"","what":"Append a teal_module to children of a teal_modules object — append_module","title":"Append a teal_module to children of a teal_modules object — append_module","text":"Append teal_module children teal_modules object","code":""},{"path":"https://insightsengineering.github.io/teal/reference/append_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Append a teal_module to children of a teal_modules object — append_module","text":"","code":"append_module(modules, module)"},{"path":"https://insightsengineering.github.io/teal/reference/append_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Append a teal_module to children of a teal_modules object — append_module","text":"modules (teal_modules) module (teal_module) object appended onto children modules","code":""},{"path":"https://insightsengineering.github.io/teal/reference/append_module.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Append a teal_module to children of a teal_modules object — append_module","text":"teal_modules object module appended.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/bookmarks_identical.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare bookmarks. — bookmarks_identical","title":"Compare bookmarks. — bookmarks_identical","text":"Test two bookmarks store identical state.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/bookmarks_identical.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare bookmarks. — bookmarks_identical","text":"","code":"bookmarks_identical(book1, book2)"},{"path":"https://insightsengineering.github.io/teal/reference/bookmarks_identical.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare bookmarks. — bookmarks_identical","text":"book1, book2 bookmark directories stored shiny_bookmarks/; default two recently modified directories","code":""},{"path":"https://insightsengineering.github.io/teal/reference/bookmarks_identical.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare bookmarks. — bookmarks_identical","text":"Invisible NULL bookmarks identical bookmarks test. FALSE inconsistencies detected.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/bookmarks_identical.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compare bookmarks. — bookmarks_identical","text":"input environments compared one variable time identical, values bookmarks reported. States datatables stripped time element comparing time stamp always different. contents printed large contents informative. Elements present one bookmark absent also reported. Differences printed messages. values environments compared .equal.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/bookmarks_identical.html","id":"how-to-use","dir":"Reference","previous_headings":"","what":"How to use","title":"Compare bookmarks. — bookmarks_identical","text":"Open application, change relevant inputs (typically, ), create bookmark. open bookmark immediately create bookmark . restoring bookmarks occurred properly, two bookmarks store state.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/build_app_title.html","id":null,"dir":"Reference","previous_headings":"","what":"Build app title with favicon — build_app_title","title":"Build app title with favicon — build_app_title","text":"helper function create browser title along logo.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/build_app_title.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build app title with favicon — build_app_title","text":"","code":"build_app_title( title = \"teal app\", favicon = \"https://raw.githubusercontent.com/insightsengineering/hex-stickers/main/PNG/nest.png\" )"},{"path":"https://insightsengineering.github.io/teal/reference/build_app_title.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build app title with favicon — build_app_title","text":"title (character) browser title teal app. favicon (character) path icon title. image/icon path can remote static path accessible shiny, like www/","code":""},{"path":"https://insightsengineering.github.io/teal/reference/build_app_title.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Build app title with favicon — build_app_title","text":"shiny.tag containing element adds title logo shiny app.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/call_once_when.html","id":null,"dir":"Reference","previous_headings":"","what":"Calls expression when condition is met — call_once_when","title":"Calls expression when condition is met — call_once_when","text":"Function postpones handlerExpr moment eventExpr (condition) returns TRUE, otherwise nothing happens.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/call_once_when.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calls expression when condition is met — call_once_when","text":"","code":"call_once_when( eventExpr, handlerExpr, event.env = parent.frame(), handler.env = parent.frame(), ... )"},{"path":"https://insightsengineering.github.io/teal/reference/call_once_when.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calls expression when condition is met — call_once_when","text":"eventExpr (quoted unquoted) logical expression represents event; can simple reactive value like input$click, call reactive expression like dataset(), even complex expression inside curly braces. handlerExpr expression call whenever eventExpr invalidated. side-effect-producing action (return value ignored). executed within isolate() scope. event.env parent environment reactive expression. default, calling environment, defining ordinary non-reactive expression. eventExpr quosure event.quoted TRUE, event.env ignored. handler.env parent environment reactive expression. default, calling environment, defining ordinary non-reactive expression. handlerExpr quosure handler.quoted TRUE, handler.env ignored. ... additional arguments passed observeEvent exception eventExpr allowed.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/call_once_when.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calls expression when condition is met — call_once_when","text":"observer.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/check_filter_datanames.html","id":null,"dir":"Reference","previous_headings":"","what":"Check datanames in filters — check_filter_datanames","title":"Check datanames in filters — check_filter_datanames","text":"function checks whether datanames filters correspond data, returning character vector error messages TRUE checks pass.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/check_filter_datanames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check datanames in filters — check_filter_datanames","text":"","code":"check_filter_datanames(filters, datanames)"},{"path":"https://insightsengineering.github.io/teal/reference/check_filter_datanames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check datanames in filters — check_filter_datanames","text":"filters (teal_slices) object datanames (character) names datasets available data object","code":""},{"path":"https://insightsengineering.github.io/teal/reference/check_filter_datanames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check datanames in filters — check_filter_datanames","text":"character(1) containing error message TRUE validation passes.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/check_modules_datanames.html","id":null,"dir":"Reference","previous_headings":"","what":"Check datanames in modules — check_modules_datanames","title":"Check datanames in modules — check_modules_datanames","text":"functions check specified datanames modules match data object, returning error messages TRUE successful validation. Two functions return error message different forms: check_modules_datanames returns character(1) basic assertion usage check_modules_datanames_html returns shiny.tag.list display app.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/check_modules_datanames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check datanames in modules — check_modules_datanames","text":"","code":"check_modules_datanames(modules, datanames) check_modules_datanames_html(modules, datanames)"},{"path":"https://insightsengineering.github.io/teal/reference/check_modules_datanames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check datanames in modules — check_modules_datanames","text":"modules (teal_modules) object datanames (character) names datasets available data object","code":""},{"path":"https://insightsengineering.github.io/teal/reference/check_modules_datanames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check datanames in modules — check_modules_datanames","text":"TRUE validation passes, otherwise character(1) shiny.tag.list","code":""},{"path":"https://insightsengineering.github.io/teal/reference/check_reactive.html","id":null,"dir":"Reference","previous_headings":"","what":"Check that argument is reactive. — check_reactive","title":"Check that argument is reactive. — check_reactive","text":"Check argument reactive.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/check_reactive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check that argument is reactive. — check_reactive","text":"","code":"check_reactive(x, null.ok = FALSE) test_reactive(x, null.ok = FALSE) assert_reactive( x, null.ok = FALSE, .var.name = checkmate::vname(x), add = NULL )"},{"path":"https://insightsengineering.github.io/teal/reference/check_reactive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check that argument is reactive. — check_reactive","text":"x [] Object check. null.ok [logical(1)] set TRUE, x may also NULL. case type check x performed, additional checks disabled. .var.name [character(1)] Name checked object print assertions. Defaults heuristic implemented vname. add [AssertCollection] Collection store assertion messages. See AssertCollection.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/check_reactive.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check that argument is reactive. — check_reactive","text":"Depending function prefix: check successful, functions assertClass/assert_class return x invisibly, whereas checkClass/check_class testClass/test_class return TRUE. check successful, assertClass/assert_class throws error message, testClass/test_class returns FALSE, checkClass/check_class return string error message. function expect_class always returns expectation.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/create_app_id.html","id":null,"dir":"Reference","previous_headings":"","what":"Application ID — create_app_id","title":"Application ID — create_app_id","text":"Creates App ID used match filter snapshots application.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/create_app_id.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Application ID — create_app_id","text":"","code":"create_app_id(data, modules)"},{"path":"https://insightsengineering.github.io/teal/reference/create_app_id.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Application ID — create_app_id","text":"data (teal_data teal_data_module) accepted init modules (teal_modules) object accepted init","code":""},{"path":"https://insightsengineering.github.io/teal/reference/create_app_id.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Application ID — create_app_id","text":"single character string.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/create_app_id.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Application ID — create_app_id","text":"Calculate app ID used stamp filter state snapshots. App ID hash app's data modules. See \"transferring snapshots\" section ?snapshot.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/decorate_err_msg.html","id":null,"dir":"Reference","previous_headings":"","what":"Capture error and decorate error message. — decorate_err_msg","title":"Capture error and decorate error message. — decorate_err_msg","text":"Capture error decorate error message.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/decorate_err_msg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Capture error and decorate error message. — decorate_err_msg","text":"","code":"decorate_err_msg(x, pre = character(0), post = character(0))"},{"path":"https://insightsengineering.github.io/teal/reference/decorate_err_msg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Capture error and decorate error message. — decorate_err_msg","text":"x object evaluate pre (character(1)) string prepend error message post (character(1)) string append error message","code":""},{"path":"https://insightsengineering.github.io/teal/reference/decorate_err_msg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Capture error and decorate error message. — decorate_err_msg","text":"x error, otherwise throws error decorated message","code":""},{"path":"https://insightsengineering.github.io/teal/reference/deep_copy_filter.html","id":null,"dir":"Reference","previous_headings":"","what":"Deep copy teal_slices — deep_copy_filter","title":"Deep copy teal_slices — deep_copy_filter","text":"important create new copy teal_slices starting new shiny session. Otherwise, object shared multiple users created global environment shiny session starts.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/deep_copy_filter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deep copy teal_slices — deep_copy_filter","text":"","code":"deep_copy_filter(filter)"},{"path":"https://insightsengineering.github.io/teal/reference/deep_copy_filter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deep copy teal_slices — deep_copy_filter","text":"filter (teal_slices)","code":""},{"path":"https://insightsengineering.github.io/teal/reference/deep_copy_filter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Deep copy teal_slices — deep_copy_filter","text":"teal_slices","code":""},{"path":"https://insightsengineering.github.io/teal/reference/dot-add_signature_to_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Adds signature protection to the datanames in the data — .add_signature_to_data","title":"Adds signature protection to the datanames in the data — .add_signature_to_data","text":"Adds signature protection datanames data","code":""},{"path":"https://insightsengineering.github.io/teal/reference/dot-add_signature_to_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adds signature protection to the datanames in the data — .add_signature_to_data","text":"","code":".add_signature_to_data(data)"},{"path":"https://insightsengineering.github.io/teal/reference/dot-add_signature_to_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adds signature protection to the datanames in the data — .add_signature_to_data","text":"data (teal_data)","code":""},{"path":"https://insightsengineering.github.io/teal/reference/dot-add_signature_to_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adds signature protection to the datanames in the data — .add_signature_to_data","text":"teal_data additional code signature datanames","code":""},{"path":"https://insightsengineering.github.io/teal/reference/dot-get_hashes_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Get code that tests the integrity of the reproducible data — .get_hashes_code","title":"Get code that tests the integrity of the reproducible data — .get_hashes_code","text":"Get code tests integrity reproducible data","code":""},{"path":"https://insightsengineering.github.io/teal/reference/dot-get_hashes_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get code that tests the integrity of the reproducible data — .get_hashes_code","text":"","code":".get_hashes_code(data, datanames = ls(teal.code::get_env(data)))"},{"path":"https://insightsengineering.github.io/teal/reference/dot-get_hashes_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get code that tests the integrity of the reproducible data — .get_hashes_code","text":"data (teal_data) object holding data datanames (character) names datasets","code":""},{"path":"https://insightsengineering.github.io/teal/reference/dot-get_hashes_code.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get code that tests the integrity of the reproducible data — .get_hashes_code","text":"character vector code lines.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/example_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"An example teal module — example_module","text":"","code":"example_module( label = \"example teal module\", datanames = \"all\", transformers = list() )"},{"path":"https://insightsengineering.github.io/teal/reference/example_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"An example teal module — example_module","text":"label (character(1)) Label shown navigation item module module group. modules() defaults \"root\". See Details. datanames (character) Names datasets relevant item. 2 reserved values specific behaviors: keyword \"\" includes datasets available data passed teal application. NULL hides sidebar panel completely. transformers specified, datanames automatically added datanames argument. transformers (list teal_data_module) applied transform data. transform module UI appear teal's sidebar panel. Transformers' datanames added datanames. See teal_transform_module().","code":""},{"path":"https://insightsengineering.github.io/teal/reference/example_module.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"An example teal module — example_module","text":"teal module can included modules argument init().","code":""},{"path":"https://insightsengineering.github.io/teal/reference/example_module.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"An example teal module — example_module","text":"","code":"app <- init( data = teal_data(IRIS = iris, MTCARS = mtcars), modules = example_module() ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/reference/extract_transformers.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract all transformers from modules. — extract_transformers","title":"Extract all transformers from modules. — extract_transformers","text":"Extract transformers modules.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/extract_transformers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract all transformers from modules. — extract_transformers","text":"","code":"extract_transformers(modules)"},{"path":"https://insightsengineering.github.io/teal/reference/extract_transformers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract all transformers from modules. — extract_transformers","text":"modules teal_modules teal_module","code":""},{"path":"https://insightsengineering.github.io/teal/reference/extract_transformers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract all transformers from modules. — extract_transformers","text":"list teal_transform_module nested way input modules.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/get_client_timezone.html","id":null,"dir":"Reference","previous_headings":"","what":"Get client timezone — get_client_timezone","title":"Get client timezone — get_client_timezone","text":"User timezone browser may different one server. script can run register shiny input contains information timezone browser.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/get_client_timezone.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get client timezone — get_client_timezone","text":"","code":"get_client_timezone(ns)"},{"path":"https://insightsengineering.github.io/teal/reference/get_client_timezone.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get client timezone — get_client_timezone","text":"ns (function) namespace function passed session object shiny server. shiny modules allow proper name spacing registered input.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/get_client_timezone.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get client timezone — get_client_timezone","text":"NULL, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/get_rcode_libraries.html","id":null,"dir":"Reference","previous_headings":"","what":"Generates library calls from current session info — get_rcode_libraries","title":"Generates library calls from current session info — get_rcode_libraries","text":"Function create multiple library calls current session info ensure reproducible code works.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/get_rcode_libraries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generates library calls from current session info — get_rcode_libraries","text":"","code":"get_rcode_libraries()"},{"path":"https://insightsengineering.github.io/teal/reference/get_rcode_libraries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generates library calls from current session info — get_rcode_libraries","text":"Character vector library() calls.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/get_unique_labels.html","id":null,"dir":"Reference","previous_headings":"","what":"Get unique labels — get_unique_labels","title":"Get unique labels — get_unique_labels","text":"Get unique labels modules avoid namespace conflicts.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/get_unique_labels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get unique labels — get_unique_labels","text":"","code":"get_unique_labels(labels)"},{"path":"https://insightsengineering.github.io/teal/reference/get_unique_labels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get unique labels — get_unique_labels","text":"labels (character) vector labels","code":""},{"path":"https://insightsengineering.github.io/teal/reference/get_unique_labels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get unique labels — get_unique_labels","text":"(character) vector unique labels","code":""},{"path":"https://insightsengineering.github.io/teal/reference/include_css_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Include CSS files from /inst/css/ package directory to application header — include_css_files","title":"Include CSS files from /inst/css/ package directory to application header — include_css_files","text":"system.file used access files packages, work devtools. Therefore, redefine method package needed. Thus, export method.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/include_css_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Include CSS files from /inst/css/ package directory to application header — include_css_files","text":"","code":"include_css_files(pattern = \"*\")"},{"path":"https://insightsengineering.github.io/teal/reference/include_css_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Include CSS files from /inst/css/ package directory to application header — include_css_files","text":"pattern (character) pattern files included","code":""},{"path":"https://insightsengineering.github.io/teal/reference/include_css_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Include CSS files from /inst/css/ package directory to application header — include_css_files","text":"HTML code includes CSS files.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/include_js_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Include JS files from /inst/js/ package directory to application header — include_js_files","title":"Include JS files from /inst/js/ package directory to application header — include_js_files","text":"system.file used access files packages, work devtools. Therefore, redefine method package needed. Thus, export method","code":""},{"path":"https://insightsengineering.github.io/teal/reference/include_js_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Include JS files from /inst/js/ package directory to application header — include_js_files","text":"","code":"include_js_files(pattern = NULL, except = NULL)"},{"path":"https://insightsengineering.github.io/teal/reference/include_js_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Include JS files from /inst/js/ package directory to application header — include_js_files","text":"pattern (character) pattern files included, passed system.file except (character) vector basename filenames excluded","code":""},{"path":"https://insightsengineering.github.io/teal/reference/include_js_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Include JS files from /inst/js/ package directory to application header — include_js_files","text":"HTML code includes JS files.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/include_teal_css_js.html","id":null,"dir":"Reference","previous_headings":"","what":"Code to include teal CSS and JavaScript files — include_teal_css_js","title":"Code to include teal CSS and JavaScript files — include_teal_css_js","text":"useful want use JavaScript CSS files used teal application. also useful running standalone modules teal correct styles. Also initializes shinyjs can use .","code":""},{"path":"https://insightsengineering.github.io/teal/reference/include_teal_css_js.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Code to include teal CSS and JavaScript files — include_teal_css_js","text":"","code":"include_teal_css_js()"},{"path":"https://insightsengineering.github.io/teal/reference/include_teal_css_js.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Code to include teal CSS and JavaScript files — include_teal_css_js","text":"shiny.tag.list.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/include_teal_css_js.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Code to include teal CSS and JavaScript files — include_teal_css_js","text":"Simply add include_teal_css_js() one UI elements.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/init.html","id":null,"dir":"Reference","previous_headings":"","what":"Create the server and UI function for the shiny app — init","title":"Create the server and UI function for the shiny app — init","text":"End-users: important function start teal app composed teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create the server and UI function for the shiny app — init","text":"","code":"init( data, modules, filter = teal_slices(), title = build_app_title(), header = tags$p(), footer = tags$p(), id = character(0), landing_popup = NULL )"},{"path":"https://insightsengineering.github.io/teal/reference/init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create the server and UI function for the shiny app — init","text":"data (teal_data teal_data_module) constructing data object, refer teal_data() teal_data_module(). datanames set teal_data object, defaults teal_data environment used. modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details. filter (teal_slices) Optionally, specifies initial filter using teal_slices(). title (shiny.tag character(1)) Optionally, browser window title. Defaults title \"teal app\" icon NEST. Can created using build_app_title() passing valid shiny.tag head tag title link tag. header (shiny.tag character(1)) Optionally, header app. footer (shiny.tag character(1)) Optionally, footer app. id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. landing_popup (teal_module_landing) Optionally, landing_popup_module show soon teal app initialized.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/init.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create the server and UI function for the shiny app — init","text":"Named list containing server UI functions.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/init.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create the server and UI function for the shiny app — init","text":"","code":"app <- init( data = within( teal_data(), { new_iris <- transform(iris, id = seq_len(nrow(iris))) new_mtcars <- transform(mtcars, id = seq_len(nrow(mtcars))) } ), modules = modules( module( label = \"data source\", server = function(input, output, session, data) {}, ui = function(id, ...) tags$div(p(\"information about data source\")), datanames = \"all\" ), example_module(label = \"example teal module\"), module( \"Iris Sepal.Length histogram\", server = function(input, output, session, data) { output$hist <- renderPlot( hist(data()[[\"new_iris\"]]$Sepal.Length) ) }, ui = function(id, ...) { ns <- NS(id) plotOutput(ns(\"hist\")) }, datanames = \"new_iris\" ) ), filter = teal_slices( teal_slice(dataname = \"new_iris\", varname = \"Species\"), teal_slice(dataname = \"new_iris\", varname = \"Sepal.Length\"), teal_slice(dataname = \"new_mtcars\", varname = \"cyl\"), exclude_varnames = list(new_iris = c(\"Sepal.Width\", \"Petal.Width\")), module_specific = TRUE, mapping = list( `example teal module` = \"new_iris Species\", `Iris Sepal.Length histogram` = \"new_iris Species\", global_filters = \"new_mtcars cyl\" ) ), title = \"App title\", header = tags$h1(\"Sample App\"), footer = tags$p(\"Sample footer\") ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/reference/is_arg_used.html","id":null,"dir":"Reference","previous_headings":"","what":"Does the object make use of the arg — is_arg_used","title":"Does the object make use of the arg — is_arg_used","text":"object make use arg","code":""},{"path":"https://insightsengineering.github.io/teal/reference/is_arg_used.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Does the object make use of the arg — is_arg_used","text":"","code":"is_arg_used(modules, arg)"},{"path":"https://insightsengineering.github.io/teal/reference/is_arg_used.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Does the object make use of the arg — is_arg_used","text":"modules (teal_module teal_modules) object arg (character(1)) names arguments checked formals teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/is_arg_used.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Does the object make use of the arg — is_arg_used","text":"logical whether object makes use arg.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/landing_popup_module.html","id":null,"dir":"Reference","previous_headings":"","what":"Landing popup module — landing_popup_module","title":"Landing popup module — landing_popup_module","text":"Creates landing welcome popup teal applications. module used display popup dialog application starts. dialog blocks access application must closed button application can viewed.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/landing_popup_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Landing popup module — landing_popup_module","text":"","code":"landing_popup_module( label = \"Landing Popup\", title = NULL, content = NULL, buttons = modalButton(\"Accept\") )"},{"path":"https://insightsengineering.github.io/teal/reference/landing_popup_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Landing popup module — landing_popup_module","text":"label (character(1)) Label module. title (character(1)) Text displayed popup title. content (character(1), shiny.tag shiny.tag.list) content popup. Passed ... shiny::modalDialog. See examples. buttons (shiny.tag shiny.tag.list) Typically modalButton actionButton. See examples.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/landing_popup_module.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Landing popup module — landing_popup_module","text":"teal_module (extended teal_landing_module class) used teal applications.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/landing_popup_module.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Landing popup module — landing_popup_module","text":"","code":"app1 <- init( data = teal_data(iris = iris), modules = modules( example_module() ), landing_popup = landing_popup_module( content = \"A place for the welcome message or a disclaimer statement.\", buttons = modalButton(\"Proceed\") ) ) #> Initializing landing_popup_module #> module \"Landing Popup\" server function takes no data so \"datanames\" will be ignored if (interactive()) { shinyApp(app1$ui, app1$server) } app2 <- init( data = teal_data(iris = iris), modules = modules( example_module() ), landing_popup = landing_popup_module( title = \"Welcome\", content = tags$b( \"A place for the welcome message or a disclaimer statement.\", style = \"color: red;\" ), buttons = tagList( modalButton(\"Proceed\"), actionButton(\"read\", \"Read more\", onclick = \"window.open('http://google.com', '_blank')\" ), actionButton(\"close\", \"Reject\", onclick = \"window.close()\") ) ) ) #> Initializing landing_popup_module #> module \"Landing Popup\" server function takes no data so \"datanames\" will be ignored if (interactive()) { shinyApp(app2$ui, app2$server) }"},{"path":"https://insightsengineering.github.io/teal/reference/module_bookmark_manager.html","id":null,"dir":"Reference","previous_headings":"","what":"App state management. — module_bookmark_manager","title":"App state management. — module_bookmark_manager","text":"Capture restore global (app) input state.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_bookmark_manager.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"App state management. — module_bookmark_manager","text":"","code":"ui_bookmark_panel(id, modules) srv_bookmark_panel(id, modules) get_bookmarking_option() need_bookmarking(modules)"},{"path":"https://insightsengineering.github.io/teal/reference/module_bookmark_manager.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"App state management. — module_bookmark_manager","text":"id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_bookmark_manager.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"App state management. — module_bookmark_manager","text":"Invisible NULL.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_bookmark_manager.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"App state management. — module_bookmark_manager","text":"module introduces bookmarks teal apps: shiny bookmarking mechanism becomes enabled server-side bookmarks can created. bookmark manager presents button bookmark icon placed tab-bar. clicked, button creates bookmark opens modal displays bookmark URL. teal guarantee modules (teal_module objects) bookmarkable. , teal_bookmarkable attribute set TRUE. modules bookmarkable, bookmark manager modal displays warning bookmark button displays flag. order communicate external module bookmarkable, module developer set teal_bookmarkable attribute TRUE.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_bookmark_manager.html","id":"server-logic","dir":"Reference","previous_headings":"","what":"Server logic","title":"App state management. — module_bookmark_manager","text":"bookmark URL contains app address /?_state_id_= suffix. directory created server, state application saved. Accessing bookmark URL opens new session app starts previously saved state.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_bookmark_manager.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"App state management. — module_bookmark_manager","text":"enable bookmarking use either: shiny app using shinyApp(..., enableBookmarking = \"server\") (supported shinytest2) set options(shiny.bookmarkStore = \"server\") running app","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_data_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Data summary — module_data_summary","title":"Data summary — module_data_summary","text":"Module utils display number rows subjects filtered unfiltered data.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_data_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data summary — module_data_summary","text":"","code":"ui_data_summary(id) srv_data_summary(id, teal_data) get_filter_overview(teal_data) get_object_filter_overview( filtered_data, unfiltered_data, dataname, subject_keys ) get_object_filter_overview_array( filtered_data, unfiltered_data, dataname, subject_keys ) get_object_filter_overview_MultiAssayExperiment( filtered_data, unfiltered_data, dataname )"},{"path":"https://insightsengineering.github.io/teal/reference/module_data_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data summary — module_data_summary","text":"id (character(1)) shiny module instance id. teal_data (reactive returning teal_data) filtered_data (list) filtered objects unfiltered_data (list) unfiltered objects dataname (character(1))","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_data_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Data summary — module_data_summary","text":"NULL.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_data_summary.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data summary — module_data_summary","text":"Handling different data classes: get_object_filter_overview() pseudo S3 method variants : array (data.frame, DataFrame, array, Matrix SummarizedExperiment): Method variant can applied two-dimensional objects ncol() can used. MultiAssayExperiment: summary contains counts colData experiments.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_filter_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter panel module in teal — module_filter_data","title":"Filter panel module in teal — module_filter_data","text":"Creates filter panel module teal_data object returns teal_data. build way filter panel changes anything happens (e.g. module_init_data) triggering reactive events something changed module visible. Thanks special implementation modules' data recalculated modules currently displayed.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_filter_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter panel module in teal — module_filter_data","text":"","code":"ui_filter_data(id) srv_filter_data(id, datasets, active_datanames, data_rv, is_active) .make_filtered_teal_data(modules, data, datasets = NULL, datanames) .observe_active_filter_changed(datasets, is_active, active_datanames, data_rv) .get_filter_expr(datasets, datanames)"},{"path":"https://insightsengineering.github.io/teal/reference/module_filter_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter panel module in teal — module_filter_data","text":"id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. datasets (reactive returning FilteredData NULL) datasets passed parent module (srv_teal) dataset singleton implies filter-panel \"global\". NULL filter-panel \"module-specific\". active_datanames (reactive returning character) module's data names data_rv (reactive returning teal_data) modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_filter_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter panel module in teal — module_filter_data","text":"eventReactive containing teal_data containing filtered objects filter code. eventReactive triggers conditions met: tab selected (is_active) filters changed (get_filter_expr different previous)","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_filter_manager.html","id":null,"dir":"Reference","previous_headings":"","what":"Manage multiple FilteredData objects — module_filter_manager","title":"Manage multiple FilteredData objects — module_filter_manager","text":"Oversee filter states across entire application.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_filter_manager.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage multiple FilteredData objects — module_filter_manager","text":"","code":"ui_filter_manager_panel(id) srv_filter_manager_panel(id, slices_global) ui_filter_manager(id) srv_filter_manager(id, slices_global) srv_module_filter_manager(id, module_fd, slices_global)"},{"path":"https://insightsengineering.github.io/teal/reference/module_filter_manager.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage multiple FilteredData objects — module_filter_manager","text":"id (character(1)) shiny module instance id. slices_global (reactiveVal) containing teal_slices. module_fd (FilteredData) Object containing data filtered single teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_filter_manager.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Manage multiple FilteredData objects — module_filter_manager","text":"Module returns slices_global (reactiveVal) containing teal_slices object mapping.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_filter_manager.html","id":"slices-global","dir":"Reference","previous_headings":"","what":"Slices global","title":"Manage multiple FilteredData objects — module_filter_manager","text":"key role maintaining module-specific filter states played .slicesGlobal object. reference class holds following fields: all_slices (reactiveVal) - reactive value containing filters registered app. module_slices_api (reactiveValues) - reactive field containing references modules' FilteredData object methods. moment used srv_filter_manager display filter states table combining informations all_slices FilteredData$get_available_teal_slices(). session new filters added all_slices unless module_snapshot_manager used restore previous state. Filters all_slices can activated deactivated module linked (ways) attr(, \"mapping\") : module's filter added removed FilteredData object, information passed SlicesGlobal updates attr(, \"mapping\") accordingly. mapping changes SlicesGlobal, filters set removed module's FilteredData.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_filter_manager.html","id":"filter-manager","dir":"Reference","previous_headings":"","what":"Filter manager","title":"Manage multiple FilteredData objects — module_filter_manager","text":"Filter-manager split two parts: ui/srv_filter_manager_panel - Called whole app. module observes changes filters slices_global displays table utilizing information mapping: (TRUE) - filter active module (FALSE) - filter inactive module (NA) - filter available module ui/srv_module_filter_manager - Called teal_module. Handling filter states single module keeping module FilteredData consistent slices_global, local filters always reflected slices_global mapping vice versa.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_init_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Data Module for teal — module_init_data","title":"Data Module for teal — module_init_data","text":"module manages data argument srv_teal. teal framework uses teal_data(), can provided various ways: Directly teal.data::teal_data() object. automatically convert reactive teal_data. reactive object returns teal.data::teal_data() object.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_init_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data Module for teal — module_init_data","text":"","code":"ui_init_data(id) srv_init_data(id, data)"},{"path":"https://insightsengineering.github.io/teal/reference/module_init_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data Module for teal — module_init_data","text":"id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. data (teal_data, teal_data_module, reactive returning teal_data) data application depend .","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_init_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Data Module for teal — module_init_data","text":"reactive object returns: Output data. data fails returned error handled (tryCatch()) rest application can respond respectively.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/module_init_data.html","id":"reactive-teal-data-","dir":"Reference","previous_headings":"","what":"Reactive teal_data:","title":"Data Module for teal — module_init_data","text":"data application can reactively updated, prompting srv_teal() rebuild content accordingly. two methods creating interactive teal_data: Using reactive object provided outside teal application. scenario, reactivity controlled external module, srv_teal responds changes. Using teal_data_module(), embedded within teal application, allowing data resubmitted user needed. Since server teal_data_module() must return reactive teal_data object, methods (1 2) produce reactive behavior within teal application. distinction lies data control: first method involves external control, second method involves control custom module within app. details, see module_teal_data.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_labels.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve labels from teal_modules — module_labels","title":"Retrieve labels from teal_modules — module_labels","text":"Retrieve labels teal_modules","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_labels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve labels from teal_modules — module_labels","text":"","code":"module_labels(modules)"},{"path":"https://insightsengineering.github.io/teal/reference/module_labels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve labels from teal_modules — module_labels","text":"modules (teal_modules)","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_labels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve labels from teal_modules — module_labels","text":"list containing labels modules. modules nested, function returns nested list labels.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_management.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract/Remove module(s) of specific class — extract_module","title":"Extract/Remove module(s) of specific class — extract_module","text":"Given teal_module teal_modules, return elements structure according class.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_management.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract/Remove module(s) of specific class — extract_module","text":"","code":"extract_module(modules, class) drop_module(modules, class)"},{"path":"https://insightsengineering.github.io/teal/reference/module_management.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract/Remove module(s) of specific class — extract_module","text":"modules (teal_modules) class class name teal_module extracted dropped.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_management.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract/Remove module(s) of specific class — extract_module","text":"extract_module, teal_module class class teal_modules containing modules class class. drop_module, opposite, teal_modules class class. teal_modules","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_snapshot_manager.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter state snapshot management — module_snapshot_manager","title":"Filter state snapshot management — module_snapshot_manager","text":"Capture restore snapshots global (app) filter state.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_snapshot_manager.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter state snapshot management — module_snapshot_manager","text":"","code":"ui_snapshot_manager_panel(id) srv_snapshot_manager_panel(id, slices_global) ui_snapshot_manager(id) srv_snapshot_manager(id, slices_global)"},{"path":"https://insightsengineering.github.io/teal/reference/module_snapshot_manager.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter state snapshot management — module_snapshot_manager","text":"id (character(1)) shiny module instance id. slices_global (reactiveVal) contains teal_slices object containing teal_slices existing app, active inactive.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_snapshot_manager.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter state snapshot management — module_snapshot_manager","text":"list containing snapshot history, element unlisted teal_slices object.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_snapshot_manager.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Filter state snapshot management — module_snapshot_manager","text":"module introduces snapshots: stored descriptions filter state entire application. Snapshots allow user save current filter state application later use session, well save file order share app developer users, turn can upload session. snapshot manager accessed camera icon tabset bar. beginning session presents three icons: camera, upload, circular arrow. Clicking camera captures snapshot, clicking upload adds snapshot file applies filter states therein, clicking arrow resets initial application state. snapshots added, show rows table select button save button.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_snapshot_manager.html","id":"server-logic","dir":"Reference","previous_headings":"","what":"Server logic","title":"Filter state snapshot management — module_snapshot_manager","text":"Snapshots basically teal_slices objects, however, since module served separate instance FilteredData objects require shared state, teal_slice reactiveVal teal_slices stored . Therefore, teal_slices reversibly converted list lists representation (attributes maintained). Snapshots stored reactiveVal named list. first snapshot initial state application user can add snapshot whenever see fit. every snapshot except initial one, piece UI generated contains snapshot name, select button restore snapshot, save button save file. initial snapshot restored separate \"reset\" button. saved directly user welcome capture initial state snapshot save .","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_snapshot_manager.html","id":"snapshot-mechanics","dir":"Reference","previous_headings":"","what":"Snapshot mechanics","title":"Filter state snapshot management — module_snapshot_manager","text":"snapshot captured, user prompted name . Names displayed since used create button ids, hood converted syntactically valid strings. New snapshot names validated valid versions unique. Leading trailing white space trimmed. module can read global state application slices_global mapping_matrix. former provides list existing teal_slices latter says slice active module. name accepted, slices_global converted list lists - snapshot. snapshot contains mapping attribute initial application state (one restored), may reflect current one, mapping_matrix transformed obtain current mapping, .e. list , passed mapping argument teal_slices(), result current mapping. substituted snapshot's mapping attribute snapshot added snapshot list. restore app state, snapshot retrieved storage rebuilt teal_slices object. state FilteredData objects (provided datasets) cleared set anew according mapping attribute snapshot. snapshot set current content slices_global. save snapshot, snapshot retrieved reassembled just like restoring, saved file slices_store(). snapshot uploaded, first added storage just like newly created one, used restore app state much like snapshot taken storage. Upon clicking upload icon user prompted file upload may choose name new snapshot. name defaults name file (extension dropped) normal naming rules apply. Loading file yields teal_slices object, disassembled storage used directly restoring app state.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_snapshot_manager.html","id":"transferring-snapshots","dir":"Reference","previous_headings":"","what":"Transferring snapshots","title":"Filter state snapshot management — module_snapshot_manager","text":"Snapshots uploaded disk used application come , .e. application uses data modules. ensure case, init stamps teal_slices app id stored app_id attribute teal_slices object. snapshot restored file, app_id compared current app state match snapshot admitted session.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_snapshot_manager.html","id":"bookmarks","dir":"Reference","previous_headings":"","what":"Bookmarks","title":"Filter state snapshot management — module_snapshot_manager","text":"onBookmark callback creates snapshot current filter state. done app session, module session. (snapshot retrieved module_teal order set initial app state restored app.) snapshot, previous snapshot history dumped values.rds file .","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_snapshot_manager.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Filter state snapshot management — module_snapshot_manager","text":"Aleksander Chlebowski","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal.html","id":null,"dir":"Reference","previous_headings":"","what":"teal main module — module_teal","title":"teal main module — module_teal","text":"Module create teal app. module can called directly instead init() included custom application. Please note init() adds reporter_previewer_module automatically, case calling ui/srv_teal directly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal main module — module_teal","text":"","code":"ui_teal( id, modules, title = build_app_title(), header = tags$p(), footer = tags$p() ) srv_teal(id, data, modules, filter = teal_slices())"},{"path":"https://insightsengineering.github.io/teal/reference/module_teal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal main module — module_teal","text":"id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details. title (shiny.tag character(1)) Optionally, browser window title. Defaults title \"teal app\" icon NEST. Can created using build_app_title() passing valid shiny.tag head tag title link tag. header (shiny.tag character(1)) Optionally, header app. footer (shiny.tag character(1)) Optionally, footer app. data (teal_data, teal_data_module, reactive returning teal_data) data application depend . filter (teal_slices) Optionally, specifies initial filter using teal_slices().","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal main module — module_teal","text":"NULL invisibly","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal main module — module_teal","text":"Module responsible creating main shiny app layout initializing necessary components. module establishes reactive connection input data every component app. Reactive change data passed argument, reloads app possibly keeps input settings user can continue one left .","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal.html","id":"data-flow-in-teal-application","dir":"Reference","previous_headings":"","what":"data flow in teal application","title":"teal main module — module_teal","text":"module supports multiple data inputs eventually, converted reactive returning teal_data module. reactive teal_data object several actions performed: data loading module_init_data data filtering module_filter_data data transformation module_transform_data","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal.html","id":"fallback-on-failure","dir":"Reference","previous_headings":"","what":"Fallback on failure","title":"teal main module — module_teal","text":"teal designed way app never crash error introduced custom shiny module provided app developer (e.g. teal_data_module(), teal_transform_module()). module returns failing object, app halt evaluation display warning message. App user always chance fix improper input continue without restarting session.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Execute and validate teal_data_module — module_teal_data","title":"Execute and validate teal_data_module — module_teal_data","text":"low level module handle teal_data_module execution validation. teal_transform_module() inherits teal_data_module() handled module . srv_teal() accepts various data objects eventually transformed reactive teal_data() standard data class whole teal framework.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Execute and validate teal_data_module — module_teal_data","text":"","code":"ui_teal_data(id, data_module = function(id) NULL) srv_teal_data( id, data_module = function(id) NULL, modules = NULL, validate_shiny_silent_error = TRUE, is_transformer_failed = reactiveValues() ) ui_validate_reactive_teal_data(id) srv_validate_reactive_teal_data( id, data, modules = NULL, validate_shiny_silent_error = FALSE, hide_validation_error = reactive(FALSE) )"},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Execute and validate teal_data_module — module_teal_data","text":"id (character(1)) Module id data_module (teal_data_module) modules (teal_modules teal_module) datanames validation purpose validate_shiny_silent_error (logical) TRUE, shiny.silent.error validated is_transformer_failed (reactiveValues) contains logical flags named transformer. Help determine previous transformer failed, following transformers can disabled display generic failure message. data (reactive teal_data)","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Execute and validate teal_data_module — module_teal_data","text":"reactive teal_data","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_data.html","id":"data-validation","dir":"Reference","previous_headings":"","what":"data validation","title":"Execute and validate teal_data_module — module_teal_data","text":"Executed teal_data_module() validated output validated consistency. Output data invalid : teal_data_module() invalid server return reactive. Immediately crashes app! reactive throws shiny.error - happens module creating teal_data() fails. reactive returns qenv.error - happens teal_data() evaluates failing code. reactive object return teal_data(). teal_data() object lacks datanames specified modules argument. teal (observers srv_teal) always waits render app reactive teal_data returned. error 2-4 occurs, relevant error message displayed app user. issue resolved, app continue run. teal guarantees errors data crash app (except error 1).","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_lockfile.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","title":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","text":"Generate lockfile application's environment reproducibility","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_lockfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","text":"","code":"ui_teal_lockfile(id) srv_teal_lockfile(id) .teal_lockfile_process_invoke(lockfile_path) .renv_snapshot(lockfile_path) .is_lockfile_deps_installed() .is_disabled_lockfile_scenario()"},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_lockfile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","text":"lockfile_path (character) path lockfile.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_lockfile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","text":"NULL","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_lockfile.html","id":"different-ways-of-creating-lockfile","dir":"Reference","previous_headings":"","what":"Different ways of creating lockfile","title":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","text":"teal leverages renv::snapshot(), offers multiple methods lockfile creation. Working directory lockfile: teal, default, create implicit type lockfile uses renv::dependencies() detect R packages current project's working directory. DESCRIPTION-based lockfile: generate lockfile based DESCRIPTION file working directory, set renv::settings$snapshot.type(\"explicit\"). naming convention type follows renv::snapshot(). \"explicit\" type, refer renv::settings$package.dependency.fields() DESCRIPTION fields included lockfile. Custom files-based lockfile: specify custom files basis lockfile, set renv::settings$snapshot.type(\"custom\") configure renv.snapshot.filter option.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_lockfile.html","id":"lockfile-usage","dir":"Reference","previous_headings":"","what":"lockfile usage","title":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","text":"creating lockfile, can restore application's environment using renv::restore().","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_module.html","id":null,"dir":"Reference","previous_headings":"","what":"Calls all modules — module_teal_module","title":"Calls all modules — module_teal_module","text":"UI side teal_modules translated tabsetPanel teal_module tabPanel. , UI server called recursively tab separate module reflect nested structure modules argument.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calls all modules — module_teal_module","text":"","code":"ui_teal_module(id, modules, depth = 0L) # Default S3 method ui_teal_module(id, modules, depth = 0L) # S3 method for class 'teal_modules' ui_teal_module(id, modules, depth = 0L) # S3 method for class 'teal_module' ui_teal_module(id, modules, depth = 0L) srv_teal_module( id, data_rv, modules, datasets = NULL, slices_global, reporter = teal.reporter::Reporter$new(), data_load_status = reactive(\"ok\"), is_active = reactive(TRUE) ) # Default S3 method srv_teal_module( id, data_rv, modules, datasets = NULL, slices_global, reporter = teal.reporter::Reporter$new(), data_load_status = reactive(\"ok\"), is_active = reactive(TRUE) ) # S3 method for class 'teal_modules' srv_teal_module( id, data_rv, modules, datasets = NULL, slices_global, reporter = teal.reporter::Reporter$new(), data_load_status = reactive(\"ok\"), is_active = reactive(TRUE) ) # S3 method for class 'teal_module' srv_teal_module( id, data_rv, modules, datasets = NULL, slices_global, reporter = teal.reporter::Reporter$new(), data_load_status = reactive(\"ok\"), is_active = reactive(TRUE) )"},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calls all modules — module_teal_module","text":"id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details. depth (integer(1)) number helps determine depth modules nesting. data_rv (reactive returning teal_data) datasets (reactive returning FilteredData NULL) datasets passed parent module (srv_teal) dataset singleton implies filter-panel \"global\". NULL filter-panel \"module-specific\". slices_global (reactiveVal returning modules_teal_slices) see module_filter_manager data_load_status (reactive returning character) Determines action dependent data loading status: \"ok\" teal_data returned data loading. \"teal_data_module failed\" teal_data_module() return teal_data. Disables tabs buttons. \"external failed\" reactive passed srv_teal(data) return teal_data. Hides whole tab panel.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_module.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calls all modules — module_teal_module","text":"output currently active module. srv_teal_module.teal_module returns reactiveVal containing output called module. srv_teal_module.teal_modules returns output module selected input$active_tab.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_with_splash.html","id":null,"dir":"Reference","previous_headings":"","what":"UI and server modules of teal — module_teal_with_splash","title":"UI and server modules of teal — module_teal_with_splash","text":"Please use module_teal instead.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_with_splash.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"UI and server modules of teal — module_teal_with_splash","text":"","code":"ui_teal_with_splash( id, data, title = build_app_title(), header = tags$p(), footer = tags$p() ) srv_teal_with_splash(id, data, modules, filter = teal_slices())"},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_with_splash.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"UI and server modules of teal — module_teal_with_splash","text":"id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. data (teal_data, teal_data_module, reactive returning teal_data) data application depend . title (shiny.tag character(1)) Optionally, browser window title. Defaults title \"teal app\" icon NEST. Can created using build_app_title() passing valid shiny.tag head tag title link tag. header (shiny.tag character(1)) Optionally, header app. footer (shiny.tag character(1)) Optionally, footer app. modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details. filter (teal_slices) Optionally, specifies initial filter using teal_slices().","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_teal_with_splash.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"UI and server modules of teal — module_teal_with_splash","text":"Returns reactive expression containing teal_data object data loaded NULL .","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_transform_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Module to transform reactive teal_data — module_transform_data","title":"Module to transform reactive teal_data — module_transform_data","text":"Module calls multiple module_teal_data sequence reactive teal_data output one module handed following module's input.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_transform_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Module to transform reactive teal_data — module_transform_data","text":"","code":"ui_transform_data(id, transformers = list(), class = \"well\") srv_transform_data( id, data, transformers = list(), modules, is_transformer_failed = reactiveValues() )"},{"path":"https://insightsengineering.github.io/teal/reference/module_transform_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Module to transform reactive teal_data — module_transform_data","text":"id (character(1)) Module id transformers (list teal_data_module) applied transform data. transform module UI appear teal's sidebar panel. Transformers' datanames added datanames. See teal_transform_module(). data (reactive teal_data) modules (teal_modules teal_module) datanames validation purpose is_transformer_failed (reactiveValues) contains logical flags named transformer. Help determine previous transformer failed, following transformers can disabled display generic failure message.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/module_transform_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Module to transform reactive teal_data — module_transform_data","text":"reactive teal_data","code":""},{"path":"https://insightsengineering.github.io/teal/reference/modules_bookmarkable.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve teal_bookmarkable attribute from teal_modules — modules_bookmarkable","title":"Retrieve teal_bookmarkable attribute from teal_modules — modules_bookmarkable","text":"Retrieve teal_bookmarkable attribute teal_modules","code":""},{"path":"https://insightsengineering.github.io/teal/reference/modules_bookmarkable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve teal_bookmarkable attribute from teal_modules — modules_bookmarkable","text":"","code":"modules_bookmarkable(modules)"},{"path":"https://insightsengineering.github.io/teal/reference/modules_bookmarkable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve teal_bookmarkable attribute from teal_modules — modules_bookmarkable","text":"modules (teal_modules teal_module) object","code":""},{"path":"https://insightsengineering.github.io/teal/reference/modules_bookmarkable.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve teal_bookmarkable attribute from teal_modules — modules_bookmarkable","text":"named list structure modules TRUE FALSE values indicating whether module bookmarkable.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/modules_depth.html","id":null,"dir":"Reference","previous_headings":"","what":"Get module depth — modules_depth","title":"Get module depth — modules_depth","text":"Depth starts 0, single teal.module depth 0. Nesting increases overall depth 1.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/modules_depth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get module depth — modules_depth","text":"","code":"modules_depth(modules, depth = 0L)"},{"path":"https://insightsengineering.github.io/teal/reference/modules_depth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get module depth — modules_depth","text":"modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details. depth optional integer determining current depth level","code":""},{"path":"https://insightsengineering.github.io/teal/reference/modules_depth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get module depth — modules_depth","text":"Depth level given module.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/report_card_template.html","id":null,"dir":"Reference","previous_headings":"","what":"Template function for TealReportCard creation and customization — report_card_template","title":"Template function for TealReportCard creation and customization — report_card_template","text":"function generates report card title, optional description, option append filter state list.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/report_card_template.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template function for TealReportCard creation and customization — report_card_template","text":"","code":"report_card_template( title, label, description = NULL, with_filter, filter_panel_api )"},{"path":"https://insightsengineering.github.io/teal/reference/report_card_template.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template function for TealReportCard creation and customization — report_card_template","text":"title (character(1)) title card (unless overwritten label) label (character(1)) label provided user adding card description (character(1)) optional, additional description with_filter (logical(1)) flag indicating add filter state filter_panel_api (FilterPanelAPI) object API allows generation filter state report","code":""},{"path":"https://insightsengineering.github.io/teal/reference/report_card_template.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template function for TealReportCard creation and customization — report_card_template","text":"(TealReportCard) populated title, description filter state.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/reporter_previewer_module.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a teal module for previewing a report — reporter_previewer_module","title":"Create a teal module for previewing a report — reporter_previewer_module","text":"function wraps teal.reporter::reporter_previewer_ui() teal.reporter::reporter_previewer_srv() teal_module used teal applications. creating teal application using init() module added application automatically teal_modules support report generation.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/reporter_previewer_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a teal module for previewing a report — reporter_previewer_module","text":"","code":"reporter_previewer_module(label = \"Report previewer\", server_args = list())"},{"path":"https://insightsengineering.github.io/teal/reference/reporter_previewer_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a teal module for previewing a report — reporter_previewer_module","text":"label (character(1)) Label shown navigation item module module group. modules() defaults \"root\". See Details. server_args (named list) Arguments passed teal.reporter::reporter_previewer_srv().","code":""},{"path":"https://insightsengineering.github.io/teal/reference/reporter_previewer_module.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a teal module for previewing a report — reporter_previewer_module","text":"teal_module (extended teal_module_previewer class) containing teal.reporter previewer functionality.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/restoreValue.html","id":null,"dir":"Reference","previous_headings":"","what":"Restore value from bookmark. — restoreValue","title":"Restore value from bookmark. — restoreValue","text":"Get value bookmark return default.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/restoreValue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Restore value from bookmark. — restoreValue","text":"","code":"restoreValue(value, default)"},{"path":"https://insightsengineering.github.io/teal/reference/restoreValue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Restore value from bookmark. — restoreValue","text":"value (character(1)) name value restore default fallback value","code":""},{"path":"https://insightsengineering.github.io/teal/reference/restoreValue.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Restore value from bookmark. — restoreValue","text":"application restored server-side bookmark, variable specified value values environment. Otherwise default.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/restoreValue.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Restore value from bookmark. — restoreValue","text":"Bookmarks can store inputs also arbitrary values. values stored onBookmark callbacks restored onBookmarked callbacks, placed values environment session$restoreContext field. Using teal_data_module makes impossible run callbacks app becomes ready modules execute callbacks registered. cases stored values can still recovered session object directly. Note variable names values environment prefixed module name space names, therefore, using function modules, value must run name space function.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/run_js_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Run JS file from /inst/js/ package directory — run_js_files","title":"Run JS file from /inst/js/ package directory — run_js_files","text":"triggered server execute client rather triggered directly client. Unlike include_js_files includes JavaScript functions, run_js actually executes JavaScript functions.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/run_js_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run JS file from /inst/js/ package directory — run_js_files","text":"","code":"run_js_files(files)"},{"path":"https://insightsengineering.github.io/teal/reference/run_js_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run JS file from /inst/js/ package directory — run_js_files","text":"files (character) vector filenames.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/run_js_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run JS file from /inst/js/ package directory — run_js_files","text":"NULL, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/run_js_files.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run JS file from /inst/js/ package directory — run_js_files","text":"system.file used access files packages, work devtools. Therefore, redefine method package needed. Thus, export method.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/show_rcode_modal.html","id":null,"dir":"Reference","previous_headings":"","what":"Show R code modal — show_rcode_modal","title":"Show R code modal — show_rcode_modal","text":"Use shiny::showModal() function show R code inside.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/show_rcode_modal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show R code modal — show_rcode_modal","text":"","code":"show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())"},{"path":"https://insightsengineering.github.io/teal/reference/show_rcode_modal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show R code modal — show_rcode_modal","text":"title (character(1)) Title modal, displayed first comment R code. rcode (character) vector R code show inside modal. session (ShinySession) optional shiny session object, defaults shiny::getDefaultReactiveDomain().","code":""},{"path":"https://insightsengineering.github.io/teal/reference/show_rcode_modal.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Show R code modal — show_rcode_modal","text":"shiny::showModal()","code":""},{"path":"https://insightsengineering.github.io/teal/reference/slices_store.html","id":null,"dir":"Reference","previous_headings":"","what":"Store and restore teal_slices object — slices_store","title":"Store and restore teal_slices object — slices_store","text":"Functions write teal_slices object file JSON format, also restore object disk.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/slices_store.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Store and restore teal_slices object — slices_store","text":"","code":"slices_store(tss, file) slices_restore(file)"},{"path":"https://insightsengineering.github.io/teal/reference/slices_store.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Store and restore teal_slices object — slices_store","text":"tss (teal_slices) object stored. file (character(1)) file path teal_slices object saved restored. file extension \".json\".","code":""},{"path":"https://insightsengineering.github.io/teal/reference/slices_store.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Store and restore teal_slices object — slices_store","text":"slices_store returns NULL, invisibly. slices_restore returns teal_slices object restored file.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/slices_store.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Store and restore teal_slices object — slices_store","text":"Date date time objects stored following formats: Date class converted \"ISO8601\" standard (YYYY-MM-DD). POSIX*t classes converted character using format.POSIX*t(usetz = TRUE, tz = \"UTC\") (YYYY-MM-DD HH:MM:SS UTC, UTC Coordinated Universal Time timezone short-code). format assumed slices_restore. POSIX*t objects selected choices fields teal_slice objects always printed UTC timezone well.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/tdata.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a tdata object — tdata","title":"Create a tdata object — tdata","text":"Recent changes teal cause modules fail modules expect tdata object passed data argument instead receive teal_data object, additionally wrapped reactive expression server functions. order easily adapt modules without proper refactor, use function downgrade data argument.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/tdata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a tdata object — tdata","text":"","code":"new_tdata(...) tdata2env(...) get_code_tdata(...) # S3 method for class 'tdata' join_keys(...) get_metadata(...) as_tdata(...)"},{"path":"https://insightsengineering.github.io/teal/reference/tdata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a tdata object — tdata","text":"... ignored","code":""},{"path":"https://insightsengineering.github.io/teal/reference/tdata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a tdata object — tdata","text":"nothing","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal-package.html","id":null,"dir":"Reference","previous_headings":"","what":"teal: Interactive exploration of clinical trials data — teal-package","title":"teal: Interactive exploration of clinical trials data — teal-package","text":"teal package provides shiny based framework creating interactive data analysis environment.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal: Interactive exploration of clinical trials data — teal-package","text":"learn mode package, visit project website read init() manual page.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/teal-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"teal: Interactive exploration of clinical trials data — teal-package","text":"Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID) Authors: Pawel Rucki pawel.rucki@roche.com Aleksander Chlebowski aleksander.chlebowski@contractors.roche.com (ORCID) Andre Verissimo andre.verissimo@roche.com (ORCID) Kartikeya Kirar kartikeya.kirar@businesspartner.roche.com Vedha Viyash vedha.viyash@roche.com Marcin Kosinski marcin.kosinski.mk1@roche.com Adrian Waddell adrian.waddell@gene.com Nikolas Burkoff Mahmoud Hallal Maciej Nasinski Konrad Pagacz Junlue Zhao Tadeusz Lewandowski contributors: Chendi Liao chendi.liao@roche.com [reviewer] Dony Unardi unardid@gene.com [reviewer] F. Hoffmann-La Roche AG [copyright holder, funder] Maximilian Mordig [contributor]","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_module.html","id":null,"dir":"Reference","previous_headings":"","what":"Data module for teal applications — teal_data_module","title":"Data module for teal applications — teal_data_module","text":"Create teal_data_module object evaluate code history tracking.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data module for teal applications — teal_data_module","text":"","code":"teal_data_module(ui, server, label = \"data module\", once = TRUE) # S4 method for class 'teal_data_module,character' eval_code(object, code) # S3 method for class 'teal_data_module' within(data, expr, ...)"},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data module for teal applications — teal_data_module","text":"ui (function(id)) shiny module UI function; must take id argument server (function(id)) shiny module server function; must take id argument; must return reactive expression containing teal_data object label (character(1)) Label module. (logical(1)) TRUE, data module shown disappear successful data loading. App user longer able interact module anymore. FALSE, data module can reused multiple times. App user able interact change data output module multiple times. object (teal_data_module) code (character language) code evaluate. character, comments retained. data (teal_data_module) object expr (expression) evaluate. Must inline code. See ... See Details.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_module.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Data module for teal applications — teal_data_module","text":"teal_data_module returns list class teal_data_module containing two elements, ui server provided via arguments. eval_code returns teal_data_module object delayed evaluation code module run. within returns teal_data_module object delayed evaluation expr module run.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_module.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data module for teal applications — teal_data_module","text":"teal_data_module creates shiny module interactively supply modify data teal application. module allows running code (creation modification) app starts reloads. body server function run app rather global environment. means run every time app starts, use sparingly. Pass module instead teal_data object call init(). Note server function must always return teal_data object wrapped reactive expression. See vignette vignette(\"data--shiny-module\", package = \"teal\") details. eval_code evaluates given code environment teal_data object created teal_data_module. code added @code slot teal_data. within convenience function evaluating inline code inside environment teal_data_module. accepts inline expressions (simple compound) allows injecting values expr ... argument: name:value pairs passed ..., name expr replaced value.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_module.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data module for teal applications — teal_data_module","text":"","code":"tdm <- teal_data_module( ui = function(id) { ns <- NS(id) actionButton(ns(\"submit\"), label = \"Load data\") }, server = function(id) { moduleServer(id, function(input, output, session) { eventReactive(input$submit, { data <- within( teal_data(), { dataset1 <- iris dataset2 <- mtcars } ) datanames(data) <- c(\"dataset1\", \"dataset2\") data }) }) } ) eval_code(tdm, \"dataset1 <- subset(dataset1, Species == 'virginica')\") #> $ui #> function(id) { #> ns <- NS(id) #> object$ui(ns(\"mutate_inner\")) #> } #> #> #> $server #> function(id) { #> data_out <- server(id) #> decorate_err_msg( #> assert_reactive(data_out), #> pre = sprintf(\"From: 'teal_data_module()':\\nA 'teal_data_module' with \\\"%s\\\" label:\", label), #> post = \"Please make sure that this module returns a 'reactive` object containing 'teal_data' class of object.\" # nolint: line_length_linter. #> ) #> } #> #> #> attr(,\"label\") #> [1] \"data module\" #> attr(,\"class\") #> [1] \"teal_data_module\" #> attr(,\"once\") #> [1] TRUE within(tdm, dataset1 <- subset(dataset1, Species == \"virginica\")) #> $ui #> function(id) { #> ns <- NS(id) #> object$ui(ns(\"mutate_inner\")) #> } #> #> #> $server #> function(id) { #> data_out <- server(id) #> decorate_err_msg( #> assert_reactive(data_out), #> pre = sprintf(\"From: 'teal_data_module()':\\nA 'teal_data_module' with \\\"%s\\\" label:\", label), #> post = \"Please make sure that this module returns a 'reactive` object containing 'teal_data' class of object.\" # nolint: line_length_linter. #> ) #> } #> #> #> attr(,\"label\") #> [1] \"data module\" #> attr(,\"class\") #> [1] \"teal_data_module\" #> attr(,\"once\") #> [1] TRUE # use additional parameter for expression value substitution. valid_species <- \"versicolor\" within(tdm, dataset1 <- subset(dataset1, Species %in% species), species = valid_species) #> $ui #> function(id) { #> ns <- NS(id) #> object$ui(ns(\"mutate_inner\")) #> } #> #> #> $server #> function(id) { #> data_out <- server(id) #> decorate_err_msg( #> assert_reactive(data_out), #> pre = sprintf(\"From: 'teal_data_module()':\\nA 'teal_data_module' with \\\"%s\\\" label:\", label), #> post = \"Please make sure that this module returns a 'reactive` object containing 'teal_data' class of object.\" # nolint: line_length_linter. #> ) #> } #> #> #> attr(,\"label\") #> [1] \"data module\" #> attr(,\"class\") #> [1] \"teal_data_module\" #> attr(,\"once\") #> [1] TRUE"},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_to_filtered_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a FilteredData — teal_data_to_filtered_data","title":"Create a FilteredData — teal_data_to_filtered_data","text":"Create FilteredData object teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_to_filtered_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a FilteredData — teal_data_to_filtered_data","text":"","code":"teal_data_to_filtered_data(x, datanames = ls(teal.code::get_env(x)))"},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_to_filtered_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a FilteredData — teal_data_to_filtered_data","text":"x (teal_data) object datanames (character) vector data set names include; must subset datanames(x)","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_to_filtered_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a FilteredData — teal_data_to_filtered_data","text":"FilteredData object.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_utilities.html","id":null,"dir":"Reference","previous_headings":"","what":"teal_data utils — teal_data_utilities","title":"teal_data utils — teal_data_utilities","text":"teal need recreate teal_data object due two operations: need append filter-data code objects evaluated FilteredData want avoid double-evaluation. need subset teal_data datanames used module, shorten obtainable R-code","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_utilities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal_data utils — teal_data_utilities","text":"","code":".append_evaluated_code(data, code) .append_modified_data(data, objects) .subset_teal_data(data, datanames)"},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_utilities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal_data utils — teal_data_utilities","text":"data (teal_data) code (character) code append data@code objects (list) objects append data@env datanames (character) names datasets","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_utilities.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal_data utils — teal_data_utilities","text":"modified teal_data","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_data_utilities.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal_data utils — teal_data_utilities","text":"Due recreation teal_data object done simply using public teal.code teal.data methods.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_modules.html","id":null,"dir":"Reference","previous_headings":"","what":"Create teal_module and teal_modules objects — teal_modules","title":"Create teal_module and teal_modules objects — teal_modules","text":"Create nested tab structure embed modules teal application.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_modules.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create teal_module and teal_modules objects — teal_modules","text":"","code":"module( label = \"module\", server = function(id, data, ...) moduleServer(id, function(input, output, session) NULL), ui = function(id, ...) tags$p(paste0(\"This module has no UI (id: \", id, \" )\")), filters, datanames = \"all\", server_args = NULL, ui_args = NULL, transformers = list() ) modules(..., label = \"root\") # S3 method for class 'teal_module' format(x, indent = 0, ...) # S3 method for class 'teal_module' print(x, ...) # S3 method for class 'teal_modules' format(x, indent = 0, ...) set_datanames(modules, datanames) # S3 method for class 'teal_modules' print(x, ...)"},{"path":"https://insightsengineering.github.io/teal/reference/teal_modules.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create teal_module and teal_modules objects — teal_modules","text":"label (character(1)) Label shown navigation item module module group. modules() defaults \"root\". See Details. server (function) shiny module following arguments: id - teal set proper shiny namespace module (see shiny::moduleServer()). input, output, session - (optional; recommended) provided, shiny::callModule() used call module. shiny 1.5.0, recommended way use shiny::moduleServer() instead require arguments. data (optional) provided, module called teal_data object (.e. list reactive (filtered) data specified filters argument) value argument. datasets (optional) provided, module called FilteredData object value argument. (See teal.slice::FilteredData). reporter (optional) provided, module called Reporter object value argument. (See teal.reporter::Reporter). filter_panel_api (optional) provided, module called FilterPanelAPI object value argument. (See teal.slice::FilterPanelAPI). ... (optional) provided, server_args elements passed module named argument .... ui (function) shiny UI module function following arguments: id - teal set proper shiny namespace module. ... (optional) provided, ui_args elements passed module named argument .... filters (character) Deprecated. Use datanames instead. datanames (character) Names datasets relevant item. 2 reserved values specific behaviors: keyword \"\" includes datasets available data passed teal application. NULL hides sidebar panel completely. transformers specified, datanames automatically added datanames argument. server_args (named list) additional arguments passed server function. ui_args (named list) additional arguments passed UI function. transformers (list teal_data_module) applied transform data. transform module UI appear teal's sidebar panel. Transformers' datanames added datanames. See teal_transform_module(). ... modules(): (teal_module teal_modules) Objects wrap tab. format() print(): Arguments passed methods. x (teal_module teal_modules) Object format/print. indent (integer(1)) Indention level; nested element indented one level . modules (teal_module teal_modules)","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_modules.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create teal_module and teal_modules objects — teal_modules","text":"module() returns object class teal_module. modules() returns teal_modules object contains following fields: label: taken label argument. children: list containing objects passed .... List elements named label attribute converted valid shiny id.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_modules.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create teal_module and teal_modules objects — teal_modules","text":"module() creates instance teal_module can placed teal application. modules() shapes structure application organizing teal_module within navigation panel. wraps teal_module teal_modules objects teal_modules object, results nested structure corresponding nested tabs final application. Note modules() label comes ..., must passed named argument, otherwise captured .... labels \"global_filters\" \"Report previewer\" reserved used mapping argument teal_slices() report previewer module reporter_previewer_module(), respectively.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_modules.html","id":"restricting-datasets-used-by-teal-module-","dir":"Reference","previous_headings":"","what":"Restricting datasets used by teal_module:","title":"Create teal_module and teal_modules objects — teal_modules","text":"datanames argument controls datasets used module’s server. datasets, passed via server's data argument, ones shown module's tab. datanames set \"\", datasets data object treated relevant. However, may include unnecessary datasets, : Proxy variables column modifications Temporary datasets used create final versions Connection objects exclude irrelevant datasets, use set_datanames() function change datanames \"\" specific names. Trying modify non-\"\" values set_datanames() result warning. Datasets names starting . ignored globally unless explicitly listed datanames.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_modules.html","id":"datanames-with-transformers","dir":"Reference","previous_headings":"","what":"datanames with transformers","title":"Create teal_module and teal_modules objects — teal_modules","text":"transformers specified, datanames added module’s datanames, changes behavior follows: module(datanames) NULL transformers defined datanames, sidebar appear showing transformers' datasets, instead hidden. module(datanames) set specific values transformer datanames = \"\", module may receive extra datasets unnecessary","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_modules.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create teal_module and teal_modules objects — teal_modules","text":"","code":"library(shiny) module_1 <- module( label = \"a module\", server = function(id, data) { moduleServer( id, module = function(input, output, session) { output$data <- renderDataTable(data()[[\"iris\"]]) } ) }, ui = function(id) { ns <- NS(id) tagList(dataTableOutput(ns(\"data\"))) }, datanames = \"all\" ) module_2 <- module( label = \"another module\", server = function(id) { moduleServer( id, module = function(input, output, session) { output$text <- renderText(\"Another Module\") } ) }, ui = function(id) { ns <- NS(id) tagList(textOutput(ns(\"text\"))) }, datanames = NULL ) modules <- modules( label = \"modules\", modules( label = \"nested modules\", module_1 ), module_2 ) app <- init( data = teal_data(iris = iris), modules = modules ) if (interactive()) { shinyApp(app$ui, app$server) } # change the module's datanames set_datanames(module(datanames = \"all\"), \"a\") #> + module # change modules' datanames set_datanames( modules( module(datanames = \"all\"), module(datanames = \"a\") ), \"b\" ) #> Warning: Not possible to modify datanames of the module module. set_datanames() can only change datanames if it was set to \"all\". #> + root #> + module #> + module"},{"path":"https://insightsengineering.github.io/teal/reference/teal_slices.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter settings for teal applications — teal_slices","title":"Filter settings for teal applications — teal_slices","text":"Specify initial filter states filtering settings teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_slices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter settings for teal applications — teal_slices","text":"","code":"teal_slices( ..., exclude_varnames = NULL, include_varnames = NULL, count_type = NULL, allow_add = TRUE, module_specific = FALSE, mapping, app_id = NULL ) as.teal_slices(x) # S3 method for class 'teal_slices' c(...)"},{"path":"https://insightsengineering.github.io/teal/reference/teal_slices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter settings for teal applications — teal_slices","text":"... number teal_slice objects. include_varnames, exclude_varnames (named lists character) list names match names data sets vector elements match variable names respective data sets; specify variables allowed filtered; see Details. count_type new feature. kindly share opinions teal.slice's GitHub repository. (character(1)) string specifying observations tallied filter states. Possible options: \"none\" (default) counts single FilterState show unfiltered number . \"\" counts single FilterState show number observation filtered unfiltered dataset. Note, issues reported using option MultiAssayExperiment. Please make sure adding new filters fail target platform deploying production. allow_add (logical(1)) logical flag specifying whether user able add new filters module_specific (logical(1)) optional, FALSE (default) one filter panel applied modules. filters shared modules. TRUE filter panel module-specific. Modules can different set filters specified - see mapping argument. mapping new feature. kindly share opinions teal's GitHub repository. (named list) specifies filters active modules app start. Elements contain character vector teal_slice ids (see teal.slice::teal_slice). Names list correspond teal_module label set module() function. ids listed \"global_filters active modules. missing, filters applied modules. empty list, filters available modules start inactive. module_specific FALSE, global_filters active start. app_id (character(1)) internal use , set manually. Added init teal_slices can matched app used. Used verifying snapshots uploaded file. See snapshot. x (list) lists convert teal_slices","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_slices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter settings for teal applications — teal_slices","text":"teal_slices object.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_slices.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Filter settings for teal applications — teal_slices","text":"Produces teal_slices object. teal_slice components specify filter states active app starts. Attributes (created named arguments) configure way app applies filters. See argument descriptions details.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/teal_slices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Filter settings for teal applications — teal_slices","text":"","code":"filter <- teal_slices( teal_slice(dataname = \"iris\", varname = \"Species\", id = \"species\"), teal_slice(dataname = \"iris\", varname = \"Sepal.Length\", id = \"sepal_length\"), teal_slice( dataname = \"iris\", id = \"long_petals\", title = \"Long petals\", expr = \"Petal.Length > 5\" ), teal_slice(dataname = \"mtcars\", varname = \"mpg\", id = \"mtcars_mpg\"), mapping = list( module1 = c(\"species\", \"sepal_length\"), module2 = c(\"mtcars_mpg\"), global_filters = \"long_petals\" ) ) app <- init( data = teal_data(iris = iris, mtcars = mtcars), modules = list( module(\"module1\"), module(\"module2\") ), filter = filter ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/reference/teal_transform_module.html","id":null,"dir":"Reference","previous_headings":"","what":"Data module for teal transformers. — teal_transform_module","title":"Data module for teal transformers. — teal_transform_module","text":"Create teal_data_module object custom transformation data pre-processing passing data module.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_transform_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data module for teal transformers. — teal_transform_module","text":"","code":"teal_transform_module( ui = function(id) NULL, server = function(id, data) data, label = \"transform module\", datanames = character(0) )"},{"path":"https://insightsengineering.github.io/teal/reference/teal_transform_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data module for teal transformers. — teal_transform_module","text":"ui (function(id)) shiny module UI function; must take id argument server (function(id, data)) shiny module server function; takes id data argument, id module id data reactive teal_data input. server function must return reactive expression containing teal_data object. server function definition use eventReactive may lead unexpected behavior. See vignettes(\"data-transform--shiny-module\") information. label (character(1)) Label module. datanames (character) Names datasets relevant module evaluate. set character(0) module receive modules() datanames.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_transform_module.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data module for teal transformers. — teal_transform_module","text":"teal_transform_module creates teal_data_module object transform data teal application. transformation happens data passed filtering activity teal. transformed data sent server teal_module(). See vignette vignette(\"data-transform--shiny-module\", package = \"teal\") details.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/teal_transform_module.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data module for teal transformers. — teal_transform_module","text":"","code":"my_transformers <- list( teal_transform_module( label = \"Custom transform for iris\", datanames = \"iris\", ui = function(id) { ns <- NS(id) tags$div( numericInput(ns(\"n_rows\"), \"Subset n rows\", value = 6, min = 1, max = 150, step = 1) ) }, server = function(id, data) { moduleServer(id, function(input, output, session) { reactive({ within(data(), { iris <- head(iris, num_rows) }, num_rows = input$n_rows ) }) }) } ) )"},{"path":"https://insightsengineering.github.io/teal/reference/validate_app_title_tag.html","id":null,"dir":"Reference","previous_headings":"","what":"Function for validating the title parameter of teal::init — validate_app_title_tag","title":"Function for validating the title parameter of teal::init — validate_app_title_tag","text":"Checks input title teal::init create valid title favicon tag.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_app_title_tag.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function for validating the title parameter of teal::init — validate_app_title_tag","text":"","code":"validate_app_title_tag(shiny_tag)"},{"path":"https://insightsengineering.github.io/teal/reference/validate_app_title_tag.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function for validating the title parameter of teal::init — validate_app_title_tag","text":"shiny_tag (shiny.tag) Object validate valid title.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/validate_has_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate that dataset has a minimum number of observations — validate_has_data","text":"","code":"validate_has_data( x, min_nrow = NULL, complete = FALSE, allow_inf = TRUE, msg = NULL )"},{"path":"https://insightsengineering.github.io/teal/reference/validate_has_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate that dataset has a minimum number of observations — validate_has_data","text":"x (data.frame) min_nrow (numeric(1)) Minimum allowed number rows x. complete (logical(1)) Flag specifying whether check complete cases. Defaults FALSE. allow_inf (logical(1)) Flag specifying whether allow infinite values. Defaults TRUE. msg (character(1)) Additional message display alongside default message.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_has_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate that dataset has a minimum number of observations — validate_has_data","text":"function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_has_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate that dataset has a minimum number of observations — validate_has_data","text":"","code":"library(teal) ui <- fluidPage( sliderInput(\"len\", \"Max Length of Sepal\", min = 4.3, max = 7.9, value = 5 ), plotOutput(\"plot\") ) server <- function(input, output) { output$plot <- renderPlot({ iris_df <- iris[iris$Sepal.Length <= input$len, ] validate_has_data( iris_df, min_nrow = 10, complete = FALSE, msg = \"Please adjust Max Length of Sepal\" ) hist(iris_df$Sepal.Length, breaks = 5) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/validate_has_elements.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validates that vector has length greater than 0 — validate_has_elements","text":"","code":"validate_has_elements(x, msg)"},{"path":"https://insightsengineering.github.io/teal/reference/validate_has_elements.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validates that vector has length greater than 0 — validate_has_elements","text":"x vector msg message display","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_has_elements.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validates that vector has length greater than 0 — validate_has_elements","text":"function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_has_elements.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validates that vector has length greater than 0 — validate_has_elements","text":"","code":"data <- data.frame( id = c(1:10, 11:20, 1:10), strata = rep(c(\"A\", \"B\"), each = 15) ) ui <- fluidPage( selectInput(\"ref1\", \"Select strata1 to compare\", choices = c(\"A\", \"B\", \"C\"), selected = \"A\" ), selectInput(\"ref2\", \"Select strata2 to compare\", choices = c(\"A\", \"B\", \"C\"), selected = \"B\" ), verbatimTextOutput(\"arm_summary\") ) server <- function(input, output) { output$arm_summary <- renderText({ sample_1 <- data$id[data$strata == input$ref1] sample_2 <- data$id[data$strata == input$ref2] validate_has_elements(sample_1, \"No subjects in strata1.\") validate_has_elements(sample_2, \"No subjects in strata2.\") paste0( \"Number of samples in: strata1=\", length(sample_1), \" comparions strata2=\", length(sample_2) ) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/validate_has_variable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validates that dataset contains specific variable — validate_has_variable","text":"","code":"validate_has_variable(data, varname, msg)"},{"path":"https://insightsengineering.github.io/teal/reference/validate_has_variable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validates that dataset contains specific variable — validate_has_variable","text":"data (data.frame) varname (character(1)) name variable check data msg (character(1)) message display data include varname","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_has_variable.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validates that dataset contains specific variable — validate_has_variable","text":"function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_has_variable.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validates that dataset contains specific variable — validate_has_variable","text":"","code":"data <- data.frame( one = rep(\"a\", length.out = 20), two = rep(c(\"a\", \"b\"), length.out = 20) ) ui <- fluidPage( selectInput( \"var\", \"Select variable\", choices = c(\"one\", \"two\", \"three\", \"four\"), selected = \"one\" ), verbatimTextOutput(\"summary\") ) server <- function(input, output) { output$summary <- renderText({ validate_has_variable(data, input$var) paste0(\"Selected treatment variables: \", paste(input$var, collapse = \", \")) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/validate_in.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validates that vector includes all expected values — validate_in","text":"","code":"validate_in(x, choices, msg)"},{"path":"https://insightsengineering.github.io/teal/reference/validate_in.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validates that vector includes all expected values — validate_in","text":"x Vector values test. choices Vector test . msg (character(1)) Error message display elements x elements choices.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_in.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validates that vector includes all expected values — validate_in","text":"function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_in.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validates that vector includes all expected values — validate_in","text":"","code":"ui <- fluidPage( selectInput( \"species\", \"Select species\", choices = c(\"setosa\", \"versicolor\", \"virginica\", \"unknown species\"), selected = \"setosa\", multiple = FALSE ), verbatimTextOutput(\"summary\") ) server <- function(input, output) { output$summary <- renderPrint({ validate_in(input$species, iris$Species, \"Species does not exist.\") nrow(iris[iris$Species == input$species, ]) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":"https://insightsengineering.github.io/teal/reference/validate_inputs.html","id":null,"dir":"Reference","previous_headings":"","what":"Send input validation messages to output — validate_inputs","title":"Send input validation messages to output — validate_inputs","text":"Captures messages InputValidator objects collates one message passed validate.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_inputs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Send input validation messages to output — validate_inputs","text":"","code":"validate_inputs(..., header = \"Some inputs require attention\")"},{"path":"https://insightsengineering.github.io/teal/reference/validate_inputs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Send input validation messages to output — validate_inputs","text":"... either number InputValidator objects optionally named, possibly nested list InputValidator objects, see Details header (character(1)) generic validation message; set NULL omit","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_inputs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Send input validation messages to output — validate_inputs","text":"Returns NULL final validation call passes shiny.silent.error fails.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_inputs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Send input validation messages to output — validate_inputs","text":"shiny::validate used withhold rendering output element certain conditions met print validation message place output element. shinyvalidate::InputValidator allows validate input elements display specific messages respective input widgets. validate_inputs provides hybrid solution. Given InputValidator object, messages corresponding inputs fail validation extracted placed one validation message passed validate/need call. way input validator messages repeated output. ... argument accepts number InputValidator objects nested list objects. validators passed directly, messages printed together one (optional) header message specified header. list passed, messages grouped validator. list's names used headers respective message groups. neither nested list elements named, header message taken header.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/validate_inputs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Send input validation messages to output — validate_inputs","text":"","code":"library(shiny) library(shinyvalidate) ui <- fluidPage( selectInput(\"method\", \"validation method\", c(\"sequential\", \"combined\", \"grouped\")), sidebarLayout( sidebarPanel( selectInput(\"letter\", \"select a letter:\", c(letters[1:3], LETTERS[4:6])), selectInput(\"number\", \"select a number:\", 1:6), tags$br(), selectInput(\"color\", \"select a color:\", c(\"black\", \"indianred2\", \"springgreen2\", \"cornflowerblue\"), multiple = TRUE ), sliderInput(\"size\", \"select point size:\", min = 0.1, max = 4, value = 0.25 ) ), mainPanel(plotOutput(\"plot\")) ) ) server <- function(input, output) { # set up input validation iv <- InputValidator$new() iv$add_rule(\"letter\", sv_in_set(LETTERS, \"choose a capital letter\")) iv$add_rule(\"number\", function(x) { if (as.integer(x) %% 2L == 1L) \"choose an even number\" }) iv$enable() # more input validation iv_par <- InputValidator$new() iv_par$add_rule(\"color\", sv_required(message = \"choose a color\")) iv_par$add_rule(\"color\", function(x) { if (length(x) > 1L) \"choose only one color\" }) iv_par$add_rule( \"size\", sv_between( left = 0.5, right = 3, message_fmt = \"choose a value between {left} and {right}\" ) ) iv_par$enable() output$plot <- renderPlot({ # validate output switch(input[[\"method\"]], \"sequential\" = { validate_inputs(iv) validate_inputs(iv_par, header = \"Set proper graphical parameters\") }, \"combined\" = validate_inputs(iv, iv_par), \"grouped\" = validate_inputs(list( \"Some inputs require attention\" = iv, \"Set proper graphical parameters\" = iv_par )) ) plot(faithful$eruptions ~ faithful$waiting, las = 1, pch = 16, col = input[[\"color\"]], cex = input[[\"size\"]] ) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/validate_n_levels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate that variables has expected number of levels — validate_n_levels","text":"","code":"validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)"},{"path":"https://insightsengineering.github.io/teal/reference/validate_n_levels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate that variables has expected number of levels — validate_n_levels","text":"x variable name. x factor, unique values treated levels. min_levels cutoff minimum number levels x max_levels cutoff maximum number levels x var_name name variable validated use validation message","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_n_levels.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate that variables has expected number of levels — validate_n_levels","text":"number levels x less min_levels greater max_levels validation fail. function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_n_levels.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate that variables has expected number of levels — validate_n_levels","text":"","code":"data <- data.frame( one = rep(\"a\", length.out = 20), two = rep(c(\"a\", \"b\"), length.out = 20), three = rep(c(\"a\", \"b\", \"c\"), length.out = 20), four = rep(c(\"a\", \"b\", \"c\", \"d\"), length.out = 20), stringsAsFactors = TRUE ) ui <- fluidPage( selectInput( \"var\", \"Select variable\", choices = c(\"one\", \"two\", \"three\", \"four\"), selected = \"one\" ), verbatimTextOutput(\"summary\") ) server <- function(input, output) { output$summary <- renderText({ validate_n_levels(data[[input$var]], min_levels = 2, max_levels = 15, var_name = input$var) paste0( \"Levels of selected treatment variable: \", paste(levels(data[[input$var]]), collapse = \", \" ) ) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/validate_no_intersection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validates no intersection between two vectors — validate_no_intersection","text":"","code":"validate_no_intersection(x, y, msg)"},{"path":"https://insightsengineering.github.io/teal/reference/validate_no_intersection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validates no intersection between two vectors — validate_no_intersection","text":"x vector y vector msg (character(1)) message display x y intersect","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_no_intersection.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validates no intersection between two vectors — validate_no_intersection","text":"function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_no_intersection.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validates no intersection between two vectors — validate_no_intersection","text":"","code":"data <- data.frame( id = c(1:10, 11:20, 1:10), strata = rep(c(\"A\", \"B\", \"C\"), each = 10) ) ui <- fluidPage( selectInput(\"ref1\", \"Select strata1 to compare\", choices = c(\"A\", \"B\", \"C\"), selected = \"A\" ), selectInput(\"ref2\", \"Select strata2 to compare\", choices = c(\"A\", \"B\", \"C\"), selected = \"B\" ), verbatimTextOutput(\"summary\") ) server <- function(input, output) { output$summary <- renderText({ sample_1 <- data$id[data$strata == input$ref1] sample_2 <- data$id[data$strata == input$ref2] validate_no_intersection( sample_1, sample_2, \"subjects within strata1 and strata2 cannot overlap\" ) paste0( \"Number of subject in: reference treatment=\", length(sample_1), \" comparions treatment=\", length(sample_2) ) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/reference/validate_one_row_per_id.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate that dataset has unique rows for key variables — validate_one_row_per_id","text":"","code":"validate_one_row_per_id(x, key = c(\"USUBJID\", \"STUDYID\"))"},{"path":"https://insightsengineering.github.io/teal/reference/validate_one_row_per_id.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate that dataset has unique rows for key variables — validate_one_row_per_id","text":"x (data.frame) key (character) Vector ID variables x identify unique records.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_one_row_per_id.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate that dataset has unique rows for key variables — validate_one_row_per_id","text":"function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/reference/validate_one_row_per_id.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate that dataset has unique rows for key variables — validate_one_row_per_id","text":"","code":"iris$id <- rep(1:50, times = 3) ui <- fluidPage( selectInput( inputId = \"species\", label = \"Select species\", choices = c(\"setosa\", \"versicolor\", \"virginica\"), selected = \"setosa\", multiple = TRUE ), plotOutput(\"plot\") ) server <- function(input, output) { output$plot <- renderPlot({ iris_f <- iris[iris$Species %in% input$species, ] validate_one_row_per_id(iris_f, key = c(\"id\")) hist(iris_f$Sepal.Length, breaks = 5) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"new-features-0-15-2-9078","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.15.2.9078","text":"Possible call ui_teal srv_teal directly application delivering data argument reactive returning teal_data object. #669 Introduced teal_transform_module provide way interactively modify data delivered teal_module’s server. #1228 Introduced new argument = FALSE teal_data_module possibly reload data run time. Possibility download lockfile restore app session reproducibility. #479 Introduced function set_datanames() change datanames teal_module. Datasets name starts . ignored module’s datanames set \"\".","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"breaking-changes-0-15-2-9078","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.15.2.9078","text":"Setting datanames() data passed teal application longer effect. order change teal_module’s datanames one modify module$datanames. landing_popup_module() needs passed landing_popup argument init instead passed module modules argument init. teal longer re-export %>%. Please load library(magrittr) instead use |> base.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"enhancement-0-15-2-9078","dir":"Changelog","previous_headings":"","what":"Enhancement","title":"teal 0.15.2.9078","text":"Enhanced system data validation display error messages. Easier way call javascript events setting $(document).ready(function() { ... }). #1114 Provided progress bar modules loading data filtering teal app startup. Filter mapping display separate icon tab. Environment data passed teal_module’s server consists unfiltered datasets contained .raw_data.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-0152","dir":"Changelog","previous_headings":"","what":"teal 0.15.2","title":"teal 0.15.2","text":"CRAN release: 2024-03-07","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"bug-fixes-0-15-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.15.2","text":"Fixed bug handling datanames modules crashed module-specific applications filtering child datasets.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-0151","dir":"Changelog","previous_headings":"","what":"teal 0.15.1","title":"teal 0.15.1","text":"CRAN release: 2024-02-22","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"bug-fixes-0-15-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.15.1","text":"Fixed bug stopped module_specific feature teal module specified datanames length 1.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"miscellaneous-0-15-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.15.1","text":"Updated links vignettes","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-0150","dir":"Changelog","previous_headings":"","what":"teal 0.15.0","title":"teal 0.15.0","text":"CRAN release: 2024-02-08","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"new-features-0-15-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.15.0","text":"Added landing_popup_module function creates module display popup app starts. popup block access app dismissed. Filter state snapshots can now uploaded file. See ?snapshot. Added as_tdata function facilitate migration modules new teal_data class. Added build_app_title function facilitate adding favicons app title.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"breaking-changes-0-15-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.15.0","text":"data argument init now accepts teal_data teal_data_module. tdata deprecated replaced teal_data. Support tdata passed data argument module(server) removed next release. module(ui) argument longer accepts data datasets arguments. data dependent logic set server function. module(server) argument deprecated datasets argument. teal_modules’ server functions accept data (teal_data) instead. Changed order formal arguments init. filter now comes directly modules, title.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"miscellaneous-0-15-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.15.0","text":"Enhanced module validation checks won’t throw messages data argument unnecessarily. Added argument teal_slices made modifications init enable tagging teal_slices app id safely upload snapshots disk. FilteredData longer stores pre-processing code specific slots. Code now attached attribute. Adjusted appropriately.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"bug-fixes-0-15-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.15.0","text":"Removed Report previewer module mapping matrix display filter manager. Specified minimal version package dependencies.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"new-features-0-14-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.14.0","text":"Enabled module specific filter panel. See module_specific teal::teal_slices documentation. Enabled capturing resetting application filter state snapshots. See ?snapshot. Enabled reporter_previewer_module customize default values srv_args. Enabled passing reporter_previewer_module list modules override default one.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"breaking-changes-0-14-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.14.0","text":"Specifying filter argument teal::init requires teal_slices object now. Details documentation teal::init. Soft deprecated filters argument module replaced datanames. Details documentation teal::module","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"miscellaneous-0-14-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.14.0","text":"Removed scda package dependency examples. Updated header tag style enhance element containment.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"breaking-changes-0-13-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.13.0","text":"use datasets argument modules deprecated removed future release. Please use data argument instead. data type tdata; see “Creating custom modules” vignettes function documentation teal::new_tdata details. Due deprecation chunks teal.code, teal framework now uses replacement (qenv) instead. documentation teal updated reflect custom modules written chunks updated use qenv. Due deprecation chunks teal.code, get_rcode, get_rcode_srv, get_rcode_ui removed.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"new-features-0-13-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.13.0","text":"Added validate_inputs function transfers input validation messages app output. modules argument init accepts teal_module type object. need wrap single module modules() list(). Updated module_nested_tabs active modules calculated teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"miscellaneous-0-13-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.13.0","text":"Updated examples use scda.2022. Added R session information link footer teal applications. Added data hashing step using rlang instead digest package calculate hash (moved teal.data teal.slice). now explicit hashing check reproducible code output. Removed deprecated functions: root_modules, default_filter, bookmarkableShinyApp, well deprecated logging mechanism, including functions log_app_usage .log. Updated “Teal Bootstrap Themes” vignette provide details customizing teal app bslib::run_with_themer. Removed outdated diagram srv_nested_tabs documentation. Changed default values header footer arguments init empty text.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"new-features-0-12-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.12.0","text":"Added support custom bslib bootstrap themes teal::init apps, please read new teal-bs-themes vignette.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"enhancements-0-12-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.12.0","text":"Added option choose variables can filtered filter panel using filterable attributes per-dataset lists filter argument init. Updated teal_module data argument receives list reactive filter data \"code\" \"join_keys\" attributes. Updated teal_module filter_panel_api argument receives FilterPanelAPI object. Updated internals module_teal reflect changes teal.slice.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"breaking-changes-0-12-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.12.0","text":"Updated teal_module longer receive datasets object ... argument. order use datasets teal_module please specify datasets explicitly. Deprecated merge_expression argument get_rcode_srv function removed get_rcode function. Deprecated session argument get_rcode function.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"miscellaneous-0-12-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.12.0","text":"Enhanced burger button disabled filter panel used.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"enhancements-0-11-1","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.11.1","text":"Added new function reporter_previewer_module wrap teal.reporter package previewer functionality teal module. Updated teal support modules include reporting. module supports reporting included reporter_previewer_module included. Added default arguments module() server argument now function second argument can ... datasets.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"breaking-changes-0-11-1","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.11.1","text":"Deprecated bookmarkableShinyApp. future releases teal framework stop supporting shiny bookmarking (officially supported); may officially supported future. Note filter panel teal.slice retains ability save restore state used standalone shiny app bookmarking.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"miscellaneous-0-11-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.11.1","text":"Added template pkgdown configuration. Removed unneeded shinytest app tests. Updated package authors. Added package vignettes.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-0110","dir":"Changelog","previous_headings":"","what":"teal 0.11.0","title":"teal 0.11.0","text":"teal.data: creating loading data needed teal applications. teal.widgets: shiny components used within teal. teal.slice: provides filtering panel allow filtering data. teal.code: handles reproducibility outputs. teal.transform: standardizes extracting merging data. teal.logger: standardizes logging within teal framework. teal package contains code create apps (teal::init), create module (teal::module) group modules app (teal::modules). teal depends teal.transform teal.data contain functions teal app creators likely need. package teal imports therefore teal module creators either fully specify functions packages required import custom packages library(teal) load .","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"new-features-0-11-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.11.0","text":"simple new teal module named example_module included package.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"breaking-changes-0-11-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.11.0","text":"teal package split multiple smaller packages, see . Deprecated root_modules function, users use modules directly inside init. Due deprecation root_modules label argument modules must explicitly named. example modules(\"lab\", mod1, mod2) replaced modules(label = \"lab\", mod1, mod2).","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"miscellaneous-0-11-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.11.0","text":"Minor changes internals teal: main module panel now fixed shiny name root active tab named active_tab Active_tab. MultiAssayExperiment now suggested packages, required. Objects dependent MultiAssayExperiment changed lazy-load now suggested package.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"bug-fixes-0-11-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.11.0","text":"Showing R Code longer shows reproducibility warning message reproducibility check passed.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"breaking-changes-0-10-1","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.10.1","text":"Changed HTML identifiers teal modules - now nested module receives shiny namespace. Deprecated functions related connectors moved separate packages. Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational. Removed rcd_connection rcd_data; scda_dataset_connectors can passed cdisc_data teal_data directly. Replaced rcd_dataset_connector rcd_cdisc_dataset_connector scda_dataset_connector scda_cdisc_dataset_connector respectively. Renamed teal_show_js_log option teal.show_js_log match options naming convention. Removed %is_in% stop_shiny internal utility functions.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"logging-0-10-1","dir":"Changelog","previous_headings":"New features","what":"Logging","title":"teal 0.10.1","text":"Added support logging using logger package. Added new function register_logger, registers logger given namespace. Added trace info levels log messages teal framework. Added pid shiny session token footnote app developers can identify logs apps.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"other-0-10-1","dir":"Changelog","previous_headings":"New features","what":"Other","title":"teal 0.10.1","text":"Added print methods DatasetConnector, RelationalData, RelationalDataconnector JoinKeys classes added input validation implementation print method already Dataset object. Added public facing constructor functions CDISCDataConnector, RelationalDataConnector, DataConnection classes. Modified data_extract_spec allow filter select parameters NULL, results data_extract_ui acting filter_spec variables possible choices supplied filter argument select_spec multiple parameter set TRUE supplied select argument. Added support full screen module filters argument equal NULL. Added support shiny::moduleServer passed server parameter teal::module. Added teal.threshold_slider_vs_checkboxgroup R option: categorical variable number unique values, filter panel uses drop-select input instead checkbox group. Extended FilteredData API allow managing filter states programmatically UI teal application. Hid buttons remove filters datasets dataset active filters. Updated init accept RelationalData, data.frame, MultiAssayExperiment, Dataset, DatasetConnector, list function returning named list data input.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"bug-fixes-0-10-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.10.1","text":"choices_selected now correctly removes duplicates array passed choices parameter. Fixed call returned FilterState case using MultiAssayExperiment::subsetByColData. Now single condition variable containing NA values !.na(var) & var == . Fixed data loading DatasetConnector dependent Dataset DatasetConnector objects. Fixed restoring bookmarked filter state teal application. Refactored module_nested_tabs fix issue filter panel reacting input change nested module. updateOptionalSelectInput longer sets input NULL logical value passed selected. Fixed setting JoinKeys key name two Dataset object differs. Fixed printing JavaScript console logs R console teal.show_js_log = TRUE.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"miscellaneous-0-10-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.10.1","text":"Soft-deprecate mae_dataset() favor general dataset() constructor. Added vignette describing modifications teal applications users can apply using R options. Added default values label argument select_spec filter_spec. Added validation FilteredDataset::get_data accept logical input . Changed references outdated functions teal.devel documentation. Introduced Teal prefix public R6 classes avoid name collisions packages. Removed dependency utils.nest replaced functionality teal equivalents checkmate package base R. Replaced old shiny server functions DataConnection, RelationalDataConnector, DatasetConnector, RelationalData shiny::moduleServer equivalents. Running teal application via ui_teal_with_splash srv_teal_with_splash now longer recommended doesn’t support new features (e.g. logging, bookmarking). Use init instead. Updated R version requirement >= 4.0. Updated “filter panel collapse” icon remove warnings using shiny version >= 1.7. Removed non-exported, debugging modules. Updated footer tag style less visible.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"new-features-0-10-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.10.0","text":"Allow passing MultiAssayExperiment teal::init using mae_dataset function connectors. Refactored filter panel use MultiAssayExperiment objects. Filters can set subject level (colData MAE object) experiment level (colData rowData assay). Added cdse_dataset_connector create delayed data objects CDSE. Added datasetdb_dataset_connector create delayed data objects DataSetDB. Added ricepass_connection create delayed data objects entimICE via ricepass. Simplified setting initial filter state without need specify “choices” “range” named list element depending variable class. Dataset type determines appearance functionality related filters filters summary. Datasets passed (reference) DDL FilteredData skipping extracting data attributes. Redesigned variable filter labels “Active Filter Variables” panel. Fully testable server functions.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"bug-fixes-0-10-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.10.0","text":"Fixed bug caused calling mutate_dataset multiple times DatasetConnector Dataset object. Fixed bug caused output get_code function reproduce raw data set. Changed filter_spec allow variable selection upon app initialization, first possible value previously selected.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"enhancements-0-10-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.10.0","text":"modules parameter teal::init function can also receive list except root_modules function call. Added split merge methods JoinKeys object. Added all_choices() possible argument selected parameter filter_spec, select_spec choices_selected indicating choices selected. append method CodeClass object modified print warning message argument result code added duplicated. Implemented delayed functionality mutate method Dataset DatasetConnector objects. Modified teal_data return CDISCData object whenever arguments type CDISCData object. Updated filters show levels logical variable TRUE/FALSE even one missing original array.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"miscellaneous-0-10-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.10.0","text":"Updated LICENCE README new package references. Added method get_hash Dataset class returning MD5 hash object stored inside Dataset object. Replaced random.cdisc.data scda examples tests. Implemented functionality store JoinKeys Dataset DatasetConnector classes. Added error_on_lintr: TRUE .lintr pipe operator %>% now exported downstream code packages can use . Removed hyperlinks rice package documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"enhancements-0-9-5","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.9.5","text":"Added informational stop message using mutate_data RelationalDataConnector. Modified as_cdisc behave similarly cdisc_dataset called Dataset object. Changed displayed format data name column name data_extract_spec UI elements. now compressed . don’t change runtime app. Added ADSAFTTE list recognized ADaM dataset names. Added another example data_extract_spec’s doc string showcasing app users can choose variable used filtering encoding panel. Added CSS styling tool tips teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"bug-fixes-0-9-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.9.5","text":"Fixed edge case error creating filter variable missing values crashed app. Fixed bug crashes app whenever Date datetime column selected filter_spec.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"enhancements-0-9-4","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.9.4","text":"Released snowflake connection connectors. Changed ordering datasets intuitive (topologically first CDISC datasets according input datasets order). closing teal app (ending user shiny session), DataConnections now try close connections. Added ADHY keys configuration file. Extended filter_spec function: parameter choices longer mandatory (function take possible choices default) vars parameter additionally accepts choices_selected allows change variables filtering using UI elements encoding panel.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"bug-fixes-0-9-4","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.9.4","text":"Cleaned imports package. Modified value_choices function handle edge case \"NA\" NA values exist character column choices derived . Fixed issue cloning Callable class.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"new-features-0-9-3","dir":"Changelog","previous_headings":"","what":"New Features","title":"teal 0.9.3","text":"Support data-standard independent input filtering. includes refactor data dataset structures together refactor FilteredData class. New JoinKeys class (join_keys() constructors join_key() constructor elements) store joining key columns datasets. Refactored basic dataset() constructor, added cdisc_dataset() constructor as_cdisc() conversion function. Soft-deprecate removed class constructors obsolete functions (e.g. keys()). Added get_keys() set_keys() functions extract manipulate datasets primary keys respectively. Unexported filtered_data_new, filtered_data_set filtered_data_set_filters.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"bug-fixes-0-9-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.9.3","text":"Duplicated lines code passed teal::cdisc_dataset teal::RelationalDataset constructors now shown getting code teal::cdisc_data objects teal::RelationalData objects. Added ability press “Enter” key without set focus Submit button delayed data loading. Allow variable_choices use datasets missing labels. Fixed bug ignores input NULL selected argument select_spec function.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"enhancements-0-9-3","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.9.3","text":"Added button remove active filters Filter Panel.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"new-features-0-9-2","dir":"Changelog","previous_headings":"","what":"New Features","title":"teal 0.9.2","text":"Added python_dataset_connector create delayed data objects python scripts directly python code. NOTE: python_dataset_connector yet ready deployed RSConnect contain numpy pandas, Python libraries used python_dataset_connector. Added support filtering Date Datetime variables Filter Panel. Added buttons date datetime filter widgets reset value original. Added new function check_key_duplicates, creates short summary rows duplicated primary key (row numbers number duplicates)","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"enhancements-0-9-2","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.9.2","text":"Fixed lack labels character factor variables Filter Panel. variables now displayed module_filter_panel, types numeric, logical, factor, character Date Fixed mutate_data accept whole scope objects vars. Clarified teal::init function documentation state custom CSS loading code htmltools::htmlDependency included header argument rather inside UI arguments modules. Enabled empty select field inside data_extract_spec. Added new argument drop_keys filter_spec decide whether drop keep keys columns single filter columns. Added new optional argument keys variable_choices. keys specifies names variables, new key icon shown next variable drop menus left-hand side encoding panels instead icon appropriate original R variable type. variable_choices now also works RelationalDataset RelationalDatasetConnector objects.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"miscellaneous-0-9-2","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.9.2","text":"Removed include_factors option get_class_colnames RawDataset.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-091","dir":"Changelog","previous_headings":"","what":"teal 0.9.1","title":"teal 0.9.1","text":"Adds method resolve nested lists containing delayed data objects, can used arm_ref_comp objects. Nested tabs module now better alignment filter panel page. Allow width argument optionalSelectInput. Added lifecycle badges exported functions. Added new code_dataset_connector code_cdisc_dataset_connector functions enable creation new delayed data objects given string code. Added new functions csv_dataset_connector csv_cdisc_dataset_connector. Updated set_ui_input method RawDatasetConnector NamedDatasetConnector handle user defined shiny inputs. Include Keep Inf checkbox numerical filter items. Keep NA Keep Inf checkbox doesn’t appear missing infinite values. Replace existing RelationalData class abstract class RelationalDataCollection rename RelationalDataList class RelationalData. data argument teal::init now always RelationalData object. Added fun_cdisc_dataset_connector enable providing custom function returning dataset. Removed code script arguments as_relational wrapper. intended done mutate_dataset functionality. filer argument init added validation step ensure compatibility rest app. Variables inherited ADSL specified ADSL dataset. Fixes issue connection close code present get_code results. Fixes issue occasional incorrect ordering bar charts filter panel. informative error displayed pull_fun DataConnection produces error.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-090","dir":"Changelog","previous_headings":"","what":"teal 0.9.0","title":"teal 0.9.0","text":"cdisc_dataset dataset now return R6 class objects (RelationalDataset). new teal_data function include datasets connectors teal application. cdisc_data function include datasets connectors teal application check argument still used consistency tests performed. get_raw_data can used derive raw data R6 objects e.g. (RelationalDataset). RawDatasetConnector, NamedDatasetConnector RelationalDatasetConnector execute custom function call order get data connection. CodeClass manage reproducibility data relationships datasets. directly exposed public interface. mutate_dataset allows modify dataset connector via code argument R script. mutate_data allows change dataset RelationalData, RelationalDataConnector RelationalDataList. New wrapper functions manipulate RelationalDatasetConnector RelationalDataset get_dataset, load_dataset, as_relational. New wrapper functions manipulate RelationalDataConnector, RelationalData RelationalDataList get_datasets, load_datasets. choices_labeled, filter_spec, select_spec, data_extract_spec, value_choices, variable_choices S3 class applied data.frame also delayed data. can longer modify app$datasets, must instead use argument filter init function. New modules created create module nested teal modules, another one adds right filter pane tab. teal::init function stays unchanged. teal::init function now returns UI function optional id argument. allows embed applications. split view two teal applications side--side one example shown vignette. teal::init turned wrapper function around module_teal_with_splash.R developers want embed teal shiny module directly work functions (ui_teal_with_splash srv_teal_with_splash) instead teal::init. teal::init function now title parameter set title browser window. Missing data NA now explicitly addressed filter panel: NAs excluded default checkbox include added. Statistics data visually depicted terms histograms bar charts overlayed onto shiny input elements. Added buttons remove filters applied dataset. Restored functionality hide filter panel module constructed filters = NULL. Moved helper functions utils.nest removed unused functions set_labels_df get_labels_df. optionalSelectInput now allows grouped choices.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"refactor-of-filtereddata-for-developers-0-9-0","dir":"Changelog","previous_headings":"","what":"Refactor of FilteredData (for developers)","title":"teal 0.9.0","text":"FilteredData now fully reactive. Now filtered data lazy evaluated per need. opens door bookmarking teal apps (bookmarking currently works right filtering panel, make feature sophisticated future release, module must reviewed adapted contains reactiveValues). Datasets materialized connectors provided FilteredData set_datasets_data function located init_datasets.R file. Renamed get_dataset() method get_data(). Renamed get_filter_call() method get_filter_expr(); returns expression rather list. Removed argument isolate get_data() method similar methods. must isolate needed. want temporarily deactivate shiny errors due missing errors, can set options(shiny.suppressMissingContextError = TRUE). general, avoid isolate breaks reactivity. added development module add several filters , e.g. safety filters. evaluated converted proper module made available end-users.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-085","dir":"Changelog","previous_headings":"","what":"teal 0.8.5","title":"teal 0.8.5","text":"UI bug fix hide filter elements used datasets.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-084","dir":"Changelog","previous_headings":"","what":"teal 0.8.4","title":"teal 0.8.4","text":"Progress bar UI creation delayed loading module. Change output keys function keys object. Delayed version choices_selected. Fix error choices_selected selected choices. Fix pickerInput display column name label ’s missing.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-083","dir":"Changelog","previous_headings":"","what":"teal 0.8.3","title":"teal 0.8.3","text":"Enable teal app initialize without data. data loaded within teal app. New classes (DatasetConnector, DataConnector) connect various data sources, including: * connector rice API - rice_data rice_dataset_connector * connector RDS files - rds_data rds_dataset_connector Message appears bottom right shiny app shiny busy update views. Remove labels argument cdisc_data function. Labels now already present data passed cdisc_data function. can achieved using var_relabel function.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-082","dir":"Changelog","previous_headings":"","what":"teal 0.8.2","title":"teal 0.8.2","text":"Fixed several BUGS optionalSelectInput improved inputs look. Added get_data_labels function FilteredData class. Improved sep passing within data_extract_spec.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-081","dir":"Changelog","previous_headings":"","what":"teal 0.8.1","title":"teal 0.8.1","text":"Refactor choices_labeled fix bug showing column name data_extract_spec.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-080","dir":"Changelog","previous_headings":"","what":"teal 0.8.0","title":"teal 0.8.0","text":"Added cdisc_dataset (general dataset) functions properly handle dataset keys merging. Possibility load custom .css .js files. Renamed columns_spec select_spec. Show number observations filter panel. Add labeling functions variable_choices value_choices.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-070","dir":"Changelog","previous_headings":"","what":"teal 0.7.0","title":"teal 0.7.0","text":"Added functions cdisc_data get_code deal preprocessing moving step towards data standard independent teal. Moved teal.utils functions teal: log_app_usage, stop_shiny. Added *_spec functions. Improvements usage PickerInput SelectInput.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-060","dir":"Changelog","previous_headings":"","what":"teal 0.6.0","title":"teal 0.6.0","text":"Removed deprecated functions tab*. Removed data generation functions including generate_sample_data. Incorporate shinyjs package. Added “Copy R code clipboard” button.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-005","dir":"Changelog","previous_headings":"","what":"teal 0.0.5","title":"teal 0.0.5","text":"Added limit data_table scrolling, preventing overlap UI elements. Boolean filtering.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-004","dir":"Changelog","previous_headings":"","what":"teal 0.0.4","title":"teal 0.0.4","text":"Bug fix teal crashes filter variable gets added many decimal places.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-003","dir":"Changelog","previous_headings":"","what":"teal 0.0.3","title":"teal 0.0.3","text":"Note version 0.0.3 backwards compatible. Reading changes studying example app , however, clarify changes.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"new-features-0-0-3","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.0.3","text":"tm_scatterplot module. tm_table module.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"changes-0-0-3","dir":"Changelog","previous_headings":"","what":"Changes","title":"teal 0.0.3","text":"tabs arguments renamed modules. tab_item function now called module. tab_items function now called modules. tabs function removed. variable_browser_item now called tm_variable_browser. data_table_item now called tm_data_table. datasets argument automatically added server functions specified module. Hence teal_datasets removed server_args element.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-002","dir":"Changelog","previous_headings":"","what":"teal 0.0.2","title":"teal 0.0.2","text":"New ‘01_getting_started’ vignette. Datanames FilteredData now case sensitive.","code":""},{"path":"https://insightsengineering.github.io/teal/news/index.html","id":"teal-001","dir":"Changelog","previous_headings":"","what":"teal 0.0.1","title":"teal 0.0.1","text":"March 28, 2016 - Initial Release.","code":""}] +[{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/teal/main/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/teal/main/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/teal/main/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/adding-support-for-reporting.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Adding Support for Reporting to Custom Modules","text":"teal package offers integrated reporting feature utilizing teal.reporter package. comprehensive explanation reporting functionality , please refer documentation therein. article intended module developers aims provide guidance enhancing custom teal module automatic reporting feature. enhancement enables users incorporate snapshots module outputs report can reviewed another module automatically provided teal. Thus app user can interact report. responsibilities module developer include: Adding support reporting module. Specifying outputs constitute snapshot module. entire life cycle objects involved creating report configuring module preview report handled teal.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/adding-support-for-reporting.html","id":"custom-module","dir":"Articles","previous_headings":"","what":"Custom module","title":"Adding Support for Reporting to Custom Modules","text":"Let us consider example module, based example module teal: Using teal, can launch example module following:","code":"library(teal) my_module <- function(label = \"example teal module\") { module( label = label, server = function(id, data) { assert_reactive(data) checkmate::assert_class(isolate(data()), \"teal_data\") moduleServer(id, function(input, output, session) { updateSelectInput(session, \"dataname\", choices = isolate(datanames(data()))) output$dataset <- renderPrint({ req(input$dataname) data()[[input$dataname]] }) }) }, ui = function(id) { ns <- NS(id) sidebarLayout( sidebarPanel(selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL)), mainPanel(verbatimTextOutput(ns(\"dataset\"))) ) } ) } app <- init( data = teal_data(IRIS = iris, MTCARS = mtcars), modules = my_module() ) if (interactive()) shinyApp(app$ui, app$server)"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/articles/adding-support-for-reporting.html","id":"modify-the-declaration-of-the-server-function","dir":"Articles","previous_headings":"Add support for reporting","what":"Modify the declaration of the server function","title":"Adding Support for Reporting to Custom Modules","text":"first step add additional argument server function declaration - reporter. informs teal module requires reporter, included module called. See : modifications, module now ready launched teal: teal adds another tab application, titled Report previewer. However, visible change module operates appears user add content report module. requires inserting UI server elements teal.reporter module module body.","code":"my_module_with_reporting <- function(label = \"example teal module\") { module( label = label, server = function(id, data, reporter) { moduleServer(id, function(input, output, session) { updateSelectInput(session, \"dataname\", choices = isolate(datanames(data()))) output$dataset <- renderPrint({ req(input$dataname) data()[[input$dataname]] }) }) }, ui = function(id) { ns <- NS(id) sidebarLayout( sidebarPanel(selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL)), mainPanel(verbatimTextOutput(ns(\"dataset\"))) ) } ) } app <- init( data = teal_data(IRIS = iris, MTCARS = mtcars), modules = my_module_with_reporting() ) ## Initializing reporter_previewer_module if (interactive()) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/main/articles/adding-support-for-reporting.html","id":"insert-teal-reporter-module","dir":"Articles","previous_headings":"Add support for reporting","what":"Insert teal.reporter module","title":"Adding Support for Reporting to Custom Modules","text":"UI server logic necessary adding cards my_module_with_reporting report provided teal.reporter::simple_reporter_ui teal.reporter::simple_reporter_srv. updated module now ready launched: new piece UI added, buttons clickable. user can now add card report view Report previewer module preview still empty since instructed module put card.","code":"my_module_with_reporting <- function(label = \"example teal module\") { module( label = label, server = function(id, data, reporter) { moduleServer(id, function(input, output, session) { teal.reporter::simple_reporter_srv( id = \"reporter\", reporter = reporter, card_fun = function(card) card ) updateSelectInput(session, \"dataname\", choices = isolate(datanames(data()))) output$dataset <- renderPrint({ req(input$dataname) data()[[input$dataname]] }) }) }, ui = function(id) { ns <- NS(id) sidebarLayout( sidebarPanel( teal.reporter::simple_reporter_ui(ns(\"reporter\")), selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL) ), mainPanel(verbatimTextOutput(ns(\"dataset\"))) ) } ) } app <- init( data = teal_data(IRIS = iris, MTCARS = mtcars), modules = my_module_with_reporting() ) ## Initializing reporter_previewer_module if (interactive()) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/main/articles/adding-support-for-reporting.html","id":"add-content-to-the-card","dir":"Articles","previous_headings":"Add support for reporting","what":"Add content to the card","title":"Adding Support for Reporting to Custom Modules","text":"add content card, utilize public API exposed TealReportCard class. teal.reporter::simple_reporter_srv module accepts card_fun argument determines appearance output custom module. ReportCard derivatives allow sequential addition content according order method calls. explore content, can use $get_content method. details, refer documentation TealReportCard teal.reporter::ReportCard. add simple text card modifying card_fun argument passed teal.reporter::simple_reporter_srv. function must return card object, otherwise errors may occur teal. Now, application user can see text added custom_function Report previewer module.","code":"custom_function <- function(card = teal.reporter::ReportCard$new()) { card$append_text(\"This is content from a custom teal module!\") card } my_module_with_reporting <- function(label = \"example teal module\") { module( label = label, server = function(id, data, reporter) { moduleServer(id, function(input, output, session) { teal.reporter::simple_reporter_srv( id = \"reporter\", reporter = reporter, card_fun = custom_function ) updateSelectInput(session, \"dataname\", choices = isolate(datanames(data()))) output$dataset <- renderPrint({ req(input$dataname) data()[[input$dataname]] }) }) }, ui = function(id) { ns <- NS(id) sidebarLayout( sidebarPanel( teal.reporter::simple_reporter_ui(ns(\"reporter\")), selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL) ), mainPanel(verbatimTextOutput(ns(\"dataset\"))) ) } ) } app <- init( data = teal_data(IRIS = iris, MTCARS = mtcars), modules = my_module_with_reporting() ) ## Initializing reporter_previewer_module if (interactive()) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/main/articles/adding-support-for-reporting.html","id":"add-non-text-content-to-the-card","dir":"Articles","previous_headings":"Add support for reporting","what":"Add non-text content to the card","title":"Adding Support for Reporting to Custom Modules","text":"teal.reporter supports addition tables, charts, . information, explore API teal.reporter::ReportCard learn supported content types.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/adding-support-for-reporting.html","id":"tealreportcard","dir":"Articles","previous_headings":"Add support for reporting","what":"TealReportCard","title":"Adding Support for Reporting to Custom Modules","text":"teal exports TealReportCard class, extends teal.reporter::ReportCard class provides several convenient methods facilitate working teal features like filter panel source code. details, refer documentation TealReportCard. support TealReportCard, function passed teal.reporter::simple_reporter_srv must define default value card, shown : Without definition, API TealReportCard available within function.","code":"custom_function <- function(card = TealReportCard$new()) { # ... some code ... # card }"},{"path":"https://insightsengineering.github.io/teal/main/articles/adding-support-for-reporting.html","id":"example","dir":"Articles","previous_headings":"","what":"Example","title":"Adding Support for Reporting to Custom Modules","text":"conclusion, demonstrated build standard teal app code reproducibility reporter functionalities. Note server function requires filter_panel_api argument filter panel state can added report. final example, incorporated teal.code snippets. teal.code R library offers utilities storing code associating execution environment. allows ReporterCard store code necessary generate table along table . learn teal.code see vignette qenv teal.code.","code":"library(teal) library(teal.reporter) ## example_reporter_module <- function(label = \"Example\") { module( label = label, server = function(id, data, reporter, filter_panel_api) { with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, \"FilterPanelApi\") moduleServer(id, function(input, output, session) { updateSelectInput(session, \"dataname\", choices = isolate(datanames(data()))) dat <- reactive(data()[[input$dataname]]) observe({ req(dat()) updateSliderInput(session, \"nrow\", max = nrow(dat()), value = floor(nrow(dat()) / 5)) }) table_q <- reactive({ req(input$dataname) req(input$nrow) within( data(), result <- head(dataset, nrows), dataset = as.name(input$dataname), nrows = input$nrow ) }) output$table <- renderTable(table_q()[[\"result\"]]) ### REPORTER card_fun <- function(card = teal.reporter::ReportCard$new(), comment) { card$set_name(\"Table Module\") card$append_text(paste(\"Selected dataset\", input$dataname), \"header2\") card$append_text(\"Selected Filters\", \"header3\") if (with_filter) { card$append_text(filter_panel_api$get_filter_state(), \"verbatim\") } card$append_text(\"Encoding\", \"header3\") card$append_text( yaml::as.yaml( stats::setNames( lapply(c(\"dataname\", \"nrow\"), function(x) input[[x]]), c(\"dataname\", \"nrow\") ) ), \"verbatim\" ) card$append_text(\"Module Table\", \"header3\") card$append_table(table_q()[[\"result\"]]) card$append_text(\"Show R Code\", \"header3\") card$append_text(teal.code::get_code(table_q()), \"verbatim\") if (!comment == \"\") { card$append_text(\"Comment\", \"header3\") card$append_text(comment) } card } teal.reporter::add_card_button_srv( \"addReportCard\", reporter = reporter, card_fun = card_fun ) teal.reporter::download_report_button_srv(\"downloadButton\", reporter = reporter) teal.reporter::reset_report_button_srv(\"resetButton\", reporter) ### }) }, ui = function(id) { ns <- NS(id) sidebarLayout( sidebarPanel(selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL)), mainPanel( teal.reporter::simple_reporter_ui(ns(\"reporter\")), verbatimTextOutput(ns(\"dataset\")) ) ) sidebarLayout( sidebarPanel( tags$div( teal.reporter::add_card_button_ui(ns(\"addReportCard\")), teal.reporter::download_report_button_ui(ns(\"downloadButton\")), teal.reporter::reset_report_button_ui(ns(\"resetButton\")) ), selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL), sliderInput(ns(\"nrow\"), \"Number of rows\", min = 1, max = 1, value = 1, step = 1) ), mainPanel(tableOutput(ns(\"table\"))) ) } ) } app <- init( data = teal_data(AIR = airquality, IRIS = iris), modules = list( example_reporter_module(label = \"with Reporter\"), my_module(label = \"without Reporter\") ), filter = teal_slices(teal_slice(dataname = \"AIR\", varname = \"Temp\", selected = c(72, 85))), header = \"Example teal app with reporter\" ) ## Initializing reporter_previewer_module if (interactive()) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/actors.html","id":"teal-app-developer","dir":"Articles > Blueprint","previous_headings":"","what":"teal app developer","title":"Actors","text":"primary responsibility teal app developer leverage available building blocks teal framework create functional teal app analyses data. expedite app creation process, developers can take advantage pre-existing teal modules found R packages like teal.modules.general teal.modules.clinical. modules designed focus standardization versatility, making suitable wide range use cases. developing teal app, developer select appropriate teal modules integrate app’s interface ensure seamless usability end-users. learn existing modules, visit teal.gallery, contains several demo applications source code.","code":"%% This is a mermaid diagram, if you see this the plot failed to render. Sorry. graph LR A[teal App Developer]--utilizes--> B[teal modules] B--to create--> C[teal app] D[app user]--uses--> C style A fill:lightblue style C fill:gold style D fill:pink"},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/actors.html","id":"teal-module-developer","dir":"Articles > Blueprint","previous_headings":"","what":"teal module developer","title":"Actors","text":"main duty teal module developer construct compatible teal module can utilized within teal framework. Several factors influence scope requirements building teal module. creating reusable teal module, ’s advisable focus making general adaptable feasible maximize possibilities re-used future. However, developers freedom create teal module customized suit specific demands project. Ultimately, one teal modules employed construct teal app. learn creating custom modules follow Tutorial Creating Custom Module.","code":"%% This is a mermaid diagram, if you see this the plot failed to render. Sorry. graph LR A[Teal App Developer]--utilizes--> B[teal modules] E[Teal Module Developer]--develops--> B B--to create--> C[teal app] D[app user]--uses--> C style A fill:lightblue style E fill:lightgreen style D fill:pink style C fill:gold"},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/actors.html","id":"workflow-in-a-clinical-trial-study","dir":"Articles > Blueprint","previous_headings":"","what":"Workflow in a clinical trial study","title":"Actors","text":"clinical trial study setting, unique study teal app developer assigned study team accountable developing tailored teal app respective study. study teal app developer initially leverage existing teal modules R packages created teal module developers. cases need create new modules tailored study, study teal module developer need involved. Upon completion, study team designated teal app tailored specific study.","code":"%% This is a mermaid diagram, if you see this the plot failed to render. Sorry. %%| fig-width: 7.5 graph LR subgraph Study B A2[Study Teal App Developer]--utilizes--> B2[teal modules] E2[Study Teal Module Developer]-.develops.-> B2 B2--to create--> C2[study teal app] D2[study app user]--uses--> C2 end E3[Teal Module Developer]--develops--> B E3--develops-->B2 subgraph Study A A[Study Teal App Developer]--utilizes--> B[teal modules] E[Study Teal Module Developer]-.develops.-> B B--to create--> C[study teal app] D[study app user]--uses--> C end style A fill:lightblue style A2 fill:lightblue style E fill:limegreen style E2 fill:limegreen style E3 fill:lightgreen style D fill:pink style D2 fill:pink style C fill:gold style C2 fill:gold"},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/filter_panel.html","id":"introduction","dir":"Articles > Blueprint","previous_headings":"","what":"Introduction","title":"Filter Panel","text":"teal.slice package provides teal applications filter panel, powerful tool exploring analyzing data, key component teal framework. One great things filter panel comes built-teal, requiring programming knowledge use. filter panel provides convenient way users subset data, simplifying process exploration comprehension. Moreover, users can activate deactivate filter states interactively, either individually globally, using filter panel.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/filter_panel.html","id":"filter-flow","dir":"Articles > Blueprint","previous_headings":"","what":"Filter flow","title":"Filter Panel","text":"filter panel creates subsets data. Subsetting achieved creating filter states, holds logical predicate (filter condition) applied single variables. filter conditions composed single expression, call particular function (e.g. dplyr::filter), expression evaluated create filtered data subset. process entirely interactive. Filter states can created, removed, changed , however, app developer may choose constrain even restrict . filter state created, filter panel generates filter card shiny inputs appropriate type variable, e.g. range selectors numeric columns sets checkboxes drop-menus categorical ones. users interact filter cards, subsetting complete expression updated filtered data recomputed. filtered data passed teal modules downstream analysis. subsetting expression returned along data, ensuring unbroken track record entire analysis. Signature data also stored ensure reproducible results.","code":"%% This is a mermaid diagram, if you see this the plot failed to render. Sorry. sequenceDiagram autonumber data->teal.slice: processed by teal.slice->>shiny inputs: creates Note over teal.slice,shiny inputs: based on data type shiny inputs->>reactive dataset: updates reactive dataset->>teal modules: processed by"},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/in_app_data.html","id":"building-data-in-the-app","dir":"Articles > Blueprint","previous_headings":"","what":"Building data in the App","title":"In-App Data","text":"Typically data passed teal application available app run. However, always true cases data built app started. good example pulling data external repository, like database, uploading file. Additional authentication may required.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/in_app_data.html","id":"teal_data_module","dir":"Articles > Blueprint","previous_headings":"Building data in the App","what":"teal_data_module","title":"In-App Data","text":"Preprocessing actions can performed -app using teal_data_module. Rather passing teal_data object app, one may pass shiny module returns teal_data object (wrapped reactive expression). allows app developer include user actions data creation, fetching, even pre-filtering modification.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/in_app_data.html","id":"further-reading","dir":"Articles > Blueprint","previous_headings":"","what":"Further reading","title":"In-App Data","text":"complete explanation using teal_data_module can found teal vignette","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/input_data.html","id":"introduction","dir":"Articles > Blueprint","previous_headings":"","what":"Introduction","title":"Input Data","text":"Reproducibility paramount pharmaceutical industry. Accurate consistent results essential ensure high-quality research safety patients. prioritizing reproducibility, researchers can validate methods, confirm findings, contribute advancement field. teal.code package provides qenv class facilitates code reproducibility. Code passed qenv object, evaluated specific environment. qenv also stores code can retrieved request. teal_data class, serves primary data interface teal applications, inherits code tracking behavior qenv.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/input_data.html","id":"preparing-data-for-a-teal-application","dir":"Articles > Blueprint","previous_headings":"","what":"Preparing data for a teal application","title":"Input Data","text":"teal applications run data provided teal_data object. Data objects stored modified within environment teal_data object R code used tracked, allows code evaluated executed teal application, reproduced outside teal application. includes data loading, preprocessing, filtering, transformations, plotting, etc. teal_data object makes easy users reproduce validate results analyses. Learn use teal_data teal.data package vignettes.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/input_data.html","id":"show-r-code-and-reporter","dir":"Articles > Blueprint","previous_headings":"","what":"Show R Code and Reporter","title":"Input Data","text":"teal.modules.clinical teal.modules.general packages, ’ll find modules include convenient Show R Code button. button clicked, modal window appears, revealing R code responsible generating module’s output. functionality achieved inspecting teal_data object retrieving code . Show R Code button, users can easily copy independently run code reproduce analysis presented teal module. Reporter feature also leverages teal_data object operation. Much like Show R Code mechanism, code displayed Reporter Card extracted teal_data object. learn Reporter feature, please visit teal.reporter documentation. Overall, qenv teal.code child class, teal_data, powerful tools ensuring code reproducibility promoting high-quality research R programming language.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/module_encapsulation.html","id":"introduction","dir":"Articles > Blueprint","previous_headings":"","what":"Introduction","title":"Module Encapsulation","text":"teal framework leverages shiny module concept enable encapsulation analytical actions teal modules, maintaining seamless communication modules application.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/module_encapsulation.html","id":"benefits","dir":"Articles > Blueprint","previous_headings":"","what":"Benefits","title":"Module Encapsulation","text":"implementing modular app technique shiny module creation teal module, several benefits realized: Streamlined maintenance development teal module becomes manageable, can function independently teal framework. separation allows developers maintain module ease. approach successfully applied R packages dedicated teal module development, teal.modules.general teal.modules.clinical. Enhanced focus outputteal module developers can concentrate solely refining parameters encoding, output aspects (data summarization visualization) without need concern intricacies teal framework. developed correctly, module seamlessly integrates teal. Facilitated collaborationteal module development becomes accessible entry point developers interested collaborating. approach encourages user collaboration improvement teal modules, developers gain deeper understanding mechanics teal framework.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/blueprint/product_map.html","id":"why-so-many-packages","dir":"Articles > Blueprint","previous_headings":"","what":"Why so many packages?","title":"Product Map","text":"breaking teal features, modules, calculations dedicated packages, maintenance made significantly manageable.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Bootstrap Themes in teal","text":"offer easy application custom Bootstrap theme teal app. teal uses bslib R package provides tools customizing Bootstrap themes, including shiny apps.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"usage","dir":"Articles","previous_headings":"","what":"Usage","title":"Bootstrap Themes in teal","text":"teal app developers can specify custom Bootstrap themes setting teal.bs_theme R option, set bslib::bs_theme object. bslib::bs_theme(...) function creates Bootstrap theme object, one specifies (major) Bootstrap version (default one 3, 4, 5). Optionally one can choose bootswatch theme customize app CSS functions like bslib::bs_add_rules. Please read custom themes bslib getting started vignette. teal.bs_theme R option specified top code script. Please install bslib package run code .","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"teal-bs_theme-r-option","dir":"Articles","previous_headings":"Usage","what":"teal.bs_theme R option","title":"Bootstrap Themes in teal","text":"","code":"options(\"teal.bs_theme\" = bslib::bs_theme(\"Custom Options\")) ####################### # teal::init() app code #######################"},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"bootstrap-version-and-themes","dir":"Articles","previous_headings":"Usage","what":"Bootstrap version and themes","title":"Bootstrap Themes in teal","text":"best recommended ways explore Bootstrap themes use bslib::run_with_themer(shinyApp(app$ui, app$server)) bslib::bs_theme_preview(), offer interactive explore mode (supported Bootstrap 3). bslib::bs_theme_preview() recommended end user shiny app yet. already shiny app want test different Bootstrap themes (CSS styling) bslib::run_with_themer(shinyApp(app$ui, app$server)) recommended. Available Bootstrap versions checked bslib::versions() Bootstrap themes (bootswatch) bslib::bootswatch_themes(version = \"5\").","code":"# bslib::versions() # bslib::bootswatch_themes(version = \"5\") options(\"teal.bs_theme\" = bslib::bs_theme(version = \"5\", bootswatch = \"lux\")) # or options(\"teal.bs_theme\" = bslib::bs_theme_update(bslib::bs_theme(version = \"5\"), bootswatch = \"lux\"))"},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"default-bootstrap-theme","dir":"Articles","previous_headings":"Usage","what":"Default Bootstrap theme","title":"Bootstrap Themes in teal","text":"using default bslib theme version (3, 4 5), styling might expected. Please run interactive themer (recommended) apply custom theme explore theme options. many scenarios updating theme might enough e.g. font color specifications updated .","code":"# instead of options(\"teal.bs_theme\" = bslib::bs_theme(version = \"5\")) # try non-default themes options(\"teal.bs_theme\" = bslib::bs_theme(version = \"5\", bootswatch = \"THEME NAME\". ...)) # or run the app inside bslib::run_with_themer"},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"reset-the-bootstrap-theme","dir":"Articles","previous_headings":"Usage","what":"Reset the Bootstrap theme","title":"Bootstrap Themes in teal","text":"Please use options(\"teal.bs_theme\" = NULL) call return default shiny Bootstrap teal apps.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"theme-not-updated","dir":"Articles","previous_headings":"Usage","what":"Theme not updated","title":"Bootstrap Themes in teal","text":"One reason theme updated web browser caches previous one, especially different themes run one another. Please, use Cmd+Shift+R (Mac) Ctrl+F5 (Windows) hard refresh webpage.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"custom-teal-css","dir":"Articles","previous_headings":"Usage","what":"Custom teal CSS","title":"Bootstrap Themes in teal","text":"important HTML tags teal specific id class, can directly styled. bslib::bs_add_rules function used around bslib::bs_theme object apply custom CSS rules. bslib::bs_add_* family functions used specify low-level Bootstrap elements.","code":"library(magrittr) options(\"teal.bs_theme\" = bslib::bs_add_rules( bslib::bs_theme(version = \"5\"), \"Anything understood by sass::as_sass()\" ))"},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"bootstrap-null-vs-bootstrap-3","dir":"Articles","previous_headings":"Usage","what":"Bootstrap NULL vs Bootstrap 3","title":"Bootstrap Themes in teal","text":"important note statements options(\"teal.bs_theme\" = NULL) options(\"teal.bs_theme\" = bslib::bs_theme(version = \"3\") equivalent bslib approximation default shiny theme Bootstrap version 3 can introduce discrepancies. One important difference using bslib::bs_theme(version = \"3\", bootswatch = \"THEME NAME\") one can apply custom Bootstrap theme. Another one usage bslib::bs_theme(version = \"3\") requires installation shinyWidgets package minimum version 0.7.4.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"regular-shinyfluidpage","dir":"Articles","previous_headings":"Usage","what":"Regular shiny::fluidPage","title":"Bootstrap Themes in teal","text":"want update theme regular shiny::fluidPage-like app, need teal.bs_theme option. Simply provide bslib::bs_theme directly: shiny::fluidPage(theme = bslib::bs_theme(...), ...).","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"interactive-theming-guide","dir":"Articles","previous_headings":"Usage","what":"Interactive theming guide","title":"Bootstrap Themes in teal","text":"section provide step--step guide customizing teal application theme interactively bslib::run_with_themer(). recommend starting simple case satisfied, verifying full application. end use teal application . example assume want use Bootstrap 5. start, launch app bslib::run_with_themer(app$ui, app$server) instead shiny::shinyApp. gives us following. Note Theme Customizer section right hand side. added bslib customize theme.","code":"options(\"teal.bs_theme\" = bslib::bs_theme(version = \"5\")) library(teal) app <- init( data = teal_data(IRIS = iris), filter = teal_slices(teal_slice(\"IRIS\", \"Sepal.Length\", selected = c(5, 7))), modules = modules(example_module(), example_module()), header = \"My first teal application\" ) bslib::run_with_themer(shinyApp(app$ui, app$server))"},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"set-overall-app-theme","dir":"Articles","previous_headings":"Usage > Interactive theming guide","what":"Set overall app theme","title":"Bootstrap Themes in teal","text":"Instead starting scratch, want start Bootswatch theme. Let us select Minty theme “Overall theme” drop-. bslib updated CSS styles use new theme, including customizer theme. Additionally, look R console, see helpful guide provides code update theme. teal applications don’t actually use bs_theme_update opt bs_theme instead. However, printed code still helpful.","code":"#### Update your bs_theme() R code with: ##### bs_theme_update(theme, bootswatch = \"minty\")"},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"customize-a-bootswatch-theme","dir":"Articles","previous_headings":"Usage > Interactive theming guide","what":"Customize a bootswatch theme","title":"Bootstrap Themes in teal","text":"base theme (Minty) close want let’s make modifications. start, increase base font size. , choose “Fonts” section customizer theme set value “Base font size” input. use 1.25 , means fonts increased factor 1.25. check R console, see bslib printed bs_theme_update(theme, font_scale = 1.25, bootswatch = \"minty\"), now includes font size adjustment. Finally, suppose want borders rounded. customizer theme, can go “Options” uncheck “Rounded corners” box. expected, corners longer rounded. look R console, now see bs_theme_update(theme, font_scale = 1.25,enable-rounded= FALSE, bootswatch = \"minty\").","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"apply-the-customized-theme","dir":"Articles","previous_headings":"Usage > Interactive theming guide","what":"Apply the customized theme","title":"Bootstrap Themes in teal","text":"customization complete, apply changes application. , use option teal.bs_theme like time expand bslib::bs_theme call include changes. Luckily, arguments printed R console running app themer can plugged right . Now application custom theme applied. Please note interactive themer contains commonly applied options. customization options, review bslib documentation.","code":"options( \"teal.bs_theme\" = bslib::bs_theme( version = \"5\", font_scale = 1.25, `enable-rounded` = FALSE, bootswatch = \"minty\" ) ) library(teal) app <- init( data = teal_data(IRIS = iris), filter = teal_slices(teal_slice(\"IRIS\", \"Sepal.Length\", selected = c(5, 7))), modules = modules(example_module(), example_module()) ) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/main/articles/bootstrap-themes-in-teal.html","id":"sources","dir":"Articles","previous_headings":"","what":"Sources","title":"Bootstrap Themes in teal","text":"https://rstudio.github.io/bslib/","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/creating-custom-modules.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Creating Custom Modules","text":"teal framework provides large catalog plug--ready analysis modules incorporated teal applications. However, also possible create modules using module function.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/articles/creating-custom-modules.html","id":"ui-function","dir":"Articles","previous_headings":"Components of a module","what":"UI function","title":"Creating Custom Modules","text":"function contains UI required module. function least argument id. See server section details.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/creating-custom-modules.html","id":"server-function","dir":"Articles","previous_headings":"Components of a module","what":"Server function","title":"Creating Custom Modules","text":"function contains shiny server logic module form: data arrives module teal_data object, data container used throughout teal application. teal_data passed init function building application , filtering filter panel, passed modules, wrapped reactive expression. teal_data class allows modules track R code execute module outputs can reproduced. See teal.data package detailed explanation.","code":"function( id, data, # optional; use if module needs access to application data filter_panel_api, # optional; use if module needs access to filter panel; see teal.slice reporter, # optional; use if module supports reporting; see reporting vignette ...) { moduleServer(id, function(input, output, session) { # module code here }) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/articles/creating-custom-modules.html","id":"viewing-data","dir":"Articles","previous_headings":"Example modules","what":"Viewing data","title":"Creating Custom Modules","text":"minimal module allows user select view one dataset time. default, filtering enabled datasets. Note dataset choices specified datanames property teal_data container.","code":"library(teal) my_module <- function(label = \"example teal module\") { checkmate::assert_string(label) module( label = label, server = function(id, data) { moduleServer(id, function(input, output, session) { updateSelectInput(session, \"dataname\", choices = isolate(datanames(data()))) output$dataset <- renderPrint({ req(input$dataname) data()[[input$dataname]] }) }) }, ui = function(id) { ns <- NS(id) sidebarLayout( sidebarPanel(selectInput(ns(\"dataname\"), \"Choose a dataset\", choices = NULL)), mainPanel(verbatimTextOutput(ns(\"dataset\"))) ) } ) }"},{"path":"https://insightsengineering.github.io/teal/main/articles/creating-custom-modules.html","id":"interacting-with-data-and-viewing-code","dir":"Articles","previous_headings":"Example modules","what":"Interacting with data and viewing code","title":"Creating Custom Modules","text":"example allows user interact data create simple visualization. addition, prints code can used reproduce visualization. module ready used teal app.","code":"library(teal) # ui function for the module # allows for selecting dataset and one of its numeric variables ui_histogram_example <- function(id) { ns <- NS(id) sidebarLayout( sidebarPanel( selectInput(ns(\"datasets\"), \"select dataset\", choices = NULL), selectInput(ns(\"numerics\"), \"select numeric variable\", choices = NULL) ), mainPanel( plotOutput(ns(\"plot\")), verbatimTextOutput(ns(\"code\")) ), ) } # server function for the module # presents datasets and numeric variables for selection # displays a histogram of the selected variable # displays code to reproduce the histogram srv_histogram_example <- function(id, data) { moduleServer(id, function(input, output, session) { # update dataset and variable choices # each selection stored in separate reactive expression updateSelectInput(inputId = \"datasets\", choices = isolate(datanames(data()))) observe({ req(dataset()) nums <- vapply(data()[[dataset()]], is.numeric, logical(1L)) updateSelectInput(inputId = \"numerics\", choices = names(nums[nums])) }) dataset <- reactive(input$datasets) selected <- reactive(input$numerics) # add plot code plot_code_q <- reactive({ validate(need(length(dataset()) == 1L, \"Please select a dataset\")) validate(need(length(selected()) == 1L, \"Please select a variable\")) req(selected() %in% names(data()[[dataset()]])) # evaluate plotting expression within data # inject input values into plotting expression within( data(), p <- hist(dataset[, selected], las = 1), dataset = as.name(dataset()), selected = selected() ) }) # view plot output$plot <- renderPlot({ plot_code_q()[[\"p\"]] }) # view code output$code <- renderText({ get_code(plot_code_q()) }) }) } # function that creates module instance to use in `teal` app tm_histogram_example <- function(label) { module( label = label, server = srv_histogram_example, ui = ui_histogram_example, datanames = \"all\" ) } app <- init( data = teal_data(IRIS = iris, NPK = npk), modules = tm_histogram_example(label = \"Histogram Module\"), header = \"Simple app with custom histogram module\" ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/articles/creating-custom-modules.html","id":"adding-reporting-to-a-module","dir":"Articles","previous_headings":"","what":"Adding reporting to a module","title":"Creating Custom Modules","text":"Refer vignette read adding support reporting teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/creating-custom-modules.html","id":"using-standard-widgets-in-your-custom-module","dir":"Articles","previous_headings":"","what":"Using standard widgets in your custom module","title":"Creating Custom Modules","text":"teal.widgets package provides various widgets can leveraged quickly create standard elements custom module.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/data-as-shiny-module.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Data as shiny Module","text":"Proper functioning teal application requires presence teal_data object. Typically, teal_data object created global environment passed data argument init. teal_data object contain elements necessary successful execution application’s modules. scenarios, however, application developers may opt postpone data operations application runtime. can done passing special shiny module data argument. teal_data_module function used build module following components: UI function; accepts one argument, id; defines user interface elements data module server function: accepts one argument, id; defines server logic data module, including data creation; must return reactive expression containing teal_data object teal run module application starts resulting teal_data object used throughout teal (analytic) modules.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/data-as-shiny-module.html","id":"creating-data-in-app","dir":"Articles","previous_headings":"","what":"Creating data in-app","title":"Data as shiny Module","text":"One case postponing data operations datasets dynamic, frequently updated. data created kept global environment. Using teal_data_module enables creating dataset scratch every time user starts application. See ?qenv detailed explanation use within method.","code":"library(teal) data_module <- teal_data_module( ui = function(id) tags$div(), server = function(id) { moduleServer(id, function(input, output, session) { reactive({ data <- within( teal_data(), { dataset1 <- iris dataset2 <- mtcars } ) datanames(data) <- c(\"dataset1\", \"dataset2\") # optional data }) }) } ) app <- init( data = data_module, modules = example_module() ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/articles/data-as-shiny-module.html","id":"modification-of-data-in-app","dir":"Articles","previous_headings":"","what":"Modification of data in-app","title":"Data as shiny Module","text":"Another reason postpone data operations involve application user preprocessing stage. initial, constant form data can created global environment modified app starts. following example illustrates teal_data_module can utilized subset data based user inputs: Note running preprocessing code module opposed global environment increase app loading times. recommended keep constant code global environment move dynamic parts data module.","code":"data <- within(teal_data(), { dataset1 <- iris dataset2 <- mtcars }) datanames(data) <- c(\"dataset1\", \"dataset2\") data_module <- teal_data_module( ui = function(id) { ns <- NS(id) tags$div( selectInput(ns(\"species\"), \"Select species to keep\", choices = unique(iris$Species), multiple = TRUE ), actionButton(ns(\"submit\"), \"Submit\") ) }, server = function(id) { moduleServer(id, function(input, output, session) { eventReactive(input$submit, { data_modified <- within( data, dataset1 <- subset(dataset1, Species %in% selected), selected = input$species ) data_modified }) }) } ) app <- init( data = data_module, modules = example_module() ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/articles/data-as-shiny-module.html","id":"warning","dir":"Articles","previous_headings":"","what":"Data as shiny Module","title":"Data as shiny Module","text":"using teal_data_module modify pre-existing teal_data object, crucial server function data object defined environment, otherwise server function able access data object. means server functions defined packages used.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/data-as-shiny-module.html","id":"extending-existing-teal_data_modules","dir":"Articles","previous_headings":"Modification of data in-app","what":"Extending existing teal_data_modules","title":"Data as shiny Module","text":"server logic teal_data_module can modified used app, using within function. allows teal_data object created teal_data_module processed . previous example, data_module takes predefined teal_data object allows app user select subset. following example modifies data_module new columns added data retrieved.","code":"data_module_2 <- within( data_module, { # Create new column with Ratio of Sepal.Width and Petal.Width dataset1$Ratio.Sepal.Petal.Width <- round(dataset1$Sepal.Width / dataset1$Petal.Width, digits = 2L) # Create new column that converts Miles per Galon to Liter per 100 Km dataset2$lp100km <- round(dataset2$mpg * 0.42514371, digits = 2L) } ) app <- init( data = data_module_2, modules = example_module() ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/articles/data-transform-as-shiny-module.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Data Transformations as shiny Module","text":"teal version 0.16 introduced new argument teal::module called transformers. argument allows pass list teal_data_module objects created using teal_transform_module() function. main benefit teal_transform_module() ability transform data passing module. feature allows extend regular behavior existing modules specifying custom data operations data inside module. teal_transform_module() Shiny module takes ui server arguments. provided, teal execute data transformations specified module loaded whenever data changes. server extend logic behind data manipulations, ui extends filter panel new UI elements orchestrate transformer inputs. vignette presents way manage custom data transformations teal apps.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/data-transform-as-shiny-module.html","id":"creating-your-first-custom-data-transformation-module","dir":"Articles","previous_headings":"","what":"Creating your first custom data transformation module","title":"Data Transformations as shiny Module","text":"initialize simple teal app pass iris mtcars input datasets.","code":"library(teal) data <- within(teal_data(), { iris <- iris mtcars <- mtcars }) app <- init( data = data, modules = teal::example_module() ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/articles/data-transform-as-shiny-module.html","id":"single-transformer","dir":"Articles","previous_headings":"Creating your first custom data transformation module","what":"Single Transformer","title":"Data Transformations as shiny Module","text":"Let’s create simple teal_transform_module returns first n number rows iris based user input. creating ui numericInput user input number rows displayed. server function take reactive data perform transformation return new reactive data. Note: recommended return reactive() teal_data() server code teal_transform_module robust maintaining reactivity Shiny. planning using eventReactive() server, event include data() (example eventReactive(list(input$, data()), {...})). discussion.","code":"data <- within(teal_data(), { iris <- iris mtcars <- mtcars }) datanames(data) <- c(\"iris\", \"mtcars\") my_transformers <- list( teal_transform_module( label = \"Custom transform for iris\", ui = function(id) { ns <- NS(id) tags$div( numericInput(ns(\"n_rows\"), \"Number of rows to subset\", value = 6, min = 1, max = 150, step = 1) ) }, server = function(id, data) { moduleServer(id, function(input, output, session) { reactive({ within(data(), { iris <- head(iris, num_rows) }, num_rows = input$n_rows ) }) }) } ) ) app <- init( data = data, modules = teal::example_module(transformers = my_transformers) ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/articles/data-transform-as-shiny-module.html","id":"multiple-transformers","dir":"Articles","previous_headings":"Creating your first custom data transformation module","what":"Multiple Transformers","title":"Data Transformations as shiny Module","text":"Note can add multiple teal transformers including teal_transform_module list. Let’s add another transformation mtcars dataset creates column rownames mtcars. Note module interactive UI elements.","code":"data <- within(teal_data(), { iris <- iris mtcars <- mtcars }) datanames(data) <- c(\"iris\", \"mtcars\") my_transformers <- list( teal_transform_module( label = \"Custom transform for iris\", ui = function(id) { ns <- NS(id) tags$div( numericInput(ns(\"n_rows\"), \"Number of rows to subset\", value = 6, min = 1, max = 150, step = 1) ) }, server = function(id, data) { moduleServer(id, function(input, output, session) { reactive({ within(data(), { iris <- head(iris, num_rows) }, num_rows = input$n_rows ) }) }) } ), teal_transform_module( label = \"Custom transform for mtcars\", ui = function(id) { ns <- NS(id) tags$div( \"Adding rownames column to mtcars\" ) }, server = function(id, data) { moduleServer(id, function(input, output, session) { reactive({ within(data(), { mtcars$rownames <- rownames(mtcars) rownames(mtcars) <- NULL }) }) }) } ) ) app <- init( data = data, modules = teal::example_module(transformers = my_transformers) ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/articles/filter-panel.html","id":"teal-apps-with-the-filter-panel","dir":"Articles","previous_headings":"","what":"teal apps with the filter panel","title":"Filter Panel","text":"filter panel integral part teal applications included right side. Based selections made filter panel, filter expressions executed passing data teal modules. technical details filter panel extensively described teal.slice documentation. default, init initializes filter panel without active filters allows user add filters column. start teal application predefined filters, one must specify filter argument. following example four filters specified using teal_slice function wrapped together teal_slices.","code":"library(teal) app <- init( data = teal_data(IRIS = iris, CARS = mtcars), modules = example_module(), filter = teal_slices( teal_slice(dataname = \"IRIS\", varname = \"Sepal.Length\"), teal_slice(dataname = \"IRIS\", varname = \"Species\", selected = \"setosa\"), teal_slice(dataname = \"CARS\", varname = \"mpg\", selected = c(20, Inf)), teal_slice(dataname = \"CARS\", expr = \"qsec < 20\", title = \"1/4 mile under 20 sec\", id = \"qsec_20\") ) ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/articles/filter-panel.html","id":"filter-panel-respective-to-teal_module","dir":"Articles","previous_headings":"Extending teal.slice","what":"Filter panel respective to teal_module","title":"Filter Panel","text":"teal_module (see ?module) object contains datanames attribute determines data sets sent module. filter panel display data sets hide rest module active.","code":"library(teal) app <- init( data = teal_data(IRIS = iris, CARS = mtcars), modules = modules( example_module(label = \"all datasets\"), example_module(label = \"IRIS only\", datanames = \"IRIS\"), example_module(label = \"CARS only\", datanames = \"CARS\"), example_module(label = \"no filter panel\", datanames = NULL) ) ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/articles/filter-panel.html","id":"global-and-module-specific-filter-panel","dir":"Articles","previous_headings":"Extending teal.slice","what":"Global and module specific filter panel","title":"Filter Panel","text":"teal contains teal_slices function extends original teal_slices found teal.slice adding two arguments: module_specific mapping. default init initializes app “global” filter panel, modules use filters. Setting module_specific = TRUE switches “module-specific” filter panel, module can different set filters active time. still possible set global filters shared among modules. One possible scenario depicted figure : filter 1 shared modules filter 2 shared module 1 module 3 filter 3 used module 2 filter 4 used module 1 filter 5 filter 6 active modules achieve described setup, one must set module_specific argument TRUE use mapping argument match filters modules. mapping takes named list element names correspond module labels, elements vectors teal_slice ids applied module startup. teal_slices listed element called \"global_filters\" applied modules. detailed explanation filter states, see teal.slice vignette.","code":"library(teal) app <- init( data = teal_data(mtcars = mtcars), modules = modules( example_module(label = \"module 1\"), example_module(label = \"module 2\"), example_module(label = \"module 3\"), example_module(label = \"module 4\") ), filter = teal_slices( # filters created with id teal_slice(dataname = \"mtcars\", varname = \"mpg\", id = \"filter 1\"), teal_slice(dataname = \"mtcars\", varname = \"cyl\", id = \"filter 2\"), teal_slice(dataname = \"mtcars\", varname = \"disp\", id = \"filter 3\"), teal_slice(dataname = \"mtcars\", varname = \"hp\", id = \"filter 4\"), teal_slice(dataname = \"mtcars\", varname = \"drat\", id = \"filter 5\"), teal_slice(dataname = \"mtcars\", varname = \"wt\", id = \"filter 6\"), # module-specific filtering enabled module_specific = TRUE, # filters mapped to modules mapping = list( \"module 1\" = c(\"filter 2\", \"filter 4\"), \"module 2\" = \"filter 3\", \"module 3\" = \"filter 2\", global_filters = \"filter 1\" ) ) ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/articles/getting-started-with-teal.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Getting Started with teal","text":"teal shiny-based interactive exploration framework analyzing data, particular emphasis CDISC clinical trial data. teal applications allow users : “Pull” data external data sources Dynamically filter data used analyses Generate reproducible code regenerate -screen analyses Create download reports containing results analyses (analysis modules support reporting) addition, teal framework provides application developers : large suite custom-made standard analysis modules included applications logging framework facilitate debugging applications advanced users framework can also create new analysis modules can added teal applications.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/getting-started-with-teal.html","id":"your-first-teal-application","dir":"Articles","previous_headings":"","what":"Your first teal application:","title":"Getting Started with teal","text":"simple teal application takes iris mtcars datasets displays contents: Hovering image shows teal application generated code. Every teal application composed following elements, can controlled app developer passing arguments init function: Application Title (browser’s tab title): title application. Application Header Footer (top bottom app): content placed top bottom application. example code: two modules named “Module 1” “Module 2”. Module Content (panel middle): outputs currently active module. example code: filter panel initialized filter Species variable iris dataset.","code":"library(teal) app <- init( data = teal_data(IRIS = iris, MTCARS = mtcars), modules = modules( example_module(\"Module 1\"), example_module(\"Module 2\") ), filter = teal_slices( teal_slice(dataname = \"IRIS\", varname = \"Species\", selected = \"setosa\") ), title = build_app_title(title = \"My first teal app\"), header = h3(\"My first teal application\"), footer = tags$div(a(\"Powered by teal\", href = \"https://insightsengineering.github.io/teal/main/latest-tag/\")) ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/articles/getting-started-with-teal.html","id":"creating-your-own-applications","dir":"Articles","previous_headings":"","what":"Creating your own applications","title":"Getting Started with teal","text":"key function use create teal application init, requires two mandatory arguments: data modules. optional arguments init, can used customize application. Please refer documentation init details.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/getting-started-with-teal.html","id":"application-data","dir":"Articles","previous_headings":"Creating your own applications","what":"Application data","title":"Getting Started with teal","text":"data argument init function specifies data used application. datasets used teal application must passed teal_data object. also possible specify relationships datasets using join_keys argument case datasets related. See vignette details. data available pulled remote source, init must receive teal_data_module specifies obtain desired datasets put teal_data object. See vignette details. order use CDISC clinical trial data teal application cdisc_data function used instead. Custom SDTM standards can handled teal_data join_keys. details, recommend exploring teal.data package documentation.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/getting-started-with-teal.html","id":"modules","dir":"Articles","previous_headings":"Creating your own applications","what":"Modules","title":"Getting Started with teal","text":"modules argument init consists list teal modules (can wrapped together using function modules). Core teal developers created several universal teal modules can useful teal application. learn create modules, please explore Creating Custom Modules vignette. use predefined modules, see references links modules.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/getting-started-with-teal.html","id":"defining-filters","dir":"Articles","previous_headings":"Creating your own applications","what":"Defining filters","title":"Getting Started with teal","text":"optional filter argument init allows initialize application predefined filters. details see Filter Panel vignette .","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/getting-started-with-teal.html","id":"reporting","dir":"Articles","previous_headings":"Creating your own applications","what":"Reporting","title":"Getting Started with teal","text":"modules teal application support reporting (see teal.reporter details), users application can add outputs modules report. report can downloaded special Report Previewer module added application additional tab, users can view configure reports downloading . See details vignette.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/getting-started-with-teal.html","id":"reproducible-code","dir":"Articles","previous_headings":"Creating your own applications","what":"Reproducible code","title":"Getting Started with teal","text":"teal hands data reproducible code every module included application. Note teal display code, modules’ responsibility. example, example_module function used shows code main panel together outputs. details see vignette.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/getting-started-with-teal.html","id":"where-to-go-next","dir":"Articles","previous_headings":"","what":"Where to go next","title":"Getting Started with teal","text":"learn teal framework recommend first exploring available analysis modules. example see: general analysis modules clinical trial reporting modules modules analyzing MultiAssayExperiment objects demo teal apps see: gallery sample apps based teal catalog Tables, Listings Graphs catalog Biomarker Analysis Templates Tables Graphs teal framework relies set supporting packages whose documentation provides -depth information. packages interest defining tealapplications : teal.data: defining data teal application. teal.slice: defining data filtering passing teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/including-data-in-teal-applications.html","id":"data-in-teal-applications","dir":"Articles","previous_headings":"","what":"Data in teal Applications","title":"Including Data in teal Applications","text":"teal framework readily accepts general, non-relational data. Modules defined teal.modules.general package designed work well kind data. Relational data handled just well mechanism passing data applications virtually . includes clinical data conforms ADaM standard. working making framework extendable support data structures can added relative ease. Currently support offered MultiAssayExperiment class. applications use teal_data class data container. teal_data objects passed init build application, modified filter panel (applicable) passed modules. Thus, first step building teal app creating teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/including-data-in-teal-applications.html","id":"general-data","dir":"Articles","previous_headings":"Data in teal Applications","what":"General data","title":"Including Data in teal Applications","text":"teal_data object created calling teal_data function passing data objects name:value pairs. Note iris cars added datanames property data (see datanames property). sufficient run teal app.","code":"library(teal) # create teal_data data <- teal_data(iris = iris, cars = mtcars) # build app app <- init( data = data, modules = example_module() ) # run app shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/main/articles/including-data-in-teal-applications.html","id":"reproducible-data","dir":"Articles","previous_headings":"Data in teal Applications","what":"Reproducible data","title":"Including Data in teal Applications","text":"teal_data object stores data separate environment. Therefore, modifying stored datasets requires processing code evaluated environment. Following logic, one can create empty teal_data object populate evaluating code. can done using eval_code function , conveniently, using within function. key difference eval_code within former accepts code character vector language objects (calls expressions), within accepts inline code. See ?qenv details. Note first example data created passing data objects, code used create data objects unknown therefore process reproduced. Inspecting code app created reveals note preprocessing code absent. necessary code can supplied code argument teal_data function. Keep mind code executed teal_data’s environment, may reproduce environment. object considered unverified (see verified property). reproducibility required, recommend creating empty teal_data object evaluating code.","code":"# create empty object data_empty <- teal_data() # run code in the object data_populated_1 <- eval_code(data_empty, code = \"iris <- iris cars <- mtcars\") # alternative data_populated_2 <- within(data_empty, { iris <- iris cars <- mtcars }) data_with_code <- teal_data( iris = iris, cars = mtcars, code = \"iris <- iris cars <- mtcars\" )"},{"path":"https://insightsengineering.github.io/teal/main/articles/including-data-in-teal-applications.html","id":"code-from-file","dir":"Articles","previous_headings":"Data in teal Applications > Reproducible data","what":"code from file","title":"Including Data in teal Applications","text":"ability pass code character vector eval_code opens door using code stored file.","code":"# not run data_from_file <- teal_data() data_from_file <- eval_code(data, readLines(\"\"))"},{"path":"https://insightsengineering.github.io/teal/main/articles/including-data-in-teal-applications.html","id":"creating-data-in-app","dir":"Articles","previous_headings":"Data in teal Applications","what":"Creating data in-app","title":"Including Data in teal Applications","text":"one departure passing teal_data object init data exist environment app run, e.g. pulled remote source. cases teal_data_module must used. See vignette detailed description.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/including-data-in-teal-applications.html","id":"clinical-data","dir":"Articles","previous_headings":"","what":"Clinical data","title":"Including Data in teal Applications","text":"Currently teal supports two specialized data formats.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/including-data-in-teal-applications.html","id":"adam-data","dir":"Articles","previous_headings":"Clinical data","what":"ADaM data","title":"Including Data in teal Applications","text":"ADaM data model, defined CDISC standards, specifies relationships subject-level parent dataset observation-level child datasets. cdisc_data function takes advantage fact automatically set default joining keys (see join_keys property). example , two standard ADaM datasets (ADSL ADTTE) passed cdisc_data.","code":"# create cdisc_data data_cdisc <- cdisc_data(ADSL = teal.data::rADSL, ADTTE = teal.data::rADSL) datanames(data_cdisc) #> [1] \"ADSL\" \"ADTTE\" join_keys(data_cdisc) #> A join_keys object containing foreign keys between 2 datasets: #> ADSL: [STUDYID, USUBJID] #> <-- ADTTE: [STUDYID, USUBJID] #> ADTTE: [STUDYID, USUBJID, PARAMCD] #> --> ADSL: [STUDYID, USUBJID] app <- init( data = data_cdisc, modules = example_module() ) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/main/articles/including-data-in-teal-applications.html","id":"multiassayexperiment-data","dir":"Articles","previous_headings":"Clinical data","what":"MultiAssayExperiment data","title":"Including Data in teal Applications","text":"MultiAssayExperiment package offers data structure representing analyzing multi-omics experiments involve multi-modal, high-dimensionality data, DNA mutations, protein RNA abundance, chromatin occupancy, etc., biological specimens. MultiAssayExperiment class described detail . MultiAssayExperiment objects (MAEs) placed teal_data just like normal objects. Due unique structure MAE, teal requires special considerations building teal modules. Therefore, guarantee modules work properly MAEs. package teal.modules.hermes developed specifically MAE mind reliable. filter panel supports MAEs box.","code":"library(MultiAssayExperiment) utils::data(miniACC) data_mae <- teal_data(MAE = miniACC) app <- init( data = data_mae, modules = example_module() ) shinyApp(app$ui, app$server)"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/articles/including-data-in-teal-applications.html","id":"join_keys","dir":"Articles","previous_headings":"teal_data properties","what":"join_keys","title":"Including Data in teal Applications","text":"Using relational data requires specifying joining keys pair datasets. Primary keys unique row identifiers individual datasets thus specified dataset. Foreign keys describe mapping variables datasets. Joining keys stored join_keys property, can set creating teal_data object, using join_keys argument, using join_keys function. detailed explanation join keys, see teal.data vignette. (back ADaM Data)","code":"ds1 <- data.frame( id = seq(1, 10), group = rep(c(\"A\", \"B\"), each = 5) ) ds2 <- data.frame( group = c(\"A\", \"B\"), condition = c(\"condition1\", \"condition2\") ) keys <- join_keys( join_key(\"DS1\", keys = \"id\"), join_key(\"DS2\", keys = \"group\"), join_key(\"DS1\", \"DS2\", keys = c(\"group\" = \"group\")) ) data_relational1 <- teal_data(DS1 = ds1, DS2 = ds2, join_keys = keys) data_relational2 <- teal_data(DS1 = ds1, DS2 = ds2) join_keys(data_relational2) <- keys"},{"path":"https://insightsengineering.github.io/teal/main/articles/including-data-in-teal-applications.html","id":"verified","dir":"Articles","previous_headings":"teal_data properties","what":"verified","title":"Including Data in teal Applications","text":"teal_data allows tracking code data creation data filtering data analysis whole process can reproduced. verified property designates whether reproducibility confirmed. teal_data objects created empty modified evaluating code within considered verified default. created data objects alone data objects code verified default, can become verified running verify function. detailed explanation verification, see teal.data vignette. (back Reproducible Data)","code":"data_with_code #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • cars: [L] #> • iris: [L] data_with_objects_and_code <- teal_data(iris = iris, cars = mtcars, code = expression(iris <- iris, cars <- mtcars)) data_with_objects_and_code #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • cars: [L] #> • iris: [L] data_with_objects_and_code_ver <- verify(data_with_objects_and_code) data_with_objects_and_code_ver #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • cars: [L] #> • iris: [L]"},{"path":"https://insightsengineering.github.io/teal/main/articles/including-data-in-teal-applications.html","id":"further-reading","dir":"Articles","previous_headings":"","what":"Further reading","title":"Including Data in teal Applications","text":"complete guide teal_data class, please refer teal.data package.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"motivation","dir":"Articles","previous_headings":"","what":"Motivation","title":"Modifying a teal Application With R Options","text":"R packages use options modify runtime behavior. usually specify sensible default values internal function arguments determine responses users actions. example, testthat uses option testthat.progress.max_fails define default number failed expectations testing functions terminate execution. adjustable values can exposed function parameters, confined option. vignette details options available package teal ’s supporting packages teal.logger, teal.widgets, teal.slice.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"setting-an-option","dir":"Articles","previous_headings":"","what":"Setting an option","title":"Modifying a teal Application With R Options","text":"time interactive session, can change option using: way change options execution specific block code withr package like : line run option, digits, go back value line run. function getOption allows inspect value option: set, value option persists session, returns default value new session. Make sure change options teal-related packages loaded initialize options overwrite custom values.","code":"options(option_to_set = \"value\") withr::with_options(list(digits = 3), print(pi)) ## [1] 3.14 getOption(\"option_to_set\") ## [1] \"value\""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"teal-bs_theme-bslibbs_theme-object","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.bs_theme (bslib::bs_theme object)","title":"Modifying a teal Application With R Options","text":"option controls bootstrap theme version used teal apps. Achieve better UX customized UI app. Please see vignette Bootstrap themes read functionality. Default: NULL","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"teal-load_nest_code-character","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.load_nest_code (character)","title":"Modifying a teal Application With R Options","text":"value option appended top code rendered using Show R Code modal button. Default: \"# Add code install/load NEST environment \".","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"teal-threshold_slider_vs_checkboxgroup-numeric","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.threshold_slider_vs_checkboxgroup (numeric)","title":"Modifying a teal Application With R Options","text":"threshold determines variable treated factor filter panel. number unique values variable less threshold variable treated factor instead original class. example, imagine teal.threshold_slider_vs_checkboxgroup equals 2. numeric variable c(1, 1, 1), one unique value, treated factor filter panel (filter panel !). filter panel creates checkbox widget filter values variable, factor variable, instead usual numeric range selector. Default: 5.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"teal-basic_table_args-basic_table_args-object","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.basic_table_args (basic_table_args object)","title":"Modifying a teal Application With R Options","text":"specifies list arguments passed every call rtables::basic_table made teal application. can used format rtables without making changes application code. See documentation teal.widgets::basic_table_args information. Default: teal.widgets::basic_table_args().","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"teal-ggplot2_args-ggplot2_args-object","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.ggplot2_args (ggplot2_args object)","title":"Modifying a teal Application With R Options","text":"option allows modifying labels themes ggplot2 plots teal application. See documentation teal.widgets::ggplot2_args information. Default: teal.widgets::ggplot2_args().","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"teal-plot_dpi-integer-value-24-or-larger","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.plot_dpi (integer value 24 or larger)","title":"Modifying a teal Application With R Options","text":"option controls dots per inch graphs rendered downloaded using module plot_with_settings teal.widgets package. Default: 72","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"teal-log_layout-character","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.log_layout (character)","title":"Modifying a teal Application With R Options","text":"defines layout log message used teal application. teal uses layout format emitted log messages. Read documentation teal.logger::register_logger information. must set loading teal package(s). case option set attaching packages, please re-attach packages use correctly. Default: \"[{level}] {format(time, \\\"%Y-%m-%d %H:%M:%OS4\\\")} pid:{pid} token:[{token}] {ans} {msg}\". Note layout formatted glue package.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"teal-log_level-character","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.log_level (character)","title":"Modifying a teal Application With R Options","text":"logging level threshold used teal application. teal application emit logs level. See documentation logger::TRACE possible values logging threshold information . must set loading teal package(s). case option set attaching packages, please re-attach packages use correctly. Default: \"INFO\". Note two levels considered less severe \"INFO\": \"DEBUG\" \"TRACE\". order see log messages two levels well, change log level default \"TRACE\", least severe log level.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"teal-show_js_log-logical","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.show_js_log (logical)","title":"Modifying a teal Application With R Options","text":"indicates whether print JavaScript console logs R console. set TRUE, logs printed; otherwise, won’t. Default: FALSE.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"teal-lockfile-mode-character","dir":"Articles","previous_headings":"Options used in a teal application","what":"teal.lockfile.mode (character)","title":"Modifying a teal Application With R Options","text":"enables compute renv lockfile shows button \"download lockfile\" footer. Values: \"auto\" - auto detect whether compute lockfile \"enabled\" - compute lockfile show \"download lockfile\" footer \"disabled\" - compute lockfile show \"download lockfile\" footer Default: \"auto\". read lockfile usage creation check ?teal::module_teal_lockfile.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"teal_logging","dir":"Articles","previous_headings":"Deprecated options","what":"teal_logging","title":"Modifying a teal Application With R Options","text":"Deprecated favor using teal.logger package logging.","code":""},{"path":"https://insightsengineering.github.io/teal/main/articles/teal-options.html","id":"teal_show_js_log","dir":"Articles","previous_headings":"Deprecated options","what":"teal_show_js_log","title":"Modifying a teal Application With R Options","text":"Deprecated favor teal.show_js_log (see ).","code":""},{"path":"https://insightsengineering.github.io/teal/main/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dawid Kaledkowski. Author, maintainer. Pawel Rucki. Author. Aleksander Chlebowski. Author. Andre Verissimo. Author. Kartikeya Kirar. Author. Vedha Viyash. Author. Marcin Kosinski. Author. Adrian Waddell. Author. Chendi Liao. Reviewer. Dony Unardi. Reviewer. Nikolas Burkoff. Author. Mahmoud Hallal. Author. Maciej Nasinski. Author. Konrad Pagacz. Author. Junlue Zhao. Author. Tadeusz Lewandowski. Author. F. Hoffmann-La Roche AG. Copyright holder, funder. Maximilian Mordig. Contributor.","code":""},{"path":"https://insightsengineering.github.io/teal/main/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kaledkowski D, Rucki P, Chlebowski , Verissimo , Kirar K, Viyash V, Kosinski M, Waddell , Burkoff N, Hallal M, Nasinski M, Pagacz K, Zhao J, Lewandowski T (2024). teal: Exploratory Web Apps Analyzing Clinical Trials Data. R package version 0.15.2.9078, https://github.com/insightsengineering/teal/, https://insightsengineering.github.io/teal/main/.","code":"@Manual{, title = {teal: Exploratory Web Apps for Analyzing Clinical Trials Data}, author = {Dawid Kaledkowski and Pawel Rucki and Aleksander Chlebowski and Andre Verissimo and Kartikeya Kirar and Vedha Viyash and Marcin Kosinski and Adrian Waddell and Nikolas Burkoff and Mahmoud Hallal and Maciej Nasinski and Konrad Pagacz and Junlue Zhao and Tadeusz Lewandowski}, year = {2024}, note = {R package version 0.15.2.9078, https://github.com/insightsengineering/teal/}, url = {https://insightsengineering.github.io/teal/main/}, }"},{"path":"https://insightsengineering.github.io/teal/main/index.html","id":"teal-interactive-exploratory-data-analysis-with-shiny-web-applications-","dir":"","previous_headings":"","what":"Exploratory Web Apps for Analyzing Clinical Trials Data","title":"Exploratory Web Apps for Analyzing Clinical Trials Data","text":"teal shiny-based interactive exploration framework analyzing data. teal applications require app developers specify: CDISC data, commonly used clinical trial reporting Independent datasets, example data.frame Related datasets, example set data.frames key columns enable data joins MultiAssayExperiment objects R data structures representing analyzing multi-omics experiments teal.modules.general: general modules exploring relational/independent/CDISC data teal.modules.clinical: modules specific CDISC data clinical trial reporting teal.modules.hermes: modules analyzing MultiAssayExperiment objects lot functionality teal framework derives following packages: teal.data: creating loading data needed teal applications. teal.widgets: shiny components used within teal. teal.slice: provides filtering panel allow filtering data. teal.code: handles reproducibility outputs. teal.logger: standardizes logging within teal framework. teal.reporter: allows teal applications generate reports. Dive deeper teal comprehensive video guide. Please click image start learning:","code":""},{"path":"https://insightsengineering.github.io/teal/main/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Exploratory Web Apps for Analyzing Clinical Trials Data","text":"Alternatively, might also use development version.","code":"install.packages(\"teal\") # install.packages(\"pak\") pak::pak(\"insightsengineering/teal\")"},{"path":"https://insightsengineering.github.io/teal/main/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Exploratory Web Apps for Analyzing Clinical Trials Data","text":"Please see teal.gallery TLG Catalog see examples teal apps. Please start “Technical Blueprint” article, “Getting Started” article, package vignettes detailed guide.","code":"library(teal) app <- init( data = teal_data(iris = iris), modules = list( module( label = \"iris histogram\", server = function(input, output, session, data) { updateSelectInput(session = session, inputId = \"var\", choices = names(data()[[\"iris\"]])[1:4]) output$hist <- renderPlot({ req(input$var) hist(x = data()[[\"iris\"]][[input$var]]) }) }, ui = function(id) { ns <- NS(id) list( selectInput(inputId = ns(\"var\"), label = \"Column name\", choices = NULL), plotOutput(outputId = ns(\"hist\")) ) } ) ) ) shinyApp(app$ui, app$server)"},{"path":"https://insightsengineering.github.io/teal/main/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"Exploratory Web Apps for Analyzing Clinical Trials Data","text":"encounter bug feature request, please file issue. questions, discussions, updates, use teal channel pharmaverse slack workspace.","code":""},{"path":"https://insightsengineering.github.io/teal/main/index.html","id":"acknowledgment","dir":"","previous_headings":"","what":"Acknowledgment","title":"Exploratory Web Apps for Analyzing Clinical Trials Data","text":"package result joint efforts many developers stakeholders. like thank everyone contributed far!","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":null,"dir":"Reference","previous_headings":"","what":"Drive a teal application — TealAppDriver","title":"Drive a teal application — TealAppDriver","text":"Drive teal application Drive teal application","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Drive a teal application — TealAppDriver","text":"Extension shinytest2::AppDriver class methods driving teal application performing interactions shinytest2 tests.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Drive a teal application — TealAppDriver","text":"shinytest2::AppDriver -> TealAppDriver","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Drive a teal application — TealAppDriver","text":"shinytest2::AppDriver$expect_download() shinytest2::AppDriver$expect_html() shinytest2::AppDriver$expect_js() shinytest2::AppDriver$expect_screenshot() shinytest2::AppDriver$expect_text() shinytest2::AppDriver$expect_unique_names() shinytest2::AppDriver$expect_values() shinytest2::AppDriver$get_chromote_session() shinytest2::AppDriver$get_dir() shinytest2::AppDriver$get_download() shinytest2::AppDriver$get_html() shinytest2::AppDriver$get_js() shinytest2::AppDriver$get_logs() shinytest2::AppDriver$get_screenshot() shinytest2::AppDriver$get_text() shinytest2::AppDriver$get_url() shinytest2::AppDriver$get_value() shinytest2::AppDriver$get_values() shinytest2::AppDriver$get_variant() shinytest2::AppDriver$get_window_size() shinytest2::AppDriver$log_message() shinytest2::AppDriver$run_js() shinytest2::AppDriver$set_inputs() shinytest2::AppDriver$set_window_size() shinytest2::AppDriver$stop() shinytest2::AppDriver$upload_file() shinytest2::AppDriver$view() shinytest2::AppDriver$wait_for_idle() shinytest2::AppDriver$wait_for_js() shinytest2::AppDriver$wait_for_value()","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver$new() TealAppDriver$click() TealAppDriver$expect_no_shiny_error() TealAppDriver$expect_no_validation_error() TealAppDriver$expect_validation_error() TealAppDriver$set_input() TealAppDriver$navigate_teal_tab() TealAppDriver$active_ns() TealAppDriver$active_module_ns() TealAppDriver$active_module_element() TealAppDriver$active_module_element_text() TealAppDriver$active_filters_ns() TealAppDriver$active_data_summary_ns() TealAppDriver$active_data_summary_element() TealAppDriver$get_active_module_input() TealAppDriver$get_active_module_output() TealAppDriver$get_active_module_table_output() TealAppDriver$get_active_module_plot_output() TealAppDriver$set_active_module_input() TealAppDriver$get_active_filter_vars() TealAppDriver$get_active_data_summary_table() TealAppDriver$is_visible() TealAppDriver$get_active_data_filters() TealAppDriver$add_filter_var() TealAppDriver$remove_filter_var() TealAppDriver$set_active_filter_selection() TealAppDriver$get_attr() TealAppDriver$get_html_rvest() TealAppDriver$open_url() TealAppDriver$wait_for_active_module_value() TealAppDriver$clone()","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Drive a teal application — TealAppDriver","text":"Initialize TealAppDriver object testing teal application.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$new( data, modules, filter = teal_slices(), title = build_app_title(), header = tags$p(), footer = tags$p(), landing_popup = NULL, timeout = rlang::missing_arg(), load_timeout = rlang::missing_arg(), ... )"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"data, modules, filter, title, header, footer, landing_popup arguments passed init timeout (numeric) Default number milliseconds timeout timeout_ parameter TealAppDriver class. Defaults 20s. See shinytest2::AppDriver new method details change via options environment variables. load_timeout (numeric) long wait app load, ms. includes time start R. Defaults 100s. See shinytest2::AppDriver new method details change via options environment variables ... Additional arguments passed shinytest2::AppDriver$new","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"Object class TealAppDriver","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-click-","dir":"Reference","previous_headings":"","what":"Method click()","title":"Drive a teal application — TealAppDriver","text":"Append parent shinytest2::AppDriver click method call waif_for_idle() method.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$click(...)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"... arguments passed parent shinytest2::AppDriver click() method.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-expect-no-shiny-error-","dir":"Reference","previous_headings":"","what":"Method expect_no_shiny_error()","title":"Drive a teal application — TealAppDriver","text":"Check app shiny errors. checks global shiny errors. Note shiny errors dependent shiny server render captured teal module tab visited shiny trigger server computations tab invisible. , navigate module tab want test calling function. Although, catches errors hidden module tabs already rendered.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$expect_no_shiny_error()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-expect-no-validation-error-","dir":"Reference","previous_headings":"","what":"Method expect_no_validation_error()","title":"Drive a teal application — TealAppDriver","text":"Check app validation errors. checks global shiny validation errors.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$expect_no_validation_error()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-expect-validation-error-","dir":"Reference","previous_headings":"","what":"Method expect_validation_error()","title":"Drive a teal application — TealAppDriver","text":"Check app validation errors. checks global shiny validation errors.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$expect_validation_error()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-set-input-","dir":"Reference","previous_headings":"","what":"Method set_input()","title":"Drive a teal application — TealAppDriver","text":"Set input teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$set_input(input_id, value, ...)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"input_id (character) shiny input id complete name space. value value set input . ... Additional arguments passed shinytest2::AppDriver$set_inputs","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver object invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-navigate-teal-tab-","dir":"Reference","previous_headings":"","what":"Method navigate_teal_tab()","title":"Drive a teal application — TealAppDriver","text":"Navigate teal tabs teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$navigate_teal_tab(tabs)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"tabs (character) Labels tabs navigate . order tabs important, start parent level tab. Note: case teal tab group duplicate names, first tab selected, wish select second tab name, use suffix \"_1\". wish select third tab name, use suffix \"_2\" .","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver object invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-active-ns-","dir":"Reference","previous_headings":"","what":"Method active_ns()","title":"Drive a teal application — TealAppDriver","text":"Get active shiny name space different components teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-7","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_ns()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-3","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(list) list active shiny name space teal components.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-active-module-ns-","dir":"Reference","previous_headings":"","what":"Method active_module_ns()","title":"Drive a teal application — TealAppDriver","text":"Get active shiny name space interacting module content.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-8","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_module_ns()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-4","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(string) active shiny name space component.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-active-module-element-","dir":"Reference","previous_headings":"","what":"Method active_module_element()","title":"Drive a teal application — TealAppDriver","text":"Get active shiny name space bound custom element name.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-9","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_module_element(element)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-4","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"element character(1) custom element name.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-5","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(string) active shiny name space component bound input element.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-active-module-element-text-","dir":"Reference","previous_headings":"","what":"Method active_module_element_text()","title":"Drive a teal application — TealAppDriver","text":"Get text active shiny name space bound custom element name.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-10","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_module_element_text(element)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-5","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"element character(1) text custom element name.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-6","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(string) text active shiny name space component bound input element.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-active-filters-ns-","dir":"Reference","previous_headings":"","what":"Method active_filters_ns()","title":"Drive a teal application — TealAppDriver","text":"Get active shiny name space interacting filter panel.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-11","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_filters_ns()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-7","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(string) active shiny name space component.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-active-data-summary-ns-","dir":"Reference","previous_headings":"","what":"Method active_data_summary_ns()","title":"Drive a teal application — TealAppDriver","text":"Get active shiny name space interacting data-summary panel.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-12","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_data_summary_ns()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-8","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(string) active shiny name space data-summary component.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-active-data-summary-element-","dir":"Reference","previous_headings":"","what":"Method active_data_summary_element()","title":"Drive a teal application — TealAppDriver","text":"Get active shiny name space bound custom element name.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-13","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$active_data_summary_element(element)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-6","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"element character(1) custom element name.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-9","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"(string) active shiny name space component bound input element.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-get-active-module-input-","dir":"Reference","previous_headings":"","what":"Method get_active_module_input()","title":"Drive a teal application — TealAppDriver","text":"Get input module teal app. function access inputs name space current active teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-14","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_module_input(input_id)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-7","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"input_id (character) shiny input id get value .","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-10","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"value shiny input.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-get-active-module-output-","dir":"Reference","previous_headings":"","what":"Method get_active_module_output()","title":"Drive a teal application — TealAppDriver","text":"Get output module teal app. function access outputs name space current active teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-15","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_module_output(output_id)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-8","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"output_id (character) shiny output id get value .","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-11","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"value shiny output.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-get-active-module-table-output-","dir":"Reference","previous_headings":"","what":"Method get_active_module_table_output()","title":"Drive a teal application — TealAppDriver","text":"Get output module's teal.widgets::table_with_settings DT::DTOutput teal app. function access outputs name space current active teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-16","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_module_table_output(table_id, which = 1)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-9","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"table_id (character(1)) id table active teal module's name space. (integer) one table, extracted. default look table built using teal.widgets::table_with_settings.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-12","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"data.frame table contents.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-get-active-module-plot-output-","dir":"Reference","previous_headings":"","what":"Method get_active_module_plot_output()","title":"Drive a teal application — TealAppDriver","text":"Get output module's teal.widgets::plot_with_settings teal app. function access plots name space current active teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-17","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_module_plot_output(plot_id)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-10","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"plot_id (character(1)) id plot active teal module's name space.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-13","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"src attribute character(1) vector.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-set-active-module-input-","dir":"Reference","previous_headings":"","what":"Method set_active_module_input()","title":"Drive a teal application — TealAppDriver","text":"Set input module teal app. function set inputs name space current active teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-18","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$set_active_module_input(input_id, value, ...)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-11","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"input_id (character) shiny input id get value . value value set input . ... Additional arguments passed shinytest2::AppDriver$set_inputs","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-14","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver object invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-get-active-filter-vars-","dir":"Reference","previous_headings":"","what":"Method get_active_filter_vars()","title":"Drive a teal application — TealAppDriver","text":"Get active datasets can accessed via filter panel current active teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-19","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_filter_vars()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-get-active-data-summary-table-","dir":"Reference","previous_headings":"","what":"Method get_active_data_summary_table()","title":"Drive a teal application — TealAppDriver","text":"Get active data summary table","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-20","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_data_summary_table()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-15","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"data.frame","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-is-visible-","dir":"Reference","previous_headings":"","what":"Method is_visible()","title":"Drive a teal application — TealAppDriver","text":"Test DOM elements visible page JavaScript call.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-21","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$is_visible( selector, content_visibility_auto = FALSE, opacity_property = FALSE, visibility_property = FALSE )"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-12","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"selector (character(1)) CSS selector check visibility. CSS id return one element UI well formed. content_visibility_auto, opacity_property, visibility_property (logical(1)) See information https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-16","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"Logical vector occurrences selector.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-get-active-data-filters-","dir":"Reference","previous_headings":"","what":"Method get_active_data_filters()","title":"Drive a teal application — TealAppDriver","text":"Get active filter variables dataset teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-22","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_active_data_filters(dataset_name = NULL)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-13","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"dataset_name (character) name dataset get filter variables . NULL, filter variables datasets returned list.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-add-filter-var-","dir":"Reference","previous_headings":"","what":"Method add_filter_var()","title":"Drive a teal application — TealAppDriver","text":"Add new variable dataset filtered.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-23","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$add_filter_var(dataset_name, var_name, ...)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-14","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"dataset_name (character) name dataset add filter variable . var_name (character) name variable add filter panel. ... Additional arguments passed shinytest2::AppDriver$set_inputs","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-17","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver object invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-remove-filter-var-","dir":"Reference","previous_headings":"","what":"Method remove_filter_var()","title":"Drive a teal application — TealAppDriver","text":"Remove active filter variable dataset active filter variables panel.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-24","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$remove_filter_var(dataset_name = NULL, var_name = NULL)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-15","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"dataset_name (character) name dataset remove filter variable . NULL, filter variables removed. var_name (character) name variable remove filter panel. NULL, filter variables dataset removed.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-18","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver object invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-set-active-filter-selection-","dir":"Reference","previous_headings":"","what":"Method set_active_filter_selection()","title":"Drive a teal application — TealAppDriver","text":"Set active filter values variable dataset active filter variable panel.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-25","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$set_active_filter_selection(dataset_name, var_name, input, ...)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-16","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"dataset_name (character) name dataset set filter value . var_name (character) name variable set filter value . input value set filter . ... Additional arguments passed shinytest2::AppDriver$set_inputs","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-19","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"TealAppDriver object invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-get-attr-","dir":"Reference","previous_headings":"","what":"Method get_attr()","title":"Drive a teal application — TealAppDriver","text":"Extract html attribute (found selector).","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-26","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_attr(selector, attribute)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-17","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"selector (character(1)) specifying selector used get content specific node. attribute (character(1)) name attribute retrieve node specified selector.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-20","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"character vector.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-get-html-rvest-","dir":"Reference","previous_headings":"","what":"Method get_html_rvest()","title":"Drive a teal application — TealAppDriver","text":"Wrapper around get_html passes output directly rvest::read_html.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-27","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$get_html_rvest(selector)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-18","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"selector (character(1)) passed get_html.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-21","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"XML document. Wrapper around get_url() method opens app browser.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-28","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$open_url()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"returns-22","dir":"Reference","previous_headings":"","what":"Returns","title":"Drive a teal application — TealAppDriver","text":"Nothing. Opens underlying teal app browser.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-wait-for-active-module-value-","dir":"Reference","previous_headings":"","what":"Method wait_for_active_module_value()","title":"Drive a teal application — TealAppDriver","text":"Waits specified input, output, export value. function serves wrapper around wait_for_value method, providing flexible interface waiting different types values within active module namespace.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-29","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$wait_for_active_module_value( input = rlang::missing_arg(), output = rlang::missing_arg(), export = rlang::missing_arg(), ... )"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-19","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"input, output, export name input, output, export value. one parameters may used. ... Must empty. Allows parameter expansion. Parameter additional value passed wait_for_value.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Drive a teal application — TealAppDriver","text":"objects class cloneable method.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"usage-30","dir":"Reference","previous_headings":"","what":"Usage","title":"Drive a teal application — TealAppDriver","text":"","code":"TealAppDriver$clone(deep = FALSE)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealAppDriver.html","id":"arguments-20","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drive a teal application — TealAppDriver","text":"deep Whether make deep clone.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":null,"dir":"Reference","previous_headings":"","what":"TealReportCard — TealReportCard","title":"TealReportCard — TealReportCard","text":"Child class ReportCard used teal specific applications. addition parent methods, supports rendering teal specific elements source code, encodings panel content filter panel content part meta data.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"TealReportCard — TealReportCard","text":"teal.reporter::ReportCard -> TealReportCard","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"TealReportCard — TealReportCard","text":"teal.reporter::ReportCard$append_content() teal.reporter::ReportCard$append_metadata() teal.reporter::ReportCard$append_plot() teal.reporter::ReportCard$append_rcode() teal.reporter::ReportCard$append_table() teal.reporter::ReportCard$append_text() teal.reporter::ReportCard$from_list() teal.reporter::ReportCard$get_content() teal.reporter::ReportCard$get_metadata() teal.reporter::ReportCard$get_name() teal.reporter::ReportCard$initialize() teal.reporter::ReportCard$reset() teal.reporter::ReportCard$set_name() teal.reporter::ReportCard$to_list()","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"TealReportCard — TealReportCard","text":"TealReportCard$append_src() TealReportCard$append_fs() TealReportCard$append_encodings() TealReportCard$clone()","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"method-append-src-","dir":"Reference","previous_headings":"","what":"Method append_src()","title":"TealReportCard — TealReportCard","text":"Appends source code content meta data TealReportCard.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"TealReportCard — TealReportCard","text":"","code":"TealReportCard$append_src(src, ...)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealReportCard — TealReportCard","text":"src (character(1)) code text. ... rmarkdown R chunk parameter value. eval parameter always set FALSE.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"TealReportCard — TealReportCard","text":"Object class TealReportCard, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"TealReportCard — TealReportCard","text":"","code":"card <- TealReportCard$new()$append_src( \"plot(iris)\" ) card$get_content()[[1]]$get_content()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"method-append-fs-","dir":"Reference","previous_headings":"","what":"Method append_fs()","title":"TealReportCard — TealReportCard","text":"Appends filter state list content metadata TealReportCard. filter state list attribute named formatted, appends card otherwise uses default yaml::.yaml format list. filter state list empty, nothing appended content.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"TealReportCard — TealReportCard","text":"","code":"TealReportCard$append_fs(fs)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealReportCard — TealReportCard","text":"fs (teal_slices) object returned teal_slices() function.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"TealReportCard — TealReportCard","text":"self, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"method-append-encodings-","dir":"Reference","previous_headings":"","what":"Method append_encodings()","title":"TealReportCard — TealReportCard","text":"Appends encodings list content metadata TealReportCard.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"TealReportCard — TealReportCard","text":"","code":"TealReportCard$append_encodings(encodings)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealReportCard — TealReportCard","text":"encodings (list) list encodings selections teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"TealReportCard — TealReportCard","text":"self, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"examples-1","dir":"Reference","previous_headings":"","what":"Examples","title":"TealReportCard — TealReportCard","text":"","code":"card <- TealReportCard$new()$append_encodings(list(variable1 = \"X\")) card$get_content()[[1]]$get_content()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"TealReportCard — TealReportCard","text":"objects class cloneable method.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"TealReportCard — TealReportCard","text":"","code":"TealReportCard$clone(deep = FALSE)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealReportCard — TealReportCard","text":"deep Whether make deep clone.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealReportCard.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"TealReportCard — TealReportCard","text":"","code":"## ------------------------------------------------ ## Method `TealReportCard$append_src` ## ------------------------------------------------ card <- TealReportCard$new()$append_src( \"plot(iris)\" ) card$get_content()[[1]]$get_content() #> [1] \"plot(iris)\" ## ------------------------------------------------ ## Method `TealReportCard$append_encodings` ## ------------------------------------------------ card <- TealReportCard$new()$append_encodings(list(variable1 = \"X\")) card$get_content()[[1]]$get_content() #> [1] \"Selected Options\""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":null,"dir":"Reference","previous_headings":"","what":"TealSlicesBlock — TealSlicesBlock","title":"TealSlicesBlock — TealSlicesBlock","text":"Specialized TealSlicesBlock block managing filter panel content reports.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"TealSlicesBlock — TealSlicesBlock","text":"teal.reporter::ContentBlock -> teal.reporter::TextBlock -> TealSlicesBlock","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"TealSlicesBlock — TealSlicesBlock","text":"teal.reporter::ContentBlock$get_content() teal.reporter::TextBlock$get_available_styles() teal.reporter::TextBlock$get_style() teal.reporter::TextBlock$set_style()","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"TealSlicesBlock — TealSlicesBlock","text":"TealSlicesBlock$new() TealSlicesBlock$set_content() TealSlicesBlock$from_list() TealSlicesBlock$to_list() TealSlicesBlock$clone()","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"TealSlicesBlock — TealSlicesBlock","text":"Returns TealSlicesBlock object.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock$new(content = teal_slices(), style = \"verbatim\")"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealSlicesBlock — TealSlicesBlock","text":"content (teal_slices) object returned teal_slices() function. style (character(1)) string specifying style apply.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"TealSlicesBlock — TealSlicesBlock","text":"Returns TealSlicesBlock object content parameters.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"TealSlicesBlock — TealSlicesBlock","text":"Object class TealSlicesBlock, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"method-set-content-","dir":"Reference","previous_headings":"","what":"Method set_content()","title":"TealSlicesBlock — TealSlicesBlock","text":"Sets content TealSlicesBlock. Sets content YAML text represents list generated teal_slices. list displays limited number fields teal_slice objects, list sufficient conclude filters applied. selected field teal_slice object range, displayed \"min\"","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock$set_content(content)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealSlicesBlock — TealSlicesBlock","text":"content (teal_slices) object returned teal_slices() function.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"TealSlicesBlock — TealSlicesBlock","text":"self, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"method-from-list-","dir":"Reference","previous_headings":"","what":"Method from_list()","title":"TealSlicesBlock — TealSlicesBlock","text":"Create TealSlicesBlock list.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock$from_list(x)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealSlicesBlock — TealSlicesBlock","text":"x (named list) two fields text style. Use get_available_styles method get possible styles.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"TealSlicesBlock — TealSlicesBlock","text":"self, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock <- getFromNamespace(\"TealSlicesBlock\", \"teal\") block <- TealSlicesBlock$new() block$from_list(list(text = \"sth\", style = \"default\"))"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"method-to-list-","dir":"Reference","previous_headings":"","what":"Method to_list()","title":"TealSlicesBlock — TealSlicesBlock","text":"Convert TealSlicesBlock list.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock$to_list()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"returns-3","dir":"Reference","previous_headings":"","what":"Returns","title":"TealSlicesBlock — TealSlicesBlock","text":"named list text style.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"examples-1","dir":"Reference","previous_headings":"","what":"Examples","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock <- getFromNamespace(\"TealSlicesBlock\", \"teal\") block <- TealSlicesBlock$new() block$to_list()"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"TealSlicesBlock — TealSlicesBlock","text":"objects class cloneable method.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"TealSlicesBlock$clone(deep = FALSE)"},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"TealSlicesBlock — TealSlicesBlock","text":"deep Whether make deep clone.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/TealSlicesBlock.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"TealSlicesBlock — TealSlicesBlock","text":"","code":"## ------------------------------------------------ ## Method `TealSlicesBlock$from_list` ## ------------------------------------------------ TealSlicesBlock <- getFromNamespace(\"TealSlicesBlock\", \"teal\") block <- TealSlicesBlock$new() block$from_list(list(text = \"sth\", style = \"default\")) ## ------------------------------------------------ ## Method `TealSlicesBlock$to_list` ## ------------------------------------------------ TealSlicesBlock <- getFromNamespace(\"TealSlicesBlock\", \"teal\") block <- TealSlicesBlock$new() block$to_list() #> $text #> [1] \"\" #> #> $style #> [1] \"verbatim\" #>"},{"path":"https://insightsengineering.github.io/teal/main/reference/append_module.html","id":null,"dir":"Reference","previous_headings":"","what":"Append a teal_module to children of a teal_modules object — append_module","title":"Append a teal_module to children of a teal_modules object — append_module","text":"Append teal_module children teal_modules object","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/append_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Append a teal_module to children of a teal_modules object — append_module","text":"","code":"append_module(modules, module)"},{"path":"https://insightsengineering.github.io/teal/main/reference/append_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Append a teal_module to children of a teal_modules object — append_module","text":"modules (teal_modules) module (teal_module) object appended onto children modules","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/append_module.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Append a teal_module to children of a teal_modules object — append_module","text":"teal_modules object module appended.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/bookmarks_identical.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare bookmarks. — bookmarks_identical","title":"Compare bookmarks. — bookmarks_identical","text":"Test two bookmarks store identical state.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/bookmarks_identical.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare bookmarks. — bookmarks_identical","text":"","code":"bookmarks_identical(book1, book2)"},{"path":"https://insightsengineering.github.io/teal/main/reference/bookmarks_identical.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare bookmarks. — bookmarks_identical","text":"book1, book2 bookmark directories stored shiny_bookmarks/; default two recently modified directories","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/bookmarks_identical.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare bookmarks. — bookmarks_identical","text":"Invisible NULL bookmarks identical bookmarks test. FALSE inconsistencies detected.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/bookmarks_identical.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compare bookmarks. — bookmarks_identical","text":"input environments compared one variable time identical, values bookmarks reported. States datatables stripped time element comparing time stamp always different. contents printed large contents informative. Elements present one bookmark absent also reported. Differences printed messages. values environments compared .equal.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/bookmarks_identical.html","id":"how-to-use","dir":"Reference","previous_headings":"","what":"How to use","title":"Compare bookmarks. — bookmarks_identical","text":"Open application, change relevant inputs (typically, ), create bookmark. open bookmark immediately create bookmark . restoring bookmarks occurred properly, two bookmarks store state.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/build_app_title.html","id":null,"dir":"Reference","previous_headings":"","what":"Build app title with favicon — build_app_title","title":"Build app title with favicon — build_app_title","text":"helper function create browser title along logo.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/build_app_title.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build app title with favicon — build_app_title","text":"","code":"build_app_title( title = \"teal app\", favicon = \"https://raw.githubusercontent.com/insightsengineering/hex-stickers/main/PNG/nest.png\" )"},{"path":"https://insightsengineering.github.io/teal/main/reference/build_app_title.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build app title with favicon — build_app_title","text":"title (character) browser title teal app. favicon (character) path icon title. image/icon path can remote static path accessible shiny, like www/","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/build_app_title.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Build app title with favicon — build_app_title","text":"shiny.tag containing element adds title logo shiny app.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/call_once_when.html","id":null,"dir":"Reference","previous_headings":"","what":"Calls expression when condition is met — call_once_when","title":"Calls expression when condition is met — call_once_when","text":"Function postpones handlerExpr moment eventExpr (condition) returns TRUE, otherwise nothing happens.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/call_once_when.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calls expression when condition is met — call_once_when","text":"","code":"call_once_when( eventExpr, handlerExpr, event.env = parent.frame(), handler.env = parent.frame(), ... )"},{"path":"https://insightsengineering.github.io/teal/main/reference/call_once_when.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calls expression when condition is met — call_once_when","text":"eventExpr (quoted unquoted) logical expression represents event; can simple reactive value like input$click, call reactive expression like dataset(), even complex expression inside curly braces. handlerExpr expression call whenever eventExpr invalidated. side-effect-producing action (return value ignored). executed within isolate() scope. event.env parent environment reactive expression. default, calling environment, defining ordinary non-reactive expression. eventExpr quosure event.quoted TRUE, event.env ignored. handler.env parent environment reactive expression. default, calling environment, defining ordinary non-reactive expression. handlerExpr quosure handler.quoted TRUE, handler.env ignored. ... additional arguments passed observeEvent exception eventExpr allowed.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/call_once_when.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calls expression when condition is met — call_once_when","text":"observer.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/check_filter_datanames.html","id":null,"dir":"Reference","previous_headings":"","what":"Check datanames in filters — check_filter_datanames","title":"Check datanames in filters — check_filter_datanames","text":"function checks whether datanames filters correspond data, returning character vector error messages TRUE checks pass.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/check_filter_datanames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check datanames in filters — check_filter_datanames","text":"","code":"check_filter_datanames(filters, datanames)"},{"path":"https://insightsengineering.github.io/teal/main/reference/check_filter_datanames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check datanames in filters — check_filter_datanames","text":"filters (teal_slices) object datanames (character) names datasets available data object","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/check_filter_datanames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check datanames in filters — check_filter_datanames","text":"character(1) containing error message TRUE validation passes.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/check_modules_datanames.html","id":null,"dir":"Reference","previous_headings":"","what":"Check datanames in modules — check_modules_datanames","title":"Check datanames in modules — check_modules_datanames","text":"functions check specified datanames modules match data object, returning error messages TRUE successful validation. Two functions return error message different forms: check_modules_datanames returns character(1) basic assertion usage check_modules_datanames_html returns shiny.tag.list display app.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/check_modules_datanames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check datanames in modules — check_modules_datanames","text":"","code":"check_modules_datanames(modules, datanames) check_modules_datanames_html(modules, datanames)"},{"path":"https://insightsengineering.github.io/teal/main/reference/check_modules_datanames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check datanames in modules — check_modules_datanames","text":"modules (teal_modules) object datanames (character) names datasets available data object","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/check_modules_datanames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check datanames in modules — check_modules_datanames","text":"TRUE validation passes, otherwise character(1) shiny.tag.list","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/check_reactive.html","id":null,"dir":"Reference","previous_headings":"","what":"Check that argument is reactive. — check_reactive","title":"Check that argument is reactive. — check_reactive","text":"Check argument reactive.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/check_reactive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check that argument is reactive. — check_reactive","text":"","code":"check_reactive(x, null.ok = FALSE) test_reactive(x, null.ok = FALSE) assert_reactive( x, null.ok = FALSE, .var.name = checkmate::vname(x), add = NULL )"},{"path":"https://insightsengineering.github.io/teal/main/reference/check_reactive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check that argument is reactive. — check_reactive","text":"x [] Object check. null.ok [logical(1)] set TRUE, x may also NULL. case type check x performed, additional checks disabled. .var.name [character(1)] Name checked object print assertions. Defaults heuristic implemented vname. add [AssertCollection] Collection store assertion messages. See AssertCollection.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/check_reactive.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check that argument is reactive. — check_reactive","text":"Depending function prefix: check successful, functions assertClass/assert_class return x invisibly, whereas checkClass/check_class testClass/test_class return TRUE. check successful, assertClass/assert_class throws error message, testClass/test_class returns FALSE, checkClass/check_class return string error message. function expect_class always returns expectation.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/create_app_id.html","id":null,"dir":"Reference","previous_headings":"","what":"Application ID — create_app_id","title":"Application ID — create_app_id","text":"Creates App ID used match filter snapshots application.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/create_app_id.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Application ID — create_app_id","text":"","code":"create_app_id(data, modules)"},{"path":"https://insightsengineering.github.io/teal/main/reference/create_app_id.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Application ID — create_app_id","text":"data (teal_data teal_data_module) accepted init modules (teal_modules) object accepted init","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/create_app_id.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Application ID — create_app_id","text":"single character string.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/create_app_id.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Application ID — create_app_id","text":"Calculate app ID used stamp filter state snapshots. App ID hash app's data modules. See \"transferring snapshots\" section ?snapshot.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/decorate_err_msg.html","id":null,"dir":"Reference","previous_headings":"","what":"Capture error and decorate error message. — decorate_err_msg","title":"Capture error and decorate error message. — decorate_err_msg","text":"Capture error decorate error message.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/decorate_err_msg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Capture error and decorate error message. — decorate_err_msg","text":"","code":"decorate_err_msg(x, pre = character(0), post = character(0))"},{"path":"https://insightsengineering.github.io/teal/main/reference/decorate_err_msg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Capture error and decorate error message. — decorate_err_msg","text":"x object evaluate pre (character(1)) string prepend error message post (character(1)) string append error message","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/decorate_err_msg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Capture error and decorate error message. — decorate_err_msg","text":"x error, otherwise throws error decorated message","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/deep_copy_filter.html","id":null,"dir":"Reference","previous_headings":"","what":"Deep copy teal_slices — deep_copy_filter","title":"Deep copy teal_slices — deep_copy_filter","text":"important create new copy teal_slices starting new shiny session. Otherwise, object shared multiple users created global environment shiny session starts.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/deep_copy_filter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deep copy teal_slices — deep_copy_filter","text":"","code":"deep_copy_filter(filter)"},{"path":"https://insightsengineering.github.io/teal/main/reference/deep_copy_filter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deep copy teal_slices — deep_copy_filter","text":"filter (teal_slices)","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/deep_copy_filter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Deep copy teal_slices — deep_copy_filter","text":"teal_slices","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/dot-add_signature_to_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Adds signature protection to the datanames in the data — .add_signature_to_data","title":"Adds signature protection to the datanames in the data — .add_signature_to_data","text":"Adds signature protection datanames data","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/dot-add_signature_to_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adds signature protection to the datanames in the data — .add_signature_to_data","text":"","code":".add_signature_to_data(data)"},{"path":"https://insightsengineering.github.io/teal/main/reference/dot-add_signature_to_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adds signature protection to the datanames in the data — .add_signature_to_data","text":"data (teal_data)","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/dot-add_signature_to_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adds signature protection to the datanames in the data — .add_signature_to_data","text":"teal_data additional code signature datanames","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/dot-get_hashes_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Get code that tests the integrity of the reproducible data — .get_hashes_code","title":"Get code that tests the integrity of the reproducible data — .get_hashes_code","text":"Get code tests integrity reproducible data","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/dot-get_hashes_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get code that tests the integrity of the reproducible data — .get_hashes_code","text":"","code":".get_hashes_code(data, datanames = ls(teal.code::get_env(data)))"},{"path":"https://insightsengineering.github.io/teal/main/reference/dot-get_hashes_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get code that tests the integrity of the reproducible data — .get_hashes_code","text":"data (teal_data) object holding data datanames (character) names datasets","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/dot-get_hashes_code.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get code that tests the integrity of the reproducible data — .get_hashes_code","text":"character vector code lines.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/example_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"An example teal module — example_module","text":"","code":"example_module( label = \"example teal module\", datanames = \"all\", transformers = list() )"},{"path":"https://insightsengineering.github.io/teal/main/reference/example_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"An example teal module — example_module","text":"label (character(1)) Label shown navigation item module module group. modules() defaults \"root\". See Details. datanames (character) Names datasets relevant item. 2 reserved values specific behaviors: keyword \"\" includes datasets available data passed teal application. NULL hides sidebar panel completely. transformers specified, datanames automatically added datanames argument. transformers (list teal_data_module) applied transform data. transform module UI appear teal's sidebar panel. Transformers' datanames added datanames. See teal_transform_module().","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/example_module.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"An example teal module — example_module","text":"teal module can included modules argument init().","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/example_module.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"An example teal module — example_module","text":"","code":"app <- init( data = teal_data(IRIS = iris, MTCARS = mtcars), modules = example_module() ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/reference/extract_transformers.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract all transformers from modules. — extract_transformers","title":"Extract all transformers from modules. — extract_transformers","text":"Extract transformers modules.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/extract_transformers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract all transformers from modules. — extract_transformers","text":"","code":"extract_transformers(modules)"},{"path":"https://insightsengineering.github.io/teal/main/reference/extract_transformers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract all transformers from modules. — extract_transformers","text":"modules teal_modules teal_module","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/extract_transformers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract all transformers from modules. — extract_transformers","text":"list teal_transform_module nested way input modules.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/get_client_timezone.html","id":null,"dir":"Reference","previous_headings":"","what":"Get client timezone — get_client_timezone","title":"Get client timezone — get_client_timezone","text":"User timezone browser may different one server. script can run register shiny input contains information timezone browser.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/get_client_timezone.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get client timezone — get_client_timezone","text":"","code":"get_client_timezone(ns)"},{"path":"https://insightsengineering.github.io/teal/main/reference/get_client_timezone.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get client timezone — get_client_timezone","text":"ns (function) namespace function passed session object shiny server. shiny modules allow proper name spacing registered input.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/get_client_timezone.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get client timezone — get_client_timezone","text":"NULL, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/get_rcode_libraries.html","id":null,"dir":"Reference","previous_headings":"","what":"Generates library calls from current session info — get_rcode_libraries","title":"Generates library calls from current session info — get_rcode_libraries","text":"Function create multiple library calls current session info ensure reproducible code works.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/get_rcode_libraries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generates library calls from current session info — get_rcode_libraries","text":"","code":"get_rcode_libraries()"},{"path":"https://insightsengineering.github.io/teal/main/reference/get_rcode_libraries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generates library calls from current session info — get_rcode_libraries","text":"Character vector library() calls.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/get_unique_labels.html","id":null,"dir":"Reference","previous_headings":"","what":"Get unique labels — get_unique_labels","title":"Get unique labels — get_unique_labels","text":"Get unique labels modules avoid namespace conflicts.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/get_unique_labels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get unique labels — get_unique_labels","text":"","code":"get_unique_labels(labels)"},{"path":"https://insightsengineering.github.io/teal/main/reference/get_unique_labels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get unique labels — get_unique_labels","text":"labels (character) vector labels","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/get_unique_labels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get unique labels — get_unique_labels","text":"(character) vector unique labels","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/include_css_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Include CSS files from /inst/css/ package directory to application header — include_css_files","title":"Include CSS files from /inst/css/ package directory to application header — include_css_files","text":"system.file used access files packages, work devtools. Therefore, redefine method package needed. Thus, export method.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/include_css_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Include CSS files from /inst/css/ package directory to application header — include_css_files","text":"","code":"include_css_files(pattern = \"*\")"},{"path":"https://insightsengineering.github.io/teal/main/reference/include_css_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Include CSS files from /inst/css/ package directory to application header — include_css_files","text":"pattern (character) pattern files included","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/include_css_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Include CSS files from /inst/css/ package directory to application header — include_css_files","text":"HTML code includes CSS files.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/include_js_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Include JS files from /inst/js/ package directory to application header — include_js_files","title":"Include JS files from /inst/js/ package directory to application header — include_js_files","text":"system.file used access files packages, work devtools. Therefore, redefine method package needed. Thus, export method","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/include_js_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Include JS files from /inst/js/ package directory to application header — include_js_files","text":"","code":"include_js_files(pattern = NULL, except = NULL)"},{"path":"https://insightsengineering.github.io/teal/main/reference/include_js_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Include JS files from /inst/js/ package directory to application header — include_js_files","text":"pattern (character) pattern files included, passed system.file except (character) vector basename filenames excluded","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/include_js_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Include JS files from /inst/js/ package directory to application header — include_js_files","text":"HTML code includes JS files.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/include_teal_css_js.html","id":null,"dir":"Reference","previous_headings":"","what":"Code to include teal CSS and JavaScript files — include_teal_css_js","title":"Code to include teal CSS and JavaScript files — include_teal_css_js","text":"useful want use JavaScript CSS files used teal application. also useful running standalone modules teal correct styles. Also initializes shinyjs can use .","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/include_teal_css_js.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Code to include teal CSS and JavaScript files — include_teal_css_js","text":"","code":"include_teal_css_js()"},{"path":"https://insightsengineering.github.io/teal/main/reference/include_teal_css_js.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Code to include teal CSS and JavaScript files — include_teal_css_js","text":"shiny.tag.list.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/include_teal_css_js.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Code to include teal CSS and JavaScript files — include_teal_css_js","text":"Simply add include_teal_css_js() one UI elements.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/init.html","id":null,"dir":"Reference","previous_headings":"","what":"Create the server and UI function for the shiny app — init","title":"Create the server and UI function for the shiny app — init","text":"End-users: important function start teal app composed teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create the server and UI function for the shiny app — init","text":"","code":"init( data, modules, filter = teal_slices(), title = build_app_title(), header = tags$p(), footer = tags$p(), id = character(0), landing_popup = NULL )"},{"path":"https://insightsengineering.github.io/teal/main/reference/init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create the server and UI function for the shiny app — init","text":"data (teal_data teal_data_module) constructing data object, refer teal_data() teal_data_module(). datanames set teal_data object, defaults teal_data environment used. modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details. filter (teal_slices) Optionally, specifies initial filter using teal_slices(). title (shiny.tag character(1)) Optionally, browser window title. Defaults title \"teal app\" icon NEST. Can created using build_app_title() passing valid shiny.tag head tag title link tag. header (shiny.tag character(1)) Optionally, header app. footer (shiny.tag character(1)) Optionally, footer app. id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. landing_popup (teal_module_landing) Optionally, landing_popup_module show soon teal app initialized.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/init.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create the server and UI function for the shiny app — init","text":"Named list containing server UI functions.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/init.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create the server and UI function for the shiny app — init","text":"","code":"app <- init( data = within( teal_data(), { new_iris <- transform(iris, id = seq_len(nrow(iris))) new_mtcars <- transform(mtcars, id = seq_len(nrow(mtcars))) } ), modules = modules( module( label = \"data source\", server = function(input, output, session, data) {}, ui = function(id, ...) tags$div(p(\"information about data source\")), datanames = \"all\" ), example_module(label = \"example teal module\"), module( \"Iris Sepal.Length histogram\", server = function(input, output, session, data) { output$hist <- renderPlot( hist(data()[[\"new_iris\"]]$Sepal.Length) ) }, ui = function(id, ...) { ns <- NS(id) plotOutput(ns(\"hist\")) }, datanames = \"new_iris\" ) ), filter = teal_slices( teal_slice(dataname = \"new_iris\", varname = \"Species\"), teal_slice(dataname = \"new_iris\", varname = \"Sepal.Length\"), teal_slice(dataname = \"new_mtcars\", varname = \"cyl\"), exclude_varnames = list(new_iris = c(\"Sepal.Width\", \"Petal.Width\")), module_specific = TRUE, mapping = list( `example teal module` = \"new_iris Species\", `Iris Sepal.Length histogram` = \"new_iris Species\", global_filters = \"new_mtcars cyl\" ) ), title = \"App title\", header = tags$h1(\"Sample App\"), footer = tags$p(\"Sample footer\") ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/reference/is_arg_used.html","id":null,"dir":"Reference","previous_headings":"","what":"Does the object make use of the arg — is_arg_used","title":"Does the object make use of the arg — is_arg_used","text":"object make use arg","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/is_arg_used.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Does the object make use of the arg — is_arg_used","text":"","code":"is_arg_used(modules, arg)"},{"path":"https://insightsengineering.github.io/teal/main/reference/is_arg_used.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Does the object make use of the arg — is_arg_used","text":"modules (teal_module teal_modules) object arg (character(1)) names arguments checked formals teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/is_arg_used.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Does the object make use of the arg — is_arg_used","text":"logical whether object makes use arg.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/landing_popup_module.html","id":null,"dir":"Reference","previous_headings":"","what":"Landing popup module — landing_popup_module","title":"Landing popup module — landing_popup_module","text":"Creates landing welcome popup teal applications. module used display popup dialog application starts. dialog blocks access application must closed button application can viewed.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/landing_popup_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Landing popup module — landing_popup_module","text":"","code":"landing_popup_module( label = \"Landing Popup\", title = NULL, content = NULL, buttons = modalButton(\"Accept\") )"},{"path":"https://insightsengineering.github.io/teal/main/reference/landing_popup_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Landing popup module — landing_popup_module","text":"label (character(1)) Label module. title (character(1)) Text displayed popup title. content (character(1), shiny.tag shiny.tag.list) content popup. Passed ... shiny::modalDialog. See examples. buttons (shiny.tag shiny.tag.list) Typically modalButton actionButton. See examples.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/landing_popup_module.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Landing popup module — landing_popup_module","text":"teal_module (extended teal_landing_module class) used teal applications.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/landing_popup_module.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Landing popup module — landing_popup_module","text":"","code":"app1 <- init( data = teal_data(iris = iris), modules = modules( example_module() ), landing_popup = landing_popup_module( content = \"A place for the welcome message or a disclaimer statement.\", buttons = modalButton(\"Proceed\") ) ) #> Initializing landing_popup_module #> module \"Landing Popup\" server function takes no data so \"datanames\" will be ignored if (interactive()) { shinyApp(app1$ui, app1$server) } app2 <- init( data = teal_data(iris = iris), modules = modules( example_module() ), landing_popup = landing_popup_module( title = \"Welcome\", content = tags$b( \"A place for the welcome message or a disclaimer statement.\", style = \"color: red;\" ), buttons = tagList( modalButton(\"Proceed\"), actionButton(\"read\", \"Read more\", onclick = \"window.open('http://google.com', '_blank')\" ), actionButton(\"close\", \"Reject\", onclick = \"window.close()\") ) ) ) #> Initializing landing_popup_module #> module \"Landing Popup\" server function takes no data so \"datanames\" will be ignored if (interactive()) { shinyApp(app2$ui, app2$server) }"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_bookmark_manager.html","id":null,"dir":"Reference","previous_headings":"","what":"App state management. — module_bookmark_manager","title":"App state management. — module_bookmark_manager","text":"Capture restore global (app) input state.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_bookmark_manager.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"App state management. — module_bookmark_manager","text":"","code":"ui_bookmark_panel(id, modules) srv_bookmark_panel(id, modules) get_bookmarking_option() need_bookmarking(modules)"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_bookmark_manager.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"App state management. — module_bookmark_manager","text":"id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_bookmark_manager.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"App state management. — module_bookmark_manager","text":"Invisible NULL.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_bookmark_manager.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"App state management. — module_bookmark_manager","text":"module introduces bookmarks teal apps: shiny bookmarking mechanism becomes enabled server-side bookmarks can created. bookmark manager presents button bookmark icon placed tab-bar. clicked, button creates bookmark opens modal displays bookmark URL. teal guarantee modules (teal_module objects) bookmarkable. , teal_bookmarkable attribute set TRUE. modules bookmarkable, bookmark manager modal displays warning bookmark button displays flag. order communicate external module bookmarkable, module developer set teal_bookmarkable attribute TRUE.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_bookmark_manager.html","id":"server-logic","dir":"Reference","previous_headings":"","what":"Server logic","title":"App state management. — module_bookmark_manager","text":"bookmark URL contains app address /?_state_id_= suffix. directory created server, state application saved. Accessing bookmark URL opens new session app starts previously saved state.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_bookmark_manager.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"App state management. — module_bookmark_manager","text":"enable bookmarking use either: shiny app using shinyApp(..., enableBookmarking = \"server\") (supported shinytest2) set options(shiny.bookmarkStore = \"server\") running app","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_data_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Data summary — module_data_summary","title":"Data summary — module_data_summary","text":"Module utils display number rows subjects filtered unfiltered data.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_data_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data summary — module_data_summary","text":"","code":"ui_data_summary(id) srv_data_summary(id, teal_data) get_filter_overview(teal_data) get_object_filter_overview( filtered_data, unfiltered_data, dataname, subject_keys ) get_object_filter_overview_array( filtered_data, unfiltered_data, dataname, subject_keys ) get_object_filter_overview_MultiAssayExperiment( filtered_data, unfiltered_data, dataname )"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_data_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data summary — module_data_summary","text":"id (character(1)) shiny module instance id. teal_data (reactive returning teal_data) filtered_data (list) filtered objects unfiltered_data (list) unfiltered objects dataname (character(1))","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_data_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Data summary — module_data_summary","text":"NULL.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_data_summary.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data summary — module_data_summary","text":"Handling different data classes: get_object_filter_overview() pseudo S3 method variants : array (data.frame, DataFrame, array, Matrix SummarizedExperiment): Method variant can applied two-dimensional objects ncol() can used. MultiAssayExperiment: summary contains counts colData experiments.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_filter_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter panel module in teal — module_filter_data","title":"Filter panel module in teal — module_filter_data","text":"Creates filter panel module teal_data object returns teal_data. build way filter panel changes anything happens (e.g. module_init_data) triggering reactive events something changed module visible. Thanks special implementation modules' data recalculated modules currently displayed.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_filter_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter panel module in teal — module_filter_data","text":"","code":"ui_filter_data(id) srv_filter_data(id, datasets, active_datanames, data_rv, is_active) .make_filtered_teal_data(modules, data, datasets = NULL, datanames) .observe_active_filter_changed(datasets, is_active, active_datanames, data_rv) .get_filter_expr(datasets, datanames)"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_filter_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter panel module in teal — module_filter_data","text":"id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. datasets (reactive returning FilteredData NULL) datasets passed parent module (srv_teal) dataset singleton implies filter-panel \"global\". NULL filter-panel \"module-specific\". active_datanames (reactive returning character) module's data names data_rv (reactive returning teal_data) modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_filter_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter panel module in teal — module_filter_data","text":"eventReactive containing teal_data containing filtered objects filter code. eventReactive triggers conditions met: tab selected (is_active) filters changed (get_filter_expr different previous)","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_filter_manager.html","id":null,"dir":"Reference","previous_headings":"","what":"Manage multiple FilteredData objects — module_filter_manager","title":"Manage multiple FilteredData objects — module_filter_manager","text":"Oversee filter states across entire application.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_filter_manager.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage multiple FilteredData objects — module_filter_manager","text":"","code":"ui_filter_manager_panel(id) srv_filter_manager_panel(id, slices_global) ui_filter_manager(id) srv_filter_manager(id, slices_global) srv_module_filter_manager(id, module_fd, slices_global)"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_filter_manager.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage multiple FilteredData objects — module_filter_manager","text":"id (character(1)) shiny module instance id. slices_global (reactiveVal) containing teal_slices. module_fd (FilteredData) Object containing data filtered single teal module.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_filter_manager.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Manage multiple FilteredData objects — module_filter_manager","text":"Module returns slices_global (reactiveVal) containing teal_slices object mapping.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_filter_manager.html","id":"slices-global","dir":"Reference","previous_headings":"","what":"Slices global","title":"Manage multiple FilteredData objects — module_filter_manager","text":"key role maintaining module-specific filter states played .slicesGlobal object. reference class holds following fields: all_slices (reactiveVal) - reactive value containing filters registered app. module_slices_api (reactiveValues) - reactive field containing references modules' FilteredData object methods. moment used srv_filter_manager display filter states table combining informations all_slices FilteredData$get_available_teal_slices(). session new filters added all_slices unless module_snapshot_manager used restore previous state. Filters all_slices can activated deactivated module linked (ways) attr(, \"mapping\") : module's filter added removed FilteredData object, information passed SlicesGlobal updates attr(, \"mapping\") accordingly. mapping changes SlicesGlobal, filters set removed module's FilteredData.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_filter_manager.html","id":"filter-manager","dir":"Reference","previous_headings":"","what":"Filter manager","title":"Manage multiple FilteredData objects — module_filter_manager","text":"Filter-manager split two parts: ui/srv_filter_manager_panel - Called whole app. module observes changes filters slices_global displays table utilizing information mapping: (TRUE) - filter active module (FALSE) - filter inactive module (NA) - filter available module ui/srv_module_filter_manager - Called teal_module. Handling filter states single module keeping module FilteredData consistent slices_global, local filters always reflected slices_global mapping vice versa.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_init_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Data Module for teal — module_init_data","title":"Data Module for teal — module_init_data","text":"module manages data argument srv_teal. teal framework uses teal_data(), can provided various ways: Directly teal.data::teal_data() object. automatically convert reactive teal_data. reactive object returns teal.data::teal_data() object.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_init_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data Module for teal — module_init_data","text":"","code":"ui_init_data(id) srv_init_data(id, data)"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_init_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data Module for teal — module_init_data","text":"id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. data (teal_data, teal_data_module, reactive returning teal_data) data application depend .","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_init_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Data Module for teal — module_init_data","text":"reactive object returns: Output data. data fails returned error handled (tryCatch()) rest application can respond respectively.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/module_init_data.html","id":"reactive-teal-data-","dir":"Reference","previous_headings":"","what":"Reactive teal_data:","title":"Data Module for teal — module_init_data","text":"data application can reactively updated, prompting srv_teal() rebuild content accordingly. two methods creating interactive teal_data: Using reactive object provided outside teal application. scenario, reactivity controlled external module, srv_teal responds changes. Using teal_data_module(), embedded within teal application, allowing data resubmitted user needed. Since server teal_data_module() must return reactive teal_data object, methods (1 2) produce reactive behavior within teal application. distinction lies data control: first method involves external control, second method involves control custom module within app. details, see module_teal_data.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_labels.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve labels from teal_modules — module_labels","title":"Retrieve labels from teal_modules — module_labels","text":"Retrieve labels teal_modules","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_labels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve labels from teal_modules — module_labels","text":"","code":"module_labels(modules)"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_labels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve labels from teal_modules — module_labels","text":"modules (teal_modules)","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_labels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve labels from teal_modules — module_labels","text":"list containing labels modules. modules nested, function returns nested list labels.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_management.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract/Remove module(s) of specific class — extract_module","title":"Extract/Remove module(s) of specific class — extract_module","text":"Given teal_module teal_modules, return elements structure according class.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_management.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract/Remove module(s) of specific class — extract_module","text":"","code":"extract_module(modules, class) drop_module(modules, class)"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_management.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract/Remove module(s) of specific class — extract_module","text":"modules (teal_modules) class class name teal_module extracted dropped.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_management.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract/Remove module(s) of specific class — extract_module","text":"extract_module, teal_module class class teal_modules containing modules class class. drop_module, opposite, teal_modules class class. teal_modules","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_snapshot_manager.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter state snapshot management — module_snapshot_manager","title":"Filter state snapshot management — module_snapshot_manager","text":"Capture restore snapshots global (app) filter state.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_snapshot_manager.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter state snapshot management — module_snapshot_manager","text":"","code":"ui_snapshot_manager_panel(id) srv_snapshot_manager_panel(id, slices_global) ui_snapshot_manager(id) srv_snapshot_manager(id, slices_global)"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_snapshot_manager.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter state snapshot management — module_snapshot_manager","text":"id (character(1)) shiny module instance id. slices_global (reactiveVal) contains teal_slices object containing teal_slices existing app, active inactive.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_snapshot_manager.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter state snapshot management — module_snapshot_manager","text":"list containing snapshot history, element unlisted teal_slices object.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_snapshot_manager.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Filter state snapshot management — module_snapshot_manager","text":"module introduces snapshots: stored descriptions filter state entire application. Snapshots allow user save current filter state application later use session, well save file order share app developer users, turn can upload session. snapshot manager accessed camera icon tabset bar. beginning session presents three icons: camera, upload, circular arrow. Clicking camera captures snapshot, clicking upload adds snapshot file applies filter states therein, clicking arrow resets initial application state. snapshots added, show rows table select button save button.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_snapshot_manager.html","id":"server-logic","dir":"Reference","previous_headings":"","what":"Server logic","title":"Filter state snapshot management — module_snapshot_manager","text":"Snapshots basically teal_slices objects, however, since module served separate instance FilteredData objects require shared state, teal_slice reactiveVal teal_slices stored . Therefore, teal_slices reversibly converted list lists representation (attributes maintained). Snapshots stored reactiveVal named list. first snapshot initial state application user can add snapshot whenever see fit. every snapshot except initial one, piece UI generated contains snapshot name, select button restore snapshot, save button save file. initial snapshot restored separate \"reset\" button. saved directly user welcome capture initial state snapshot save .","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_snapshot_manager.html","id":"snapshot-mechanics","dir":"Reference","previous_headings":"","what":"Snapshot mechanics","title":"Filter state snapshot management — module_snapshot_manager","text":"snapshot captured, user prompted name . Names displayed since used create button ids, hood converted syntactically valid strings. New snapshot names validated valid versions unique. Leading trailing white space trimmed. module can read global state application slices_global mapping_matrix. former provides list existing teal_slices latter says slice active module. name accepted, slices_global converted list lists - snapshot. snapshot contains mapping attribute initial application state (one restored), may reflect current one, mapping_matrix transformed obtain current mapping, .e. list , passed mapping argument teal_slices(), result current mapping. substituted snapshot's mapping attribute snapshot added snapshot list. restore app state, snapshot retrieved storage rebuilt teal_slices object. state FilteredData objects (provided datasets) cleared set anew according mapping attribute snapshot. snapshot set current content slices_global. save snapshot, snapshot retrieved reassembled just like restoring, saved file slices_store(). snapshot uploaded, first added storage just like newly created one, used restore app state much like snapshot taken storage. Upon clicking upload icon user prompted file upload may choose name new snapshot. name defaults name file (extension dropped) normal naming rules apply. Loading file yields teal_slices object, disassembled storage used directly restoring app state.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_snapshot_manager.html","id":"transferring-snapshots","dir":"Reference","previous_headings":"","what":"Transferring snapshots","title":"Filter state snapshot management — module_snapshot_manager","text":"Snapshots uploaded disk used application come , .e. application uses data modules. ensure case, init stamps teal_slices app id stored app_id attribute teal_slices object. snapshot restored file, app_id compared current app state match snapshot admitted session.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_snapshot_manager.html","id":"bookmarks","dir":"Reference","previous_headings":"","what":"Bookmarks","title":"Filter state snapshot management — module_snapshot_manager","text":"onBookmark callback creates snapshot current filter state. done app session, module session. (snapshot retrieved module_teal order set initial app state restored app.) snapshot, previous snapshot history dumped values.rds file .","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_snapshot_manager.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Filter state snapshot management — module_snapshot_manager","text":"Aleksander Chlebowski","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal.html","id":null,"dir":"Reference","previous_headings":"","what":"teal main module — module_teal","title":"teal main module — module_teal","text":"Module create teal app. module can called directly instead init() included custom application. Please note init() adds reporter_previewer_module automatically, case calling ui/srv_teal directly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal main module — module_teal","text":"","code":"ui_teal( id, modules, title = build_app_title(), header = tags$p(), footer = tags$p() ) srv_teal(id, data, modules, filter = teal_slices())"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal main module — module_teal","text":"id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details. title (shiny.tag character(1)) Optionally, browser window title. Defaults title \"teal app\" icon NEST. Can created using build_app_title() passing valid shiny.tag head tag title link tag. header (shiny.tag character(1)) Optionally, header app. footer (shiny.tag character(1)) Optionally, footer app. data (teal_data, teal_data_module, reactive returning teal_data) data application depend . filter (teal_slices) Optionally, specifies initial filter using teal_slices().","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal main module — module_teal","text":"NULL invisibly","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal main module — module_teal","text":"Module responsible creating main shiny app layout initializing necessary components. module establishes reactive connection input data every component app. Reactive change data passed argument, reloads app possibly keeps input settings user can continue one left .","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal.html","id":"data-flow-in-teal-application","dir":"Reference","previous_headings":"","what":"data flow in teal application","title":"teal main module — module_teal","text":"module supports multiple data inputs eventually, converted reactive returning teal_data module. reactive teal_data object several actions performed: data loading module_init_data data filtering module_filter_data data transformation module_transform_data","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal.html","id":"fallback-on-failure","dir":"Reference","previous_headings":"","what":"Fallback on failure","title":"teal main module — module_teal","text":"teal designed way app never crash error introduced custom shiny module provided app developer (e.g. teal_data_module(), teal_transform_module()). module returns failing object, app halt evaluation display warning message. App user always chance fix improper input continue without restarting session.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Execute and validate teal_data_module — module_teal_data","title":"Execute and validate teal_data_module — module_teal_data","text":"low level module handle teal_data_module execution validation. teal_transform_module() inherits teal_data_module() handled module . srv_teal() accepts various data objects eventually transformed reactive teal_data() standard data class whole teal framework.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Execute and validate teal_data_module — module_teal_data","text":"","code":"ui_teal_data(id, data_module = function(id) NULL) srv_teal_data( id, data_module = function(id) NULL, modules = NULL, validate_shiny_silent_error = TRUE, is_transformer_failed = reactiveValues() ) ui_validate_reactive_teal_data(id) srv_validate_reactive_teal_data( id, data, modules = NULL, validate_shiny_silent_error = FALSE, hide_validation_error = reactive(FALSE) )"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Execute and validate teal_data_module — module_teal_data","text":"id (character(1)) Module id data_module (teal_data_module) modules (teal_modules teal_module) datanames validation purpose validate_shiny_silent_error (logical) TRUE, shiny.silent.error validated is_transformer_failed (reactiveValues) contains logical flags named transformer. Help determine previous transformer failed, following transformers can disabled display generic failure message. data (reactive teal_data)","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Execute and validate teal_data_module — module_teal_data","text":"reactive teal_data","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_data.html","id":"data-validation","dir":"Reference","previous_headings":"","what":"data validation","title":"Execute and validate teal_data_module — module_teal_data","text":"Executed teal_data_module() validated output validated consistency. Output data invalid : teal_data_module() invalid server return reactive. Immediately crashes app! reactive throws shiny.error - happens module creating teal_data() fails. reactive returns qenv.error - happens teal_data() evaluates failing code. reactive object return teal_data(). teal_data() object lacks datanames specified modules argument. teal (observers srv_teal) always waits render app reactive teal_data returned. error 2-4 occurs, relevant error message displayed app user. issue resolved, app continue run. teal guarantees errors data crash app (except error 1).","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_lockfile.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","title":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","text":"Generate lockfile application's environment reproducibility","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_lockfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","text":"","code":"ui_teal_lockfile(id) srv_teal_lockfile(id) .teal_lockfile_process_invoke(lockfile_path) .renv_snapshot(lockfile_path) .is_lockfile_deps_installed() .is_disabled_lockfile_scenario()"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_lockfile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","text":"lockfile_path (character) path lockfile.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_lockfile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","text":"NULL","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_lockfile.html","id":"different-ways-of-creating-lockfile","dir":"Reference","previous_headings":"","what":"Different ways of creating lockfile","title":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","text":"teal leverages renv::snapshot(), offers multiple methods lockfile creation. Working directory lockfile: teal, default, create implicit type lockfile uses renv::dependencies() detect R packages current project's working directory. DESCRIPTION-based lockfile: generate lockfile based DESCRIPTION file working directory, set renv::settings$snapshot.type(\"explicit\"). naming convention type follows renv::snapshot(). \"explicit\" type, refer renv::settings$package.dependency.fields() DESCRIPTION fields included lockfile. Custom files-based lockfile: specify custom files basis lockfile, set renv::settings$snapshot.type(\"custom\") configure renv.snapshot.filter option.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_lockfile.html","id":"lockfile-usage","dir":"Reference","previous_headings":"","what":"lockfile usage","title":"Generate lockfile for application's environment reproducibility — module_teal_lockfile","text":"creating lockfile, can restore application's environment using renv::restore().","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_module.html","id":null,"dir":"Reference","previous_headings":"","what":"Calls all modules — module_teal_module","title":"Calls all modules — module_teal_module","text":"UI side teal_modules translated tabsetPanel teal_module tabPanel. , UI server called recursively tab separate module reflect nested structure modules argument.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calls all modules — module_teal_module","text":"","code":"ui_teal_module(id, modules, depth = 0L) # Default S3 method ui_teal_module(id, modules, depth = 0L) # S3 method for class 'teal_modules' ui_teal_module(id, modules, depth = 0L) # S3 method for class 'teal_module' ui_teal_module(id, modules, depth = 0L) srv_teal_module( id, data_rv, modules, datasets = NULL, slices_global, reporter = teal.reporter::Reporter$new(), data_load_status = reactive(\"ok\"), is_active = reactive(TRUE) ) # Default S3 method srv_teal_module( id, data_rv, modules, datasets = NULL, slices_global, reporter = teal.reporter::Reporter$new(), data_load_status = reactive(\"ok\"), is_active = reactive(TRUE) ) # S3 method for class 'teal_modules' srv_teal_module( id, data_rv, modules, datasets = NULL, slices_global, reporter = teal.reporter::Reporter$new(), data_load_status = reactive(\"ok\"), is_active = reactive(TRUE) ) # S3 method for class 'teal_module' srv_teal_module( id, data_rv, modules, datasets = NULL, slices_global, reporter = teal.reporter::Reporter$new(), data_load_status = reactive(\"ok\"), is_active = reactive(TRUE) )"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calls all modules — module_teal_module","text":"id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details. depth (integer(1)) number helps determine depth modules nesting. data_rv (reactive returning teal_data) datasets (reactive returning FilteredData NULL) datasets passed parent module (srv_teal) dataset singleton implies filter-panel \"global\". NULL filter-panel \"module-specific\". slices_global (reactiveVal returning modules_teal_slices) see module_filter_manager data_load_status (reactive returning character) Determines action dependent data loading status: \"ok\" teal_data returned data loading. \"teal_data_module failed\" teal_data_module() return teal_data. Disables tabs buttons. \"external failed\" reactive passed srv_teal(data) return teal_data. Hides whole tab panel.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_module.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calls all modules — module_teal_module","text":"output currently active module. srv_teal_module.teal_module returns reactiveVal containing output called module. srv_teal_module.teal_modules returns output module selected input$active_tab.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_with_splash.html","id":null,"dir":"Reference","previous_headings":"","what":"UI and server modules of teal — module_teal_with_splash","title":"UI and server modules of teal — module_teal_with_splash","text":"Please use module_teal instead.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_with_splash.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"UI and server modules of teal — module_teal_with_splash","text":"","code":"ui_teal_with_splash( id, data, title = build_app_title(), header = tags$p(), footer = tags$p() ) srv_teal_with_splash(id, data, modules, filter = teal_slices())"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_with_splash.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"UI and server modules of teal — module_teal_with_splash","text":"id (character) Optionally, string specifying shiny module id cases used shiny module rather standalone shiny app. legacy feature. data (teal_data, teal_data_module, reactive returning teal_data) data application depend . title (shiny.tag character(1)) Optionally, browser window title. Defaults title \"teal app\" icon NEST. Can created using build_app_title() passing valid shiny.tag head tag title link tag. header (shiny.tag character(1)) Optionally, header app. footer (shiny.tag character(1)) Optionally, footer app. modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details. filter (teal_slices) Optionally, specifies initial filter using teal_slices().","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_teal_with_splash.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"UI and server modules of teal — module_teal_with_splash","text":"Returns reactive expression containing teal_data object data loaded NULL .","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_transform_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Module to transform reactive teal_data — module_transform_data","title":"Module to transform reactive teal_data — module_transform_data","text":"Module calls multiple module_teal_data sequence reactive teal_data output one module handed following module's input.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_transform_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Module to transform reactive teal_data — module_transform_data","text":"","code":"ui_transform_data(id, transformers = list(), class = \"well\") srv_transform_data( id, data, transformers = list(), modules, is_transformer_failed = reactiveValues() )"},{"path":"https://insightsengineering.github.io/teal/main/reference/module_transform_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Module to transform reactive teal_data — module_transform_data","text":"id (character(1)) Module id transformers (list teal_data_module) applied transform data. transform module UI appear teal's sidebar panel. Transformers' datanames added datanames. See teal_transform_module(). data (reactive teal_data) modules (teal_modules teal_module) datanames validation purpose is_transformer_failed (reactiveValues) contains logical flags named transformer. Help determine previous transformer failed, following transformers can disabled display generic failure message.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/module_transform_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Module to transform reactive teal_data — module_transform_data","text":"reactive teal_data","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/modules_bookmarkable.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve teal_bookmarkable attribute from teal_modules — modules_bookmarkable","title":"Retrieve teal_bookmarkable attribute from teal_modules — modules_bookmarkable","text":"Retrieve teal_bookmarkable attribute teal_modules","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/modules_bookmarkable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve teal_bookmarkable attribute from teal_modules — modules_bookmarkable","text":"","code":"modules_bookmarkable(modules)"},{"path":"https://insightsengineering.github.io/teal/main/reference/modules_bookmarkable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve teal_bookmarkable attribute from teal_modules — modules_bookmarkable","text":"modules (teal_modules teal_module) object","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/modules_bookmarkable.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve teal_bookmarkable attribute from teal_modules — modules_bookmarkable","text":"named list structure modules TRUE FALSE values indicating whether module bookmarkable.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/modules_depth.html","id":null,"dir":"Reference","previous_headings":"","what":"Get module depth — modules_depth","title":"Get module depth — modules_depth","text":"Depth starts 0, single teal.module depth 0. Nesting increases overall depth 1.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/modules_depth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get module depth — modules_depth","text":"","code":"modules_depth(modules, depth = 0L)"},{"path":"https://insightsengineering.github.io/teal/main/reference/modules_depth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get module depth — modules_depth","text":"modules (list teal_modules teal_module) Nested list teal_modules teal_module objects single teal_modules teal_module object. specific output modules displayed teal application. See modules() module() details. depth optional integer determining current depth level","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/modules_depth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get module depth — modules_depth","text":"Depth level given module.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/report_card_template.html","id":null,"dir":"Reference","previous_headings":"","what":"Template function for TealReportCard creation and customization — report_card_template","title":"Template function for TealReportCard creation and customization — report_card_template","text":"function generates report card title, optional description, option append filter state list.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/report_card_template.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Template function for TealReportCard creation and customization — report_card_template","text":"","code":"report_card_template( title, label, description = NULL, with_filter, filter_panel_api )"},{"path":"https://insightsengineering.github.io/teal/main/reference/report_card_template.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Template function for TealReportCard creation and customization — report_card_template","text":"title (character(1)) title card (unless overwritten label) label (character(1)) label provided user adding card description (character(1)) optional, additional description with_filter (logical(1)) flag indicating add filter state filter_panel_api (FilterPanelAPI) object API allows generation filter state report","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/report_card_template.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Template function for TealReportCard creation and customization — report_card_template","text":"(TealReportCard) populated title, description filter state.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/reporter_previewer_module.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a teal module for previewing a report — reporter_previewer_module","title":"Create a teal module for previewing a report — reporter_previewer_module","text":"function wraps teal.reporter::reporter_previewer_ui() teal.reporter::reporter_previewer_srv() teal_module used teal applications. creating teal application using init() module added application automatically teal_modules support report generation.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/reporter_previewer_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a teal module for previewing a report — reporter_previewer_module","text":"","code":"reporter_previewer_module(label = \"Report previewer\", server_args = list())"},{"path":"https://insightsengineering.github.io/teal/main/reference/reporter_previewer_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a teal module for previewing a report — reporter_previewer_module","text":"label (character(1)) Label shown navigation item module module group. modules() defaults \"root\". See Details. server_args (named list) Arguments passed teal.reporter::reporter_previewer_srv().","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/reporter_previewer_module.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a teal module for previewing a report — reporter_previewer_module","text":"teal_module (extended teal_module_previewer class) containing teal.reporter previewer functionality.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/restoreValue.html","id":null,"dir":"Reference","previous_headings":"","what":"Restore value from bookmark. — restoreValue","title":"Restore value from bookmark. — restoreValue","text":"Get value bookmark return default.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/restoreValue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Restore value from bookmark. — restoreValue","text":"","code":"restoreValue(value, default)"},{"path":"https://insightsengineering.github.io/teal/main/reference/restoreValue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Restore value from bookmark. — restoreValue","text":"value (character(1)) name value restore default fallback value","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/restoreValue.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Restore value from bookmark. — restoreValue","text":"application restored server-side bookmark, variable specified value values environment. Otherwise default.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/restoreValue.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Restore value from bookmark. — restoreValue","text":"Bookmarks can store inputs also arbitrary values. values stored onBookmark callbacks restored onBookmarked callbacks, placed values environment session$restoreContext field. Using teal_data_module makes impossible run callbacks app becomes ready modules execute callbacks registered. cases stored values can still recovered session object directly. Note variable names values environment prefixed module name space names, therefore, using function modules, value must run name space function.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/run_js_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Run JS file from /inst/js/ package directory — run_js_files","title":"Run JS file from /inst/js/ package directory — run_js_files","text":"triggered server execute client rather triggered directly client. Unlike include_js_files includes JavaScript functions, run_js actually executes JavaScript functions.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/run_js_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run JS file from /inst/js/ package directory — run_js_files","text":"","code":"run_js_files(files)"},{"path":"https://insightsengineering.github.io/teal/main/reference/run_js_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run JS file from /inst/js/ package directory — run_js_files","text":"files (character) vector filenames.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/run_js_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run JS file from /inst/js/ package directory — run_js_files","text":"NULL, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/run_js_files.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run JS file from /inst/js/ package directory — run_js_files","text":"system.file used access files packages, work devtools. Therefore, redefine method package needed. Thus, export method.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/show_rcode_modal.html","id":null,"dir":"Reference","previous_headings":"","what":"Show R code modal — show_rcode_modal","title":"Show R code modal — show_rcode_modal","text":"Use shiny::showModal() function show R code inside.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/show_rcode_modal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show R code modal — show_rcode_modal","text":"","code":"show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())"},{"path":"https://insightsengineering.github.io/teal/main/reference/show_rcode_modal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show R code modal — show_rcode_modal","text":"title (character(1)) Title modal, displayed first comment R code. rcode (character) vector R code show inside modal. session (ShinySession) optional shiny session object, defaults shiny::getDefaultReactiveDomain().","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/show_rcode_modal.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Show R code modal — show_rcode_modal","text":"shiny::showModal()","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/slices_store.html","id":null,"dir":"Reference","previous_headings":"","what":"Store and restore teal_slices object — slices_store","title":"Store and restore teal_slices object — slices_store","text":"Functions write teal_slices object file JSON format, also restore object disk.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/slices_store.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Store and restore teal_slices object — slices_store","text":"","code":"slices_store(tss, file) slices_restore(file)"},{"path":"https://insightsengineering.github.io/teal/main/reference/slices_store.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Store and restore teal_slices object — slices_store","text":"tss (teal_slices) object stored. file (character(1)) file path teal_slices object saved restored. file extension \".json\".","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/slices_store.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Store and restore teal_slices object — slices_store","text":"slices_store returns NULL, invisibly. slices_restore returns teal_slices object restored file.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/slices_store.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Store and restore teal_slices object — slices_store","text":"Date date time objects stored following formats: Date class converted \"ISO8601\" standard (YYYY-MM-DD). POSIX*t classes converted character using format.POSIX*t(usetz = TRUE, tz = \"UTC\") (YYYY-MM-DD HH:MM:SS UTC, UTC Coordinated Universal Time timezone short-code). format assumed slices_restore. POSIX*t objects selected choices fields teal_slice objects always printed UTC timezone well.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/tdata.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a tdata object — tdata","title":"Create a tdata object — tdata","text":"Recent changes teal cause modules fail modules expect tdata object passed data argument instead receive teal_data object, additionally wrapped reactive expression server functions. order easily adapt modules without proper refactor, use function downgrade data argument.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/tdata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a tdata object — tdata","text":"","code":"new_tdata(...) tdata2env(...) get_code_tdata(...) # S3 method for class 'tdata' join_keys(...) get_metadata(...) as_tdata(...)"},{"path":"https://insightsengineering.github.io/teal/main/reference/tdata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a tdata object — tdata","text":"... ignored","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/tdata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a tdata object — tdata","text":"nothing","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal-package.html","id":null,"dir":"Reference","previous_headings":"","what":"teal: Interactive exploration of clinical trials data — teal-package","title":"teal: Interactive exploration of clinical trials data — teal-package","text":"teal package provides shiny based framework creating interactive data analysis environment.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal: Interactive exploration of clinical trials data — teal-package","text":"learn mode package, visit project website read init() manual page.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/teal-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"teal: Interactive exploration of clinical trials data — teal-package","text":"Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID) Authors: Pawel Rucki pawel.rucki@roche.com Aleksander Chlebowski aleksander.chlebowski@contractors.roche.com (ORCID) Andre Verissimo andre.verissimo@roche.com (ORCID) Kartikeya Kirar kartikeya.kirar@businesspartner.roche.com Vedha Viyash vedha.viyash@roche.com Marcin Kosinski marcin.kosinski.mk1@roche.com Adrian Waddell adrian.waddell@gene.com Nikolas Burkoff Mahmoud Hallal Maciej Nasinski Konrad Pagacz Junlue Zhao Tadeusz Lewandowski contributors: Chendi Liao chendi.liao@roche.com [reviewer] Dony Unardi unardid@gene.com [reviewer] F. Hoffmann-La Roche AG [copyright holder, funder] Maximilian Mordig [contributor]","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_module.html","id":null,"dir":"Reference","previous_headings":"","what":"Data module for teal applications — teal_data_module","title":"Data module for teal applications — teal_data_module","text":"Create teal_data_module object evaluate code history tracking.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data module for teal applications — teal_data_module","text":"","code":"teal_data_module(ui, server, label = \"data module\", once = TRUE) # S4 method for class 'teal_data_module,character' eval_code(object, code) # S3 method for class 'teal_data_module' within(data, expr, ...)"},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data module for teal applications — teal_data_module","text":"ui (function(id)) shiny module UI function; must take id argument server (function(id)) shiny module server function; must take id argument; must return reactive expression containing teal_data object label (character(1)) Label module. (logical(1)) TRUE, data module shown disappear successful data loading. App user longer able interact module anymore. FALSE, data module can reused multiple times. App user able interact change data output module multiple times. object (teal_data_module) code (character language) code evaluate. character, comments retained. data (teal_data_module) object expr (expression) evaluate. Must inline code. See ... See Details.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_module.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Data module for teal applications — teal_data_module","text":"teal_data_module returns list class teal_data_module containing two elements, ui server provided via arguments. eval_code returns teal_data_module object delayed evaluation code module run. within returns teal_data_module object delayed evaluation expr module run.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_module.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data module for teal applications — teal_data_module","text":"teal_data_module creates shiny module interactively supply modify data teal application. module allows running code (creation modification) app starts reloads. body server function run app rather global environment. means run every time app starts, use sparingly. Pass module instead teal_data object call init(). Note server function must always return teal_data object wrapped reactive expression. See vignette vignette(\"data--shiny-module\", package = \"teal\") details. eval_code evaluates given code environment teal_data object created teal_data_module. code added @code slot teal_data. within convenience function evaluating inline code inside environment teal_data_module. accepts inline expressions (simple compound) allows injecting values expr ... argument: name:value pairs passed ..., name expr replaced value.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_module.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data module for teal applications — teal_data_module","text":"","code":"tdm <- teal_data_module( ui = function(id) { ns <- NS(id) actionButton(ns(\"submit\"), label = \"Load data\") }, server = function(id) { moduleServer(id, function(input, output, session) { eventReactive(input$submit, { data <- within( teal_data(), { dataset1 <- iris dataset2 <- mtcars } ) datanames(data) <- c(\"dataset1\", \"dataset2\") data }) }) } ) eval_code(tdm, \"dataset1 <- subset(dataset1, Species == 'virginica')\") #> $ui #> function(id) { #> ns <- NS(id) #> object$ui(ns(\"mutate_inner\")) #> } #> #> #> $server #> function(id) { #> data_out <- server(id) #> decorate_err_msg( #> assert_reactive(data_out), #> pre = sprintf(\"From: 'teal_data_module()':\\nA 'teal_data_module' with \\\"%s\\\" label:\", label), #> post = \"Please make sure that this module returns a 'reactive` object containing 'teal_data' class of object.\" # nolint: line_length_linter. #> ) #> } #> #> #> attr(,\"label\") #> [1] \"data module\" #> attr(,\"class\") #> [1] \"teal_data_module\" #> attr(,\"once\") #> [1] TRUE within(tdm, dataset1 <- subset(dataset1, Species == \"virginica\")) #> $ui #> function(id) { #> ns <- NS(id) #> object$ui(ns(\"mutate_inner\")) #> } #> #> #> $server #> function(id) { #> data_out <- server(id) #> decorate_err_msg( #> assert_reactive(data_out), #> pre = sprintf(\"From: 'teal_data_module()':\\nA 'teal_data_module' with \\\"%s\\\" label:\", label), #> post = \"Please make sure that this module returns a 'reactive` object containing 'teal_data' class of object.\" # nolint: line_length_linter. #> ) #> } #> #> #> attr(,\"label\") #> [1] \"data module\" #> attr(,\"class\") #> [1] \"teal_data_module\" #> attr(,\"once\") #> [1] TRUE # use additional parameter for expression value substitution. valid_species <- \"versicolor\" within(tdm, dataset1 <- subset(dataset1, Species %in% species), species = valid_species) #> $ui #> function(id) { #> ns <- NS(id) #> object$ui(ns(\"mutate_inner\")) #> } #> #> #> $server #> function(id) { #> data_out <- server(id) #> decorate_err_msg( #> assert_reactive(data_out), #> pre = sprintf(\"From: 'teal_data_module()':\\nA 'teal_data_module' with \\\"%s\\\" label:\", label), #> post = \"Please make sure that this module returns a 'reactive` object containing 'teal_data' class of object.\" # nolint: line_length_linter. #> ) #> } #> #> #> attr(,\"label\") #> [1] \"data module\" #> attr(,\"class\") #> [1] \"teal_data_module\" #> attr(,\"once\") #> [1] TRUE"},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_to_filtered_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a FilteredData — teal_data_to_filtered_data","title":"Create a FilteredData — teal_data_to_filtered_data","text":"Create FilteredData object teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_to_filtered_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a FilteredData — teal_data_to_filtered_data","text":"","code":"teal_data_to_filtered_data(x, datanames = ls(teal.code::get_env(x)))"},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_to_filtered_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a FilteredData — teal_data_to_filtered_data","text":"x (teal_data) object datanames (character) vector data set names include; must subset datanames(x)","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_to_filtered_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a FilteredData — teal_data_to_filtered_data","text":"FilteredData object.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_utilities.html","id":null,"dir":"Reference","previous_headings":"","what":"teal_data utils — teal_data_utilities","title":"teal_data utils — teal_data_utilities","text":"teal need recreate teal_data object due two operations: need append filter-data code objects evaluated FilteredData want avoid double-evaluation. need subset teal_data datanames used module, shorten obtainable R-code","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_utilities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"teal_data utils — teal_data_utilities","text":"","code":".append_evaluated_code(data, code) .append_modified_data(data, objects) .subset_teal_data(data, datanames)"},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_utilities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"teal_data utils — teal_data_utilities","text":"data (teal_data) code (character) code append data@code objects (list) objects append data@env datanames (character) names datasets","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_utilities.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"teal_data utils — teal_data_utilities","text":"modified teal_data","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_data_utilities.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"teal_data utils — teal_data_utilities","text":"Due recreation teal_data object done simply using public teal.code teal.data methods.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_modules.html","id":null,"dir":"Reference","previous_headings":"","what":"Create teal_module and teal_modules objects — teal_modules","title":"Create teal_module and teal_modules objects — teal_modules","text":"Create nested tab structure embed modules teal application.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_modules.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create teal_module and teal_modules objects — teal_modules","text":"","code":"module( label = \"module\", server = function(id, data, ...) moduleServer(id, function(input, output, session) NULL), ui = function(id, ...) tags$p(paste0(\"This module has no UI (id: \", id, \" )\")), filters, datanames = \"all\", server_args = NULL, ui_args = NULL, transformers = list() ) modules(..., label = \"root\") # S3 method for class 'teal_module' format(x, indent = 0, ...) # S3 method for class 'teal_module' print(x, ...) # S3 method for class 'teal_modules' format(x, indent = 0, ...) set_datanames(modules, datanames) # S3 method for class 'teal_modules' print(x, ...)"},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_modules.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create teal_module and teal_modules objects — teal_modules","text":"label (character(1)) Label shown navigation item module module group. modules() defaults \"root\". See Details. server (function) shiny module following arguments: id - teal set proper shiny namespace module (see shiny::moduleServer()). input, output, session - (optional; recommended) provided, shiny::callModule() used call module. shiny 1.5.0, recommended way use shiny::moduleServer() instead require arguments. data (optional) provided, module called teal_data object (.e. list reactive (filtered) data specified filters argument) value argument. datasets (optional) provided, module called FilteredData object value argument. (See teal.slice::FilteredData). reporter (optional) provided, module called Reporter object value argument. (See teal.reporter::Reporter). filter_panel_api (optional) provided, module called FilterPanelAPI object value argument. (See teal.slice::FilterPanelAPI). ... (optional) provided, server_args elements passed module named argument .... ui (function) shiny UI module function following arguments: id - teal set proper shiny namespace module. ... (optional) provided, ui_args elements passed module named argument .... filters (character) Deprecated. Use datanames instead. datanames (character) Names datasets relevant item. 2 reserved values specific behaviors: keyword \"\" includes datasets available data passed teal application. NULL hides sidebar panel completely. transformers specified, datanames automatically added datanames argument. server_args (named list) additional arguments passed server function. ui_args (named list) additional arguments passed UI function. transformers (list teal_data_module) applied transform data. transform module UI appear teal's sidebar panel. Transformers' datanames added datanames. See teal_transform_module(). ... modules(): (teal_module teal_modules) Objects wrap tab. format() print(): Arguments passed methods. x (teal_module teal_modules) Object format/print. indent (integer(1)) Indention level; nested element indented one level . modules (teal_module teal_modules)","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_modules.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create teal_module and teal_modules objects — teal_modules","text":"module() returns object class teal_module. modules() returns teal_modules object contains following fields: label: taken label argument. children: list containing objects passed .... List elements named label attribute converted valid shiny id.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_modules.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create teal_module and teal_modules objects — teal_modules","text":"module() creates instance teal_module can placed teal application. modules() shapes structure application organizing teal_module within navigation panel. wraps teal_module teal_modules objects teal_modules object, results nested structure corresponding nested tabs final application. Note modules() label comes ..., must passed named argument, otherwise captured .... labels \"global_filters\" \"Report previewer\" reserved used mapping argument teal_slices() report previewer module reporter_previewer_module(), respectively.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_modules.html","id":"restricting-datasets-used-by-teal-module-","dir":"Reference","previous_headings":"","what":"Restricting datasets used by teal_module:","title":"Create teal_module and teal_modules objects — teal_modules","text":"datanames argument controls datasets used module’s server. datasets, passed via server's data argument, ones shown module's tab. datanames set \"\", datasets data object treated relevant. However, may include unnecessary datasets, : Proxy variables column modifications Temporary datasets used create final versions Connection objects exclude irrelevant datasets, use set_datanames() function change datanames \"\" specific names. Trying modify non-\"\" values set_datanames() result warning. Datasets names starting . ignored globally unless explicitly listed datanames.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_modules.html","id":"datanames-with-transformers","dir":"Reference","previous_headings":"","what":"datanames with transformers","title":"Create teal_module and teal_modules objects — teal_modules","text":"transformers specified, datanames added module’s datanames, changes behavior follows: module(datanames) NULL transformers defined datanames, sidebar appear showing transformers' datasets, instead hidden. module(datanames) set specific values transformer datanames = \"\", module may receive extra datasets unnecessary","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_modules.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create teal_module and teal_modules objects — teal_modules","text":"","code":"library(shiny) module_1 <- module( label = \"a module\", server = function(id, data) { moduleServer( id, module = function(input, output, session) { output$data <- renderDataTable(data()[[\"iris\"]]) } ) }, ui = function(id) { ns <- NS(id) tagList(dataTableOutput(ns(\"data\"))) }, datanames = \"all\" ) module_2 <- module( label = \"another module\", server = function(id) { moduleServer( id, module = function(input, output, session) { output$text <- renderText(\"Another Module\") } ) }, ui = function(id) { ns <- NS(id) tagList(textOutput(ns(\"text\"))) }, datanames = NULL ) modules <- modules( label = \"modules\", modules( label = \"nested modules\", module_1 ), module_2 ) app <- init( data = teal_data(iris = iris), modules = modules ) if (interactive()) { shinyApp(app$ui, app$server) } # change the module's datanames set_datanames(module(datanames = \"all\"), \"a\") #> + module # change modules' datanames set_datanames( modules( module(datanames = \"all\"), module(datanames = \"a\") ), \"b\" ) #> Warning: Not possible to modify datanames of the module module. set_datanames() can only change datanames if it was set to \"all\". #> + root #> + module #> + module"},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_slices.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter settings for teal applications — teal_slices","title":"Filter settings for teal applications — teal_slices","text":"Specify initial filter states filtering settings teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_slices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter settings for teal applications — teal_slices","text":"","code":"teal_slices( ..., exclude_varnames = NULL, include_varnames = NULL, count_type = NULL, allow_add = TRUE, module_specific = FALSE, mapping, app_id = NULL ) as.teal_slices(x) # S3 method for class 'teal_slices' c(...)"},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_slices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter settings for teal applications — teal_slices","text":"... number teal_slice objects. include_varnames, exclude_varnames (named lists character) list names match names data sets vector elements match variable names respective data sets; specify variables allowed filtered; see Details. count_type new feature. kindly share opinions teal.slice's GitHub repository. (character(1)) string specifying observations tallied filter states. Possible options: \"none\" (default) counts single FilterState show unfiltered number . \"\" counts single FilterState show number observation filtered unfiltered dataset. Note, issues reported using option MultiAssayExperiment. Please make sure adding new filters fail target platform deploying production. allow_add (logical(1)) logical flag specifying whether user able add new filters module_specific (logical(1)) optional, FALSE (default) one filter panel applied modules. filters shared modules. TRUE filter panel module-specific. Modules can different set filters specified - see mapping argument. mapping new feature. kindly share opinions teal's GitHub repository. (named list) specifies filters active modules app start. Elements contain character vector teal_slice ids (see teal.slice::teal_slice). Names list correspond teal_module label set module() function. ids listed \"global_filters active modules. missing, filters applied modules. empty list, filters available modules start inactive. module_specific FALSE, global_filters active start. app_id (character(1)) internal use , set manually. Added init teal_slices can matched app used. Used verifying snapshots uploaded file. See snapshot. x (list) lists convert teal_slices","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_slices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter settings for teal applications — teal_slices","text":"teal_slices object.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_slices.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Filter settings for teal applications — teal_slices","text":"Produces teal_slices object. teal_slice components specify filter states active app starts. Attributes (created named arguments) configure way app applies filters. See argument descriptions details.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_slices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Filter settings for teal applications — teal_slices","text":"","code":"filter <- teal_slices( teal_slice(dataname = \"iris\", varname = \"Species\", id = \"species\"), teal_slice(dataname = \"iris\", varname = \"Sepal.Length\", id = \"sepal_length\"), teal_slice( dataname = \"iris\", id = \"long_petals\", title = \"Long petals\", expr = \"Petal.Length > 5\" ), teal_slice(dataname = \"mtcars\", varname = \"mpg\", id = \"mtcars_mpg\"), mapping = list( module1 = c(\"species\", \"sepal_length\"), module2 = c(\"mtcars_mpg\"), global_filters = \"long_petals\" ) ) app <- init( data = teal_data(iris = iris, mtcars = mtcars), modules = list( module(\"module1\"), module(\"module2\") ), filter = filter ) if (interactive()) { shinyApp(app$ui, app$server) }"},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_transform_module.html","id":null,"dir":"Reference","previous_headings":"","what":"Data module for teal transformers. — teal_transform_module","title":"Data module for teal transformers. — teal_transform_module","text":"Create teal_data_module object custom transformation data pre-processing passing data module.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_transform_module.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data module for teal transformers. — teal_transform_module","text":"","code":"teal_transform_module( ui = function(id) NULL, server = function(id, data) data, label = \"transform module\", datanames = character(0) )"},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_transform_module.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data module for teal transformers. — teal_transform_module","text":"ui (function(id)) shiny module UI function; must take id argument server (function(id, data)) shiny module server function; takes id data argument, id module id data reactive teal_data input. server function must return reactive expression containing teal_data object. server function definition use eventReactive may lead unexpected behavior. See vignettes(\"data-transform--shiny-module\") information. label (character(1)) Label module. datanames (character) Names datasets relevant module evaluate. set character(0) module receive modules() datanames.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_transform_module.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data module for teal transformers. — teal_transform_module","text":"teal_transform_module creates teal_data_module object transform data teal application. transformation happens data passed filtering activity teal. transformed data sent server teal_module(). See vignette vignette(\"data-transform--shiny-module\", package = \"teal\") details.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/teal_transform_module.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data module for teal transformers. — teal_transform_module","text":"","code":"my_transformers <- list( teal_transform_module( label = \"Custom transform for iris\", datanames = \"iris\", ui = function(id) { ns <- NS(id) tags$div( numericInput(ns(\"n_rows\"), \"Subset n rows\", value = 6, min = 1, max = 150, step = 1) ) }, server = function(id, data) { moduleServer(id, function(input, output, session) { reactive({ within(data(), { iris <- head(iris, num_rows) }, num_rows = input$n_rows ) }) }) } ) )"},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_app_title_tag.html","id":null,"dir":"Reference","previous_headings":"","what":"Function for validating the title parameter of teal::init — validate_app_title_tag","title":"Function for validating the title parameter of teal::init — validate_app_title_tag","text":"Checks input title teal::init create valid title favicon tag.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_app_title_tag.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function for validating the title parameter of teal::init — validate_app_title_tag","text":"","code":"validate_app_title_tag(shiny_tag)"},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_app_title_tag.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function for validating the title parameter of teal::init — validate_app_title_tag","text":"shiny_tag (shiny.tag) Object validate valid title.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_has_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate that dataset has a minimum number of observations — validate_has_data","text":"","code":"validate_has_data( x, min_nrow = NULL, complete = FALSE, allow_inf = TRUE, msg = NULL )"},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_has_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate that dataset has a minimum number of observations — validate_has_data","text":"x (data.frame) min_nrow (numeric(1)) Minimum allowed number rows x. complete (logical(1)) Flag specifying whether check complete cases. Defaults FALSE. allow_inf (logical(1)) Flag specifying whether allow infinite values. Defaults TRUE. msg (character(1)) Additional message display alongside default message.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_has_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate that dataset has a minimum number of observations — validate_has_data","text":"function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_has_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate that dataset has a minimum number of observations — validate_has_data","text":"","code":"library(teal) ui <- fluidPage( sliderInput(\"len\", \"Max Length of Sepal\", min = 4.3, max = 7.9, value = 5 ), plotOutput(\"plot\") ) server <- function(input, output) { output$plot <- renderPlot({ iris_df <- iris[iris$Sepal.Length <= input$len, ] validate_has_data( iris_df, min_nrow = 10, complete = FALSE, msg = \"Please adjust Max Length of Sepal\" ) hist(iris_df$Sepal.Length, breaks = 5) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_has_elements.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validates that vector has length greater than 0 — validate_has_elements","text":"","code":"validate_has_elements(x, msg)"},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_has_elements.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validates that vector has length greater than 0 — validate_has_elements","text":"x vector msg message display","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_has_elements.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validates that vector has length greater than 0 — validate_has_elements","text":"function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_has_elements.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validates that vector has length greater than 0 — validate_has_elements","text":"","code":"data <- data.frame( id = c(1:10, 11:20, 1:10), strata = rep(c(\"A\", \"B\"), each = 15) ) ui <- fluidPage( selectInput(\"ref1\", \"Select strata1 to compare\", choices = c(\"A\", \"B\", \"C\"), selected = \"A\" ), selectInput(\"ref2\", \"Select strata2 to compare\", choices = c(\"A\", \"B\", \"C\"), selected = \"B\" ), verbatimTextOutput(\"arm_summary\") ) server <- function(input, output) { output$arm_summary <- renderText({ sample_1 <- data$id[data$strata == input$ref1] sample_2 <- data$id[data$strata == input$ref2] validate_has_elements(sample_1, \"No subjects in strata1.\") validate_has_elements(sample_2, \"No subjects in strata2.\") paste0( \"Number of samples in: strata1=\", length(sample_1), \" comparions strata2=\", length(sample_2) ) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_has_variable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validates that dataset contains specific variable — validate_has_variable","text":"","code":"validate_has_variable(data, varname, msg)"},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_has_variable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validates that dataset contains specific variable — validate_has_variable","text":"data (data.frame) varname (character(1)) name variable check data msg (character(1)) message display data include varname","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_has_variable.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validates that dataset contains specific variable — validate_has_variable","text":"function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_has_variable.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validates that dataset contains specific variable — validate_has_variable","text":"","code":"data <- data.frame( one = rep(\"a\", length.out = 20), two = rep(c(\"a\", \"b\"), length.out = 20) ) ui <- fluidPage( selectInput( \"var\", \"Select variable\", choices = c(\"one\", \"two\", \"three\", \"four\"), selected = \"one\" ), verbatimTextOutput(\"summary\") ) server <- function(input, output) { output$summary <- renderText({ validate_has_variable(data, input$var) paste0(\"Selected treatment variables: \", paste(input$var, collapse = \", \")) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_in.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validates that vector includes all expected values — validate_in","text":"","code":"validate_in(x, choices, msg)"},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_in.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validates that vector includes all expected values — validate_in","text":"x Vector values test. choices Vector test . msg (character(1)) Error message display elements x elements choices.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_in.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validates that vector includes all expected values — validate_in","text":"function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_in.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validates that vector includes all expected values — validate_in","text":"","code":"ui <- fluidPage( selectInput( \"species\", \"Select species\", choices = c(\"setosa\", \"versicolor\", \"virginica\", \"unknown species\"), selected = \"setosa\", multiple = FALSE ), verbatimTextOutput(\"summary\") ) server <- function(input, output) { output$summary <- renderPrint({ validate_in(input$species, iris$Species, \"Species does not exist.\") nrow(iris[iris$Species == input$species, ]) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_inputs.html","id":null,"dir":"Reference","previous_headings":"","what":"Send input validation messages to output — validate_inputs","title":"Send input validation messages to output — validate_inputs","text":"Captures messages InputValidator objects collates one message passed validate.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_inputs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Send input validation messages to output — validate_inputs","text":"","code":"validate_inputs(..., header = \"Some inputs require attention\")"},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_inputs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Send input validation messages to output — validate_inputs","text":"... either number InputValidator objects optionally named, possibly nested list InputValidator objects, see Details header (character(1)) generic validation message; set NULL omit","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_inputs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Send input validation messages to output — validate_inputs","text":"Returns NULL final validation call passes shiny.silent.error fails.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_inputs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Send input validation messages to output — validate_inputs","text":"shiny::validate used withhold rendering output element certain conditions met print validation message place output element. shinyvalidate::InputValidator allows validate input elements display specific messages respective input widgets. validate_inputs provides hybrid solution. Given InputValidator object, messages corresponding inputs fail validation extracted placed one validation message passed validate/need call. way input validator messages repeated output. ... argument accepts number InputValidator objects nested list objects. validators passed directly, messages printed together one (optional) header message specified header. list passed, messages grouped validator. list's names used headers respective message groups. neither nested list elements named, header message taken header.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_inputs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Send input validation messages to output — validate_inputs","text":"","code":"library(shiny) library(shinyvalidate) ui <- fluidPage( selectInput(\"method\", \"validation method\", c(\"sequential\", \"combined\", \"grouped\")), sidebarLayout( sidebarPanel( selectInput(\"letter\", \"select a letter:\", c(letters[1:3], LETTERS[4:6])), selectInput(\"number\", \"select a number:\", 1:6), tags$br(), selectInput(\"color\", \"select a color:\", c(\"black\", \"indianred2\", \"springgreen2\", \"cornflowerblue\"), multiple = TRUE ), sliderInput(\"size\", \"select point size:\", min = 0.1, max = 4, value = 0.25 ) ), mainPanel(plotOutput(\"plot\")) ) ) server <- function(input, output) { # set up input validation iv <- InputValidator$new() iv$add_rule(\"letter\", sv_in_set(LETTERS, \"choose a capital letter\")) iv$add_rule(\"number\", function(x) { if (as.integer(x) %% 2L == 1L) \"choose an even number\" }) iv$enable() # more input validation iv_par <- InputValidator$new() iv_par$add_rule(\"color\", sv_required(message = \"choose a color\")) iv_par$add_rule(\"color\", function(x) { if (length(x) > 1L) \"choose only one color\" }) iv_par$add_rule( \"size\", sv_between( left = 0.5, right = 3, message_fmt = \"choose a value between {left} and {right}\" ) ) iv_par$enable() output$plot <- renderPlot({ # validate output switch(input[[\"method\"]], \"sequential\" = { validate_inputs(iv) validate_inputs(iv_par, header = \"Set proper graphical parameters\") }, \"combined\" = validate_inputs(iv, iv_par), \"grouped\" = validate_inputs(list( \"Some inputs require attention\" = iv, \"Set proper graphical parameters\" = iv_par )) ) plot(faithful$eruptions ~ faithful$waiting, las = 1, pch = 16, col = input[[\"color\"]], cex = input[[\"size\"]] ) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_n_levels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate that variables has expected number of levels — validate_n_levels","text":"","code":"validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)"},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_n_levels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate that variables has expected number of levels — validate_n_levels","text":"x variable name. x factor, unique values treated levels. min_levels cutoff minimum number levels x max_levels cutoff maximum number levels x var_name name variable validated use validation message","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_n_levels.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate that variables has expected number of levels — validate_n_levels","text":"number levels x less min_levels greater max_levels validation fail. function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_n_levels.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate that variables has expected number of levels — validate_n_levels","text":"","code":"data <- data.frame( one = rep(\"a\", length.out = 20), two = rep(c(\"a\", \"b\"), length.out = 20), three = rep(c(\"a\", \"b\", \"c\"), length.out = 20), four = rep(c(\"a\", \"b\", \"c\", \"d\"), length.out = 20), stringsAsFactors = TRUE ) ui <- fluidPage( selectInput( \"var\", \"Select variable\", choices = c(\"one\", \"two\", \"three\", \"four\"), selected = \"one\" ), verbatimTextOutput(\"summary\") ) server <- function(input, output) { output$summary <- renderText({ validate_n_levels(data[[input$var]], min_levels = 2, max_levels = 15, var_name = input$var) paste0( \"Levels of selected treatment variable: \", paste(levels(data[[input$var]]), collapse = \", \" ) ) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_no_intersection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validates no intersection between two vectors — validate_no_intersection","text":"","code":"validate_no_intersection(x, y, msg)"},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_no_intersection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validates no intersection between two vectors — validate_no_intersection","text":"x vector y vector msg (character(1)) message display x y intersect","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_no_intersection.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validates no intersection between two vectors — validate_no_intersection","text":"function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_no_intersection.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validates no intersection between two vectors — validate_no_intersection","text":"","code":"data <- data.frame( id = c(1:10, 11:20, 1:10), strata = rep(c(\"A\", \"B\", \"C\"), each = 10) ) ui <- fluidPage( selectInput(\"ref1\", \"Select strata1 to compare\", choices = c(\"A\", \"B\", \"C\"), selected = \"A\" ), selectInput(\"ref2\", \"Select strata2 to compare\", choices = c(\"A\", \"B\", \"C\"), selected = \"B\" ), verbatimTextOutput(\"summary\") ) server <- function(input, output) { output$summary <- renderText({ sample_1 <- data$id[data$strata == input$ref1] sample_2 <- data$id[data$strata == input$ref2] validate_no_intersection( sample_1, sample_2, \"subjects within strata1 and strata2 cannot overlap\" ) paste0( \"Number of subject in: reference treatment=\", length(sample_1), \" comparions treatment=\", length(sample_2) ) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_one_row_per_id.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate that dataset has unique rows for key variables — validate_one_row_per_id","text":"","code":"validate_one_row_per_id(x, key = c(\"USUBJID\", \"STUDYID\"))"},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_one_row_per_id.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate that dataset has unique rows for key variables — validate_one_row_per_id","text":"x (data.frame) key (character) Vector ID variables x identify unique records.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_one_row_per_id.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate that dataset has unique rows for key variables — validate_one_row_per_id","text":"function wrapper shiny::validate.","code":""},{"path":"https://insightsengineering.github.io/teal/main/reference/validate_one_row_per_id.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate that dataset has unique rows for key variables — validate_one_row_per_id","text":"","code":"iris$id <- rep(1:50, times = 3) ui <- fluidPage( selectInput( inputId = \"species\", label = \"Select species\", choices = c(\"setosa\", \"versicolor\", \"virginica\"), selected = \"setosa\", multiple = TRUE ), plotOutput(\"plot\") ) server <- function(input, output) { output$plot <- renderPlot({ iris_f <- iris[iris$Species %in% input$species, ] validate_one_row_per_id(iris_f, key = c(\"id\")) hist(iris_f$Sepal.Length, breaks = 5) }) } if (interactive()) { shinyApp(ui, server) }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"new-features-0-15-2-9078","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.15.2.9078","text":"Possible call ui_teal srv_teal directly application delivering data argument reactive returning teal_data object. #669 Introduced teal_transform_module provide way interactively modify data delivered teal_module’s server. #1228 Introduced new argument = FALSE teal_data_module possibly reload data run time. Possibility download lockfile restore app session reproducibility. #479 Introduced function set_datanames() change datanames teal_module. Datasets name starts . ignored module’s datanames set \"\".","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"breaking-changes-0-15-2-9078","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.15.2.9078","text":"Setting datanames() data passed teal application longer effect. order change teal_module’s datanames one modify module$datanames. landing_popup_module() needs passed landing_popup argument init instead passed module modules argument init. teal longer re-export %>%. Please load library(magrittr) instead use |> base.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"enhancement-0-15-2-9078","dir":"Changelog","previous_headings":"","what":"Enhancement","title":"teal 0.15.2.9078","text":"Enhanced system data validation display error messages. Easier way call javascript events setting $(document).ready(function() { ... }). #1114 Provided progress bar modules loading data filtering teal app startup. Filter mapping display separate icon tab. Environment data passed teal_module’s server consists unfiltered datasets contained .raw_data.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-0152","dir":"Changelog","previous_headings":"","what":"teal 0.15.2","title":"teal 0.15.2","text":"CRAN release: 2024-03-07","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"bug-fixes-0-15-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.15.2","text":"Fixed bug handling datanames modules crashed module-specific applications filtering child datasets.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-0151","dir":"Changelog","previous_headings":"","what":"teal 0.15.1","title":"teal 0.15.1","text":"CRAN release: 2024-02-22","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"bug-fixes-0-15-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.15.1","text":"Fixed bug stopped module_specific feature teal module specified datanames length 1.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"miscellaneous-0-15-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.15.1","text":"Updated links vignettes","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-0150","dir":"Changelog","previous_headings":"","what":"teal 0.15.0","title":"teal 0.15.0","text":"CRAN release: 2024-02-08","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"new-features-0-15-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.15.0","text":"Added landing_popup_module function creates module display popup app starts. popup block access app dismissed. Filter state snapshots can now uploaded file. See ?snapshot. Added as_tdata function facilitate migration modules new teal_data class. Added build_app_title function facilitate adding favicons app title.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"breaking-changes-0-15-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.15.0","text":"data argument init now accepts teal_data teal_data_module. tdata deprecated replaced teal_data. Support tdata passed data argument module(server) removed next release. module(ui) argument longer accepts data datasets arguments. data dependent logic set server function. module(server) argument deprecated datasets argument. teal_modules’ server functions accept data (teal_data) instead. Changed order formal arguments init. filter now comes directly modules, title.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"miscellaneous-0-15-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.15.0","text":"Enhanced module validation checks won’t throw messages data argument unnecessarily. Added argument teal_slices made modifications init enable tagging teal_slices app id safely upload snapshots disk. FilteredData longer stores pre-processing code specific slots. Code now attached attribute. Adjusted appropriately.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"bug-fixes-0-15-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.15.0","text":"Removed Report previewer module mapping matrix display filter manager. Specified minimal version package dependencies.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"new-features-0-14-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.14.0","text":"Enabled module specific filter panel. See module_specific teal::teal_slices documentation. Enabled capturing resetting application filter state snapshots. See ?snapshot. Enabled reporter_previewer_module customize default values srv_args. Enabled passing reporter_previewer_module list modules override default one.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"breaking-changes-0-14-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.14.0","text":"Specifying filter argument teal::init requires teal_slices object now. Details documentation teal::init. Soft deprecated filters argument module replaced datanames. Details documentation teal::module","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"miscellaneous-0-14-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.14.0","text":"Removed scda package dependency examples. Updated header tag style enhance element containment.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"breaking-changes-0-13-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.13.0","text":"use datasets argument modules deprecated removed future release. Please use data argument instead. data type tdata; see “Creating custom modules” vignettes function documentation teal::new_tdata details. Due deprecation chunks teal.code, teal framework now uses replacement (qenv) instead. documentation teal updated reflect custom modules written chunks updated use qenv. Due deprecation chunks teal.code, get_rcode, get_rcode_srv, get_rcode_ui removed.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"new-features-0-13-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.13.0","text":"Added validate_inputs function transfers input validation messages app output. modules argument init accepts teal_module type object. need wrap single module modules() list(). Updated module_nested_tabs active modules calculated teal app.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"miscellaneous-0-13-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.13.0","text":"Updated examples use scda.2022. Added R session information link footer teal applications. Added data hashing step using rlang instead digest package calculate hash (moved teal.data teal.slice). now explicit hashing check reproducible code output. Removed deprecated functions: root_modules, default_filter, bookmarkableShinyApp, well deprecated logging mechanism, including functions log_app_usage .log. Updated “Teal Bootstrap Themes” vignette provide details customizing teal app bslib::run_with_themer. Removed outdated diagram srv_nested_tabs documentation. Changed default values header footer arguments init empty text.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"new-features-0-12-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.12.0","text":"Added support custom bslib bootstrap themes teal::init apps, please read new teal-bs-themes vignette.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"enhancements-0-12-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.12.0","text":"Added option choose variables can filtered filter panel using filterable attributes per-dataset lists filter argument init. Updated teal_module data argument receives list reactive filter data \"code\" \"join_keys\" attributes. Updated teal_module filter_panel_api argument receives FilterPanelAPI object. Updated internals module_teal reflect changes teal.slice.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"breaking-changes-0-12-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.12.0","text":"Updated teal_module longer receive datasets object ... argument. order use datasets teal_module please specify datasets explicitly. Deprecated merge_expression argument get_rcode_srv function removed get_rcode function. Deprecated session argument get_rcode function.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"miscellaneous-0-12-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.12.0","text":"Enhanced burger button disabled filter panel used.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"enhancements-0-11-1","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.11.1","text":"Added new function reporter_previewer_module wrap teal.reporter package previewer functionality teal module. Updated teal support modules include reporting. module supports reporting included reporter_previewer_module included. Added default arguments module() server argument now function second argument can ... datasets.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"breaking-changes-0-11-1","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.11.1","text":"Deprecated bookmarkableShinyApp. future releases teal framework stop supporting shiny bookmarking (officially supported); may officially supported future. Note filter panel teal.slice retains ability save restore state used standalone shiny app bookmarking.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"miscellaneous-0-11-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.11.1","text":"Added template pkgdown configuration. Removed unneeded shinytest app tests. Updated package authors. Added package vignettes.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-0110","dir":"Changelog","previous_headings":"","what":"teal 0.11.0","title":"teal 0.11.0","text":"teal.data: creating loading data needed teal applications. teal.widgets: shiny components used within teal. teal.slice: provides filtering panel allow filtering data. teal.code: handles reproducibility outputs. teal.transform: standardizes extracting merging data. teal.logger: standardizes logging within teal framework. teal package contains code create apps (teal::init), create module (teal::module) group modules app (teal::modules). teal depends teal.transform teal.data contain functions teal app creators likely need. package teal imports therefore teal module creators either fully specify functions packages required import custom packages library(teal) load .","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"new-features-0-11-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.11.0","text":"simple new teal module named example_module included package.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"breaking-changes-0-11-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.11.0","text":"teal package split multiple smaller packages, see . Deprecated root_modules function, users use modules directly inside init. Due deprecation root_modules label argument modules must explicitly named. example modules(\"lab\", mod1, mod2) replaced modules(label = \"lab\", mod1, mod2).","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"miscellaneous-0-11-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.11.0","text":"Minor changes internals teal: main module panel now fixed shiny name root active tab named active_tab Active_tab. MultiAssayExperiment now suggested packages, required. Objects dependent MultiAssayExperiment changed lazy-load now suggested package.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"bug-fixes-0-11-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.11.0","text":"Showing R Code longer shows reproducibility warning message reproducibility check passed.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"breaking-changes-0-10-1","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal 0.10.1","text":"Changed HTML identifiers teal modules - now nested module receives shiny namespace. Deprecated functions related connectors moved separate packages. Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational. Removed rcd_connection rcd_data; scda_dataset_connectors can passed cdisc_data teal_data directly. Replaced rcd_dataset_connector rcd_cdisc_dataset_connector scda_dataset_connector scda_cdisc_dataset_connector respectively. Renamed teal_show_js_log option teal.show_js_log match options naming convention. Removed %is_in% stop_shiny internal utility functions.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"logging-0-10-1","dir":"Changelog","previous_headings":"New features","what":"Logging","title":"teal 0.10.1","text":"Added support logging using logger package. Added new function register_logger, registers logger given namespace. Added trace info levels log messages teal framework. Added pid shiny session token footnote app developers can identify logs apps.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"other-0-10-1","dir":"Changelog","previous_headings":"New features","what":"Other","title":"teal 0.10.1","text":"Added print methods DatasetConnector, RelationalData, RelationalDataconnector JoinKeys classes added input validation implementation print method already Dataset object. Added public facing constructor functions CDISCDataConnector, RelationalDataConnector, DataConnection classes. Modified data_extract_spec allow filter select parameters NULL, results data_extract_ui acting filter_spec variables possible choices supplied filter argument select_spec multiple parameter set TRUE supplied select argument. Added support full screen module filters argument equal NULL. Added support shiny::moduleServer passed server parameter teal::module. Added teal.threshold_slider_vs_checkboxgroup R option: categorical variable number unique values, filter panel uses drop-select input instead checkbox group. Extended FilteredData API allow managing filter states programmatically UI teal application. Hid buttons remove filters datasets dataset active filters. Updated init accept RelationalData, data.frame, MultiAssayExperiment, Dataset, DatasetConnector, list function returning named list data input.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"bug-fixes-0-10-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.10.1","text":"choices_selected now correctly removes duplicates array passed choices parameter. Fixed call returned FilterState case using MultiAssayExperiment::subsetByColData. Now single condition variable containing NA values !.na(var) & var == . Fixed data loading DatasetConnector dependent Dataset DatasetConnector objects. Fixed restoring bookmarked filter state teal application. Refactored module_nested_tabs fix issue filter panel reacting input change nested module. updateOptionalSelectInput longer sets input NULL logical value passed selected. Fixed setting JoinKeys key name two Dataset object differs. Fixed printing JavaScript console logs R console teal.show_js_log = TRUE.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"miscellaneous-0-10-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.10.1","text":"Soft-deprecate mae_dataset() favor general dataset() constructor. Added vignette describing modifications teal applications users can apply using R options. Added default values label argument select_spec filter_spec. Added validation FilteredDataset::get_data accept logical input . Changed references outdated functions teal.devel documentation. Introduced Teal prefix public R6 classes avoid name collisions packages. Removed dependency utils.nest replaced functionality teal equivalents checkmate package base R. Replaced old shiny server functions DataConnection, RelationalDataConnector, DatasetConnector, RelationalData shiny::moduleServer equivalents. Running teal application via ui_teal_with_splash srv_teal_with_splash now longer recommended doesn’t support new features (e.g. logging, bookmarking). Use init instead. Updated R version requirement >= 4.0. Updated “filter panel collapse” icon remove warnings using shiny version >= 1.7. Removed non-exported, debugging modules. Updated footer tag style less visible.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"new-features-0-10-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.10.0","text":"Allow passing MultiAssayExperiment teal::init using mae_dataset function connectors. Refactored filter panel use MultiAssayExperiment objects. Filters can set subject level (colData MAE object) experiment level (colData rowData assay). Added cdse_dataset_connector create delayed data objects CDSE. Added datasetdb_dataset_connector create delayed data objects DataSetDB. Added ricepass_connection create delayed data objects entimICE via ricepass. Simplified setting initial filter state without need specify “choices” “range” named list element depending variable class. Dataset type determines appearance functionality related filters filters summary. Datasets passed (reference) DDL FilteredData skipping extracting data attributes. Redesigned variable filter labels “Active Filter Variables” panel. Fully testable server functions.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"bug-fixes-0-10-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.10.0","text":"Fixed bug caused calling mutate_dataset multiple times DatasetConnector Dataset object. Fixed bug caused output get_code function reproduce raw data set. Changed filter_spec allow variable selection upon app initialization, first possible value previously selected.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"enhancements-0-10-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.10.0","text":"modules parameter teal::init function can also receive list except root_modules function call. Added split merge methods JoinKeys object. Added all_choices() possible argument selected parameter filter_spec, select_spec choices_selected indicating choices selected. append method CodeClass object modified print warning message argument result code added duplicated. Implemented delayed functionality mutate method Dataset DatasetConnector objects. Modified teal_data return CDISCData object whenever arguments type CDISCData object. Updated filters show levels logical variable TRUE/FALSE even one missing original array.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"miscellaneous-0-10-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.10.0","text":"Updated LICENCE README new package references. Added method get_hash Dataset class returning MD5 hash object stored inside Dataset object. Replaced random.cdisc.data scda examples tests. Implemented functionality store JoinKeys Dataset DatasetConnector classes. Added error_on_lintr: TRUE .lintr pipe operator %>% now exported downstream code packages can use . Removed hyperlinks rice package documentation.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"enhancements-0-9-5","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.9.5","text":"Added informational stop message using mutate_data RelationalDataConnector. Modified as_cdisc behave similarly cdisc_dataset called Dataset object. Changed displayed format data name column name data_extract_spec UI elements. now compressed . don’t change runtime app. Added ADSAFTTE list recognized ADaM dataset names. Added another example data_extract_spec’s doc string showcasing app users can choose variable used filtering encoding panel. Added CSS styling tool tips teal modules.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"bug-fixes-0-9-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.9.5","text":"Fixed edge case error creating filter variable missing values crashed app. Fixed bug crashes app whenever Date datetime column selected filter_spec.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"enhancements-0-9-4","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.9.4","text":"Released snowflake connection connectors. Changed ordering datasets intuitive (topologically first CDISC datasets according input datasets order). closing teal app (ending user shiny session), DataConnections now try close connections. Added ADHY keys configuration file. Extended filter_spec function: parameter choices longer mandatory (function take possible choices default) vars parameter additionally accepts choices_selected allows change variables filtering using UI elements encoding panel.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"bug-fixes-0-9-4","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.9.4","text":"Cleaned imports package. Modified value_choices function handle edge case \"NA\" NA values exist character column choices derived . Fixed issue cloning Callable class.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"new-features-0-9-3","dir":"Changelog","previous_headings":"","what":"New Features","title":"teal 0.9.3","text":"Support data-standard independent input filtering. includes refactor data dataset structures together refactor FilteredData class. New JoinKeys class (join_keys() constructors join_key() constructor elements) store joining key columns datasets. Refactored basic dataset() constructor, added cdisc_dataset() constructor as_cdisc() conversion function. Soft-deprecate removed class constructors obsolete functions (e.g. keys()). Added get_keys() set_keys() functions extract manipulate datasets primary keys respectively. Unexported filtered_data_new, filtered_data_set filtered_data_set_filters.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"bug-fixes-0-9-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal 0.9.3","text":"Duplicated lines code passed teal::cdisc_dataset teal::RelationalDataset constructors now shown getting code teal::cdisc_data objects teal::RelationalData objects. Added ability press “Enter” key without set focus Submit button delayed data loading. Allow variable_choices use datasets missing labels. Fixed bug ignores input NULL selected argument select_spec function.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"enhancements-0-9-3","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.9.3","text":"Added button remove active filters Filter Panel.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"new-features-0-9-2","dir":"Changelog","previous_headings":"","what":"New Features","title":"teal 0.9.2","text":"Added python_dataset_connector create delayed data objects python scripts directly python code. NOTE: python_dataset_connector yet ready deployed RSConnect contain numpy pandas, Python libraries used python_dataset_connector. Added support filtering Date Datetime variables Filter Panel. Added buttons date datetime filter widgets reset value original. Added new function check_key_duplicates, creates short summary rows duplicated primary key (row numbers number duplicates)","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"enhancements-0-9-2","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal 0.9.2","text":"Fixed lack labels character factor variables Filter Panel. variables now displayed module_filter_panel, types numeric, logical, factor, character Date Fixed mutate_data accept whole scope objects vars. Clarified teal::init function documentation state custom CSS loading code htmltools::htmlDependency included header argument rather inside UI arguments modules. Enabled empty select field inside data_extract_spec. Added new argument drop_keys filter_spec decide whether drop keep keys columns single filter columns. Added new optional argument keys variable_choices. keys specifies names variables, new key icon shown next variable drop menus left-hand side encoding panels instead icon appropriate original R variable type. variable_choices now also works RelationalDataset RelationalDatasetConnector objects.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"miscellaneous-0-9-2","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal 0.9.2","text":"Removed include_factors option get_class_colnames RawDataset.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-091","dir":"Changelog","previous_headings":"","what":"teal 0.9.1","title":"teal 0.9.1","text":"Adds method resolve nested lists containing delayed data objects, can used arm_ref_comp objects. Nested tabs module now better alignment filter panel page. Allow width argument optionalSelectInput. Added lifecycle badges exported functions. Added new code_dataset_connector code_cdisc_dataset_connector functions enable creation new delayed data objects given string code. Added new functions csv_dataset_connector csv_cdisc_dataset_connector. Updated set_ui_input method RawDatasetConnector NamedDatasetConnector handle user defined shiny inputs. Include Keep Inf checkbox numerical filter items. Keep NA Keep Inf checkbox doesn’t appear missing infinite values. Replace existing RelationalData class abstract class RelationalDataCollection rename RelationalDataList class RelationalData. data argument teal::init now always RelationalData object. Added fun_cdisc_dataset_connector enable providing custom function returning dataset. Removed code script arguments as_relational wrapper. intended done mutate_dataset functionality. filer argument init added validation step ensure compatibility rest app. Variables inherited ADSL specified ADSL dataset. Fixes issue connection close code present get_code results. Fixes issue occasional incorrect ordering bar charts filter panel. informative error displayed pull_fun DataConnection produces error.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-090","dir":"Changelog","previous_headings":"","what":"teal 0.9.0","title":"teal 0.9.0","text":"cdisc_dataset dataset now return R6 class objects (RelationalDataset). new teal_data function include datasets connectors teal application. cdisc_data function include datasets connectors teal application check argument still used consistency tests performed. get_raw_data can used derive raw data R6 objects e.g. (RelationalDataset). RawDatasetConnector, NamedDatasetConnector RelationalDatasetConnector execute custom function call order get data connection. CodeClass manage reproducibility data relationships datasets. directly exposed public interface. mutate_dataset allows modify dataset connector via code argument R script. mutate_data allows change dataset RelationalData, RelationalDataConnector RelationalDataList. New wrapper functions manipulate RelationalDatasetConnector RelationalDataset get_dataset, load_dataset, as_relational. New wrapper functions manipulate RelationalDataConnector, RelationalData RelationalDataList get_datasets, load_datasets. choices_labeled, filter_spec, select_spec, data_extract_spec, value_choices, variable_choices S3 class applied data.frame also delayed data. can longer modify app$datasets, must instead use argument filter init function. New modules created create module nested teal modules, another one adds right filter pane tab. teal::init function stays unchanged. teal::init function now returns UI function optional id argument. allows embed applications. split view two teal applications side--side one example shown vignette. teal::init turned wrapper function around module_teal_with_splash.R developers want embed teal shiny module directly work functions (ui_teal_with_splash srv_teal_with_splash) instead teal::init. teal::init function now title parameter set title browser window. Missing data NA now explicitly addressed filter panel: NAs excluded default checkbox include added. Statistics data visually depicted terms histograms bar charts overlayed onto shiny input elements. Added buttons remove filters applied dataset. Restored functionality hide filter panel module constructed filters = NULL. Moved helper functions utils.nest removed unused functions set_labels_df get_labels_df. optionalSelectInput now allows grouped choices.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"refactor-of-filtereddata-for-developers-0-9-0","dir":"Changelog","previous_headings":"","what":"Refactor of FilteredData (for developers)","title":"teal 0.9.0","text":"FilteredData now fully reactive. Now filtered data lazy evaluated per need. opens door bookmarking teal apps (bookmarking currently works right filtering panel, make feature sophisticated future release, module must reviewed adapted contains reactiveValues). Datasets materialized connectors provided FilteredData set_datasets_data function located init_datasets.R file. Renamed get_dataset() method get_data(). Renamed get_filter_call() method get_filter_expr(); returns expression rather list. Removed argument isolate get_data() method similar methods. must isolate needed. want temporarily deactivate shiny errors due missing errors, can set options(shiny.suppressMissingContextError = TRUE). general, avoid isolate breaks reactivity. added development module add several filters , e.g. safety filters. evaluated converted proper module made available end-users.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-085","dir":"Changelog","previous_headings":"","what":"teal 0.8.5","title":"teal 0.8.5","text":"UI bug fix hide filter elements used datasets.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-084","dir":"Changelog","previous_headings":"","what":"teal 0.8.4","title":"teal 0.8.4","text":"Progress bar UI creation delayed loading module. Change output keys function keys object. Delayed version choices_selected. Fix error choices_selected selected choices. Fix pickerInput display column name label ’s missing.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-083","dir":"Changelog","previous_headings":"","what":"teal 0.8.3","title":"teal 0.8.3","text":"Enable teal app initialize without data. data loaded within teal app. New classes (DatasetConnector, DataConnector) connect various data sources, including: * connector rice API - rice_data rice_dataset_connector * connector RDS files - rds_data rds_dataset_connector Message appears bottom right shiny app shiny busy update views. Remove labels argument cdisc_data function. Labels now already present data passed cdisc_data function. can achieved using var_relabel function.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-082","dir":"Changelog","previous_headings":"","what":"teal 0.8.2","title":"teal 0.8.2","text":"Fixed several BUGS optionalSelectInput improved inputs look. Added get_data_labels function FilteredData class. Improved sep passing within data_extract_spec.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-081","dir":"Changelog","previous_headings":"","what":"teal 0.8.1","title":"teal 0.8.1","text":"Refactor choices_labeled fix bug showing column name data_extract_spec.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-080","dir":"Changelog","previous_headings":"","what":"teal 0.8.0","title":"teal 0.8.0","text":"Added cdisc_dataset (general dataset) functions properly handle dataset keys merging. Possibility load custom .css .js files. Renamed columns_spec select_spec. Show number observations filter panel. Add labeling functions variable_choices value_choices.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-070","dir":"Changelog","previous_headings":"","what":"teal 0.7.0","title":"teal 0.7.0","text":"Added functions cdisc_data get_code deal preprocessing moving step towards data standard independent teal. Moved teal.utils functions teal: log_app_usage, stop_shiny. Added *_spec functions. Improvements usage PickerInput SelectInput.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-060","dir":"Changelog","previous_headings":"","what":"teal 0.6.0","title":"teal 0.6.0","text":"Removed deprecated functions tab*. Removed data generation functions including generate_sample_data. Incorporate shinyjs package. Added “Copy R code clipboard” button.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-005","dir":"Changelog","previous_headings":"","what":"teal 0.0.5","title":"teal 0.0.5","text":"Added limit data_table scrolling, preventing overlap UI elements. Boolean filtering.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-004","dir":"Changelog","previous_headings":"","what":"teal 0.0.4","title":"teal 0.0.4","text":"Bug fix teal crashes filter variable gets added many decimal places.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-003","dir":"Changelog","previous_headings":"","what":"teal 0.0.3","title":"teal 0.0.3","text":"Note version 0.0.3 backwards compatible. Reading changes studying example app , however, clarify changes.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"new-features-0-0-3","dir":"Changelog","previous_headings":"","what":"New features","title":"teal 0.0.3","text":"tm_scatterplot module. tm_table module.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"changes-0-0-3","dir":"Changelog","previous_headings":"","what":"Changes","title":"teal 0.0.3","text":"tabs arguments renamed modules. tab_item function now called module. tab_items function now called modules. tabs function removed. variable_browser_item now called tm_variable_browser. data_table_item now called tm_data_table. datasets argument automatically added server functions specified module. Hence teal_datasets removed server_args element.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-002","dir":"Changelog","previous_headings":"","what":"teal 0.0.2","title":"teal 0.0.2","text":"New ‘01_getting_started’ vignette. Datanames FilteredData now case sensitive.","code":""},{"path":"https://insightsengineering.github.io/teal/main/news/index.html","id":"teal-001","dir":"Changelog","previous_headings":"","what":"teal 0.0.1","title":"teal 0.0.1","text":"March 28, 2016 - Initial Release.","code":""}] diff --git a/release-candidate/404.html b/release-candidate/404.html index c3a8f3acff..63023393ef 100644 --- a/release-candidate/404.html +++ b/release-candidate/404.html @@ -1,5 +1,4 @@ - - + @@ -80,23 +79,7 @@ - - + - + + diff --git a/release-candidate/CODE_OF_CONDUCT.html b/release-candidate/CODE_OF_CONDUCT.html index e751a842c5..dc1fc90789 100644 --- a/release-candidate/CODE_OF_CONDUCT.html +++ b/release-candidate/CODE_OF_CONDUCT.html @@ -1,8 +1,22 @@ - -Contributor Covenant Code of Conduct • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,65 +131,80 @@
    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    • Demonstrating empathy and kindness toward other people
    • +
        +
      • Demonstrating empathy and kindness toward other people
      • Being respectful of differing opinions, viewpoints, and experiences
      • Giving and gracefully accepting constructive feedback
      • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
      • Focusing on what is best not just for us as individuals, but for the overall community
      • -

      Examples of unacceptable behavior include:

      -
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • +
      +

      Examples of unacceptable behavior include:

      +
        +
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • Trolling, insulting or derogatory comments, and personal or political attacks
      • Public or private harassment
      • Publishing others’ private information, such as a physical or email address, without their explicit permission
      • Other conduct which could reasonably be considered inappropriate in a professional setting
      • -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -177,17 +212,19 @@

    Attribution

    + + + + - - + + diff --git a/release-candidate/CONTRIBUTING.html b/release-candidate/CONTRIBUTING.html index e60c9ba54a..908e7d746e 100644 --- a/release-candidate/CONTRIBUTING.html +++ b/release-candidate/CONTRIBUTING.html @@ -1,8 +1,22 @@ - -Contribution Guidelines • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -113,7 +133,8 @@

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -124,38 +145,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    GitHub Flow

    +

    GitHub Flow +

    This repository uses the GitHub Flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes

        Make sure your code

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR)

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -169,76 +199,93 @@

        GitHub Flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    -

    Coding guidelines

    +

    Coding guidelines +

    This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Dependency management

    +

    Dependency management +

    Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

    -

    Dependency version management

    +

    Dependency version management +

    If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    -
    • Minimum 5% of lines of code authored* (determined by git blame query) OR
    • +
        +
      • Minimum 5% of lines of code authored* (determined by git blame query) OR
      • Being at the top 5 contributors in terms of number of commits OR lines added OR lines removed*
      • -

      *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

      +
    +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + + + - - + + diff --git a/release-candidate/LICENSE-text.html b/release-candidate/LICENSE-text.html index 149de865b6..17ba20d136 100644 --- a/release-candidate/LICENSE-text.html +++ b/release-candidate/LICENSE-text.html @@ -1,8 +1,22 @@ - -License • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -123,17 +143,19 @@ limitations under the License. - + + + + - - + + diff --git a/release-candidate/SECURITY.html b/release-candidate/SECURITY.html index 409122c91e..0bab2fdd15 100644 --- a/release-candidate/SECURITY.html +++ b/release-candidate/SECURITY.html @@ -1,8 +1,22 @@ - -Security Policy • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,38 +131,44 @@
    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    -
    • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
    • +
        +
      • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
      • Full paths of source file(s) related to the manifestation of the issue
      • The location of the affected source code (tag/branch/commit or direct URL)
      • Any special configuration required to reproduce the issue
      • Step-by-step instructions to reproduce the issue
      • Proof-of-concept or exploit code (if possible)
      • Impact of the issue, including how an attacker might exploit the issue
      • -

      This information will help us triage your report more quickly.

      +
    +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + + + - - + + diff --git a/release-candidate/articles/adding-support-for-reporting.html b/release-candidate/articles/adding-support-for-reporting.html index 7dd83299c4..886e755f68 100644 --- a/release-candidate/articles/adding-support-for-reporting.html +++ b/release-candidate/articles/adding-support-for-reporting.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/blueprint/actors.html b/release-candidate/articles/blueprint/actors.html index 84d06815f4..117dcd140e 100644 --- a/release-candidate/articles/blueprint/actors.html +++ b/release-candidate/articles/blueprint/actors.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/blueprint/dataflow.html b/release-candidate/articles/blueprint/dataflow.html index 9c46bc2de8..36f5082365 100644 --- a/release-candidate/articles/blueprint/dataflow.html +++ b/release-candidate/articles/blueprint/dataflow.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/blueprint/filter_panel.html b/release-candidate/articles/blueprint/filter_panel.html index b3c15e6293..ee7011595d 100644 --- a/release-candidate/articles/blueprint/filter_panel.html +++ b/release-candidate/articles/blueprint/filter_panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/blueprint/in_app_data.html b/release-candidate/articles/blueprint/in_app_data.html index 3c44c395ee..9277cc5d8e 100644 --- a/release-candidate/articles/blueprint/in_app_data.html +++ b/release-candidate/articles/blueprint/in_app_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/blueprint/index.html b/release-candidate/articles/blueprint/index.html index e29740786a..5e99a13233 100644 --- a/release-candidate/articles/blueprint/index.html +++ b/release-candidate/articles/blueprint/index.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/blueprint/input_data.html b/release-candidate/articles/blueprint/input_data.html index 9bb316b3f1..76a10cdc87 100644 --- a/release-candidate/articles/blueprint/input_data.html +++ b/release-candidate/articles/blueprint/input_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/blueprint/intro.html b/release-candidate/articles/blueprint/intro.html index 3d2936ab23..3c5250000b 100644 --- a/release-candidate/articles/blueprint/intro.html +++ b/release-candidate/articles/blueprint/intro.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/blueprint/module_encapsulation.html b/release-candidate/articles/blueprint/module_encapsulation.html index 6f081619c0..5806e11ff3 100644 --- a/release-candidate/articles/blueprint/module_encapsulation.html +++ b/release-candidate/articles/blueprint/module_encapsulation.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/blueprint/product_map.html b/release-candidate/articles/blueprint/product_map.html index d30b3aa113..3b993028aa 100644 --- a/release-candidate/articles/blueprint/product_map.html +++ b/release-candidate/articles/blueprint/product_map.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/bootstrap-themes-in-teal.html b/release-candidate/articles/bootstrap-themes-in-teal.html index e2a2cb4ec8..7d5cac222b 100644 --- a/release-candidate/articles/bootstrap-themes-in-teal.html +++ b/release-candidate/articles/bootstrap-themes-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/creating-custom-modules.html b/release-candidate/articles/creating-custom-modules.html index 2cfd76907d..c64af5fba5 100644 --- a/release-candidate/articles/creating-custom-modules.html +++ b/release-candidate/articles/creating-custom-modules.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/data-as-shiny-module.html b/release-candidate/articles/data-as-shiny-module.html index 716aa387fe..11c5b7476a 100644 --- a/release-candidate/articles/data-as-shiny-module.html +++ b/release-candidate/articles/data-as-shiny-module.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/filter-panel.html b/release-candidate/articles/filter-panel.html index cd7f27469d..1dead27954 100644 --- a/release-candidate/articles/filter-panel.html +++ b/release-candidate/articles/filter-panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/getting-started-with-teal.html b/release-candidate/articles/getting-started-with-teal.html index 070608a63f..2e092e1ab4 100644 --- a/release-candidate/articles/getting-started-with-teal.html +++ b/release-candidate/articles/getting-started-with-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/including-data-in-teal-applications.html b/release-candidate/articles/including-data-in-teal-applications.html index b2fad73449..5e0cd60105 100644 --- a/release-candidate/articles/including-data-in-teal-applications.html +++ b/release-candidate/articles/including-data-in-teal-applications.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/articles/index.html b/release-candidate/articles/index.html index 9cb9ed52e5..7fa34719a6 100644 --- a/release-candidate/articles/index.html +++ b/release-candidate/articles/index.html @@ -1,8 +1,22 @@ - -Articles • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,78 +131,113 @@

    Get started

    -
    Getting Started with teal
    +
    +
    Getting Started with teal
    -
    + +
    + + + + + + + + + +

    📃 Technical blueprint

    -

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    +

    +

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    -
    About Technical Blueprint
    +
    +
    About Technical Blueprint
    -
    Introduction
    + +
    Introduction
    -
    Actors
    + +
    Actors
    -
    Data Flow
    + +
    Data Flow
    -
    Product Map
    + +
    Product Map
    -
    + + + + + + + + + + - - + + diff --git a/release-candidate/articles/teal-options.html b/release-candidate/articles/teal-options.html index 1158b3339c..fe98a8535d 100644 --- a/release-candidate/articles/teal-options.html +++ b/release-candidate/articles/teal-options.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/release-candidate/authors.html b/release-candidate/authors.html index edbe52093f..716a75ddc3 100644 --- a/release-candidate/authors.html +++ b/release-candidate/authors.html @@ -1,8 +1,22 @@ - -Authors and Citation • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -110,7 +130,8 @@

    Authors

    -
    • +
        +
      • Dawid Kaledkowski. Author, maintainer.

      • @@ -182,7 +203,8 @@

        Authors

        Maximilian Mordig. Contributor.

        -
    + +

    Citation

    @@ -203,17 +225,19 @@

    Citation

    }
    + + + + - - + + diff --git a/release-candidate/coverage-report/index.html b/release-candidate/coverage-report/index.html index 92d14cb919..61b942ba64 100644 --- a/release-candidate/coverage-report/index.html +++ b/release-candidate/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -445,42 +444,48 @@

    teal coverage - 69.63%

    48 - 34x + 34x +
      lifecycle::deprecate_soft(
    49 - 34x + 34x +
        when = "0.15.0",
    50 - 34x + 34x +
        what = "tdata()",
    51 - 34x + 34x +
        details = paste(
    52 - 34x + 34x +
          "tdata is deprecated and will be removed in the next release. Use `teal_data` instead.\n",
    53 - 34x + 34x +
          "Please follow migration instructions https://github.com/insightsengineering/teal/discussions/987."
    @@ -501,28 +506,32 @@

    teal coverage - 69.63%

    56 - 34x + 34x +
      checkmate::assert_list(
    57 - 34x + 34x +
        data,
    58 - 34x + 34x +
        any.missing = FALSE, names = "unique",
    59 - 34x + 34x +
        types = c("data.frame", "reactive", "MultiAssayExperiment")
    @@ -536,14 +545,16 @@

    teal coverage - 69.63%

    61 - 30x + 30x +
      checkmate::assert_class(join_keys, "join_keys", null.ok = TRUE)
    62 - 29x + 29x +
      checkmate::assert_multi_class(code, c("character", "reactive"))
    @@ -557,14 +568,16 @@

    teal coverage - 69.63%

    64 - 28x + 28x +
      checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
    65 - 26x + 26x +
      checkmate::assert_subset(names(metadata), names(data))
    @@ -578,14 +591,16 @@

    teal coverage - 69.63%

    67 - 25x + 25x +
      if (is.reactive(code)) {
    68 - 9x + 9x +
        isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
    @@ -613,21 +628,24 @@

    teal coverage - 69.63%

    72 - 24x + 24x +
      for (x in names(data)) {
    73 - 47x + 47x +
        if (!is.reactive(data[[x]])) {
    74 - 31x + 31x +
          data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
    @@ -662,21 +680,24 @@

    teal coverage - 69.63%

    79 - 24x + 24x +
      attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
    80 - 24x + 24x +
      attr(data, "join_keys") <- join_keys
    81 - 24x + 24x +
      attr(data, "metadata") <- metadata
    @@ -697,14 +718,16 @@

    teal coverage - 69.63%

    84 - 24x + 24x +
      class(data) <- c("tdata", class(data))
    85 - 24x + 24x +
      data
    @@ -844,14 +867,16 @@

    teal coverage - 69.63%

    105 - 2x + 2x +
      checkmate::assert_class(data, "tdata")
    106 - 1x + 1x +
      list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
    @@ -942,14 +967,16 @@

    teal coverage - 69.63%

    119 - 7x + 7x +
      checkmate::assert_class(data, "tdata")
    120 - 5x + 5x +
      attr(data, "code")()
    @@ -1005,7 +1032,8 @@

    teal coverage - 69.63%

    128 - 2x + 2x +
      attr(data, "join_keys")
    @@ -1068,14 +1096,16 @@

    teal coverage - 69.63%

    137 - 4x + 4x +
      checkmate::assert_string(dataname)
    138 - 4x + 4x +
      UseMethod("get_metadata", data)
    @@ -1117,21 +1147,24 @@

    teal coverage - 69.63%

    144 - 4x + 4x +
      metadata <- attr(data, "metadata")
    145 - 4x + 4x +
      if (is.null(metadata)) {
    146 - 1x + 1x +
        return(NULL)
    @@ -1145,7 +1178,8 @@

    teal coverage - 69.63%

    148 - 3x + 3x +
      metadata[[dataname]]
    @@ -1390,14 +1424,16 @@

    teal coverage - 69.63%

    183 - 8x + 8x +
      if (inherits(x, "tdata")) {
    184 - 2x + 2x +
        return(x)
    @@ -1411,77 +1447,88 @@

    teal coverage - 69.63%

    186 - 6x + 6x +
      if (is.reactive(x)) {
    187 - 1x + 1x +
        checkmate::assert_class(isolate(x()), "teal_data")
    188 - 1x + 1x +
        datanames <- isolate(teal_data_datanames(x()))
    189 - 1x + 1x +
        datasets <- sapply(datanames, function(dataname) reactive(x()[[dataname]]), simplify = FALSE)
    190 - 1x + 1x +
        code <- reactive(teal.code::get_code(x()))
    191 - 1x + 1x +
        join_keys <- isolate(teal.data::join_keys(x()))
    192 - 5x + 5x +
      } else if (inherits(x, "teal_data")) {
    193 - 5x + 5x +
        datanames <- teal_data_datanames(x)
    194 - 5x + 5x +
        datasets <- sapply(datanames, function(dataname) reactive(x[[dataname]]), simplify = FALSE)
    195 - 5x + 5x +
        code <- reactive(teal.code::get_code(x))
    196 - 5x + 5x +
        join_keys <- isolate(teal.data::join_keys(x))
    @@ -1502,7 +1549,8 @@

    teal coverage - 69.63%

    199 - 6x + 6x +
      new_tdata(data = datasets, code = code, join_keys = join_keys)
    @@ -1641,14 +1689,16 @@

    teal coverage - 69.63%

    18 - 2x + 2x +
      packageStartupMessage(
    19 - 2x + 2x +
        "\nYou are using teal version ",
    @@ -1669,7 +1719,8 @@

    teal coverage - 69.63%

    22 - 2x + 2x +
        read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
    @@ -1941,56 +1992,64 @@

    teal coverage - 69.63%

    25 - 4x + 4x +
          checkmate::assert_character(src, min.len = 0, max.len = 1)
    26 - 4x + 4x +
          params <- list(...)
    27 - 4x + 4x +
          params$eval <- FALSE
    28 - 4x + 4x +
          rblock <- RcodeBlock$new(src)
    29 - 4x + 4x +
          rblock$set_params(params)
    30 - 4x + 4x +
          self$append_content(rblock)
    31 - 4x + 4x +
          self$append_metadata("SRC", src)
    32 - 4x + 4x +
          invisible(self)
    @@ -2060,28 +2119,32 @@

    teal coverage - 69.63%

    42 - 5x + 5x +
          checkmate::assert_class(fs, "teal_slices")
    43 - 4x + 4x +
          self$append_text("Filter State", "header3")
    44 - 4x + 4x +
          if (length(fs)) {
    45 - 3x + 3x +
            self$append_content(TealSlicesBlock$new(fs))
    @@ -2095,7 +2158,8 @@

    teal coverage - 69.63%

    47 - 1x + 1x +
            self$append_text("No filters specified.")
    @@ -2109,7 +2173,8 @@

    teal coverage - 69.63%

    49 - 4x + 4x +
          invisible(self)
    @@ -2186,56 +2251,64 @@

    teal coverage - 69.63%

    60 - 4x + 4x +
          checkmate::assert_list(encodings)
    61 - 4x + 4x +
          self$append_text("Selected Options", "header3")
    62 - 4x + 4x +
          if (requireNamespace("yaml", quietly = TRUE)) {
    63 - 4x + 4x +
            self$append_text(yaml::as.yaml(encodings, handlers = list(
    64 - 4x + 4x +
              POSIXct = function(x) format(x, "%Y-%m-%d"),
    65 - 4x + 4x +
              POSIXlt = function(x) format(x, "%Y-%m-%d"),
    66 - 4x + 4x +
              Date = function(x) format(x, "%Y-%m-%d")
    67 - 4x + 4x +
            )), "verbatim")
    @@ -2263,14 +2336,16 @@

    teal coverage - 69.63%

    71 - 4x + 4x +
          self$append_metadata("Encodings", encodings)
    72 - 4x + 4x +
          invisible(self)
    @@ -2424,21 +2499,24 @@

    teal coverage - 69.63%

    94 - 9x + 9x +
          self$set_content(content)
    95 - 8x + 8x +
          self$set_style(style)
    96 - 8x + 8x +
          invisible(self)
    @@ -2529,56 +2607,64 @@

    teal coverage - 69.63%

    109 - 10x + 10x +
          checkmate::assert_class(content, "teal_slices")
    110 - 9x + 9x +
          if (length(content) != 0) {
    111 - 7x + 7x +
            states_list <- lapply(content, function(x) {
    112 - 7x + 7x +
              x_list <- shiny::isolate(as.list(x))
    113 - 7x + 7x +
              if (
    114 - 7x + 7x +
                inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
    115 - 7x + 7x +
                  length(x_list$choices) == 2 &&
    116 - 7x + 7x +
                  length(x_list$selected) == 2
    @@ -2613,7 +2699,8 @@

    teal coverage - 69.63%

    121 - 7x + 7x +
              if (!is.null(x_list$arg)) {
    @@ -2641,14 +2728,16 @@

    teal coverage - 69.63%

    125 - 7x + 7x +
              x_list <- x_list[
    126 - 7x + 7x +
                c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
    @@ -2662,21 +2751,24 @@

    teal coverage - 69.63%

    128 - 7x + 7x +
              names(x_list) <- c(
    129 - 7x + 7x +
                "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
    130 - 7x + 7x +
                "Selected Values", "Selected range", "Include NA values", "Include Inf values"
    @@ -2697,7 +2789,8 @@

    teal coverage - 69.63%

    133 - 7x + 7x +
              Filter(Negate(is.null), x_list)
    @@ -2718,14 +2811,16 @@

    teal coverage - 69.63%

    136 - 7x + 7x +
            if (requireNamespace("yaml", quietly = TRUE)) {
    137 - 7x + 7x +
              super$set_content(yaml::as.yaml(states_list))
    @@ -2760,14 +2855,16 @@

    teal coverage - 69.63%

    142 - 9x + 9x +
          private$teal_slices <- content
    143 - 9x + 9x +
          invisible(self)
    @@ -2816,28 +2913,32 @@

    teal coverage - 69.63%

    150 - 1x + 1x +
          checkmate::assert_list(x)
    151 - 1x + 1x +
          checkmate::assert_names(names(x), must.include = c("teal_slices"))
    152 - 1x + 1x +
          self$set_content(x$teal_slices)
    153 - 1x + 1x +
          invisible(self)
    @@ -2879,7 +2980,8 @@

    teal coverage - 69.63%

    159 - 2x + 2x +
          list(teal_slices = private$teal_slices)
    @@ -2990,28 +3092,32 @@

    teal coverage - 69.63%

    8 - 6x + 6x +
      vapply(
    9 - 6x + 6x +
        utils::sessionInfo()$otherPkgs,
    10 - 6x + 6x +
        function(x) {
    11 - 36x + 36x +
          paste0("library(", x$Package, ")")
    @@ -3025,7 +3131,8 @@

    teal coverage - 69.63%

    13 - 6x + 6x +
        character(1)
    @@ -3046,21 +3153,24 @@

    teal coverage - 69.63%

    16 - 6x + 6x +
        rev() %>%
    17 - 6x + 6x +
        paste0(sep = "\n") %>%
    18 - 6x + 6x +
        paste0(collapse = "")
    @@ -3102,21 +3212,24 @@

    teal coverage - 69.63%

    24 - 10x + 10x +
      code_string <- getOption("teal.load_nest_code")
    25 - 10x + 10x +
      if (is.character(code_string)) {
    26 - 2x + 2x +
        code_string
    @@ -3130,7 +3243,8 @@

    teal coverage - 69.63%

    28 - 8x + 8x +
        "# Add any code to install/load your NEST environment here\n"
    @@ -3270,14 +3384,16 @@

    teal coverage - 69.63%

    48 - 4x + 4x +
      str_prepro <- attr(datasets, "preprocessing_code")
    49 - 4x + 4x +
      if (length(str_prepro) == 0) {
    @@ -3298,7 +3414,8 @@

    teal coverage - 69.63%

    52 - 4x + 4x +
        str_prepro <- paste(str_prepro, collapse = "\n")
    @@ -3326,35 +3443,40 @@

    teal coverage - 69.63%

    56 - 4x + 4x +
      str_hash <- vapply(datanames, function(dataname) {
    57 - 6x + 6x +
        sprintf(
    58 - 6x + 6x +
          "stopifnot(%s == %s)",
    59 - 6x + 6x +
          deparse1(bquote(rlang::hash(.(as.name(dataname))))),
    60 - 6x + 6x +
          deparse1(hashes[[dataname]])
    @@ -3368,14 +3490,16 @@

    teal coverage - 69.63%

    62 - 4x + 4x +
      }, character(1))
    63 - 4x + 4x +
      str_hash <- paste(str_hash, collapse = "\n")
    @@ -3396,21 +3520,24 @@

    teal coverage - 69.63%

    66 - 4x + 4x +
      str_filter <- teal.slice::get_filter_expr(datasets, datanames)
    67 - 4x + 4x +
      if (str_filter == "") {
    68 - 2x + 2x +
        str_filter <- character(0)
    @@ -3438,14 +3565,16 @@

    teal coverage - 69.63%

    72 - 4x + 4x +
      str_code <- paste(c(str_prepro, str_hash, str_filter), collapse = "\n\n")
    73 - 4x + 4x +
      sprintf("%s\n", str_code)
    @@ -4424,42 +4553,48 @@

    teal coverage - 69.63%

    138 - 147x + 147x +
      checkmate::assert_string(label)
    139 - 144x + 144x +
      if (label == "global_filters") {
    140 - 1x + 1x +
        stop(
    141 - 1x + 1x +
          sprintf("module(label = \"%s\", ...\n  ", label),
    142 - 1x + 1x +
          "Label 'global_filters' is reserved in teal. Please change to something else.",
    143 - 1x + 1x +
          call. = FALSE
    @@ -4480,7 +4615,8 @@

    teal coverage - 69.63%

    146 - 143x + 143x +
      if (label == "Report previewer") {
    @@ -4543,35 +4679,40 @@

    teal coverage - 69.63%

    155 - 143x + 143x +
      checkmate::assert_function(server)
    156 - 143x + 143x +
      server_formals <- names(formals(server))
    157 - 143x + 143x +
      if (!(
    158 - 143x + 143x +
        "id" %in% server_formals ||
    159 - 143x + 143x +
          all(c("input", "output", "session") %in% server_formals)
    @@ -4585,70 +4726,80 @@

    teal coverage - 69.63%

    161 - 2x + 2x +
        stop(
    162 - 2x + 2x +
          "\nmodule() `server` argument requires a function with following arguments:",
    163 - 2x + 2x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    164 - 2x + 2x +
          "\n - input, output, session (not recommended) - then `shiny::callModule` will be used to call a module.",
    165 - 2x + 2x +
          "\n\nFollowing arguments can be used optionaly:",
    166 - 2x + 2x +
          "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
    167 - 2x + 2x +
          "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
    168 - 2x + 2x +
          "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
    169 - 2x + 2x +
          "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
    170 - 2x + 2x +
          "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
    @@ -4669,42 +4820,48 @@

    teal coverage - 69.63%

    173 - 141x + 141x +
      if ("datasets" %in% server_formals) {
    174 - 2x + 2x +
        warning(
    175 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    176 - 2x + 2x +
          "`datasets` argument in the server is deprecated and will be removed in the next release. ",
    177 - 2x + 2x +
          "Please use `data` instead.",
    178 - 2x + 2x +
          call. = FALSE
    @@ -4746,56 +4903,64 @@

    teal coverage - 69.63%

    184 - 141x + 141x +
      checkmate::assert_function(ui)
    185 - 141x + 141x +
      ui_formals <- names(formals(ui))
    186 - 141x + 141x +
      if (!"id" %in% ui_formals) {
    187 - 1x + 1x +
        stop(
    188 - 1x + 1x +
          "\nmodule() `ui` argument requires a function with following arguments:",
    189 - 1x + 1x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    190 - 1x + 1x +
          "\n\nFollowing arguments can be used optionally:",
    191 - 1x + 1x +
          "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
    @@ -4816,42 +4981,48 @@

    teal coverage - 69.63%

    194 - 140x + 140x +
      if (any(c("data", "datasets") %in% ui_formals)) {
    195 - 2x + 2x +
        stop(
    196 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    197 - 2x + 2x +
          "UI with `data` or `datasets` argument is no longer accepted.\n  ",
    198 - 2x + 2x +
          "If some UI inputs depend on data, please move the logic to your server instead.\n  ",
    199 - 2x + 2x +
          "Possible solutions are renderUI() or updateXyzInput() functions."
    @@ -4893,7 +5064,8 @@

    teal coverage - 69.63%

    205 - 138x + 138x +
      if (!missing(filters)) {
    @@ -4963,21 +5135,24 @@

    teal coverage - 69.63%

    215 - 138x + 138x +
      if (!is.element("data", server_formals) && !is.null(datanames)) {
    216 - 50x + 50x +
        message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
    217 - 50x + 50x +
        datanames <- NULL
    @@ -4991,7 +5166,8 @@

    teal coverage - 69.63%

    219 - 138x + 138x +
      checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
    @@ -5012,49 +5188,56 @@

    teal coverage - 69.63%

    222 - 137x + 137x +
      checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
    223 - 135x + 135x +
      srv_extra_args <- setdiff(names(server_args), server_formals)
    224 - 135x + 135x +
      if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
    225 - 1x + 1x +
        stop(
    226 - 1x + 1x +
          "\nFollowing `server_args` elements have no equivalent in the formals of the server:\n",
    227 - 1x + 1x +
          paste(paste(" -", srv_extra_args), collapse = "\n"),
    228 - 1x + 1x +
          "\n\nUpdate the server arguments by including above or add `...`"
    @@ -5089,49 +5272,56 @@

    teal coverage - 69.63%

    233 - 134x + 134x +
      checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
    234 - 132x + 132x +
      ui_extra_args <- setdiff(names(ui_args), ui_formals)
    235 - 132x + 132x +
      if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
    236 - 1x + 1x +
        stop(
    237 - 1x + 1x +
          "\nFollowing `ui_args` elements have no equivalent in the formals of UI:\n",
    238 - 1x + 1x +
          paste(paste(" -", ui_extra_args), collapse = "\n"),
    239 - 1x + 1x +
          "\n\nUpdate the UI arguments by including above or add `...`"
    @@ -5159,35 +5349,40 @@

    teal coverage - 69.63%

    243 - 131x + 131x +
      structure(
    244 - 131x + 131x +
        list(
    245 - 131x + 131x +
          label = label,
    246 - 131x + 131x +
          server = server, ui = ui, datanames = unique(datanames),
    247 - 131x + 131x +
          server_args = server_args, ui_args = ui_args
    @@ -5201,7 +5396,8 @@

    teal coverage - 69.63%

    249 - 131x + 131x +
        class = "teal_module"
    @@ -5257,42 +5453,48 @@

    teal coverage - 69.63%

    257 - 102x + 102x +
      checkmate::assert_string(label)
    258 - 100x + 100x +
      submodules <- list(...)
    259 - 100x + 100x +
      if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
    260 - 2x + 2x +
        stop(
    261 - 2x + 2x +
          "The only character argument to modules() must be 'label' and it must be named, ",
    262 - 2x + 2x +
          "change modules('lab', ...) to modules(label = 'lab', ...)"
    @@ -5320,7 +5522,8 @@

    teal coverage - 69.63%

    266 - 98x + 98x +
      checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -5341,42 +5544,48 @@

    teal coverage - 69.63%

    269 - 95x + 95x +
      labels <- vapply(submodules, function(submodule) submodule$label, character(1))
    270 - 95x + 95x +
      names(submodules) <- make.unique(gsub("[^[:alnum:]]+", "_", labels), sep = "_")
    271 - 95x + 95x +
      structure(
    272 - 95x + 95x +
        list(
    273 - 95x + 95x +
          label = label,
    274 - 95x + 95x +
          children = submodules
    @@ -5390,7 +5599,8 @@

    teal coverage - 69.63%

    276 - 95x + 95x +
        class = "teal_modules"
    @@ -5453,7 +5663,8 @@

    teal coverage - 69.63%

    285 - 3x + 3x +
      paste0(paste(rep(" ", indent), collapse = ""), "+ ", x$label, "\n", collapse = "")
    @@ -5558,28 +5769,32 @@

    teal coverage - 69.63%

    300 - 1x + 1x +
      paste(
    301 - 1x + 1x +
        c(
    302 - 1x + 1x +
          paste0(rep(" ", indent), "+ ", x$label, "\n"),
    303 - 1x + 1x +
          unlist(lapply(x$children, format, indent = indent + 1, ...))
    @@ -5593,7 +5808,8 @@

    teal coverage - 69.63%

    305 - 1x + 1x +
        collapse = ""
    @@ -5726,42 +5942,48 @@

    teal coverage - 69.63%

    324 - 8x + 8x +
      checkmate::assert_class(modules, "teal_modules")
    325 - 6x + 6x +
      checkmate::assert_class(module, "teal_module")
    326 - 4x + 4x +
      modules$children <- c(modules$children, list(module))
    327 - 4x + 4x +
      labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
    328 - 4x + 4x +
      names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
    329 - 4x + 4x +
      modules
    @@ -5866,7 +6088,8 @@

    teal coverage - 69.63%

    344 - 20x + 20x +
      if (inherits(modules, class)) {
    @@ -5880,28 +6103,32 @@

    teal coverage - 69.63%

    346 - 20x + 20x +
      } else if (inherits(modules, "teal_module")) {
    347 - 11x + 11x +
        NULL
    348 - 9x + 9x +
      } else if (inherits(modules, "teal_modules")) {
    349 - 9x + 9x +
        Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
    @@ -6111,49 +6338,56 @@

    teal coverage - 69.63%

    379 - 286x + 286x +
      checkmate::assert_string(arg)
    380 - 283x + 283x +
      if (inherits(modules, "teal_modules")) {
    381 - 29x + 29x +
        any(unlist(lapply(modules$children, is_arg_used, arg)))
    382 - 254x + 254x +
      } else if (inherits(modules, "teal_module")) {
    383 - 43x + 43x +
        is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
    384 - 211x + 211x +
      } else if (is.function(modules)) {
    385 - 209x + 209x +
        isTRUE(arg %in% names(formals(modules)))
    @@ -6167,7 +6401,8 @@

    teal coverage - 69.63%

    387 - 2x + 2x +
        stop("is_arg_used function not implemented for this object")
    @@ -6279,28 +6514,32 @@

    teal coverage - 69.63%

    403 - 12x + 12x +
      checkmate::assert_multi_class(modules, c("teal_module", "teal_modules"))
    404 - 12x + 12x +
      checkmate::assert_int(depth, lower = 0)
    405 - 11x + 11x +
      if (inherits(modules, "teal_modules")) {
    406 - 4x + 4x +
        max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
    @@ -6314,7 +6553,8 @@

    teal coverage - 69.63%

    408 - 7x + 7x +
        depth
    @@ -6768,14 +7008,16 @@

    teal coverage - 69.63%

    48 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    49 - 3x + 3x +
        observeEvent(input$show, {
    @@ -6859,7 +7101,8 @@

    teal coverage - 69.63%

    61 - 3x + 3x +
        filter_manager_srv("filter_manager", filtered_data_list, filter)
    @@ -6971,14 +7214,16 @@

    teal coverage - 69.63%

    77 - 5x + 5x +
      moduleServer(id, function(input, output, session) {
    78 - 5x + 5x +
        logger::log_trace("filter_manager_srv initializing for: { paste(names(filtered_data_list), collapse = ', ')}.")
    @@ -6992,7 +7237,8 @@

    teal coverage - 69.63%

    80 - 5x + 5x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    @@ -7034,7 +7280,8 @@

    teal coverage - 69.63%

    86 - 5x + 5x +
        slices_global <- reactiveVal(filter)
    @@ -7048,14 +7295,16 @@

    teal coverage - 69.63%

    88 - 5x + 5x +
        filtered_data_list <-
    89 - 5x + 5x +
          if (!is_module_specific) {
    @@ -7076,7 +7325,8 @@

    teal coverage - 69.63%

    92 - 4x + 4x +
            list(global_filters = unlist(filtered_data_list)[[1]])
    @@ -7104,21 +7354,24 @@

    teal coverage - 69.63%

    96 - 1x + 1x +
            flatten_nested <- function(x, name = NULL) {
    97 - 5x + 5x +
              if (inherits(x, "FilteredData")) {
    98 - 3x + 3x +
                setNames(list(x), name)
    @@ -7132,7 +7385,8 @@

    teal coverage - 69.63%

    100 - 2x + 2x +
                unlist(lapply(names(x), function(name) flatten_nested(x[[name]], name)))
    @@ -7153,7 +7407,8 @@

    teal coverage - 69.63%

    103 - 1x + 1x +
            flatten_nested(filtered_data_list)
    @@ -7188,49 +7443,56 @@

    teal coverage - 69.63%

    108 - 5x + 5x +
        mapping_matrix <- reactive({
    109 - 5x + 5x +
          state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
    110 - 5x + 5x +
          mapping_smooth <- lapply(filtered_data_list, function(x) {
    111 - 7x + 7x +
            state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
    112 - 7x + 7x +
            state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
    113 - 7x + 7x +
            states_active <- state_ids_global %in% state_ids_local
    114 - 7x + 7x +
            ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
    @@ -7251,7 +7513,8 @@

    teal coverage - 69.63%

    117 - 5x + 5x +
          as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
    @@ -7272,14 +7535,16 @@

    teal coverage - 69.63%

    120 - 5x + 5x +
        output$slices_table <- renderTable(
    121 - 5x + 5x +
          expr = {
    @@ -7293,28 +7558,32 @@

    teal coverage - 69.63%

    123 - 2x + 2x +
            mm <- mapping_matrix()
    124 - 2x + 2x +
            mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
    125 - 2x + 2x +
            mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
    126 - 2x + 2x +
            if (!is_module_specific) colnames(mm) <- "Global Filters"
    @@ -7335,21 +7604,24 @@

    teal coverage - 69.63%

    129 - 2x + 2x +
            if (nrow(mm) == 0L) {
    130 - 2x + 2x +
              mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
    131 - 2x + 2x +
              rownames(mm) <- ""
    @@ -7377,7 +7649,8 @@

    teal coverage - 69.63%

    135 - 2x + 2x +
            mm[names(mm) != "Report previewer"]
    @@ -7391,14 +7664,16 @@

    teal coverage - 69.63%

    137 - 5x + 5x +
          align = paste(c("l", rep("c", sum(names(filtered_data_list) != "Report previewer"))), collapse = ""),
    138 - 5x + 5x +
          rownames = TRUE
    @@ -7426,35 +7701,40 @@

    teal coverage - 69.63%

    142 - 5x + 5x +
        modules_out <- lapply(names(filtered_data_list), function(module_name) {
    143 - 7x + 7x +
          filter_manager_module_srv(
    144 - 7x + 7x +
            id = module_name,
    145 - 7x + 7x +
            module_fd = filtered_data_list[[module_name]],
    146 - 7x + 7x +
            slices_global = slices_global
    @@ -7489,7 +7769,8 @@

    teal coverage - 69.63%

    151 - 5x + 5x +
        snapshot_manager_srv("snapshot_manager", slices_global, mapping_matrix, filtered_data_list)
    @@ -7503,7 +7784,8 @@

    teal coverage - 69.63%

    153 - 5x + 5x +
        modules_out # returned for testing purpose
    @@ -7692,7 +7974,8 @@

    teal coverage - 69.63%

    180 - 7x + 7x +
      moduleServer(id, function(input, output, session) {
    @@ -7706,7 +7989,8 @@

    teal coverage - 69.63%

    182 - 7x + 7x +
        module_fd$set_available_teal_slices(reactive(slices_global()))
    @@ -7727,7 +8011,8 @@

    teal coverage - 69.63%

    185 - 7x + 7x +
        slices_module <- reactive(module_fd$get_filter_state())
    @@ -7748,14 +8033,16 @@

    teal coverage - 69.63%

    188 - 7x + 7x +
        previous_slices <- reactiveVal(isolate(slices_module()))
    189 - 7x + 7x +
        slices_added <- reactiveVal(NULL)
    @@ -7776,21 +8063,24 @@

    teal coverage - 69.63%

    192 - 7x + 7x +
        observeEvent(slices_module(), ignoreNULL = FALSE, {
    193 - 2x + 2x +
          logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
    194 - 2x + 2x +
          added <- setdiff_teal_slices(slices_module(), slices_global())
    @@ -7804,7 +8094,8 @@

    teal coverage - 69.63%

    196 - 2x + 2x +
          previous_slices(slices_module())
    @@ -7825,7 +8116,8 @@

    teal coverage - 69.63%

    199 - 7x + 7x +
        observeEvent(slices_added(), ignoreNULL = TRUE, {
    @@ -7944,7 +8236,8 @@

    teal coverage - 69.63%

    216 - 7x + 7x +
        slices_module # returned for testing purpose
    @@ -8503,35 +8796,40 @@

    teal coverage - 69.63%

    77 - 79x + 79x +
      shiny::isolate({
    78 - 79x + 79x +
        checkmate::assert_flag(allow_add)
    79 - 79x + 79x +
        checkmate::assert_flag(module_specific)
    80 - 33x + 33x +
        if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
    81 - 76x + 76x +
        checkmate::assert_string(app_id, null.ok = TRUE)
    @@ -8545,14 +8843,16 @@

    teal coverage - 69.63%

    83 - 76x + 76x +
        slices <- list(...)
    84 - 76x + 76x +
        all_slice_id <- vapply(slices, `[[`, character(1L), "id")
    @@ -8566,14 +8866,16 @@

    teal coverage - 69.63%

    86 - 76x + 76x +
        if (missing(mapping)) {
    87 - 46x + 46x +
          mapping <- list(global_filters = all_slice_id)
    @@ -8587,14 +8889,16 @@

    teal coverage - 69.63%

    89 - 76x + 76x +
        if (!module_specific) {
    90 - 71x + 71x +
          mapping[setdiff(names(mapping), "global_filters")] <- NULL
    @@ -8615,42 +8919,48 @@

    teal coverage - 69.63%

    93 - 76x + 76x +
        failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
    94 - 76x + 76x +
        if (length(failed_slice_id)) {
    95 - 1x + 1x +
          stop(sprintf(
    96 - 1x + 1x +
            "Filters in mapping don't match any available filter.\n %s not in %s",
    97 - 1x + 1x +
            toString(failed_slice_id),
    98 - 1x + 1x +
            toString(all_slice_id)
    @@ -8678,7 +8988,8 @@

    teal coverage - 69.63%

    102 - 75x + 75x +
        tss <- teal.slice::teal_slices(
    @@ -8692,28 +9003,32 @@

    teal coverage - 69.63%

    104 - 75x + 75x +
          exclude_varnames = exclude_varnames,
    105 - 75x + 75x +
          include_varnames = include_varnames,
    106 - 75x + 75x +
          count_type = count_type,
    107 - 75x + 75x +
          allow_add = allow_add
    @@ -8727,35 +9042,40 @@

    teal coverage - 69.63%

    109 - 75x + 75x +
        attr(tss, "mapping") <- mapping
    110 - 75x + 75x +
        attr(tss, "module_specific") <- module_specific
    111 - 75x + 75x +
        attr(tss, "app_id") <- app_id
    112 - 75x + 75x +
        class(tss) <- c("modules_teal_slices", class(tss))
    113 - 75x + 75x +
        tss
    @@ -8825,14 +9145,16 @@

    teal coverage - 69.63%

    123 - 10x + 10x +
      checkmate::assert_list(x)
    124 - 10x + 10x +
      lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
    @@ -8846,21 +9168,24 @@

    teal coverage - 69.63%

    126 - 10x + 10x +
      attrs <- attributes(unclass(x))
    127 - 10x + 10x +
      ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
    128 - 10x + 10x +
      do.call(teal_slices, c(ans, attrs))
    @@ -9112,28 +9437,32 @@

    teal coverage - 69.63%

    164 - 1x + 1x +
      checkmate::assert_class(filter, "teal_slices")
    165 - 1x + 1x +
      shiny::isolate({
    166 - 1x + 1x +
        filter_copy <- lapply(filter, function(slice) {
    167 - 2x + 2x +
          teal.slice::as.teal_slice(as.list(slice))
    @@ -9147,14 +9476,16 @@

    teal coverage - 69.63%

    169 - 1x + 1x +
        attributes(filter_copy) <- attributes(filter)
    170 - 1x + 1x +
        filter_copy
    @@ -9930,14 +10261,16 @@

    teal coverage - 69.63%

    108 - 36x + 36x +
      dots <- list(...)
    109 - 2x + 2x +
      if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
    @@ -9951,21 +10284,24 @@

    teal coverage - 69.63%

    111 - 34x + 34x +
      messages <- extract_validator(dots, header)
    112 - 34x + 34x +
      failings <- if (!any_names(dots)) {
    113 - 29x + 29x +
        add_header(messages, header)
    @@ -9979,7 +10315,8 @@

    teal coverage - 69.63%

    115 - 5x + 5x +
        unlist(messages)
    @@ -10000,7 +10337,8 @@

    teal coverage - 69.63%

    118 - 34x + 34x +
      shiny::validate(shiny::need(is.null(failings), failings))
    @@ -10070,7 +10408,8 @@

    teal coverage - 69.63%

    128 - 118x + 118x +
      all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
    @@ -10133,7 +10472,8 @@

    teal coverage - 69.63%

    137 - 49x + 49x +
      x$.__enclos_env__$private$enabled
    @@ -10189,14 +10529,16 @@

    teal coverage - 69.63%

    145 - 113x + 113x +
      if (inherits(iv, "InputValidator")) {
    146 - 49x + 49x +
        add_header(gather_messages(iv), header)
    @@ -10210,14 +10552,16 @@

    teal coverage - 69.63%

    148 - 58x + 58x +
        if (is.null(names(iv))) names(iv) <- rep("", length(iv))
    149 - 64x + 64x +
        mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
    @@ -10280,28 +10624,32 @@

    teal coverage - 69.63%

    158 - 49x + 49x +
      if (validator_enabled(iv)) {
    159 - 46x + 46x +
        status <- iv$validate()
    160 - 46x + 46x +
        failing_inputs <- Filter(Negate(is.null), status)
    161 - 46x + 46x +
        unique(lapply(failing_inputs, function(x) x[["message"]]))
    @@ -10315,14 +10663,16 @@

    teal coverage - 69.63%

    163 - 3x + 3x +
        warning("Validator is disabled and will be omitted.")
    164 - 3x + 3x +
        list()
    @@ -10378,21 +10728,24 @@

    teal coverage - 69.63%

    172 - 78x + 78x +
      ans <- unlist(messages)
    173 - 78x + 78x +
      if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
    174 - 31x + 31x +
        ans <- c(paste0(header, "\n"), ans, "\n")
    @@ -10406,7 +10759,8 @@

    teal coverage - 69.63%

    176 - 78x + 78x +
      ans
    @@ -10455,21 +10809,24 @@

    teal coverage - 69.63%

    183 - 103x + 103x +
      any(
    184 - 103x + 103x +
        if (is.list(x)) {
    185 - 58x + 58x +
          if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
    @@ -10483,7 +10840,8 @@

    teal coverage - 69.63%

    187 - 40x + 40x +
          FALSE
    @@ -11252,42 +11610,48 @@

    teal coverage - 69.63%

    106 - 6x + 6x +
      checkmate::assert_character(id)
    107 - 6x + 6x +
      checkmate::assert_true(is.reactive(slices_global))
    108 - 6x + 6x +
      checkmate::assert_class(isolate(slices_global()), "teal_slices")
    109 - 6x + 6x +
      checkmate::assert_true(is.reactive(mapping_matrix))
    110 - 6x + 6x +
      checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
    111 - 6x + 6x +
      checkmate::assert_list(filtered_data_list, types = "FilteredData", any.missing = FALSE, names = "named")
    @@ -11301,14 +11665,16 @@

    teal coverage - 69.63%

    113 - 6x + 6x +
      moduleServer(id, function(input, output, session) {
    114 - 6x + 6x +
        ns <- session$ns
    @@ -11329,28 +11695,32 @@

    teal coverage - 69.63%

    117 - 6x + 6x +
        filter <- isolate(slices_global())
    118 - 6x + 6x +
        snapshot_history <- reactiveVal({
    119 - 6x + 6x +
          list(
    120 - 6x + 6x +
            "Initial application state" = as.list(filter, recursive = TRUE)
    @@ -11392,7 +11762,8 @@

    teal coverage - 69.63%

    126 - 6x + 6x +
        observeEvent(input$snapshot_add, {
    @@ -11483,7 +11854,8 @@

    teal coverage - 69.63%

    139 - 6x + 6x +
        observeEvent(input$snapshot_name_accept, {
    @@ -11679,7 +12051,8 @@

    teal coverage - 69.63%

    167 - 6x + 6x +
        observeEvent(input$snapshot_load, {
    @@ -11805,7 +12178,8 @@

    teal coverage - 69.63%

    185 - 6x + 6x +
        observeEvent(input$snaphot_file_accept, {
    @@ -12155,7 +12529,8 @@

    teal coverage - 69.63%

    235 - 6x + 6x +
        observeEvent(input$snapshot_reset, {
    @@ -12323,21 +12698,24 @@

    teal coverage - 69.63%

    259 - 6x + 6x +
        observers <- reactiveValues()
    260 - 6x + 6x +
        handlers <- reactiveValues()
    261 - 6x + 6x +
        divs <- reactiveValues()
    @@ -12351,14 +12729,16 @@

    teal coverage - 69.63%

    263 - 6x + 6x +
        observeEvent(snapshot_history(), {
    264 - 2x + 2x +
          lapply(names(snapshot_history())[-1L], function(s) {
    @@ -12729,42 +13109,48 @@

    teal coverage - 69.63%

    317 - 6x + 6x +
        output$snapshot_list <- renderUI({
    318 - 2x + 2x +
          rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
    319 - 2x + 2x +
          if (length(rows) == 0L) {
    320 - 2x + 2x +
            div(
    321 - 2x + 2x +
              class = "snapshot_manager_placeholder",
    322 - 2x + 2x +
              "Snapshots will appear here."
    @@ -13449,7 +13835,8 @@

    teal coverage - 69.63%

    52 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -13463,7 +13850,8 @@

    teal coverage - 69.63%

    54 - 7x + 7x +
      checkmate::assert_multi_class(splash_ui, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -13477,7 +13865,8 @@

    teal coverage - 69.63%

    56 - 7x + 7x +
      if (is.character(title)) {
    @@ -13498,7 +13887,8 @@

    teal coverage - 69.63%

    59 - 7x + 7x +
        validate_app_title_tag(title)
    @@ -13519,28 +13909,32 @@

    teal coverage - 69.63%

    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "header",
    64 - 7x + 7x +
        checkmate::check_string(header),
    65 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -13554,7 +13948,8 @@

    teal coverage - 69.63%

    67 - 7x + 7x +
      if (checkmate::test_string(header)) {
    @@ -13582,28 +13977,32 @@

    teal coverage - 69.63%

    71 - 7x + 7x +
      checkmate::assert(
    72 - 7x + 7x +
        .var.name = "footer",
    73 - 7x + 7x +
        checkmate::check_string(footer),
    74 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -13617,7 +14016,8 @@

    teal coverage - 69.63%

    76 - 7x + 7x +
      if (checkmate::test_string(footer)) {
    @@ -13645,7 +14045,8 @@

    teal coverage - 69.63%

    80 - 7x + 7x +
      ns <- NS(id)
    @@ -13666,7 +14067,8 @@

    teal coverage - 69.63%

    83 - 7x + 7x +
      splash_ui <- div(
    @@ -13680,7 +14082,8 @@

    teal coverage - 69.63%

    85 - 7x + 7x +
        id = ns("main_ui_container"),
    @@ -13701,7 +14104,8 @@

    teal coverage - 69.63%

    88 - 7x + 7x +
        div(splash_ui)
    @@ -13736,35 +14140,40 @@

    teal coverage - 69.63%

    93 - 7x + 7x +
      shiny_busy_message_panel <- conditionalPanel(
    94 - 7x + 7x +
        condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint: line_length.
    95 - 7x + 7x +
        div(
    96 - 7x + 7x +
          icon("arrows-rotate", "spin fa-spin"),
    97 - 7x + 7x +
          "Computing ...",
    @@ -13778,7 +14187,8 @@

    teal coverage - 69.63%

    99 - 7x + 7x +
          class = "shinybusymessage"
    @@ -13806,98 +14216,112 @@

    teal coverage - 69.63%

    103 - 7x + 7x +
      fluidPage(
    104 - 7x + 7x +
        title = title,
    105 - 7x + 7x +
        theme = get_teal_bs_theme(),
    106 - 7x + 7x +
        include_teal_css_js(),
    107 - 7x + 7x +
        tags$header(header),
    108 - 7x + 7x +
        tags$hr(class = "my-2"),
    109 - 7x + 7x +
        shiny_busy_message_panel,
    110 - 7x + 7x +
        splash_ui,
    111 - 7x + 7x +
        tags$hr(),
    112 - 7x + 7x +
        tags$footer(
    113 - 7x + 7x +
          div(
    114 - 7x + 7x +
            footer,
    115 - 7x + 7x +
            teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
    116 - 7x + 7x +
            textOutput(ns("identifier"))
    @@ -13960,21 +14384,24 @@

    teal coverage - 69.63%

    125 - 19x + 19x +
      stopifnot(is.reactive(teal_data_rv))
    126 - 18x + 18x +
      moduleServer(id, function(input, output, session) {
    127 - 18x + 18x +
        logger::log_trace("srv_teal initializing the module.")
    @@ -13988,14 +14415,16 @@

    teal coverage - 69.63%

    129 - 18x + 18x +
        output$identifier <- renderText(
    130 - 18x + 18x +
          paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
    @@ -14016,28 +14445,32 @@

    teal coverage - 69.63%

    133 - 18x + 18x +
        teal.widgets::verbatim_popup_srv(
    134 - 18x + 18x +
          "sessionInfo",
    135 - 18x + 18x +
          verbatim_content = utils::capture.output(utils::sessionInfo()),
    136 - 18x + 18x +
          title = "SessionInfo"
    @@ -14065,7 +14498,8 @@

    teal coverage - 69.63%

    140 - 18x + 18x +
        run_js_files(files = "init.js")
    @@ -14100,35 +14534,40 @@

    teal coverage - 69.63%

    145 - 18x + 18x +
        get_client_timezone(session$ns)
    146 - 18x + 18x +
        observeEvent(
    147 - 18x + 18x +
          eventExpr = input$timezone,
    148 - 18x + 18x +
          once = TRUE,
    149 - 18x + 18x +
          handlerExpr = {
    @@ -14170,14 +14609,16 @@

    teal coverage - 69.63%

    155 - 18x + 18x +
        reporter <- teal.reporter::Reporter$new()
    156 - 18x + 18x +
        if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
    @@ -14205,28 +14646,32 @@

    teal coverage - 69.63%

    160 - 18x + 18x +
        env <- environment()
    161 - 18x + 18x +
        datasets_reactive <- eventReactive(teal_data_rv(), {
    162 - 4x + 4x +
          env$progress <- shiny::Progress$new(session)
    163 - 4x + 4x +
          env$progress$set(0.25, message = "Setting data")
    @@ -14247,7 +14692,8 @@

    teal coverage - 69.63%

    166 - 4x + 4x +
          modules_datasets(teal_data_rv(), modules, filter, teal_data_to_filtered_data(teal_data_rv()))
    @@ -14310,7 +14756,8 @@

    teal coverage - 69.63%

    175 - 18x + 18x +
        observeEvent(datasets_reactive(), once = TRUE, {
    @@ -15394,21 +15841,24 @@

    teal coverage - 69.63%

    119 - 50x + 50x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    120 - 50x + 50x +
      checkmate::assert_class(reporter, "Reporter")
    121 - 49x + 49x +
      UseMethod("srv_nested_tabs", modules)
    @@ -15506,7 +15956,8 @@

    teal coverage - 69.63%

    135 - 22x + 22x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    @@ -15520,14 +15971,16 @@

    teal coverage - 69.63%

    137 - 22x + 22x +
      moduleServer(id = id, module = function(input, output, session) {
    138 - 22x + 22x +
        logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
    @@ -15541,70 +15994,80 @@

    teal coverage - 69.63%

    140 - 22x + 22x +
        labels <- vapply(modules$children, `[[`, character(1), "label")
    141 - 22x + 22x +
        modules_reactive <- sapply(
    142 - 22x + 22x +
          names(modules$children),
    143 - 22x + 22x +
          function(module_id) {
    144 - 33x + 33x +
            srv_nested_tabs(
    145 - 33x + 33x +
              id = module_id,
    146 - 33x + 33x +
              datasets = datasets[[labels[module_id]]],
    147 - 33x + 33x +
              modules = modules$children[[module_id]],
    148 - 33x + 33x +
              is_module_specific = is_module_specific,
    149 - 33x + 33x +
              reporter = reporter
    @@ -15625,7 +16088,8 @@

    teal coverage - 69.63%

    152 - 22x + 22x +
          simplify = FALSE
    @@ -15653,21 +16117,24 @@

    teal coverage - 69.63%

    156 - 22x + 22x +
        input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
    157 - 22x + 22x +
        get_active_module <- reactive({
    158 - 12x + 12x +
          if (length(modules$children) == 1L) {
    @@ -15681,7 +16148,8 @@

    teal coverage - 69.63%

    160 - 1x + 1x +
            modules_reactive[[1]]()
    @@ -15702,7 +16170,8 @@

    teal coverage - 69.63%

    163 - 11x + 11x +
            modules_reactive[[input_validated()]]()
    @@ -15730,7 +16199,8 @@

    teal coverage - 69.63%

    167 - 22x + 22x +
        get_active_module
    @@ -15786,14 +16256,16 @@

    teal coverage - 69.63%

    175 - 27x + 27x +
      checkmate::assert_class(datasets, "FilteredData")
    176 - 27x + 27x +
      logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
    @@ -15807,14 +16279,16 @@

    teal coverage - 69.63%

    178 - 27x + 27x +
      moduleServer(id = id, module = function(input, output, session) {
    179 - 27x + 27x +
        if (!is.null(modules$datanames) && is_module_specific) {
    @@ -15870,35 +16344,40 @@

    teal coverage - 69.63%

    187 - 27x + 27x +
        trigger_data <- reactiveVal(1L)
    188 - 27x + 27x +
        trigger_module <- reactiveVal(NULL)
    189 - 27x + 27x +
        output$data_reactive <- renderUI({
    190 - 17x + 17x +
          lapply(datasets$datanames(), function(x) {
    191 - 21x + 21x +
            datasets$get_data(x, filtered = TRUE)
    @@ -15912,14 +16391,16 @@

    teal coverage - 69.63%

    193 - 17x + 17x +
          isolate(trigger_data(trigger_data() + 1))
    194 - 17x + 17x +
          isolate(trigger_module(TRUE))
    @@ -15933,7 +16414,8 @@

    teal coverage - 69.63%

    196 - 17x + 17x +
          NULL
    @@ -15961,14 +16443,16 @@

    teal coverage - 69.63%

    200 - 27x + 27x +
        args <- c(list(id = "module"), modules$server_args)
    201 - 27x + 27x +
        if (is_arg_used(modules$server, "reporter")) {
    @@ -15996,14 +16480,16 @@

    teal coverage - 69.63%

    205 - 27x + 27x +
        if (is_arg_used(modules$server, "datasets")) {
    206 - 1x + 1x +
          args <- c(args, datasets = datasets)
    @@ -16024,21 +16510,24 @@

    teal coverage - 69.63%

    209 - 27x + 27x +
        if (is_arg_used(modules$server, "data")) {
    210 - 7x + 7x +
          data <- eventReactive(trigger_data(), .datasets_to_data(modules, datasets))
    211 - 7x + 7x +
          args <- c(args, data = list(data))
    @@ -16059,21 +16548,24 @@

    teal coverage - 69.63%

    214 - 27x + 27x +
        if (is_arg_used(modules$server, "filter_panel_api")) {
    215 - 2x + 2x +
          filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
    216 - 2x + 2x +
          args <- c(args, filter_panel_api = filter_panel_api)
    @@ -16101,49 +16593,56 @@

    teal coverage - 69.63%

    220 - 27x + 27x +
        observeEvent(
    221 - 27x + 27x +
          ignoreNULL = TRUE,
    222 - 27x + 27x +
          once = TRUE,
    223 - 27x + 27x +
          eventExpr = trigger_module(),
    224 - 27x + 27x +
          handlerExpr = {
    225 - 17x + 17x +
            module_output <- if (is_arg_used(modules$server, "id")) {
    226 - 17x + 17x +
              do.call(modules$server, args)
    @@ -16192,7 +16691,8 @@

    teal coverage - 69.63%

    233 - 27x + 27x +
        reactive(modules)
    @@ -16311,14 +16811,16 @@

    teal coverage - 69.63%

    250 - 4x + 4x +
      checkmate::assert_class(module, "teal_module")
    251 - 4x + 4x +
      checkmate::assert_class(datasets, "FilteredData")
    @@ -16332,14 +16834,16 @@

    teal coverage - 69.63%

    253 - 4x + 4x +
      datanames <- if (is.null(module$datanames) || identical(module$datanames, "all")) {
    254 - 1x + 1x +
        datasets$datanames()
    @@ -16353,21 +16857,24 @@

    teal coverage - 69.63%

    256 - 3x + 3x +
        include_parent_datanames(
    257 - 3x + 3x +
          module$datanames,
    258 - 3x + 3x +
          datasets$get_join_keys()
    @@ -16402,7 +16909,8 @@

    teal coverage - 69.63%

    263 - 4x + 4x +
      data <- sapply(datanames, function(x) datasets$get_data(x, filtered = TRUE), simplify = FALSE)
    @@ -16416,7 +16924,8 @@

    teal coverage - 69.63%

    265 - 4x + 4x +
      hashes <- calculate_hashes(datanames, datasets)
    @@ -16430,28 +16939,32 @@

    teal coverage - 69.63%

    267 - 4x + 4x +
      code <- c(
    268 - 4x + 4x +
        get_rcode_str_install(),
    269 - 4x + 4x +
        get_rcode_libraries(),
    270 - 4x + 4x +
        get_datasets_code(datanames, datasets, hashes)
    @@ -16479,21 +16992,24 @@

    teal coverage - 69.63%

    274 - 4x + 4x +
      data <- do.call(
    275 - 4x + 4x +
        teal.data::teal_data,
    276 - 4x + 4x +
        args = c(data, code = list(code), join_keys = list(datasets$get_join_keys()[datanames]))
    @@ -16514,14 +17030,16 @@

    teal coverage - 69.63%

    279 - 4x + 4x +
      data@verified <- attr(datasets, "verification_status")
    280 - 4x + 4x +
      data
    @@ -16605,7 +17123,8 @@

    teal coverage - 69.63%

    292 - 7x + 7x +
      sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
    @@ -17164,28 +17683,32 @@

    teal coverage - 69.63%

    78 - 5x + 5x +
      checkmate::assert_class(modules, "teal_modules")
    79 - 5x + 5x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    80 - 5x + 5x +
      checkmate::assert_class(reporter, "Reporter")
    81 - 3x + 3x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -17199,14 +17722,16 @@

    teal coverage - 69.63%

    83 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    84 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initializing the module.")
    @@ -17220,14 +17745,16 @@

    teal coverage - 69.63%

    86 - 3x + 3x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    87 - 3x + 3x +
        manager_out <- filter_manager_modal_srv("filter_manager", filtered_data_list = datasets, filter = filter)
    @@ -17241,42 +17768,48 @@

    teal coverage - 69.63%

    89 - 3x + 3x +
        active_module <- srv_nested_tabs(
    90 - 3x + 3x +
          id = "root",
    91 - 3x + 3x +
          datasets = datasets,
    92 - 3x + 3x +
          modules = modules,
    93 - 3x + 3x +
          reporter = reporter,
    94 - 3x + 3x +
          is_module_specific = is_module_specific
    @@ -17297,21 +17830,24 @@

    teal coverage - 69.63%

    97 - 3x + 3x +
        if (!is_module_specific) {
    98 - 3x + 3x +
          active_datanames <- reactive({
    99 - 6x + 6x +
            if (identical(active_module()$datanames, "all")) {
    @@ -17332,21 +17868,24 @@

    teal coverage - 69.63%

    102 - 5x + 5x +
              include_parent_datanames(
    103 - 5x + 5x +
                active_module()$datanames,
    104 - 5x + 5x +
                singleton$get_join_keys()
    @@ -17374,14 +17913,16 @@

    teal coverage - 69.63%

    108 - 3x + 3x +
          singleton <- unlist(datasets)[[1]]
    109 - 3x + 3x +
          singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
    @@ -17395,28 +17936,32 @@

    teal coverage - 69.63%

    111 - 3x + 3x +
          observeEvent(
    112 - 3x + 3x +
            eventExpr = active_datanames(),
    113 - 3x + 3x +
            handlerExpr = {
    114 - 4x + 4x +
              script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
    @@ -17451,7 +17996,8 @@

    teal coverage - 69.63%

    119 - 4x + 4x +
                "handleActiveDatasetsPresent();"
    @@ -17465,7 +18011,8 @@

    teal coverage - 69.63%

    121 - 4x + 4x +
              shinyjs::runjs(script)
    @@ -17479,7 +18026,8 @@

    teal coverage - 69.63%

    123 - 3x + 3x +
            ignoreNULL = FALSE
    @@ -17507,14 +18055,16 @@

    teal coverage - 69.63%

    127 - 3x + 3x +
        showNotification("Data loaded - App fully started up")
    128 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initialized the module")
    @@ -17528,7 +18078,8 @@

    teal coverage - 69.63%

    130 - 3x + 3x +
        active_module
    @@ -17968,42 +18519,48 @@

    teal coverage - 69.63%

    60 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    61 - 7x + 7x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "title",
    64 - 7x + 7x +
        checkmate::check_string(title),
    65 - 7x + 7x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18017,28 +18574,32 @@

    teal coverage - 69.63%

    67 - 7x + 7x +
      checkmate::assert(
    68 - 7x + 7x +
        .var.name = "header",
    69 - 7x + 7x +
        checkmate::check_string(header),
    70 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18052,28 +18613,32 @@

    teal coverage - 69.63%

    72 - 7x + 7x +
      checkmate::assert(
    73 - 7x + 7x +
        .var.name = "footer",
    74 - 7x + 7x +
        checkmate::check_string(footer),
    75 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18094,7 +18659,8 @@

    teal coverage - 69.63%

    78 - 7x + 7x +
      ns <- NS(id)
    @@ -18136,28 +18702,32 @@

    teal coverage - 69.63%

    84 - 7x + 7x +
      splash_ui <- if (inherits(data, "teal_data_module")) {
    85 - 1x + 1x +
        data$ui(ns("teal_data_module"))
    86 - 7x + 7x +
      } else if (inherits(data, "teal_data")) {
    87 - 6x + 6x +
        div()
    @@ -18171,42 +18741,48 @@

    teal coverage - 69.63%

    89 - 7x + 7x +
      ui_teal(
    90 - 7x + 7x +
        id = ns("teal"),
    91 - 7x + 7x +
        splash_ui = div(splash_ui, uiOutput(ns("error"))),
    92 - 7x + 7x +
        title = title,
    93 - 7x + 7x +
        header = header,
    94 - 7x + 7x +
        footer = footer
    @@ -18255,28 +18831,32 @@

    teal coverage - 69.63%

    101 - 15x + 15x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    102 - 15x + 15x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    103 - 15x + 15x +
      checkmate::assert_class(modules, "teal_modules")
    104 - 15x + 15x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -18290,14 +18870,16 @@

    teal coverage - 69.63%

    106 - 15x + 15x +
      moduleServer(id, function(input, output, session) {
    107 - 15x + 15x +
        logger::log_trace("srv_teal_with_splash initializing module with data.")
    @@ -18311,7 +18893,8 @@

    teal coverage - 69.63%

    109 - 15x + 15x +
        if (getOption("teal.show_js_log", default = FALSE)) {
    @@ -18353,28 +18936,32 @@

    teal coverage - 69.63%

    115 - 15x + 15x +
        teal_data_rv <- if (inherits(data, "teal_data_module")) {
    116 - 10x + 10x +
          data <- data$server(id = "teal_data_module")
    117 - 10x + 10x +
          if (!is.reactive(data)) {
    118 - 1x + 1x +
            stop("The `teal_data_module` passed to `data` must return a reactive expression.", call. = FALSE)
    @@ -18388,21 +18975,24 @@

    teal coverage - 69.63%

    120 - 9x + 9x +
          data
    121 - 15x + 15x +
        } else if (inherits(data, "teal_data")) {
    122 - 5x + 5x +
          reactiveVal(data)
    @@ -18423,7 +19013,8 @@

    teal coverage - 69.63%

    125 - 14x + 14x +
        teal_data_rv_validate <- reactive({
    @@ -18437,7 +19028,8 @@

    teal coverage - 69.63%

    127 - 11x + 11x +
          data <- tryCatch(teal_data_rv(), error = function(e) e)
    @@ -18458,7 +19050,8 @@

    teal coverage - 69.63%

    130 - 11x + 11x +
          if (inherits(data, "shiny.silent.error") && identical(data$message, "")) {
    @@ -18493,56 +19086,64 @@

    teal coverage - 69.63%

    135 - 11x + 11x +
          if (inherits(data, "qenv.error")) {
    136 - 2x + 2x +
            validate(
    137 - 2x + 2x +
              need(
    138 - 2x + 2x +
                FALSE,
    139 - 2x + 2x +
                paste(
    140 - 2x + 2x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    141 - 2x + 2x +
                  paste(data$message, collapse = "\n"),
    142 - 2x + 2x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -18591,56 +19192,64 @@

    teal coverage - 69.63%

    149 - 9x + 9x +
          if (inherits(data, "error")) {
    150 - 1x + 1x +
            validate(
    151 - 1x + 1x +
              need(
    152 - 1x + 1x +
                FALSE,
    153 - 1x + 1x +
                paste(
    154 - 1x + 1x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    155 - 1x + 1x +
                  paste(data$message, collpase = "\n"),
    156 - 1x + 1x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -18682,56 +19291,64 @@

    teal coverage - 69.63%

    162 - 8x + 8x +
          validate(
    163 - 8x + 8x +
            need(
    164 - 8x + 8x +
              inherits(data, "teal_data"),
    165 - 8x + 8x +
              paste(
    166 - 8x + 8x +
                "Error: `teal_data_module` passed to `data` failed to return `teal_data` object, returned",
    167 - 8x + 8x +
                toString(sQuote(class(data))),
    168 - 8x + 8x +
                "instead.",
    169 - 8x + 8x +
                "\n Check your inputs or contact app developer if error persists."
    @@ -18766,14 +19383,16 @@

    teal coverage - 69.63%

    174 - 5x + 5x +
          if (!length(teal.data::datanames(data))) {
    175 - 1x + 1x +
            warning("`data` object has no datanames. Default datanames are set using `teal_data`'s environment.")
    @@ -18794,21 +19413,24 @@

    teal coverage - 69.63%

    178 - 5x + 5x +
          is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    179 - 5x + 5x +
          if (!isTRUE(is_modules_ok)) {
    180 - 1x + 1x +
            validate(need(isTRUE(is_modules_ok), sprintf("%s. Contact app developer.", is_modules_ok)))
    @@ -18829,42 +19451,48 @@

    teal coverage - 69.63%

    183 - 4x + 4x +
          is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    184 - 4x + 4x +
          if (!isTRUE(is_filter_ok)) {
    185 - 1x + 1x +
            showNotification(
    186 - 1x + 1x +
              "Some filters were not applied because of incompatibility with data. Contact app developer.",
    187 - 1x + 1x +
              type = "warning",
    188 - 1x + 1x +
              duration = 10
    @@ -18878,7 +19506,8 @@

    teal coverage - 69.63%

    190 - 1x + 1x +
            warning(is_filter_ok)
    @@ -18899,7 +19528,8 @@

    teal coverage - 69.63%

    193 - 4x + 4x +
          teal_data_rv()
    @@ -18920,7 +19550,8 @@

    teal coverage - 69.63%

    196 - 14x + 14x +
        output$error <- renderUI({
    @@ -18962,14 +19593,16 @@

    teal coverage - 69.63%

    202 - 14x + 14x +
        res <- srv_teal(id = "teal", modules = modules, teal_data_rv = teal_data_rv_validate, filter = filter)
    203 - 14x + 14x +
        logger::log_trace("srv_teal_with_splash initialized module with data.")
    @@ -18983,7 +19616,8 @@

    teal coverage - 69.63%

    205 - 14x + 14x +
        res
    @@ -19108,21 +19742,24 @@

    teal coverage - 69.63%

    15 - 18x + 18x +
      script <- sprintf(
    16 - 18x + 18x +
        "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
    17 - 18x + 18x +
        ns("timezone")
    @@ -19136,14 +19773,16 @@

    teal coverage - 69.63%

    19 - 18x + 18x +
      shinyjs::runjs(script) # function does not return anything
    20 - 18x + 18x +
      invisible(NULL)
    @@ -19192,42 +19831,48 @@

    teal coverage - 69.63%

    27 - 11x + 11x +
      bs_theme <- getOption("teal.bs_theme")
    28 - 11x + 11x +
      if (is.null(bs_theme)) {
    29 - 8x + 8x +
        NULL
    30 - 3x + 3x +
      } else if (!inherits(bs_theme, "bs_theme")) {
    31 - 2x + 2x +
        warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
    32 - 2x + 2x +
        NULL
    @@ -19241,7 +19886,8 @@

    teal coverage - 69.63%

    34 - 1x + 1x +
        bs_theme
    @@ -19297,42 +19943,48 @@

    teal coverage - 69.63%

    42 - 15x + 15x +
      parents <- character(0)
    43 - 15x + 15x +
      for (i in dataname) {
    44 - 22x + 22x +
        while (length(i) > 0) {
    45 - 24x + 24x +
          parent_i <- teal.data::parent(join_keys, i)
    46 - 24x + 24x +
          parents <- c(parent_i, parents)
    47 - 24x + 24x +
          i <- parent_i
    @@ -19360,7 +20012,8 @@

    teal coverage - 69.63%

    51 - 15x + 15x +
      unique(c(parents, dataname))
    @@ -19444,14 +20097,16 @@

    teal coverage - 69.63%

    63 - 18x + 18x +
      checkmate::assert_class(x, "teal_data")
    64 - 18x + 18x +
      checkmate::assert_character(datanames, min.chars = 1L, any.missing = FALSE)
    @@ -19465,21 +20120,24 @@

    teal coverage - 69.63%

    66 - 18x + 18x +
      ans <- teal.slice::init_filtered_data(
    67 - 18x + 18x +
        x = sapply(datanames, function(dn) x[[dn]], simplify = FALSE),
    68 - 18x + 18x +
        join_keys = teal.data::join_keys(x)
    @@ -19500,21 +20158,24 @@

    teal coverage - 69.63%

    71 - 18x + 18x +
      attr(ans, "preprocessing_code") <- teal.data::get_code(x, datanames = datanames, check_names = FALSE)
    72 - 18x + 18x +
      attr(ans, "verification_status") <- x@verified
    73 - 18x + 18x +
      ans
    @@ -19647,35 +20308,40 @@

    teal coverage - 69.63%

    92 - 2x + 2x +
      checkmate::assert_string(title)
    93 - 2x + 2x +
      checkmate::assert_string(label)
    94 - 2x + 2x +
      checkmate::assert_string(description, null.ok = TRUE)
    95 - 2x + 2x +
      checkmate::assert_flag(with_filter)
    96 - 2x + 2x +
      checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
    @@ -19689,49 +20355,56 @@

    teal coverage - 69.63%

    98 - 2x + 2x +
      card <- teal::TealReportCard$new()
    99 - 2x + 2x +
      title <- if (label == "") title else label
    100 - 2x + 2x +
      card$set_name(title)
    101 - 2x + 2x +
      card$append_text(title, "header2")
    102 - 1x + 1x +
      if (!is.null(description)) card$append_text(description, "header3")
    103 - 1x + 1x +
      if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
    104 - 2x + 2x +
      card
    @@ -19836,14 +20509,16 @@

    teal coverage - 69.63%

    119 - 12x + 12x +
      checkmate::assert_class(modules, "teal_modules")
    120 - 12x + 12x +
      checkmate::assert_character(datanames)
    @@ -19857,7 +20532,8 @@

    teal coverage - 69.63%

    122 - 12x + 12x +
      recursive_check_datanames <- function(modules, datanames) {
    @@ -19871,14 +20547,16 @@

    teal coverage - 69.63%

    124 - 26x + 26x +
        if (inherits(modules, "teal_modules")) {
    125 - 12x + 12x +
          sapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
    @@ -19892,49 +20570,56 @@

    teal coverage - 69.63%

    127 - 14x + 14x +
          extra_datanames <- setdiff(modules$datanames, c("all", datanames))
    128 - 14x + 14x +
          if (length(extra_datanames)) {
    129 - 2x + 2x +
            sprintf(
    130 - 2x + 2x +
              "- Module '%s' uses datanames not available in 'data': (%s) not in (%s)",
    131 - 2x + 2x +
              modules$label,
    132 - 2x + 2x +
              toString(dQuote(extra_datanames, q = FALSE)),
    133 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -19969,21 +20654,24 @@

    teal coverage - 69.63%

    138 - 12x + 12x +
      check_datanames <- unlist(recursive_check_datanames(modules, datanames))
    139 - 12x + 12x +
      if (length(check_datanames)) {
    140 - 2x + 2x +
        paste(check_datanames, collapse = "\n")
    @@ -19997,7 +20685,8 @@

    teal coverage - 69.63%

    142 - 10x + 10x +
        TRUE
    @@ -20102,14 +20791,16 @@

    teal coverage - 69.63%

    157 - 10x + 10x +
      checkmate::assert_class(filters, "teal_slices")
    158 - 10x + 10x +
      checkmate::assert_character(datanames)
    @@ -20130,63 +20821,72 @@

    teal coverage - 69.63%

    161 - 10x + 10x +
      out <- unlist(sapply(
    162 - 10x + 10x +
        filters, function(filter) {
    163 - 3x + 3x +
          dataname <- shiny::isolate(filter$dataname)
    164 - 3x + 3x +
          if (!dataname %in% datanames) {
    165 - 2x + 2x +
            sprintf(
    166 - 2x + 2x +
              "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
    167 - 2x + 2x +
              shiny::isolate(filter$id),
    168 - 2x + 2x +
              dQuote(dataname, q = FALSE),
    169 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -20235,14 +20935,16 @@

    teal coverage - 69.63%

    176 - 10x + 10x +
      if (length(out)) {
    177 - 2x + 2x +
        paste(out, collapse = "\n")
    @@ -20256,7 +20958,8 @@

    teal coverage - 69.63%

    179 - 8x + 8x +
        TRUE
    @@ -20375,28 +21078,32 @@

    teal coverage - 69.63%

    196 - 15x + 15x +
      checkmate::assert_class(data, "teal_data")
    197 - 15x + 15x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    198 - 15x + 15x +
      checkmate::assert_class(filters, "modules_teal_slices")
    199 - 15x + 15x +
      checkmate::assert_r6(filtered_data_singleton, "FilteredData")
    @@ -20410,7 +21117,8 @@

    teal coverage - 69.63%

    201 - 15x + 15x +
      if (!isTRUE(attr(filters, "module_specific"))) {
    @@ -20424,14 +21132,16 @@

    teal coverage - 69.63%

    203 - 3x + 3x +
        slices <- shiny::isolate({
    204 - 3x + 3x +
          Filter(function(x) x$id %in% attr(filters, "mapping")$global_filters, filters)
    @@ -20445,14 +21155,16 @@

    teal coverage - 69.63%

    206 - 3x + 3x +
        filtered_data_singleton$set_filter_state(slices)
    207 - 3x + 3x +
        return(modules_structure(modules, filtered_data_singleton))
    @@ -20473,7 +21185,8 @@

    teal coverage - 69.63%

    210 - 12x + 12x +
      if (inherits(modules, "teal_module")) {
    @@ -20487,35 +21200,40 @@

    teal coverage - 69.63%

    212 - 7x + 7x +
        datanames <-
    213 - 7x + 7x +
          if (is.null(modules$datanames) || identical(modules$datanames, "all")) {
    214 - 4x + 4x +
            include_parent_datanames(
    215 - 4x + 4x +
              teal_data_datanames(data),
    216 - 4x + 4x +
              teal.data::join_keys(data)
    @@ -20536,21 +21254,24 @@

    teal coverage - 69.63%

    219 - 3x + 3x +
            include_parent_datanames(
    220 - 3x + 3x +
              modules$datanames,
    221 - 3x + 3x +
              teal.data::join_keys(data)
    @@ -20578,35 +21299,40 @@

    teal coverage - 69.63%

    225 - 7x + 7x +
        slices <- shiny::isolate({
    226 - 7x + 7x +
          Filter(x = filters, f = function(x) {
    227 - 20x + 20x +
            x$dataname %in% datanames &&
    228 - 20x + 20x +
              (x$id %in% attr(filters, "mapping")$global_filters ||
    229 - 20x + 20x +
                x$id %in% unique(unlist(attr(filters, "mapping")[modules$label]))) # nolint: indentation_linter.
    @@ -20634,14 +21360,16 @@

    teal coverage - 69.63%

    233 - 7x + 7x +
        slices$include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
    234 - 7x + 7x +
        slices$exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
    @@ -20662,7 +21390,8 @@

    teal coverage - 69.63%

    237 - 7x + 7x +
        filtered_data <- teal_data_to_filtered_data(data, datanames)
    @@ -20676,7 +21405,8 @@

    teal coverage - 69.63%

    239 - 7x + 7x +
        filtered_data$set_filter_state(slices)
    @@ -20690,56 +21420,64 @@

    teal coverage - 69.63%

    241 - 7x + 7x +
        return(filtered_data)
    242 - 5x + 5x +
      } else if (inherits(modules, "teal_modules")) {
    243 - 5x + 5x +
        ans <- lapply(
    244 - 5x + 5x +
          modules$children,
    245 - 5x + 5x +
          modules_datasets,
    246 - 5x + 5x +
          data = data,
    247 - 5x + 5x +
          filters = filters,
    248 - 5x + 5x +
          filtered_data_singleton = filtered_data_singleton
    @@ -20753,7 +21491,8 @@

    teal coverage - 69.63%

    250 - 5x + 5x +
        names(ans) <- vapply(modules$children, `[[`, character(1), "label")
    @@ -20767,7 +21506,8 @@

    teal coverage - 69.63%

    252 - 5x + 5x +
        return(ans)
    @@ -20823,14 +21563,16 @@

    teal coverage - 69.63%

    260 - 13x + 13x +
      if (inherits(modules, "teal_module")) {
    261 - 8x + 8x +
        return(value)
    @@ -20844,21 +21586,24 @@

    teal coverage - 69.63%

    263 - 5x + 5x +
        stats::setNames(
    264 - 5x + 5x +
          lapply(modules$children, modules_structure, value),
    265 - 5x + 5x +
          vapply(modules$children, `[[`, character(1), "label")
    @@ -20949,21 +21694,24 @@

    teal coverage - 69.63%

    278 - 53x + 53x +
      checkmate::assert_class(data, "teal_data")
    279 - 53x + 53x +
      if (length(teal.data::datanames(data))) {
    280 - 47x + 47x +
        teal.data::datanames(data)
    @@ -20977,7 +21725,8 @@

    teal coverage - 69.63%

    282 - 6x + 6x +
        ls(teal.code::get_env(data), all.names = TRUE)
    @@ -21047,70 +21796,80 @@

    teal coverage - 69.63%

    292 - 14x + 14x +
      checkmate::assert_class(shiny_tag, "shiny.tag")
    293 - 14x + 14x +
      checkmate::assert_true(shiny_tag$name == "head")
    294 - 13x + 13x +
      child_names <- vapply(shiny_tag$children, `[[`, character(1L), "name")
    295 - 13x + 13x +
      checkmate::assert_subset(c("title", "link"), child_names, .var.name = "child tags")
    296 - 11x + 11x +
      rel_attr <- shiny_tag$children[[which(child_names == "link")]]$attribs$rel
    297 - 11x + 11x +
      checkmate::assert_subset(
    298 - 11x + 11x +
        rel_attr,
    299 - 11x + 11x +
        c("icon", "shortcut icon"),
    300 - 11x + 11x +
        .var.name = "Link tag's rel attribute",
    301 - 11x + 11x +
        empty.ok = FALSE
    @@ -21229,56 +21988,64 @@

    teal coverage - 69.63%

    318 - 11x + 11x +
      checkmate::assert_string(title, null.ok = TRUE)
    319 - 11x + 11x +
      checkmate::assert_string(favicon, null.ok = TRUE)
    320 - 11x + 11x +
      tags$head(
    321 - 11x + 11x +
        tags$title(title),
    322 - 11x + 11x +
        tags$link(
    323 - 11x + 11x +
          rel = "icon",
    324 - 11x + 11x +
          href = favicon,
    325 - 11x + 11x +
          sizes = "any"
    @@ -21418,14 +22185,16 @@

    teal coverage - 69.63%

    345 - 19x + 19x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    346 - 18x + 18x +
      checkmate::assert_class(modules, "teal_modules")
    @@ -21439,28 +22208,32 @@

    teal coverage - 69.63%

    348 - 17x + 17x +
      data <- if (inherits(data, "teal_data")) {
    349 - 15x + 15x +
        as.list(data@env)
    350 - 17x + 17x +
      } else if (inherits(data, "teal_data_module")) {
    351 - 2x + 2x +
        deparse1(body(data$server))
    @@ -21474,7 +22247,8 @@

    teal coverage - 69.63%

    353 - 17x + 17x +
      modules <- lapply(modules, defunction)
    @@ -21488,7 +22262,8 @@

    teal coverage - 69.63%

    355 - 17x + 17x +
      rlang::hash(list(data = data, modules = modules))
    @@ -21537,28 +22312,32 @@

    teal coverage - 69.63%

    362 - 186x + 186x +
      if (is.list(x)) {
    363 - 40x + 40x +
        lapply(x, defunction)
    364 - 146x + 146x +
      } else if (is.function(x)) {
    365 - 44x + 44x +
        deparse1(body(x))
    @@ -21572,7 +22351,8 @@

    teal coverage - 69.63%

    367 - 102x + 102x +
        x
    @@ -21788,14 +22568,16 @@

    teal coverage - 69.63%

    28 - 9x + 9x +
      checkmate::assert_class(tss, "teal_slices")
    29 - 9x + 9x +
      checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
    @@ -21809,7 +22591,8 @@

    teal coverage - 69.63%

    31 - 9x + 9x +
      cat(format(tss, trim_lines = FALSE), "\n", file = file)
    @@ -21858,7 +22641,8 @@

    teal coverage - 69.63%

    38 - 9x + 9x +
      checkmate::assert_file_exists(file, access = "r", extension = "json")
    @@ -21872,56 +22656,64 @@

    teal coverage - 69.63%

    40 - 9x + 9x +
      tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
    41 - 9x + 9x +
      tss_json$slices <-
    42 - 9x + 9x +
        lapply(tss_json$slices, function(slice) {
    43 - 9x + 9x +
          for (field in c("selected", "choices")) {
    44 - 18x + 18x +
            if (!is.null(slice[[field]])) {
    45 - 12x + 12x +
              if (length(slice[[field]]) > 0) {
    46 - 9x + 9x +
                date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
    47 - 9x + 9x +
                time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
    @@ -21935,35 +22727,40 @@

    teal coverage - 69.63%

    49 - 9x + 9x +
                slice[[field]] <-
    50 - 9x + 9x +
                  if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
    51 - 3x + 3x +
                    as.Date(slice[[field]])
    52 - 9x + 9x +
                  } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
    53 - 3x + 3x +
                    as.POSIXct(slice[[field]], tz = "UTC")
    @@ -21977,7 +22774,8 @@

    teal coverage - 69.63%

    55 - 3x + 3x +
                    slice[[field]]
    @@ -21998,7 +22796,8 @@

    teal coverage - 69.63%

    58 - 3x + 3x +
                slice[[field]] <- character(0)
    @@ -22026,7 +22825,8 @@

    teal coverage - 69.63%

    62 - 9x + 9x +
          slice
    @@ -22047,7 +22847,8 @@

    teal coverage - 69.63%

    65 - 9x + 9x +
      tss_elements <- lapply(tss_json$slices, as.teal_slice)
    @@ -22061,7 +22862,8 @@

    teal coverage - 69.63%

    67 - 9x + 9x +
      do.call(teal_slices, c(tss_elements, tss_json$attributes))
    @@ -22396,56 +23198,64 @@

    teal coverage - 69.63%

    46 - 17x + 17x +
      checkmate::assert_string(msg, null.ok = TRUE)
    47 - 15x + 15x +
      checkmate::assert_data_frame(x)
    48 - 15x + 15x +
      if (!is.null(min_nrow)) {
    49 - 15x + 15x +
        if (complete) {
    50 - 5x + 5x +
          complete_index <- stats::complete.cases(x)
    51 - 5x + 5x +
          validate(need(
    52 - 5x + 5x +
            sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
    53 - 5x + 5x +
            paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
    @@ -22466,35 +23276,40 @@

    teal coverage - 69.63%

    56 - 10x + 10x +
          validate(need(
    57 - 10x + 10x +
            nrow(x) >= min_nrow,
    58 - 10x + 10x +
            paste(
    59 - 10x + 10x +
              c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
    60 - 10x + 10x +
              collapse = "\n"
    @@ -22529,28 +23344,32 @@

    teal coverage - 69.63%

    65 - 10x + 10x +
        if (!allow_inf) {
    66 - 6x + 6x +
          validate(need(
    67 - 6x + 6x +
            all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
    68 - 6x + 6x +
            "Dataframe contains Inf values which is not allowed."
    @@ -25454,7 +26273,8 @@

    teal coverage - 69.63%

    103 - 10x + 10x +
      logger::log_trace("init initializing teal app with: data ('{ class(data) }').")
    @@ -25482,7 +26302,8 @@

    teal coverage - 69.63%

    107 - 10x + 10x +
      if (inherits(data, "TealData")) {
    @@ -25552,7 +26373,8 @@

    teal coverage - 69.63%

    117 - 10x + 10x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    @@ -25573,28 +26395,32 @@

    teal coverage - 69.63%

    120 - 10x + 10x +
      checkmate::assert(
    121 - 10x + 10x +
        .var.name = "modules",
    122 - 10x + 10x +
        checkmate::check_multi_class(modules, c("teal_modules", "teal_module")),
    123 - 10x + 10x +
        checkmate::check_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -25608,14 +26434,16 @@

    teal coverage - 69.63%

    125 - 10x + 10x +
      if (inherits(modules, "teal_module")) {
    126 - 1x + 1x +
        modules <- list(modules)
    @@ -25629,14 +26457,16 @@

    teal coverage - 69.63%

    128 - 10x + 10x +
      if (checkmate::test_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))) {
    129 - 4x + 4x +
        modules <- do.call(teal::modules, modules)
    @@ -25664,7 +26494,8 @@

    teal coverage - 69.63%

    133 - 10x + 10x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -25685,28 +26516,32 @@

    teal coverage - 69.63%

    136 - 9x + 9x +
      checkmate::assert(
    137 - 9x + 9x +
        .var.name = "title",
    138 - 9x + 9x +
        checkmate::check_string(title),
    139 - 9x + 9x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25720,28 +26555,32 @@

    teal coverage - 69.63%

    141 - 9x + 9x +
      checkmate::assert(
    142 - 9x + 9x +
        .var.name = "header",
    143 - 9x + 9x +
        checkmate::check_string(header),
    144 - 9x + 9x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25755,28 +26594,32 @@

    teal coverage - 69.63%

    146 - 9x + 9x +
      checkmate::assert(
    147 - 9x + 9x +
        .var.name = "footer",
    148 - 9x + 9x +
        checkmate::check_string(footer),
    149 - 9x + 9x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25790,7 +26633,8 @@

    teal coverage - 69.63%

    151 - 9x + 9x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -25811,7 +26655,8 @@

    teal coverage - 69.63%

    154 - 9x + 9x +
      teal.logger::log_system_info()
    @@ -25839,21 +26684,24 @@

    teal coverage - 69.63%

    158 - 9x + 9x +
      landing <- extract_module(modules, "teal_module_landing")
    159 - 9x + 9x +
      landing_module <- NULL
    160 - 9x + 9x +
      if (length(landing) == 1L) {
    @@ -25874,7 +26722,8 @@

    teal coverage - 69.63%

    163 - 9x + 9x +
      } else if (length(landing) > 1L) {
    @@ -25909,7 +26758,8 @@

    teal coverage - 69.63%

    168 - 9x + 9x +
      attr(filter, "app_id") <- create_app_id(data, modules)
    @@ -25930,7 +26780,8 @@

    teal coverage - 69.63%

    171 - 9x + 9x +
      filter <- as.teal_slices(as.list(filter))
    @@ -25958,7 +26809,8 @@

    teal coverage - 69.63%

    175 - 9x + 9x +
      if (isTRUE(attr(filter, "module_specific"))) {
    @@ -26147,21 +26999,24 @@

    teal coverage - 69.63%

    202 - 9x + 9x +
      if (inherits(data, "teal_data")) {
    203 - 8x + 8x +
        if (length(teal_data_datanames(data)) == 0) {
    204 - 1x + 1x +
          stop("The environment of `data` is empty.")
    @@ -26182,28 +27037,32 @@

    teal coverage - 69.63%

    207 - 7x + 7x +
        is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    208 - 7x + 7x +
        if (!isTRUE(is_modules_ok)) {
    209 - 1x + 1x +
          logger::log_error(is_modules_ok)
    210 - 1x + 1x +
          checkmate::assert(is_modules_ok, .var.name = "modules")
    @@ -26224,21 +27083,24 @@

    teal coverage - 69.63%

    213 - 6x + 6x +
        is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    214 - 6x + 6x +
        if (!isTRUE(is_filter_ok)) {
    215 - 1x + 1x +
          warning(is_filter_ok)
    @@ -26301,21 +27163,24 @@

    teal coverage - 69.63%

    224 - 7x + 7x +
      res <- list(
    225 - 7x + 7x +
        ui = ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
    226 - 7x + 7x +
        server = function(input, output, session) {
    @@ -26371,7 +27236,8 @@

    teal coverage - 69.63%

    234 - 7x + 7x +
      logger::log_trace("init teal app has been initialized.")
    @@ -26385,7 +27251,8 @@

    teal coverage - 69.63%

    236 - 7x + 7x +
      res
    @@ -26594,14 +27461,16 @@

    teal coverage - 69.63%

    28 - 6x + 6x +
      expr <- substitute(expr)
    29 - 6x + 6x +
      extras <- list(...)
    @@ -26622,14 +27491,16 @@

    teal coverage - 69.63%

    32 - 6x + 6x +
      if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
    33 - 6x + 6x +
        expr <- call("{", expr)
    @@ -26650,7 +27521,8 @@

    teal coverage - 69.63%

    36 - 6x + 6x +
      calls <- as.list(expr)[-1]
    @@ -26671,7 +27543,8 @@

    teal coverage - 69.63%

    39 - 6x + 6x +
      calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
    @@ -26685,7 +27558,8 @@

    teal coverage - 69.63%

    41 - 6x + 6x +
      eval_code(object = data, code = as.expression(calls))
    @@ -26782,21 +27656,24 @@

    teal coverage - 69.63%

    12 - 7x + 7x +
      css_files <- list.files(
    13 - 7x + 7x +
        system.file("css", package = "teal", mustWork = TRUE),
    14 - 7x + 7x +
        pattern = pattern, full.names = TRUE
    @@ -26817,14 +27694,16 @@

    teal coverage - 69.63%

    17 - 7x + 7x +
      singleton(
    18 - 7x + 7x +
        tags$head(lapply(css_files, includeCSS))
    @@ -26936,21 +27815,24 @@

    teal coverage - 69.63%

    34 - 7x + 7x +
      checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
    35 - 7x + 7x +
      js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
    36 - 7x + 7x +
      js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
    @@ -26964,7 +27846,8 @@

    teal coverage - 69.63%

    38 - 7x + 7x +
      singleton(lapply(js_files, includeScript))
    @@ -27097,21 +27980,24 @@

    teal coverage - 69.63%

    57 - 18x + 18x +
      checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
    58 - 18x + 18x +
      lapply(files, function(file) {
    59 - 18x + 18x +
        shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
    @@ -27125,7 +28011,8 @@

    teal coverage - 69.63%

    61 - 18x + 18x +
      invisible(NULL)
    @@ -27230,21 +28117,24 @@

    teal coverage - 69.63%

    76 - 7x + 7x +
      tagList(
    77 - 7x + 7x +
        shinyjs::useShinyjs(),
    78 - 7x + 7x +
        include_css_files(),
    @@ -27258,14 +28148,16 @@

    teal coverage - 69.63%

    80 - 7x + 7x +
        include_js_files(except = "init.js"),
    81 - 7x + 7x +
        shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
    @@ -27404,28 +28296,32 @@

    teal coverage - 69.63%

    17 - 53x + 53x +
      checkmate::assert_string(label)
    18 - 53x + 53x +
      module(
    19 - 53x + 53x +
        label,
    20 - 53x + 53x +
        server = function(id, data) {
    @@ -27530,7 +28426,8 @@

    teal coverage - 69.63%

    35 - 53x + 53x +
        ui = function(id) {
    @@ -27600,7 +28497,8 @@

    teal coverage - 69.63%

    45 - 53x + 53x +
        datanames = datanames
    @@ -27823,28 +28721,32 @@

    teal coverage - 69.63%

    29 - 13x + 13x +
      teal_data_module(
    30 - 13x + 13x +
        ui = function(id) {
    31 - 1x + 1x +
          ns <- NS(id)
    32 - 1x + 1x +
          object$ui(ns("mutate_inner"))
    @@ -27858,21 +28760,24 @@

    teal coverage - 69.63%

    34 - 13x + 13x +
        server = function(id) {
    35 - 11x + 11x +
          moduleServer(id, function(input, output, session) {
    36 - 11x + 11x +
            teal_data_rv <- object$server("mutate_inner")
    @@ -27886,14 +28791,16 @@

    teal coverage - 69.63%

    38 - 11x + 11x +
            if (!is.reactive(teal_data_rv)) {
    39 - 1x + 1x +
              stop("The `teal_data_module` must return a reactive expression.", call. = FALSE)
    @@ -27914,7 +28821,8 @@

    teal coverage - 69.63%

    42 - 10x + 10x +
            td <- eventReactive(teal_data_rv(),
    @@ -27928,14 +28836,16 @@

    teal coverage - 69.63%

    44 - 10x + 10x +
                if (inherits(teal_data_rv(), c("teal_data", "qenv.error"))) {
    45 - 6x + 6x +
                  eval_code(teal_data_rv(), code)
    @@ -27949,7 +28859,8 @@

    teal coverage - 69.63%

    47 - 4x + 4x +
                  teal_data_rv()
    @@ -27970,7 +28881,8 @@

    teal coverage - 69.63%

    50 - 10x + 10x +
              ignoreNULL = FALSE
    @@ -27984,7 +28896,8 @@

    teal coverage - 69.63%

    52 - 10x + 10x +
            td
    @@ -28033,7 +28946,8 @@

    teal coverage - 69.63%

    59 - 1x + 1x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -28061,7 +28975,8 @@

    teal coverage - 69.63%

    63 - 6x + 6x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -28857,21 +29772,24 @@

    teal coverage - 69.63%

    23 - 4x + 4x +
      checkmate::assert_string(label)
    24 - 2x + 2x +
      checkmate::assert_list(server_args, names = "named")
    25 - 2x + 2x +
      checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
    @@ -28885,7 +29803,8 @@

    teal coverage - 69.63%

    27 - 2x + 2x +
      logger::log_info("Initializing reporter_previewer_module")
    @@ -28899,7 +29818,8 @@

    teal coverage - 69.63%

    29 - 2x + 2x +
      srv <- function(id, reporter, ...) {
    @@ -28927,7 +29847,8 @@

    teal coverage - 69.63%

    33 - 2x + 2x +
      ui <- function(id, ...) {
    @@ -28955,28 +29876,32 @@

    teal coverage - 69.63%

    37 - 2x + 2x +
      module <- module(
    38 - 2x + 2x +
        label = "temporary label",
    39 - 2x + 2x +
        server = srv, ui = ui,
    40 - 2x + 2x +
        server_args = server_args, ui_args = list(), datanames = NULL
    @@ -29004,21 +29929,24 @@

    teal coverage - 69.63%

    44 - 2x + 2x +
      class(module) <- c("teal_module_previewer", class(module))
    45 - 2x + 2x +
      module$label <- label
    46 - 2x + 2x +
      module
    @@ -29430,35 +30358,40 @@

    teal coverage - 69.63%

    57 - 36x + 36x +
      checkmate::assert_function(ui, args = "id", nargs = 1)
    58 - 35x + 35x +
      checkmate::assert_function(server, args = "id", nargs = 1)
    59 - 34x + 34x +
      structure(
    60 - 34x + 34x +
        list(ui = ui, server = server),
    61 - 34x + 34x +
        class = "teal_data_module"
    diff --git a/release-candidate/index.html b/release-candidate/index.html index f1e5827450..fccc573a2a 100644 --- a/release-candidate/index.html +++ b/release-candidate/index.html @@ -1,5 +1,4 @@ - - + @@ -88,23 +87,7 @@ - - + - + + diff --git a/release-candidate/news/index.html b/release-candidate/news/index.html index 4420e7b718..7be7b3fa0f 100644 --- a/release-candidate/news/index.html +++ b/release-candidate/news/index.html @@ -1,8 +1,22 @@ - -Changelog • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -109,35 +129,54 @@
    -

    teal 0.15.2

    -
    -

    Bug fixes

    -
    • Fixed a bug in handling datanames of modules that crashed module-specific applications when filtering child datasets.
    • -
    +

    teal 0.15.2 +

    +
    +

    Bug fixes +

    +
      +
    • Fixed a bug in handling datanames of modules that crashed module-specific applications when filtering child datasets.
    • +
    +
    -

    teal 0.15.1

    CRAN release: 2024-02-22

    -
    -

    Bug fixes

    -
    • Fixed a bug that stopped the module_specific feature when a teal module specified datanames of length more than 1.
    • -
    +

    teal 0.15.1 +

    +

    CRAN release: 2024-02-22

    +
    +

    Bug fixes +

    +
      +
    • Fixed a bug that stopped the module_specific feature when a teal module specified datanames of length more than 1.
    • +
    +
    -

    Miscellaneous

    -
    • Updated links in vignettes
    • -
    +

    Miscellaneous +

    +
      +
    • Updated links in vignettes
    • +
    +
    -

    teal 0.15.0

    CRAN release: 2024-02-08

    -
    -

    New features

    -
    • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
    • +

      teal 0.15.0 +

      +

      CRAN release: 2024-02-08

      +
      +

      New features +

      +
        +
      • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
      • Filter state snapshots can now be uploaded from file. See ?snapshot.
      • Added as_tdata function to facilitate migration of modules to the new teal_data class.
      • Added build_app_title function to facilitate adding favicons to app title.
      • -
      +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • data argument in init now accepts only teal_data and teal_data_module.
      • tdata has been deprecated and replaced with teal_data. Support for tdata passed to the data argument in module(server) will be removed in the next release.
      • @@ -146,114 +185,166 @@

        Breaking changes -

        Miscellaneous

        -
        • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
        • +

          Miscellaneous +

          +
            +
          • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
          • Added argument to teal_slices and made modifications to init to enable tagging teal_slices with an app id to safely upload snapshots from disk.
          • FilteredData no longer stores pre-processing code in specific slots. Code is now attached as attribute. Adjusted appropriately.
          • -

    + +
    -

    Bug fixes

    -
    • Removed Report previewer module from mapping matrix display in filter manager.
    • +

      Bug fixes +

      +
        +
      • Removed Report previewer module from mapping matrix display in filter manager.
      • Specified minimal version of package dependencies.
      • -
    + +
    -

    teal 0.14.0

    +

    teal 0.14.0 +

    -

    New features

    -
    • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
    • +

      New features +

      +
        +
      • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
      • Enabled capturing and resetting application filter state with snapshots. See ?snapshot.
      • Enabled reporter_previewer_module to customize default values through srv_args.
      • Enabled passing own reporter_previewer_module in a list of modules to override default one.
      • -
    + +
    -

    Breaking changes

    -
    • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
    • +

      Breaking changes +

      +
        +
      • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
      • Soft deprecated filters argument in module and replaced it with datanames. Details in documentation of teal::module
      • -
    + +
    -

    Miscellaneous

    -
    • Removed scda package dependency from examples.
    • +

      Miscellaneous +

      +
        +
      • Removed scda package dependency from examples.
      • Updated the header tag style to enhance element containment.
      • -
    + +
    -

    teal 0.13.0

    +

    teal 0.13.0 +

    -

    Breaking changes

    -
    • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
    • +

      Breaking changes +

      +
        +
      • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
      • Due to deprecation of chunks in teal.code, the teal framework now uses their replacement (qenv) instead. The documentation in teal has been updated to reflect this and custom modules written with chunks should be updated to use qenv.
      • Due to deprecation of chunks in teal.code, get_rcode, get_rcode_srv, and get_rcode_ui have been removed.
      • -
    + +
    -

    New features

    -
    • Added the validate_inputs function that transfers input validation messages to app output.
    • +

      New features +

      +
        +
      • Added the validate_inputs function that transfers input validation messages to app output.
      • modules argument of init accepts teal_module type of object. There is no need to wrap up a single module in modules() or list().
      • Updated module_nested_tabs so that only active modules are calculated in a teal app.
      • -
    + +
    -

    Miscellaneous

    -
    • Updated examples to use scda.2022.
    • +

      Miscellaneous +

      +
        +
      • Updated examples to use scda.2022.
      • Added R session information into a link in the footer of teal applications.
      • Added data hashing step using rlang instead of digest package to calculate the hash (which has been moved from teal.data and teal.slice). There is now an explicit hashing check in the reproducible code output.
      • Removed deprecated functions: root_modules, default_filter, bookmarkableShinyApp, as well as deprecated logging mechanism, including the functions log_app_usage and .log.
      • Updated the “Teal and Bootstrap Themes” vignette to provide more details customizing a teal app with bslib::run_with_themer.
      • Removed outdated diagram from srv_nested_tabs documentation.
      • Changed default values of header and footer arguments in init to empty text.
      • -
    + +
    -

    teal 0.12.0

    -
    -

    New features

    -
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • -
    +

    teal 0.12.0 +

    +
    +

    New features +

    +
      +
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • +
    +
    -

    Enhancements

    -
    • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
    • +

      Enhancements +

      +
        +
      • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
      • Updated teal_module to have data argument which receives a list of reactive filter data with "code" and "join_keys" attributes.
      • Updated teal_module to have filter_panel_api argument which receives a FilterPanelAPI object.
      • Updated the internals of module_teal to reflect changes in teal.slice.
      • -
    + +
    -

    Breaking changes

    -
    • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
    • +

      Breaking changes +

      +
        +
      • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
      • Deprecated merge_expression argument in get_rcode_srv function and removed it in get_rcode function.
      • Deprecated session argument in get_rcode function.
      • -
    + +
    -

    Miscellaneous

    -
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • -
    +

    Miscellaneous +

    +
      +
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • +
    +
    -

    teal 0.11.1

    +

    teal 0.11.1 +

    -

    Enhancements

    -
    • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
    • +

      Enhancements +

      +
        +
      • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
      • Updated teal to support modules which include reporting. If any module which supports reporting is included then a reporter_previewer_module is included.
      • Added default arguments to module() and the server argument is now a function where the second argument can be ... or datasets.
      • -
    + +
    -

    Breaking changes

    -
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • -
    +

    Breaking changes +

    +
      +
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • +
    +
    -

    Miscellaneous

    -
    • Added a template to the pkgdown configuration.
    • +

      Miscellaneous +

      +
        +
      • Added a template to the pkgdown configuration.
      • Removed unneeded shinytest app tests.
      • Updated package authors.
      • Added package vignettes.
      • -
    + +
    -

    teal 0.11.0

    -
    +

    The teal package contains the code to create apps (teal::init), to create a module (teal::module) and to group modules in the app (teal::modules). teal depends on teal.transform and teal.data which contain the functions that teal app creators are likely to need. The other package teal only imports from and therefore teal module creators should either fully specify functions from these packages when required or import them into custom packages as library(teal) will not load them.

    +
    +

    New features +

    +
      +
    • A simple new teal module named example_module has been included in the package.
    • +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • teal package has been split into multiple smaller packages, see above.
      • Deprecated root_modules function, users should use modules directly inside init.
      • Due to deprecation of root_modules any label argument to modules must be explicitly named. For example modules("lab", mod1, mod2) should be replaced with modules(label = "lab", mod1, mod2).
      • -
    + +
    -

    Miscellaneous

    -
    • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
    • +

      Miscellaneous +

      +
        +
      • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
      • MultiAssayExperiment is now suggested packages, not required. Objects dependent on MultiAssayExperiment are changed to lazy-load this now suggested package.
      • -
    + +
    -

    Bug fixes

    -
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • -
    +

    Bug fixes +

    +
      +
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • +
    +
    -

    teal 0.10.1

    +

    teal 0.10.1 +

    -

    Breaking changes

    -
    • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
    • +

      Breaking changes +

      +
        +
      • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
      • Deprecated all functions related to connectors that have been moved to their own separate packages.
      • Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational.
      • Removed rcd_connection and rcd_data; scda_dataset_connectors can be passed into cdisc_data and teal_data directly.
      • Replaced rcd_dataset_connector and rcd_cdisc_dataset_connector with scda_dataset_connector and scda_cdisc_dataset_connector respectively.
      • Renamed teal_show_js_log option into teal.show_js_log to match options naming convention.
      • Removed %is_in% and stop_shiny internal utility functions.
      • -
    + +
    -

    New features

    +

    New features +

    -
    Logging
    -
    • Added support for logging using the logger package.
    • +
      Logging +
      +
        +
      • Added support for logging using the logger package.
      • Added a new function register_logger, which registers a logger in a given namespace.
      • Added trace and info levels log messages to the teal framework.
      • Added pid and shiny session token into footnote so app developers can identify logs for apps.
      • -
    + +
    -
    Other
    -
    • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

    • +
      Other +
      +
        +
      • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

      • Added public facing constructor functions for CDISCDataConnector, RelationalDataConnector, and DataConnection classes.

      • Modified data_extract_spec to allow both the filter and select parameters to be NULL, which results in the data_extract_ui acting as if a filter_spec with all variables as possible choices had been supplied as the filter argument and a select_spec with the multiple parameter set to TRUE had been supplied as the select argument.

      • Added support of the full screen for a module when the filters argument is equal NULL.

      • @@ -320,11 +434,14 @@
        Other -

        Bug fixes

        -
    + +
    -

    teal 0.10.0

    +

    teal 0.10.0 +

    -

    New features

    -
    • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
    • +

      New features +

      +
        +
      • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
      • Refactored filter panel to use MultiAssayExperiment objects. Filters can be set on a subject level (colData of MAE object) and on a experiment level (colData and rowData of an assay).
      • Added cdse_dataset_connector to create delayed data objects from CDSE.
      • Added datasetdb_dataset_connector to create delayed data objects from DataSetDB.
      • Added ricepass_connection to create delayed data objects from entimICE via ricepass.
      • Refactor of the filter panel: -
        • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
        • +
            +
          • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
          • Dataset type determines an appearance and a functionality of related filters and filters summary.
          • Datasets are passed (by reference) from DDL to FilteredData skipping extracting data and their attributes.
          • Redesigned variable filter labels in “Active Filter Variables” panel.
          • Fully testable server functions.
          • -
          -
    + + + +
    -

    Bug fixes

    -
    • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
    • +

      Bug fixes +

      +
        +
      • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
      • Fixed a bug that caused the output of get_code function to not reproduce its raw data set.
      • Changed filter_spec to allow no variable selection upon app initialization, where the first possible value was previously selected.
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal 0.9.5

    +

    teal 0.9.5 +

    -

    Enhancements

    -
    • Added informational stop message when using mutate_data with RelationalDataConnector.
    • +

      Enhancements +

      +
        +
      • Added informational stop message when using mutate_data with RelationalDataConnector.
      • Modified as_cdisc to behave similarly to cdisc_dataset when called on a Dataset object.
      • Changed the displayed format of the data name and the column name in data_extract_spec UI elements. Both are now compressed to <data name>.<column name> if they don’t change during runtime of the app.
      • Added ADSAFTTE to the list of recognized ADaM dataset names.
      • Added another example to data_extract_spec’s doc string showcasing app users can choose a variable used for filtering in the encoding panel.
      • Added CSS styling to tool tips in teal modules.
      • -
    + +
    -

    Bug fixes

    -
    • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
    • +

      Bug fixes +

      +
        +
      • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
      • Fixed a bug that crashes app whenever a Date or datetime column is selected from a filter_spec.
      • -
    + +
    -

    teal 0.9.4

    +

    teal 0.9.4 +

    -

    Enhancements

    -
    • Released snowflake connection and connectors.
    • +

      Enhancements +

      +
        +
      • Released snowflake connection and connectors.
      • Changed ordering of datasets to be more intuitive (topologically first for CDISC datasets only and then according to input datasets order).
      • When closing a teal app (ending a user shiny session), all DataConnections will now try to close their connections.
      • Added ADHY keys to configuration file.
      • Extended the filter_spec function: the parameter choices is no longer mandatory (the function will take all possible choices by default) and the vars parameter additionally accepts the choices_selected and allows to change the variables for filtering using the UI elements in the encoding panel.
      • -
    + +
    -

    Bug fixes

    -
    • Cleaned up imports in the package.
    • -
    • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
    • +

      Bug fixes +

      +
        +
      • Cleaned up imports in the package.
      • +
      • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
        +
      • Fixed issue with cloning Callable class.
      • -
    + +
    -

    teal 0.9.3

    +

    teal 0.9.3 +

    -

    New Features

    -
    • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
    • +

      New Features +

      +
        +
      • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
      • New JoinKeys class (with join_keys() constructors and join_key() constructor for its elements) to store joining key columns between datasets.
      • Refactored the most basic dataset() constructor, added cdisc_dataset() constructor and as_cdisc() conversion function.
      • Soft-deprecate removed class constructors and obsolete functions (e.g. keys()).
      • Added get_keys() and set_keys() functions to extract and manipulate datasets primary keys respectively.
      • Unexported filtered_data_new, filtered_data_set and filtered_data_set_filters.
      • -
    + +
    -

    Bug fixes

    -
    • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
    • +

      Bug fixes +

      +
        +
      • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
      • Added ability to press “Enter” key without having to set focus to the Submit button for delayed data loading.
      • Allow variable_choices to use datasets with missing labels.
      • Fixed bug that ignores input of NULL to selected argument of select_spec function.
      • -
    + +
    -

    Enhancements

    -
    • Added button to remove all active filters from the Filter Panel.
    • -
    +

    Enhancements +

    +
      +
    • Added button to remove all active filters from the Filter Panel.
    • +
    +
    -

    teal 0.9.2

    +

    teal 0.9.2 +

    -

    New Features

    -
    • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
    • +

      New Features +

      +
        +
      • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
      • NOTE: python_dataset_connector is not yet ready to be deployed on RSConnect because it does not contain numpy and pandas, which are Python libraries used in python_dataset_connector.
      • Added support for filtering on Date and Datetime variables in the Filter Panel.
      • Added buttons for date and datetime filter widgets to reset the value to the original.
      • Added new function check_key_duplicates, which creates a short summary about rows with duplicated primary key (row numbers and the number of duplicates)
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    • Removed include_factors option in get_class_colnames in RawDataset.
    • -
    +

    Miscellaneous +

    +
      +
    • Removed include_factors option in get_class_colnames in RawDataset.
    • +
    +
    -

    teal 0.9.1

    -
    • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
    • +

      teal 0.9.1 +

      +
        +
      • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
      • Nested tabs module now has better alignment with the filter panel on the page.
      • Allow width argument in optionalSelectInput.
      • Added lifecycle badges to all exported functions.
      • @@ -501,10 +674,13 @@

        teal 0.9.1 -

        teal 0.9.0

        -
        • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

        • +

          teal 0.9.0 +

          +
            +
          • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

          • A new teal_data function to include datasets and connectors into teal application.

          • cdisc_data function to include datasets and connectors into teal application where a check argument still could be used and other consistency tests are performed.

          • get_raw_data can be used to derive raw data from R6 objects e.g. (RelationalDataset).

          • @@ -525,91 +701,133 @@

            teal 0.9.0 -

            Refactor of FilteredData (for developers)

            -
            • +
            +
            +

            Refactor of FilteredData (for developers) +

            +
              +
            • FilteredData is now fully reactive. Now filtered data is lazy evaluated as per need. This further opens the door to bookmarking teal apps (bookmarking currently works for the right filtering panel, but we will make this feature more sophisticated in a future release, each module must be reviewed and adapted if it contains reactiveValues).
            • Datasets and materialized connectors are provided to FilteredData by set_datasets_data function located in init_datasets.R file.
            • Renamed get_dataset() method to get_data().
            • Renamed get_filter_call() method to get_filter_expr(); returns an expression rather than a list.
            • Removed argument isolate from get_data() method and similar methods. You must isolate it yourself as needed. If you want to temporarily deactivate shiny errors due to missing errors, you can set options(shiny.suppressMissingContextError = TRUE). In general, avoid isolate as this breaks reactivity.
            • We added a development module to add several filters at once, e.g. safety filters. This is to be evaluated before it is converted into a proper module and made available to end-users.
            • -
            +

          +

    -

    teal 0.8.5

    -
    • UI bug fix to hide filter elements for not used datasets.
    • -
    +

    teal 0.8.5 +

    +
      +
    • UI bug fix to hide filter elements for not used datasets.
    • +
    +
    -

    teal 0.8.4

    -
    • Progress bar for UI creation in delayed loading module.
    • +

      teal 0.8.4 +

      +
        +
      • Progress bar for UI creation in delayed loading module.
      • Change output of keys function to keys object.
      • Delayed version of choices_selected.
      • Fix an error in choices_selected when selected is not in choices.
      • Fix pickerInput not to display column name as label if it’s missing.
      • -
    + +
    -

    teal 0.8.3

    -
    • Enable teal app to initialize without data. The data are then loaded from within the teal app.
    • +

      teal 0.8.3 +

      +
        +
      • Enable teal app to initialize without data. The data are then loaded from within the teal app.
      • New classes (DatasetConnector, DataConnector) to connect to various data sources, including: * connector to rice API - rice_data and rice_dataset_connector * connector to RDS files - rds_data and rds_dataset_connector
      • Message appears at bottom right of shiny app when shiny is busy to update the views.
      • Remove labels argument of cdisc_data function. Labels should now already be present in the data passed to the cdisc_data function. This can be achieved using the var_relabel function.
      • -
    + +
    -

    teal 0.8.2

    -
    • Fixed several BUGS in optionalSelectInput and improved inputs look.
    • +

      teal 0.8.2 +

      +
        +
      • Fixed several BUGS in optionalSelectInput and improved inputs look.
      • Added get_data_labels function to FilteredData class.
      • Improved sep passing within data_extract_spec.
      • -
    + +
    -

    teal 0.8.1

    -
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • -
    +

    teal 0.8.1 +

    +
      +
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • +
    +
    -

    teal 0.8.0

    -
    • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
    • +

      teal 0.8.0 +

      +
        +
      • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
      • Possibility to load custom .css and .js files.
      • Renamed columns_spec to select_spec.
      • Show number of observations on filter panel.
      • Add labeling functions variable_choices and value_choices.
      • -
    + +
    -

    teal 0.7.0

    -
    • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
    • +

      teal 0.7.0 +

      +
        +
      • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
      • Moved teal.utils functions to teal: log_app_usage, stop_shiny.
      • Added *_spec functions.
      • Improvements on usage of PickerInput and SelectInput.
      • -
    + +
    -

    teal 0.6.0

    -
    • Removed deprecated functions tab*.
    • +

      teal 0.6.0 +

      +
        +
      • Removed deprecated functions tab*.
      • Removed data generation functions including generate_sample_data.
      • Incorporate shinyjs package.
      • Added “Copy R code to clipboard” button.
      • -
    + +
    -

    teal 0.0.5

    -
    • Added limit to data_table with scrolling, preventing overlap of UI elements.
    • +

      teal 0.0.5 +

      +
        +
      • Added limit to data_table with scrolling, preventing overlap of UI elements.
      • Boolean filtering.
      • -
    + +
    -

    teal 0.0.4

    -
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • -
    +

    teal 0.0.4 +

    +
      +
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • +
    +
    -

    teal 0.0.3

    -
    • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
    • -
    -
    New features
    -
    • +

      teal 0.0.3 +

      +
        +
      • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
      • +
      +
      +
      New features +
      +
        +
      • tm_scatterplot module.
      • tm_table module.
      • -
      +
    +
    -
    Changes
    -
    • All tabs arguments were renamed to modules.
    • +
      Changes +
      +
        +
      • All tabs arguments were renamed to modules.
      • tab_item function is now called module.
      • @@ -622,30 +840,39 @@
        Changes -

        teal 0.0.2

        -
        • New ‘01_getting_started’ vignette.
        • +

          teal 0.0.2 +

          +
            +
          • New ‘01_getting_started’ vignette.
          • Datanames in FilteredData are now case sensitive.
          • -
    + +
    -

    teal 0.0.1

    -
    • March 28, 2016 - Initial Release.
    • -
    +

    teal 0.0.1 +

    +
      +
    • March 28, 2016 - Initial Release.
    • +
    + + + + + - - + + diff --git a/release-candidate/pull_request_template.html b/release-candidate/pull_request_template.html index 0eca9930a5..202314d428 100644 --- a/release-candidate/pull_request_template.html +++ b/release-candidate/pull_request_template.html @@ -1,8 +1,22 @@ - -Pull Request • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -114,17 +134,19 @@

    Fixes #nnn

    - + + + + - - + + diff --git a/release-candidate/reference/TealReportCard.html b/release-candidate/reference/TealReportCard.html index e777febcf4..7016c1b1b4 100644 --- a/release-candidate/reference/TealReportCard.html +++ b/release-candidate/reference/TealReportCard.html @@ -1,16 +1,32 @@ - - + + + + + +TealReportCard — TealReportCard • teal +TealReportCard — TealReportCard • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -127,20 +149,27 @@
    -

    Super class

    +

    Super class +

    teal.reporter::ReportCard -> TealReportCard

    +

    Inherited methods


    -

    Method append_src()

    -

    Appends the source code to the content meta data of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_src(src, ...)

    +

    +
    +
    +

    Method append_src() +

    +

    Appends the source code to the content meta data of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_src(src, ...)
    +

    +
    -

    Arguments

    -

    src
    +

    Arguments +

    +

    +
    +
    +
    src

    (character(1)) code as text.

    @@ -172,85 +214,148 @@

    Arguments -

    Returns

    +

    Returns +

    Object of class TealReportCard, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_src(
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_src(
       "plot(iris)"
     )
    -card$get_content()[[1]]$get_content()

    +card$get_content()[[1]]$get_content()
    +

    +
    -


    -

    Method append_fs()

    +
    +

    +
    +
    +

    Method append_fs() +

    Appends the filter state list to the content and metadata of this TealReportCard. If the filter state list has an attribute named formatted, it appends it to the card otherwise it uses the default yaml::as.yaml to format the list. -If the filter state list is empty, nothing is appended to the content.

    -

    Usage

    -

    TealReportCard$append_fs(fs)

    +If the filter state list is empty, nothing is appended to the content.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_fs(fs)
    +

    +
    -

    Arguments

    -

    fs
    +

    Arguments +

    +

    +
    +
    +
    fs

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method append_encodings()

    -

    Appends the encodings list to the content and metadata of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_encodings(encodings)

    +
    +

    +
    +
    +

    Method append_encodings() +

    +

    Appends the encodings list to the content and metadata of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_encodings(encodings)
    +

    +
    -

    Arguments

    -

    encodings
    +

    Arguments +

    +

    +
    +
    +
    encodings

    (list) list of encodings selections of the teal app.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
     card$get_content()[[1]]$get_content()
    -

    +
    +

    +
    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealReportCard$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -258,7 +363,8 @@

    Arguments -

    Examples

    +

    Examples +

    
     ## ------------------------------------------------
     ## Method `TealReportCard$append_src`
    @@ -281,17 +387,19 @@ 

    Examples

    + +
    + +
    - - + + diff --git a/release-candidate/reference/TealSlicesBlock.html b/release-candidate/reference/TealSlicesBlock.html index c22c73b587..21920ac9ba 100644 --- a/release-candidate/reference/TealSlicesBlock.html +++ b/release-candidate/reference/TealSlicesBlock.html @@ -1,10 +1,26 @@ - -RcodeBlock — TealSlicesBlock • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,34 +140,54 @@
    -

    Super classes

    +

    Super classes +

    teal.reporter::ContentBlock -> teal.reporter::TextBlock -> TealSlicesBlock

    +

    Inherited methods


    -

    Method new()

    -

    Returns a TealSlicesBlock object.

    -

    Usage

    -

    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")

    +

    +
    +
    +

    Method new() +

    +

    Returns a TealSlicesBlock object.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    @@ -153,89 +195,154 @@

    Arguments -

    Details

    +

    Details +

    Returns a TealSlicesBlock object with no content and no parameters.

    -

    Returns

    +

    Returns +

    Object of class TealSlicesBlock, invisibly.

    -


    -

    Method set_content()

    +
    +

    +
    +
    +

    Method set_content() +

    Sets content of this TealSlicesBlock. Sets content as YAML text which represents a list generated from teal_slices. The list displays limited number of fields from teal_slice objects, but this list is sufficient to conclude which filters were applied. -When selected field in teal_slice object is a range, then it is displayed as a "min"

    -

    Usage

    -

    TealSlicesBlock$set_content(content)

    +When selected field in teal_slice object is a range, then it is displayed as a "min"

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$set_content(content)
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method from_list()

    -

    Create the RcodeBlock from a list.

    -

    Usage

    -

    TealSlicesBlock$from_list(x)

    +
    +

    +
    +
    +

    Method from_list() +

    +

    Create the RcodeBlock from a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$from_list(x)
    +

    +
    -

    Arguments

    -

    x
    +

    Arguments +

    +

    +
    +
    +
    x

    (named list) with two fields c("text", "params"). Use the get_available_params method to get all possible parameters.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method to_list()

    -

    Convert the RcodeBlock to a list.

    -

    Usage

    -

    TealSlicesBlock$to_list()

    +
    +

    +
    +
    +

    Method to_list() +

    +

    Convert the RcodeBlock to a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$to_list()
    +

    +
    -

    Returns

    +

    Returns +

    named list with a text and params.

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealSlicesBlock$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -243,17 +350,19 @@

    Arguments

    + +
    + +
    - - + + diff --git a/release-candidate/reference/append_module.html b/release-candidate/reference/append_module.html index 33504fe229..2fbe33ad08 100644 --- a/release-candidate/reference/append_module.html +++ b/release-candidate/reference/append_module.html @@ -1,8 +1,24 @@ - -Append a teal_module to children of a teal_modules object — append_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    append_module(modules, module)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    module

    (teal_module) object to be appended onto the children of modules

    -
    + +
    -

    Value

    +

    Value +

    A teal_modules object with module appended.

    + +
    + + - - + + diff --git a/release-candidate/reference/build_app_title.html b/release-candidate/reference/build_app_title.html index 73d2404bb4..80c939a2da 100644 --- a/release-candidate/reference/build_app_title.html +++ b/release-candidate/reference/build_app_title.html @@ -1,8 +1,24 @@ - -Build app title with favicon — build_app_title • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    build_app_title(
       title = "teal app",
       favicon =
    @@ -123,8 +146,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character) The browser title for the teal app.

    @@ -132,26 +157,30 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag containing the element that adds the title and logo to the shiny app.

    + + + + - - + + diff --git a/release-candidate/reference/calculate_hashes.html b/release-candidate/reference/calculate_hashes.html index caf806a2bf..cd34af01bd 100644 --- a/release-candidate/reference/calculate_hashes.html +++ b/release-candidate/reference/calculate_hashes.html @@ -1,8 +1,24 @@ - -Get the hash of a dataset — calculate_hashes • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    calculate_hashes(datanames, datasets)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets

    datasets

    (FilteredData) object holding the data

    -
    + +
    -

    Value

    +

    Value +

    A list of hashes per dataset.

    + + + + - - + + diff --git a/release-candidate/reference/check_filter_datanames.html b/release-candidate/reference/check_filter_datanames.html index 91742dd993..c207b62171 100644 --- a/release-candidate/reference/check_filter_datanames.html +++ b/release-candidate/reference/check_filter_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in filters — check_filter_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_filter_datanames(filters, datanames)
    -

    Arguments

    -
    filters
    +

    Arguments +

    +
    +
    filters

    (teal_slices) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/release-candidate/reference/check_modules_datanames.html b/release-candidate/reference/check_modules_datanames.html index ebfed97190..7dad186f57 100644 --- a/release-candidate/reference/check_modules_datanames.html +++ b/release-candidate/reference/check_modules_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in modules — check_modules_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_modules_datanames(modules, datanames)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/release-candidate/reference/create_app_id.html b/release-candidate/reference/create_app_id.html index a47d15c56f..eadeaec5ce 100644 --- a/release-candidate/reference/create_app_id.html +++ b/release-candidate/reference/create_app_id.html @@ -1,8 +1,24 @@ - -Application ID — create_app_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,53 @@
    -

    Usage

    +

    Usage +

    create_app_id(data, modules)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) as accepted by init

    modules

    (teal_modules) object as accepted by init

    -
    + +
    -

    Value

    +

    Value +

    A single character string.

    -

    Details

    +

    Details +

    Calculate app ID that will be used to stamp filter state snapshots. App ID is a hash of the app's data and modules. See "transferring snapshots" section in ?snapshot.

    + + + + - - + + diff --git a/release-candidate/reference/deep_copy_filter.html b/release-candidate/reference/deep_copy_filter.html index fd1cb830a1..6cb01af3d0 100644 --- a/release-candidate/reference/deep_copy_filter.html +++ b/release-candidate/reference/deep_copy_filter.html @@ -1,14 +1,30 @@ - - + + + + + +Deep copy teal_slices — deep_copy_filter • teal +Deep copy teal_slices — deep_copy_filter • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + +
    @@ -123,18 +146,23 @@
    -

    Usage

    +

    Usage +

    deep_copy_filter(filter)
    -

    Arguments

    -
    filter
    +

    Arguments +

    +
    +
    filter

    (teal_slices)

    -
    + +
    -

    Value

    +

    Value +

    teal_slices

    @@ -143,17 +171,19 @@

    Value

    + + + + - - + + diff --git a/release-candidate/reference/dot-datasets_to_data.html b/release-candidate/reference/dot-datasets_to_data.html index edc63b5e61..7761232260 100644 --- a/release-candidate/reference/dot-datasets_to_data.html +++ b/release-candidate/reference/dot-datasets_to_data.html @@ -1,12 +1,28 @@ - - + + + + + +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    .datasets_to_data(module, datasets)
    -

    Arguments

    -
    module
    +

    Arguments +

    +
    +
    module

    (teal_module) module where needed filters are taken from

    datasets

    (FilteredData) object where needed data are taken from

    -
    + +
    -

    Value

    +

    Value +

    A teal_data object.

    + + + + - - + + diff --git a/release-candidate/reference/example_module.html b/release-candidate/reference/example_module.html index 32d6294243..16164d8d22 100644 --- a/release-candidate/reference/example_module.html +++ b/release-candidate/reference/example_module.html @@ -1,8 +1,24 @@ - -An example teal module — example_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    example_module(label = "example teal module", datanames = "all")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -132,16 +157,19 @@

    Arguments will show filters of all datasets. datanames also determines a subset of datasets which are appended to the data argument in server function.

    -

    + +
    -

    Value

    +

    Value +

    A teal module which can be included in the modules argument to init().

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(IRIS = iris, MTCARS = mtcars),
       modules = example_module()
    @@ -152,17 +180,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/filter_manager_module_srv.html b/release-candidate/reference/filter_manager_module_srv.html index a6505b172a..6481d214b8 100644 --- a/release-candidate/reference/filter_manager_module_srv.html +++ b/release-candidate/reference/filter_manager_module_srv.html @@ -1,8 +1,24 @@ - -Module specific filter manager — filter_manager_module_srv • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    filter_manager_module_srv(id, module_fd, slices_global)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -131,21 +156,28 @@

    Arguments -

    Value

    +

    Value +

    A reactive expression containing the slices active in this module.

    -

    Details

    +

    Details +

    This module tracks the state of a single FilteredData object and global teal_slices and updates both objects as necessary. Filter states added in different modules Filter states added any individual module are added to global teal_slices @@ -154,17 +186,19 @@

    Details

    + + + + - - + + diff --git a/release-candidate/reference/get_client_timezone.html b/release-candidate/reference/get_client_timezone.html index 788cb5f944..d4c0542565 100644 --- a/release-candidate/reference/get_client_timezone.html +++ b/release-candidate/reference/get_client_timezone.html @@ -1,10 +1,26 @@ - -Get client timezone — get_client_timezone • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,19 +139,24 @@
    -

    Usage

    +

    Usage +

    get_client_timezone(ns)
    -

    Arguments

    -
    ns
    +

    Arguments +

    +
    +
    ns

    (function) namespace function passed from the session object in the shiny server. For shiny modules this will allow for proper name spacing of the registered input.

    -
    + +
    -

    Value

    +

    Value +

    (shiny) input variable accessible with input$tz which is a (character) @@ -137,17 +164,19 @@

    Value

    + + + + - - + + diff --git a/release-candidate/reference/get_code_tdata.html b/release-candidate/reference/get_code_tdata.html index d9f154864b..a085b98cac 100644 --- a/release-candidate/reference/get_code_tdata.html +++ b/release-candidate/reference/get_code_tdata.html @@ -1,8 +1,24 @@ - -Wrapper for get_code.tdata — get_code_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,35 +137,42 @@
    -

    Usage

    +

    Usage +

    get_code_tdata(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    (character) code used in the tdata object.

    + + + + - - + + diff --git a/release-candidate/reference/get_datasets_code.html b/release-candidate/reference/get_datasets_code.html index 14adab55eb..08b81c4950 100644 --- a/release-candidate/reference/get_datasets_code.html +++ b/release-candidate/reference/get_datasets_code.html @@ -1,8 +1,24 @@ - -Get datasets code — get_datasets_code • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    get_datasets_code(datanames, datasets, hashes)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets to extract code from

    @@ -131,28 +156,35 @@

    Arguments -

    Value

    +

    Value +

    -

    Character string concatenated from the following elements:

    • data pre-processing code (from data argument in init)

    • +

      Character string concatenated from the following elements:

      +
        +
      • data pre-processing code (from data argument in init)

      • hash check of loaded objects

      • filter code (if any)

      • -
    + + + + + + - - + + diff --git a/release-candidate/reference/get_metadata.html b/release-candidate/reference/get_metadata.html index 48dc07e590..2284d4e6d8 100644 --- a/release-candidate/reference/get_metadata.html +++ b/release-candidate/reference/get_metadata.html @@ -1,8 +1,24 @@ - -Function to get metadata from a tdata object — get_metadata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    get_metadata(data, dataname)
     
     # S3 method for tdata
    @@ -125,34 +148,40 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata - object) to extract the data from

    dataname

    (character(1)) the dataset name whose metadata is requested

    -
    + +
    -

    Value

    +

    Value +

    Either list of metadata or NULL if no metadata.

    + + + + - - + + diff --git a/release-candidate/reference/get_rcode_libraries.html b/release-candidate/reference/get_rcode_libraries.html index 1c92cce2f5..3e9a985d39 100644 --- a/release-candidate/reference/get_rcode_libraries.html +++ b/release-candidate/reference/get_rcode_libraries.html @@ -1,8 +1,24 @@ - -Generates library calls from current session info — get_rcode_libraries • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,29 +136,33 @@
    -

    Usage

    +

    Usage +

    get_rcode_libraries()
    -

    Value

    +

    Value +

    Character vector of library(<package>) calls.

    + + + + - - + + diff --git a/release-candidate/reference/include_css_files.html b/release-candidate/reference/include_css_files.html index ddb9781288..aac05699d6 100644 --- a/release-candidate/reference/include_css_files.html +++ b/release-candidate/reference/include_css_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,35 +142,42 @@
    -

    Usage

    +

    Usage +

    include_css_files(pattern = "*")
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes CSS files.

    + + + + - - + + diff --git a/release-candidate/reference/include_js_files.html b/release-candidate/reference/include_js_files.html index 05c010eaa8..fa89841321 100644 --- a/release-candidate/reference/include_js_files.html +++ b/release-candidate/reference/include_js_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include JS files from /inst/js/ package directory to application header — include_js_files • teal +Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    include_js_files(pattern = NULL, except = NULL)
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included, passed to system.file

    except

    (character) vector of basename filenames to be excluded

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes JS files.

    + + + + - - + + diff --git a/release-candidate/reference/include_teal_css_js.html b/release-candidate/reference/include_teal_css_js.html index 837f0f9637..f1fede65a9 100644 --- a/release-candidate/reference/include_teal_css_js.html +++ b/release-candidate/reference/include_teal_css_js.html @@ -1,16 +1,32 @@ - - + + + + + +Code to include teal CSS and JavaScript files — include_teal_css_js • teal +Code to include teal CSS and JavaScript files — include_teal_css_js • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -126,33 +148,38 @@
    -

    Usage

    +

    Usage +

    include_teal_css_js()
    -

    Value

    +

    Value +

    A shiny.tag.list.

    -

    Details

    +

    Details +

    Simply add include_teal_css_js() as one of the UI elements.

    + + + + - - + + diff --git a/release-candidate/reference/index.html b/release-candidate/reference/index.html index f3e4856292..94603d8d14 100644 --- a/release-candidate/reference/index.html +++ b/release-candidate/reference/index.html @@ -1,8 +1,22 @@ - -Function reference • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -108,230 +128,312 @@
    -

    Core teal functions

    +

    Core teal functions +

    -

    Main functions needed to build a teal app

    +

    +

    Main functions needed to build a teal app

    -
    +
    +
    -
    +
    +
    init()
    Create the server and UI function for the shiny app
    -
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    module() modules() format(<teal_module>) print(<teal_module>) format(<teal_modules>) print(<teal_modules>)
    Create teal_module and teal_modules objects
    -
    +
    +
    +
    ui_teal_with_splash() srv_teal_with_splash()
    Add splash screen to teal application
    -
    +
    +
    +
    teal_slices() as.teal_slices() c(<teal_slices>)
    Filter settings for teal applications
    -
    -

    Helper Functions

    + +
    +
    +

    Helper Functions +

    -

    Helper functions for teal

    +

    +

    Helper functions for teal

    -
    +
    +
    -
    +
    +
    build_app_title()
    Build app title with favicon
    -
    -

    Example module

    + +
    +
    +

    Example module +

    -

    A simple teal module

    +

    +

    A simple teal module

    -
    +
    +
    -
    +
    +
    example_module()
    An example teal module
    -
    -

    Creating reports

    + +
    +
    +

    Creating reports +

    -
    +
    +
    -
    +
    +
    reporter_previewer_module()
    Create a teal module for previewing a report
    -
    +
    +
    +
    TealReportCard
    TealReportCard
    -
    +
    +
    +
    report_card_template()
    Template function for TealReportCard creation and customization
    -
    -

    Landing popup

    + +
    +
    +

    Landing popup +

    -
    +
    +
    -
    +
    +
    landing_popup_module()
    Landing popup module
    -
    -

    Functions for module developers

    + +
    +
    +

    Functions for module developers +

    -
    +
    +
    -
    +
    +
    as_tdata()
    Downgrade teal_data objects in modules for compatibility
    -
    +
    +
    +
    new_tdata()
    Create a tdata object
    -
    +
    +
    +
    get_code_tdata()
    -
    Wrapper for get_code.tdata
    -
    +
    Wrapper for get_code.tdata +
    +
    +
    +
    get_metadata()
    Function to get metadata from a tdata object
    -
    +
    +
    +
    tdata2env()
    -
    Function to convert a tdata object to an environment
    -
    +
    Function to convert a tdata object to an environment +
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    show_rcode_modal()
    Show R code modal
    -
    +
    +
    +
    join_keys(<tdata>)
    -
    Extract join_keys from tdata
    -
    -

    Validation functions

    +
    Extract join_keys from tdata +
    + +
    +
    +

    Validation functions +

    -
    +
    +
    -
    +
    +
    validate_has_data()
    Validate that dataset has a minimum number of observations
    -
    +
    +
    +
    validate_has_elements()
    Validates that vector has length greater than 0
    -
    +
    +
    +
    validate_has_variable()
    Validates that dataset contains specific variable
    -
    +
    +
    +
    validate_in()
    Validates that vector includes all expected values
    -
    +
    +
    +
    validate_inputs()
    Send input validation messages to output
    -
    +
    +
    +
    validate_n_levels()
    Validate that variables has expected number of levels
    -
    +
    +
    +
    validate_no_intersection()
    Validates no intersection between two vectors
    -
    +
    +
    +
    validate_one_row_per_id()
    Validate that dataset has unique rows for key variables
    -
    + + + + + + - - + + diff --git a/release-candidate/reference/init.html b/release-candidate/reference/init.html index 263abcb8f2..7434539dbd 100644 --- a/release-candidate/reference/init.html +++ b/release-candidate/reference/init.html @@ -1,12 +1,28 @@ - - + + + + + +Create the server and UI function for the shiny app — init • teal +Create the server and UI function for the shiny app — init • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    init(
       data,
       modules,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) For constructing the data object, refer to teal_data() and teal_data_module().

    @@ -174,21 +199,25 @@

    Arguments -

    Value

    +

    Value +

    Named list with server and UI functions.

    -

    Details

    +

    Details +

    When initializing the teal app, if datanames are not set for the teal_data object, defaults from the teal_data environment will be used.

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(
         new_iris = transform(iris, id = seq_len(nrow(iris))),
    @@ -243,17 +272,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/is_arg_used.html b/release-candidate/reference/is_arg_used.html index 6e6376230d..95416c4fbc 100644 --- a/release-candidate/reference/is_arg_used.html +++ b/release-candidate/reference/is_arg_used.html @@ -1,8 +1,24 @@ - -Does the object make use of the arg — is_arg_used • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    is_arg_used(modules, arg)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_module or teal_modules) object

    arg

    (character(1)) names of the arguments to be checked against formals of teal modules.

    -
    + +
    -

    Value

    +

    Value +

    logical whether the object makes use of arg.

    + + + + - - + + diff --git a/release-candidate/reference/join_keys.tdata.html b/release-candidate/reference/join_keys.tdata.html index 0050234c5a..abb57484a9 100644 --- a/release-candidate/reference/join_keys.tdata.html +++ b/release-candidate/reference/join_keys.tdata.html @@ -1,8 +1,24 @@ - -Extract join_keys from tdata — join_keys.tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,34 +137,40 @@
    -

    Usage

    +

    Usage +

    # S3 method for tdata
     join_keys(data, ...)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    ...

    Additional arguments (not used)

    -
    + +
    + + + + - - + + diff --git a/release-candidate/reference/landing_popup_module.html b/release-candidate/reference/landing_popup_module.html index d5d8c90626..10422f9aee 100644 --- a/release-candidate/reference/landing_popup_module.html +++ b/release-candidate/reference/landing_popup_module.html @@ -1,12 +1,28 @@ - - + + + + + +Landing popup module — landing_popup_module • teal +Landing popup module — landing_popup_module • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    landing_popup_module(
       label = "Landing Popup",
       title = NULL,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label of the module.

    @@ -147,16 +172,19 @@

    Arguments -

    Value

    +

    Value +

    A teal_module (extended with teal_landing_module class) to be used in teal applications.

    -

    Examples

    +

    Examples +

    app1 <- init(
       data = teal_data(iris = iris),
       modules = modules(
    @@ -203,17 +231,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/matrix_to_mapping.html b/release-candidate/reference/matrix_to_mapping.html index d613f76b3e..fb9946f029 100644 --- a/release-candidate/reference/matrix_to_mapping.html +++ b/release-candidate/reference/matrix_to_mapping.html @@ -1,14 +1,30 @@ - - + + + + + +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,36 +145,43 @@
    -

    Usage

    +

    Usage +

    matrix_to_mapping(mapping_matrix)
    -

    Arguments

    -
    mapping_matrix
    +

    Arguments +

    +
    +
    mapping_matrix

    (data.frame) of logical vectors where columns represent modules and row represent teal_slices

    -
    + +
    -

    Value

    +

    Value +

    Named list like that in the mapping attribute of a teal_slices object.

    + + + + - - + + diff --git a/release-candidate/reference/module_filter_manager.html b/release-candidate/reference/module_filter_manager.html index 5c64b9dbe2..d8ecf12a0c 100644 --- a/release-candidate/reference/module_filter_manager.html +++ b/release-candidate/reference/module_filter_manager.html @@ -1,8 +1,24 @@ - -Manage multiple FilteredData objects — module_filter_manager • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_ui(id)
     
     filter_manager_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,15 +164,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    A list of reactives, each holding a teal_slices, as returned by filter_manager_module_srv.

    -

    Details

    +

    Details +

    This module observes changes in the filters of each FilteredData object and keeps track of all filters used. A mapping of filters to modules is kept in the mapping_matrix object (which is actually a data.frame) @@ -155,17 +183,19 @@

    Details

    + + + + - - + + diff --git a/release-candidate/reference/module_filter_manager_modal.html b/release-candidate/reference/module_filter_manager_modal.html index 2516f2a86b..1689793ca4 100644 --- a/release-candidate/reference/module_filter_manager_modal.html +++ b/release-candidate/reference/module_filter_manager_modal.html @@ -1,8 +1,24 @@ - -Filter manager modal — module_filter_manager_modal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_modal_ui(id)
     
     filter_manager_modal_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,20 +164,23 @@

    Argumentsteal_slices().

    -

    + + + + + + - - + + diff --git a/release-candidate/reference/module_labels.html b/release-candidate/reference/module_labels.html index 3481947b5d..4cd2cce0d0 100644 --- a/release-candidate/reference/module_labels.html +++ b/release-candidate/reference/module_labels.html @@ -1,8 +1,24 @@ - -Retrieve labels from teal_modules — module_labels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,18 +137,23 @@
    -

    Usage

    +

    Usage +

    module_labels(modules)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    -
    + +
    -

    Value

    +

    Value +

    A list containing the labels of the modules. If the modules are nested, @@ -133,17 +161,19 @@

    Value

    + + + + - - + + diff --git a/release-candidate/reference/module_management.html b/release-candidate/reference/module_management.html index 5bb9f35bab..d0fe766999 100644 --- a/release-candidate/reference/module_management.html +++ b/release-candidate/reference/module_management.html @@ -1,8 +1,24 @@ - -Extract/Remove module(s) of specific class — extract_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,54 @@
    -

    Usage

    +

    Usage +

    extract_module(modules, class)
     
     drop_module(modules, class)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    class

    The class name of teal_module to be extracted or dropped.

    -
    + +
    -

    Value

    +

    Value +

    -
    • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

    • +
        +
      • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

      • For drop_module, the opposite, which is all teal_modules of class other than class.

      • -

      teal_modules

      +
    +

    teal_modules

    + + + + - - + + diff --git a/release-candidate/reference/module_nested_tabs.html b/release-candidate/reference/module_nested_tabs.html index aa466c5fe2..7608ddb632 100644 --- a/release-candidate/reference/module_nested_tabs.html +++ b/release-candidate/reference/module_nested_tabs.html @@ -1,8 +1,24 @@ - -Create a UI of nested tabs of teal_modules — module_nested_tabs • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)
     
     # S3 method for default
    @@ -163,8 +187,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -197,18 +223,25 @@

    Arguments -

    Value

    +

    Value +

    -

    Depending on the class of modules, ui_nested_tabs returns:

    • teal_module: instantiated UI of the module.

    • +

      Depending on the class of modules, ui_nested_tabs returns:

      +
        +
      • teal_module: instantiated UI of the module.

      • teal_modules: tabsetPanel with each tab corresponding to recursively calling this function on it.

      • -

      srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

      +
    +

    srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

    -

    ui_nested_tabs

    +

    +ui_nested_tabs +

    Each teal_modules is translated to a tabsetPanel and each @@ -218,25 +251,32 @@

    ui_nested_tabs

    -

    srv_nested_tabs

    +

    +srv_nested_tabs +

    -

    This module recursively calls all elements of modules and returns currently active one.

    • teal_module returns self as a active module.

    • +

      This module recursively calls all elements of modules and returns currently active one.

      +
        +
      • teal_module returns self as a active module.

      • teal_modules also returns module active within self which is determined by the input$active_tab.

      • -
    + +
    + + + + - - + + diff --git a/release-candidate/reference/module_tabs_with_filters.html b/release-candidate/reference/module_tabs_with_filters.html index 5b078ae2fa..77e288b508 100644 --- a/release-candidate/reference/module_tabs_with_filters.html +++ b/release-candidate/reference/module_tabs_with_filters.html @@ -1,12 +1,28 @@ - - + + + + + +Add right filter panel into each of the top-level teal_modules UIs — module_tabs_with_filters • teal +Add right filter panel into each of the top-level teal_modules UIs — module_tabs_with_filters • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    ui_tabs_with_filters(id, modules, datasets, filter = teal_slices())
     
     srv_tabs_with_filters(
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -161,15 +186,18 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag.list containing the main menu, placeholders for filters and placeholders for the teal modules.

    -

    Details

    +

    Details +

    The right filter panel's filter choices affect the datasets object. Therefore, all modules using the same datasets share the same filters.

    This works with nested modules of depth greater than 2, though the filter @@ -177,17 +205,19 @@

    Details

    + +
    + + - - + + diff --git a/release-candidate/reference/module_teal.html b/release-candidate/reference/module_teal.html index 78a55153af..6d0d716340 100644 --- a/release-candidate/reference/module_teal.html +++ b/release-candidate/reference/module_teal.html @@ -1,8 +1,24 @@ - -teal main app module — module_teal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_teal(
       id,
       splash_ui = tags$h2("Starting the Teal App"),
    @@ -127,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -171,15 +197,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression which returns the currently active module.

    -

    Details

    +

    Details +

    It displays the splash UI which is used to fetch the data, possibly prompting for a password input to fetch the data. Once the data is ready, the splash screen is replaced by the actual teal UI that is tabsetted and @@ -200,17 +229,19 @@

    Details

    + +
    + + - - + + diff --git a/release-candidate/reference/module_teal_with_splash.html b/release-candidate/reference/module_teal_with_splash.html index cbb398bf0f..ae213f7eae 100644 --- a/release-candidate/reference/module_teal_with_splash.html +++ b/release-candidate/reference/module_teal_with_splash.html @@ -1,10 +1,26 @@ - -Add splash screen to teal application — module_teal_with_splash • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    ui_teal_with_splash(
       id,
       data,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -168,15 +193,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression containing a teal_data object when data is loaded or NULL when it is not.

    -

    Details

    +

    Details +

    This module pauses app initialization pending delayed data loading. This is necessary because the filter panel and modules depend on the data to initialize.

    teal_with_splash follows the shiny module convention. @@ -186,12 +214,14 @@

    Detailsinit to create a standalone application.

    -

    See also

    +

    See also +

    -

    Examples

    +

    Examples +

    teal_modules <- modules(example_module())
     # Shiny app with modular integration of teal
     ui <- fluidPage(
    @@ -213,17 +243,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/modules_datasets.html b/release-candidate/reference/modules_datasets.html index 6ff9cbac30..88cd9a5f09 100644 --- a/release-candidate/reference/modules_datasets.html +++ b/release-candidate/reference/modules_datasets.html @@ -1,8 +1,24 @@ - -Create filterable data for modules — modules_datasets • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    modules_datasets(
       data,
       modules,
    @@ -124,8 +147,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data)

    @@ -140,9 +165,11 @@

    Arguments -

    Value

    +

    Value +

    Returns list of same shape as modules, containing FilteredData at every leaf. @@ -150,17 +177,19 @@

    Value

    + +
    + + - - + + diff --git a/release-candidate/reference/modules_depth.html b/release-candidate/reference/modules_depth.html index cb78fdfe3c..f7c93abe3c 100644 --- a/release-candidate/reference/modules_depth.html +++ b/release-candidate/reference/modules_depth.html @@ -1,10 +1,26 @@ - -Get module depth — modules_depth • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    modules_depth(modules, depth = 0L)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (list or teal_modules or teal_module) nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -134,26 +159,30 @@

    Arguments -

    Value

    +

    Value +

    Depth level for given module.

    + + + + - - + + diff --git a/release-candidate/reference/reexports.html b/release-candidate/reference/reexports.html index 7563220a24..155a10b89d 100644 --- a/release-candidate/reference/reexports.html +++ b/release-candidate/reference/reexports.html @@ -1,5 +1,10 @@ - - + + + + + +Objects exported from other packages — reexports • teal +Objects exported from other packages — reexports • teal + + + + + + + + + + Skip to contents @@ -40,7 +56,8 @@ + + @@ -134,7 +156,8 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    lifecycle
    +
    +
    lifecycle

    badge

    @@ -142,21 +165,24 @@

    %>%

    -
    + + - + + + + - - + + diff --git a/release-candidate/reference/report_card_template.html b/release-candidate/reference/report_card_template.html index 4c0de52f75..6fa5ed937f 100644 --- a/release-candidate/reference/report_card_template.html +++ b/release-candidate/reference/report_card_template.html @@ -1,10 +1,26 @@ - -Template function for TealReportCard creation and customization — report_card_template • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    report_card_template(
       title,
       label,
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) title of the card (unless overwritten by label)

    @@ -149,26 +174,30 @@

    Arguments -

    Value

    +

    Value +

    (TealReportCard) populated with a title, description and filter state.

    + + + + - - + + diff --git a/release-candidate/reference/reporter_previewer_module.html b/release-candidate/reference/reporter_previewer_module.html index e398feb1dc..ebf6594de5 100644 --- a/release-candidate/reference/reporter_previewer_module.html +++ b/release-candidate/reference/reporter_previewer_module.html @@ -1,20 +1,36 @@ - - + + + + + +Create a teal module for previewing a report — reporter_previewer_module • teal +Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + @@ -132,13 +154,16 @@
    -

    Usage

    +

    Usage +

    reporter_previewer_module(label = "Report previewer", server_args = list())
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -147,26 +172,30 @@

    Argumentsteal.reporter::reporter_previewer_srv().

    -

    + +
    -

    Value

    +

    Value +

    teal_module (extended with teal_module_previewer class) containing the teal.reporter previewer functionality.

    + + + + - - + + diff --git a/release-candidate/reference/run_js_files.html b/release-candidate/reference/run_js_files.html index 322364b8c3..63bd9ad75d 100644 --- a/release-candidate/reference/run_js_files.html +++ b/release-candidate/reference/run_js_files.html @@ -1,14 +1,30 @@ - - + + + + + +Run JS file from /inst/js/ package directory — run_js_files • teal +Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,41 +145,49 @@
    -

    Usage

    +

    Usage +

    run_js_files(files)
    -

    Arguments

    -
    files
    +

    Arguments +

    +
    +
    files

    (character) vector of filenames.

    -
    + +
    -

    Value

    +

    Value +

    returns NULL, invisibly.

    -

    Details

    +

    Details +

    system.file should not be used to access files in other packages, it does not work with devtools. Therefore, we redefine this method in each package as needed. Thus, we do not export this method.

    + + + + - - + + diff --git a/release-candidate/reference/show_rcode_modal.html b/release-candidate/reference/show_rcode_modal.html index e5a0bfe14c..c74fd03f67 100644 --- a/release-candidate/reference/show_rcode_modal.html +++ b/release-candidate/reference/show_rcode_modal.html @@ -1,10 +1,26 @@ - -Show R code modal — show_rcode_modal • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())
    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) Title of the modal, displayed in the first comment of the R code.

    @@ -137,24 +162,28 @@

    Argumentsshiny::getDefaultReactiveDomain() is used.

    -

    + +
    -

    References

    +

    References +

    shiny::showModal()

    + + + + - - + + diff --git a/release-candidate/reference/slices_store.html b/release-candidate/reference/slices_store.html index 0c757a7263..4ae609ced8 100644 --- a/release-candidate/reference/slices_store.html +++ b/release-candidate/reference/slices_store.html @@ -1,10 +1,26 @@ - -Store and restore teal_slices object — slices_store • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,15 +139,18 @@
    -

    Usage

    +

    Usage +

    slices_store(tss, file)
     
     slices_restore(file)
    -

    Arguments

    -
    tss
    +

    Arguments +

    +
    +
    tss

    (teal_slices) object to be stored.

    @@ -133,9 +158,11 @@

    Arguments.

    -

    + +
    -

    Value

    +

    Value +

    slices_store returns NULL, invisibly.

    @@ -144,32 +171,39 @@

    Value

    slices_restore returns a teal_slices object restored from the file.

    -

    Details

    -

    Date and date time objects are stored in the following formats:

    • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

    • +

      Details +

      +

      Date and date time objects are stored in the following formats:

      +
        +
      • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

      • POSIX*t classes are converted to character by using format.POSIX*t(usetz = TRUE, tz = "UTC") (YYYY-MM-DD HH:MM:SS UTC, where UTC is the Coordinated Universal Time timezone short-code).

      • -

      This format is assumed during slices_restore. All POSIX*t objects in +

    +

    This format is assumed during slices_restore. All POSIX*t objects in selected or choices fields of teal_slice objects are always printed in UTC timezone as well.

    -

    See also

    +

    See also +

    + + + + - - + + diff --git a/release-candidate/reference/snapshot_manager_module.html b/release-candidate/reference/snapshot_manager_module.html index 0e796660f9..a8c1a14bc1 100644 --- a/release-candidate/reference/snapshot_manager_module.html +++ b/release-candidate/reference/snapshot_manager_module.html @@ -1,8 +1,24 @@ - -Filter state snapshot management — snapshot_manager_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    snapshot_manager_ui(id)
     
     snapshot_manager_srv(id, slices_global, mapping_matrix, filtered_data_list)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id

    @@ -140,15 +165,18 @@

    Arguments -

    Value

    +

    Value +

    Nothing is returned.

    -

    Details

    +

    Details +

    This module introduces snapshots: stored descriptions of the filter state of the entire application. Snapshots allow the user to save the current filter state of the application for later use in the session, as well as to save it to file in order to share it with an app developer or other users, @@ -160,7 +188,8 @@

    Details

    -

    Server logic

    +

    Server logic +

    Snapshots are basically teal_slices objects, however, since each module is served by a separate instance @@ -175,7 +204,8 @@

    Server logic -

    Snapshot mechanics

    +

    Snapshot mechanics +

    When a snapshot is captured, the user is prompted to name it. @@ -205,7 +235,8 @@

    Snapshot mechanics -

    Transferring snapshots

    +

    Transferring snapshots +

    Snapshots uploaded from disk should only be used in the same application they come from, @@ -215,22 +246,25 @@

    Transferring snapshots

    -

    Author

    +

    Author +

    Aleksander Chlebowski

    + + + + - - + + diff --git a/release-candidate/reference/tdata.html b/release-candidate/reference/tdata.html index 7342093efd..21e1cde217 100644 --- a/release-candidate/reference/tdata.html +++ b/release-candidate/reference/tdata.html @@ -1,22 +1,38 @@ - - + + + + + +Create a tdata object — tdata • teal +Create a tdata object — tdata • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + + @@ -126,19 +148,25 @@

    [Deprecated]

    Create a new object called tdata which contains data, a reactive list of data.frames -(or MultiAssayExperiment), with attributes:

    • code (reactive) containing code used to generate the data

    • +(or MultiAssayExperiment), with attributes:

      +
        +
      • code (reactive) containing code used to generate the data

      • join_keys (join_keys) containing the relationships between the data

      • metadata (named list) containing any metadata associated with the data frames

      • -
    + +
    -

    Usage

    +

    Usage +

    new_tdata(data, code = "", join_keys = NULL, metadata = NULL)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (named list) A list of data.frame or MultiAssayExperiment objects, which optionally can be reactive. Inside this object all of these items will be made reactive.

    @@ -160,20 +188,24 @@

    Arguments -

    Value

    +

    Value +

    A tdata object.

    -

    See also

    +

    See also +

    as_tdata

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars), dd = data.frame(x = 1:10)),
    @@ -354,17 +386,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/tdata2env.html b/release-candidate/reference/tdata2env.html index c72dad4bba..06febce645 100644 --- a/release-candidate/reference/tdata2env.html +++ b/release-candidate/reference/tdata2env.html @@ -1,8 +1,24 @@ - -Function to convert a tdata object to an environment — tdata2env • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,25 +137,31 @@
    -

    Usage

    +

    Usage +

    tdata2env(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    An environment.

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars)),
    @@ -145,17 +174,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/tdata_deprecation.html b/release-candidate/reference/tdata_deprecation.html index ed1fb5f00c..a2c0fbae2e 100644 --- a/release-candidate/reference/tdata_deprecation.html +++ b/release-candidate/reference/tdata_deprecation.html @@ -1,8 +1,24 @@ - -Downgrade teal_data objects in modules for compatibility — as_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,24 +136,30 @@
    -

    Usage

    +

    Usage +

    as_tdata(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    data object, either tdata or teal_data, the latter possibly in a reactive expression

    -
    + +
    -

    Value

    +

    Value +

    Object of class tdata.

    -

    Details

    +

    Details +

    Recent changes in teal cause modules to fail because modules expect a tdata object to be passed to the data argument but instead they receive a teal_data object, which is additionally wrapped in a reactive expression in the server functions. @@ -140,7 +168,8 @@

    Details
    -

    Examples

    +

    Examples +

    td <- teal_data()
     td <- within(td, iris <- iris) %>% within(mtcars <- mtcars)
     td
    @@ -192,17 +221,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/release-candidate/reference/teal-package.html b/release-candidate/reference/teal-package.html index c155214b25..e4d7102cae 100644 --- a/release-candidate/reference/teal-package.html +++ b/release-candidate/reference/teal-package.html @@ -1,10 +1,26 @@ - -teal: Interactive exploration of clinical trials data — teal-package • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,21 +141,30 @@
    -

    Details

    +

    Details +

    To learn mode about the package, visit the project website or read the init() manual page.

    -

    Author

    +

    Author +

    Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID)

    -

    Authors:

    + +
    + + + + - - + + diff --git a/release-candidate/reference/teal_data_datanames.html b/release-candidate/reference/teal_data_datanames.html index a0c08f7852..158b9149c0 100644 --- a/release-candidate/reference/teal_data_datanames.html +++ b/release-candidate/reference/teal_data_datanames.html @@ -1,10 +1,26 @@ - -Wrapper on teal.data::datanames — teal_data_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -117,18 +140,23 @@
    -

    Usage

    +

    Usage +

    teal_data_datanames(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data)

    -
    + +
    -

    Value

    +

    Value +

    character

    @@ -137,17 +165,19 @@

    Value

    + + + + - - + + diff --git a/release-candidate/reference/teal_data_module.html b/release-candidate/reference/teal_data_module.html index 673c516aad..ceaaeb4b5e 100644 --- a/release-candidate/reference/teal_data_module.html +++ b/release-candidate/reference/teal_data_module.html @@ -1,10 +1,26 @@ - -Data module for teal applications — teal_data_module • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    teal_data_module(ui, server)
     
     # S4 method for teal_data_module,character
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    ui
    +

    Arguments +

    +
    +
    ui

    (function(id)) shiny module UI function; must only take id argument

    @@ -159,9 +184,11 @@

    Arguments -

    Value

    +

    Value +

    teal_data_module returns an object of class teal_data_module.

    @@ -173,7 +200,8 @@

    Value

    within returns a teal_data_module object with a delayed evaluation of expr when the module is run.

    -

    Details

    +

    Details +

    teal_data_module creates a shiny module to supply or modify data in a teal application. The module allows for running data pre-processing code (creation and some modification) after the app starts. The body of the server function will be run in the app rather than in the global environment. @@ -188,12 +216,14 @@

    Details... argument: as name:value pairs are passed to ..., name in expr will be replaced with value.

    -

    Examples

    +

    Examples +

    tdm <- teal_data_module(
       ui = function(id) {
         ns <- NS(id)
    @@ -326,17 +356,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/teal_data_to_filtered_data.html b/release-candidate/reference/teal_data_to_filtered_data.html index 495458d944..36154860d7 100644 --- a/release-candidate/reference/teal_data_to_filtered_data.html +++ b/release-candidate/reference/teal_data_to_filtered_data.html @@ -1,8 +1,24 @@ - -Create a FilteredData — teal_data_to_filtered_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    teal_data_to_filtered_data(x, datanames = teal_data_datanames(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (teal_data) object

    datanames

    (character) vector of data set names to include; must be subset of datanames(x)

    -
    + +
    -

    Value

    +

    Value +

    A FilteredData object.

    + + + + - - + + diff --git a/release-candidate/reference/teal_modules.html b/release-candidate/reference/teal_modules.html index cb0f323d76..891b8d42d5 100644 --- a/release-candidate/reference/teal_modules.html +++ b/release-candidate/reference/teal_modules.html @@ -1,10 +1,26 @@ - -Create teal_module and teal_modules objects — teal_modules • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    module(
       label = "module",
       server = function(id, ...) {
    @@ -151,14 +174,19 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    server
    -

    (function) shiny module with following arguments:

    • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

    • +
      +

      (function) shiny module with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

      • input, output, session - (optional; not recommended) When provided, then shiny::callModule() will be used to call a module. From shiny 1.5.0, the recommended way is to use shiny::moduleServer() instead which doesn't require these arguments.

      • @@ -172,14 +200,19 @@

        Argumentsteal.slice::FilterPanelAPI).

      • ... (optional) When provided, server_args elements will be passed to the module named argument or to the ....

      • -

      +
    +
    ui
    -

    (function) shiny UI module function with following arguments:

    • id - teal will set proper shiny namespace for this module.

    • +
      +

      (function) shiny UI module function with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module.

      • ... (optional) When provided, ui_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    filters
    @@ -203,7 +236,8 @@

    Argumentsformat() and print(): Arguments passed to other methods.

    @@ -215,20 +249,26 @@

    Arguments -

    Value

    +

    Value +

    module() returns an object of class teal_module.

    -

    modules() returns a teal_modules object which contains following fields:

    • label: taken from the label argument.

    • +

      modules() returns a teal_modules object which contains following fields:

      +
        +
      • label: taken from the label argument.

      • children: a list containing objects passed in .... List elements are named after their label attribute converted to a valid shiny id.

      • -
    + +
    -

    Details

    +

    Details +

    module() creates an instance of a teal_module that can be placed in a teal application. modules() shapes the structure of a the application by organizing teal_module within the navigation panel. It wraps teal_module and teal_modules objects in a teal_modules object, @@ -241,7 +281,8 @@

    Details
    -

    Examples

    +

    Examples +

    library(shiny)
     
     module_1 <- module(
    @@ -298,17 +339,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/release-candidate/reference/teal_slices.html b/release-candidate/reference/teal_slices.html index 3d9cf92f1a..7c3c3231cf 100644 --- a/release-candidate/reference/teal_slices.html +++ b/release-candidate/reference/teal_slices.html @@ -1,8 +1,24 @@ - -Filter settings for teal applications — teal_slices • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    teal_slices(
       ...,
       exclude_varnames = NULL,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    any number of teal_slice objects. For print and format, additional arguments passed to other functions.

    @@ -146,15 +171,19 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal.slice's GitHub repository.

    (character(1)) string specifying how observations are tallied by these filter states. -Possible options:

    • "none" (default) to have counts of single FilterState to show unfiltered number only.

    • +Possible options:

      +
        +
      • "none" (default) to have counts of single FilterState to show unfiltered number only.

      • "all" to have counts of single FilterState to show number of observation in filtered and unfiltered dataset. Note, that issues were reported when using this option with MultiAssayExperiment. Please make sure that adding new filters doesn't fail on target platform before deploying for production.

      • -
    + +
    allow_add
    @@ -162,24 +191,32 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal's GitHub repository.

    (named list) specifies which filters will be active in which modules on app start. Elements should contain character vector of teal_slice ids (see teal.slice::teal_slice). -Names of the list should correspond to teal_module label set in module() function.

    • ids listed under "global_filters will be active in all modules.

    • +Names of the list should correspond to teal_module label set in module() function.

      +
        +
      • ids listed under "global_filters will be active in all modules.

      • If missing, all filters will be applied to all modules.

      • If empty list, all filters will be available to all modules but will start inactive.

      • If module_specific is FALSE, only global_filters will be active on start.

      • -
    + +
    app_id
    @@ -192,27 +229,32 @@

    Arguments -

    Value

    +

    Value +

    A teal_slices object.

    -

    Details

    +

    Details +

    Produces a teal_slices object. The teal_slice components will specify filter states that will be active when the app starts. Attributes (created with the named arguments) will configure the way the app applies filters. See argument descriptions for details.

    -

    Examples

    +

    Examples +

    filter <- teal_slices(
       teal_slice(dataname = "iris", varname = "Species", id = "species"),
       teal_slice(dataname = "iris", varname = "Sepal.Length", id = "sepal_length"),
    @@ -245,17 +287,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/unfold_mapping.html b/release-candidate/reference/unfold_mapping.html index fefc8785ad..1d3354c4b8 100644 --- a/release-candidate/reference/unfold_mapping.html +++ b/release-candidate/reference/unfold_mapping.html @@ -1,8 +1,24 @@ - -Explicitly enumerate global filters. — unfold_mapping • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    unfold_mapping(mapping, module_names)
    -

    Arguments

    -
    mapping
    +

    Arguments +

    +
    +
    mapping

    (named list) as stored in mapping parameter of teal_slices

    module_names

    (character) vector containing names of all modules in the app

    -
    + +
    -

    Value

    +

    Value +

    A named_list with one element per module, each element containing all filters applied to that module.

    + + + + - - + + diff --git a/release-candidate/reference/validate_app_title_tag.html b/release-candidate/reference/validate_app_title_tag.html index c1a7d8c5dd..ecba517221 100644 --- a/release-candidate/reference/validate_app_title_tag.html +++ b/release-candidate/reference/validate_app_title_tag.html @@ -1,8 +1,24 @@ - -Function for validating the title parameter of teal::init — validate_app_title_tag • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,29 +137,35 @@
    -

    Usage

    +

    Usage +

    validate_app_title_tag(shiny_tag)
    -

    Arguments

    -
    shiny_tag
    +

    Arguments +

    +
    +
    shiny_tag

    (shiny.tag) Object to validate for a valid title.

    -
    + +
    + + + + - - + + diff --git a/release-candidate/reference/validate_has_data.html b/release-candidate/reference/validate_has_data.html index f63d174b66..41be8e36df 100644 --- a/release-candidate/reference/validate_has_data.html +++ b/release-candidate/reference/validate_has_data.html @@ -1,8 +1,24 @@ - -Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    validate_has_data(
       x,
       min_nrow = NULL,
    @@ -125,8 +148,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    @@ -145,14 +170,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(teal)
     ui <- fluidPage(
       sliderInput("len", "Max Length of Sepal",
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/validate_has_elements.html b/release-candidate/reference/validate_has_elements.html index bbbbbb76c2..1fa0b9936f 100644 --- a/release-candidate/reference/validate_has_elements.html +++ b/release-candidate/reference/validate_has_elements.html @@ -1,8 +1,24 @@ - -Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_has_elements(x, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    msg

    message to display

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B"), each = 15)
    @@ -169,17 +197,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/validate_has_variable.html b/release-candidate/reference/validate_has_variable.html index cfd25d1a0b..6739c20696 100644 --- a/release-candidate/reference/validate_has_variable.html +++ b/release-candidate/reference/validate_has_variable.html @@ -1,8 +1,24 @@ - -Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_has_variable(data, varname, msg)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20)
    @@ -165,17 +193,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/validate_in.html b/release-candidate/reference/validate_in.html index d6d95db3ee..ab653781da 100644 --- a/release-candidate/reference/validate_in.html +++ b/release-candidate/reference/validate_in.html @@ -1,8 +1,24 @@ - -Validates that vector includes all expected values — validate_in • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_in(x, choices, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Vector of values to test.

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    ui <- fluidPage(
       selectInput(
         "species",
    @@ -163,17 +191,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/validate_inputs.html b/release-candidate/reference/validate_inputs.html index 86059f2f9c..2e9ac2f514 100644 --- a/release-candidate/reference/validate_inputs.html +++ b/release-candidate/reference/validate_inputs.html @@ -1,10 +1,26 @@ - -Send input validation messages to output — validate_inputs • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    validate_inputs(..., header = "Some inputs require attention")
    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    either any number of InputValidator objects or an optionally named, possibly nested list of InputValidator objects, see Details

    @@ -132,15 +157,18 @@

    Arguments -

    Value

    +

    Value +

    Returns NULL if the final validation call passes and a shiny.silent.error if it fails.

    -

    Details

    +

    Details +

    shiny::validate is used to withhold rendering of an output element until certain conditions are met and to print a validation message in place of the output element. @@ -159,12 +187,14 @@

    Detailsheader.

    -

    Examples

    +

    Examples +

    library(shiny)
     library(shinyvalidate)
     
    @@ -238,17 +268,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/validate_n_levels.html b/release-candidate/reference/validate_n_levels.html index 10b89d4741..851e80147f 100644 --- a/release-candidate/reference/validate_n_levels.html +++ b/release-candidate/reference/validate_n_levels.html @@ -1,8 +1,24 @@ - -Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    variable name. If x is not a factor, the unique values are treated as levels.

    @@ -137,16 +162,19 @@

    Arguments -

    Details

    +

    Details +

    If the number of levels of x is less than min_levels or greater than max_levels the validation will fail. This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20),
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/validate_no_intersection.html b/release-candidate/reference/validate_no_intersection.html index 8350682688..31fccbc460 100644 --- a/release-candidate/reference/validate_no_intersection.html +++ b/release-candidate/reference/validate_no_intersection.html @@ -1,8 +1,24 @@ - -Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_no_intersection(x, y, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B", "C"), each = 10)
    @@ -178,17 +206,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/release-candidate/reference/validate_one_row_per_id.html b/release-candidate/reference/validate_one_row_per_id.html index 3fbad3eec2..095ac6b44d 100644 --- a/release-candidate/reference/validate_one_row_per_id.html +++ b/release-candidate/reference/validate_one_row_per_id.html @@ -1,8 +1,24 @@ - -Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_one_row_per_id(x, key = c("USUBJID", "STUDYID"))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    key

    (character) Vector of ID variables from x that identify unique records.

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    iris$id <- rep(1:50, times = 3)
     ui <- fluidPage(
       selectInput(
    @@ -161,17 +189,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/404.html b/v0.12.0/404.html index 532e6a2214..af1f4487fe 100644 --- a/v0.12.0/404.html +++ b/v0.12.0/404.html @@ -1,5 +1,4 @@ - - + @@ -56,24 +55,25 @@ - - - +v0.12.0 + + + diff --git a/v0.12.0/CODE_OF_CONDUCT.html b/v0.12.0/CODE_OF_CONDUCT.html index 5af813be82..dbb4fcea55 100644 --- a/v0.12.0/CODE_OF_CONDUCT.html +++ b/v0.12.0/CODE_OF_CONDUCT.html @@ -1,8 +1,22 @@ - -Contributor Covenant Code of Conduct • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -80,65 +100,80 @@
    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    • Demonstrating empathy and kindness toward other people
    • +
        +
      • Demonstrating empathy and kindness toward other people
      • Being respectful of differing opinions, viewpoints, and experiences
      • Giving and gracefully accepting constructive feedback
      • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
      • Focusing on what is best not just for us as individuals, but for the overall community
      • -

      Examples of unacceptable behavior include:

      -
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • +
      +

      Examples of unacceptable behavior include:

      +
        +
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • Trolling, insulting or derogatory comments, and personal or political attacks
      • Public or private harassment
      • Publishing others’ private information, such as a physical or email address, without their explicit permission
      • Other conduct which could reasonably be considered inappropriate in a professional setting
      • -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -146,17 +181,19 @@

    Attribution

    + + + + - - + + diff --git a/v0.12.0/CONTRIBUTING.html b/v0.12.0/CONTRIBUTING.html index 4e047bd297..2a8ca2e0d6 100644 --- a/v0.12.0/CONTRIBUTING.html +++ b/v0.12.0/CONTRIBUTING.html @@ -1,8 +1,22 @@ - -Contribution Guidelines • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -82,7 +102,8 @@

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -93,38 +114,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    Github flow

    +

    Github flow +

    This repository uses the Github flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch.

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes.

        Make sure your code:

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR).

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -138,64 +168,78 @@

        Github flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    -
    • Minimum 5% of lines of code authored* (determined by git blame query) OR
    • +
        +
      • Minimum 5% of lines of code authored* (determined by git blame query) OR
      • Being at the top 5 contributors in terms of number of commits OR lines added OR lines removed*
      • -

      *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

      +
    +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + + + - - + + diff --git a/v0.12.0/LICENSE-text.html b/v0.12.0/LICENSE-text.html index bc420b119a..98f83700c5 100644 --- a/v0.12.0/LICENSE-text.html +++ b/v0.12.0/LICENSE-text.html @@ -1,8 +1,22 @@ - -License • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -92,17 +112,19 @@ limitations under the License. - + + + + - - + + diff --git a/v0.12.0/SECURITY.html b/v0.12.0/SECURITY.html index 12c2e56326..f77ad071de 100644 --- a/v0.12.0/SECURITY.html +++ b/v0.12.0/SECURITY.html @@ -1,8 +1,22 @@ - -Security Policy • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -80,38 +100,44 @@
    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    -
    • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
    • +
        +
      • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
      • Full paths of source file(s) related to the manifestation of the issue
      • The location of the affected source code (tag/branch/commit or direct URL)
      • Any special configuration required to reproduce the issue
      • Step-by-step instructions to reproduce the issue
      • Proof-of-concept or exploit code (if possible)
      • Impact of the issue, including how an attacker might exploit the issue
      • -

      This information will help us triage your report more quickly.

      +
    +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + + + - - + + diff --git a/v0.12.0/articles/adding-support-for-reporting.html b/v0.12.0/articles/adding-support-for-reporting.html index 14f27a37eb..a3d391cfdc 100644 --- a/v0.12.0/articles/adding-support-for-reporting.html +++ b/v0.12.0/articles/adding-support-for-reporting.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.12.0/articles/creating-custom-modules.html b/v0.12.0/articles/creating-custom-modules.html index 4bef2f097a..51be993dfb 100644 --- a/v0.12.0/articles/creating-custom-modules.html +++ b/v0.12.0/articles/creating-custom-modules.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.12.0/articles/including-adam-data-in-teal.html b/v0.12.0/articles/including-adam-data-in-teal.html index d45cd6f299..047d3bc005 100644 --- a/v0.12.0/articles/including-adam-data-in-teal.html +++ b/v0.12.0/articles/including-adam-data-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.12.0/articles/including-general-data-in-teal.html b/v0.12.0/articles/including-general-data-in-teal.html index 511ebf569c..0fcf803548 100644 --- a/v0.12.0/articles/including-general-data-in-teal.html +++ b/v0.12.0/articles/including-general-data-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.12.0/articles/including-mae-data-in-teal.html b/v0.12.0/articles/including-mae-data-in-teal.html index cd68e31df5..ba8586abb2 100644 --- a/v0.12.0/articles/including-mae-data-in-teal.html +++ b/v0.12.0/articles/including-mae-data-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.12.0/articles/index.html b/v0.12.0/articles/index.html index 7fd9504b58..f7bc90bbd8 100644 --- a/v0.12.0/articles/index.html +++ b/v0.12.0/articles/index.html @@ -1,8 +1,22 @@ - -Articles • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -80,36 +100,49 @@

    Articles

    -
    Getting Started with Teal
    +
    +
    Getting Started with Teal
    -
    Input general data in a teal application
    + +
    Input general data in a teal application
    -
    Input ADaM data in a teal application
    + +
    Input ADaM data in a teal application
    -
    Input MultiAssayExperiment data in a teal application
    + +
    Input MultiAssayExperiment data in a teal application
    -
    Pre-processing data
    + +
    Pre-processing data
    -
    Creating Custom Modules
    + +
    Creating Custom Modules
    -
    Adding support for Reporting to custom modules
    + +
    Adding support for Reporting to custom modules
    -
    Modifying a Teal application with R options
    + +
    Modifying a Teal application with R options
    -
    Teal and Bootstrap Themes
    + +
    Teal and Bootstrap Themes
    -
    - + +
    + + + + + - - + + diff --git a/v0.12.0/articles/preprocessing-data.html b/v0.12.0/articles/preprocessing-data.html index 8c25e3617a..ac77a52998 100644 --- a/v0.12.0/articles/preprocessing-data.html +++ b/v0.12.0/articles/preprocessing-data.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.12.0/articles/teal-bs-themes.html b/v0.12.0/articles/teal-bs-themes.html index 98620cbbff..90c2de800b 100644 --- a/v0.12.0/articles/teal-bs-themes.html +++ b/v0.12.0/articles/teal-bs-themes.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.12.0/articles/teal-options.html b/v0.12.0/articles/teal-options.html index a748646f05..2542806ae3 100644 --- a/v0.12.0/articles/teal-options.html +++ b/v0.12.0/articles/teal-options.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.12.0/articles/teal.html b/v0.12.0/articles/teal.html index d220b3f7f4..1ff18169d3 100644 --- a/v0.12.0/articles/teal.html +++ b/v0.12.0/articles/teal.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.12.0/authors.html b/v0.12.0/authors.html index 2afd61c9a1..643e70e4d0 100644 --- a/v0.12.0/authors.html +++ b/v0.12.0/authors.html @@ -1,8 +1,22 @@ - -Authors and Citation • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -79,7 +99,8 @@

    Authors

    -
    • +
        +
      • Dawid Kaledkowski. Author, maintainer.

      • @@ -119,7 +140,8 @@

        Authors

        Maximilian Mordig. Contributor.

        -
    + +

    Citation

    @@ -137,17 +159,19 @@

    Citation

    }
    + + + + - - + + diff --git a/v0.12.0/index.html b/v0.12.0/index.html index c9f585a1aa..6329de8e5e 100644 --- a/v0.12.0/index.html +++ b/v0.12.0/index.html @@ -1,5 +1,4 @@ - - + @@ -64,24 +63,25 @@ - - - +v0.12.0 + + + diff --git a/v0.12.0/news/index.html b/v0.12.0/news/index.html index 9bc83daedf..77a119a691 100644 --- a/v0.12.0/news/index.html +++ b/v0.12.0/news/index.html @@ -1,8 +1,22 @@ - -Changelog • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -78,49 +98,71 @@
    -

    teal 0.12.0

    +

    teal 0.12.0 +

    -

    New features

    -
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • -
    +

    New features +

    +
      +
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • +
    +
    -

    Enhancements

    -
    • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
    • +

      Enhancements +

      +
        +
      • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
      • Updated teal_module to have data argument which receives a list of reactive filter data with "code" and "join_keys" attributes.
      • Updated teal_module to have filter_panel_api argument which receives a FilterPanelAPI object.
      • Updated the internals of module_teal to reflect changes in teal.slice.
      • Updated vignettes and README content.
      • -
    + +
    -

    Breaking changes

    -
    • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
    • +

      Breaking changes +

      +
        +
      • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
      • Deprecated merge_expression argument in get_rcode_srv function and removed it in get_rcode function.
      • Deprecated session argument in get_rcode function.
      • -
    + +
    -

    teal 0.11.1

    +

    teal 0.11.1 +

    -

    Enhancements

    -
    • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
    • +

      Enhancements +

      +
        +
      • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
      • Updated teal to support modules which include reporting. If any module which supports reporting is included then a reporter_previewer_module is included.
      • Added default arguments to module() and the server argument is now a function where the second argument can be ... or datasets.
      • -
    + +
    -

    Breaking changes

    -
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • -
    +

    Breaking changes +

    +
      +
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • +
    +
    -

    Miscellaneous

    -
    • Added a template to the pkgdown configuration.
    • +

      Miscellaneous +

      +
        +
      • Added a template to the pkgdown configuration.
      • Removed unneeded shinytest app tests.
      • Updated package authors.
      • Added package vignettes.
      • -
    + +
    -

    teal 0.11.0

    -
    +

    The teal package contains the code to create apps (teal::init), to create a module (teal::module) and to group modules in the app (teal::modules). teal depends on teal.transform and teal.data which contain the functions that teal app creators are likely to need. The other package teal only imports from and therefore teal module creators should either fully specify functions from these packages when required or import them into custom packages as library(teal) will not load them.

    -

    New features

    -
    • A simple new teal module named example_module has been included in the package.
    • -
    +

    New features +

    +
      +
    • A simple new teal module named example_module has been included in the package.
    • +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • teal package has been split into multiple smaller packages, see above.
      • Deprecated root_modules function, users should use modules directly inside init.
      • Due to deprecation of root_modules any label argument to modules must be explicitly named. For example modules("lab", mod1, mod2) should be replaced with modules(label = "lab", mod1, mod2).
      • -
    + +
    -

    Miscellaneous

    -
    • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
    • +

      Miscellaneous +

      +
        +
      • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
      • MultiAssayExperiment is now suggested packages, not required. Objects dependent on MultiAssayExperiment are changed to lazy-load this now suggested package.
      • -
    + +
    -

    Bug fixes

    -
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • -
    +

    Bug fixes +

    +
      +
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • +
    +
    -

    teal 0.10.1

    +

    teal 0.10.1 +

    -

    Breaking changes

    -
    • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
    • +

      Breaking changes +

      +
        +
      • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
      • Deprecated all functions related to connectors that have been moved to their own separate packages.
      • Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational.
      • Removed rcd_connection and rcd_data; scda_dataset_connectors can be passed into cdisc_data and teal_data directly.
      • Replaced rcd_dataset_connector and rcd_cdisc_dataset_connector with scda_dataset_connector and scda_cdisc_dataset_connector respectively.
      • Renamed teal_show_js_log option into teal.show_js_log to match options naming convention.
      • Removed %is_in% and stop_shiny internal utility functions.
      • -
    + +
    -

    New features

    +

    New features +

    -
    Logging
    -
    • Added support for logging using the logger package.
    • +
      Logging +
      +
        +
      • Added support for logging using the logger package.
      • Added a new function register_logger, which registers a logger in a given namespace.
      • Added trace and info levels log messages to the teal framework.
      • Added pid and shiny session token into footnote so app developers can identify logs for apps.
      • -
    + +
    -
    Other
    -
    • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

    • +
      Other +
      +
        +
      • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

      • Added public facing constructor functions for CDISCDataConnector, RelationalDataConnector, and DataConnection classes.

      • Modified data_extract_spec to allow both the filter and select parameters to be NULL, which results in the data_extract_ui acting as if a filter_spec with all variables as possible choices had been supplied as the filter argument and a select_spec with the multiple parameter set to TRUE had been supplied as the select argument.

      • Added support of the full screen for a module when the filters argument is equal NULL.

      • @@ -187,11 +252,14 @@
        Other -

        Bug fixes

        -
    + +
    -

    teal 0.10.0

    +

    teal 0.10.0 +

    -

    New features

    -
    • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
    • +

      New features +

      +
        +
      • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
      • Refactored filter panel to use MultiAssayExperiment objects. Filters can be set on a subject level (colData of MAE object) and on a experiment level (colData and rowData of an assay).
      • Added cdse_dataset_connector to create delayed data objects from CDSE.
      • Added datasetdb_dataset_connector to create delayed data objects from DataSetDB.
      • Added ricepass_connection to create delayed data objects from entimICE via ricepass.
      • Refactor of the filter panel: -
        • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
        • +
            +
          • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
          • Dataset type determines an appearance and a functionality of related filters and filters summary.
          • Datasets are passed (by reference) from DDL to FilteredData skipping extracting data and their attributes.
          • Redesigned variable filter labels in “Active Filter Variables” panel.
          • Fully testable server functions.
          • -
          -
    + + + +
    -

    Bug fixes

    -
    • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
    • +

      Bug fixes +

      +
        +
      • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
      • Fixed a bug that caused the output of get_code function to not reproduce its raw data set.
      • Changed filter_spec to allow no variable selection upon app initialization, where the first possible value was previously selected.
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal 0.9.5

    +

    teal 0.9.5 +

    -

    Enhancements

    -
    • Added informational stop message when using mutate_data with RelationalDataConnector.
    • +

      Enhancements +

      +
        +
      • Added informational stop message when using mutate_data with RelationalDataConnector.
      • Modified as_cdisc to behave similarly to cdisc_dataset when called on a Dataset object.
      • Changed the displayed format of the data name and the column name in data_extract_spec UI elements. Both are now compressed to <data name>.<column name> if they don’t change during runtime of the app.
      • Added ADSAFTTE to the list of recognized ADaM dataset names.
      • Added another example to data_extract_spec’s doc string showcasing app users can choose a variable used for filtering in the encoding panel.
      • Added CSS styling to tool tips in teal modules.
      • -
    + +
    -

    Bug fixes

    -
    • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
    • +

      Bug fixes +

      +
        +
      • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
      • Fixed a bug that crashes app whenever a Date or datetime column is selected from a filter_spec.
      • -
    + +
    -

    teal 0.9.4

    +

    teal 0.9.4 +

    -

    Enhancements

    -
    • Released snowflake connection and connectors.
    • +

      Enhancements +

      +
        +
      • Released snowflake connection and connectors.
      • Changed ordering of datasets to be more intuitive (topologically first for CDISC datasets only and then according to input datasets order).
      • When closing a teal app (ending a user shiny session), all DataConnections will now try to close their connections.
      • Added ADHY keys to configuration file.
      • Extended the filter_spec function: the parameter choices is no longer mandatory (the function will take all possible choices by default) and the vars parameter additionally accepts the choices_selected and allows to change the variables for filtering using the UI elements in the encoding panel.
      • -
    + +
    -

    Bug fixes

    -
    • Cleaned up imports in the package.
    • -
    • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
    • +

      Bug fixes +

      +
        +
      • Cleaned up imports in the package.
      • +
      • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
        +
      • Fixed issue with cloning Callable class.
      • -
    + +
    -

    teal 0.9.3

    +

    teal 0.9.3 +

    -

    New Features

    -
    • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
    • +

      New Features +

      +
        +
      • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
      • New JoinKeys class (with join_keys() constructors and join_key() constructor for its elements) to store joining key columns between datasets.
      • Refactored the most basic dataset() constructor, added cdisc_dataset() constructor and as_cdisc() conversion function.
      • Soft-deprecate removed class constructors and obsolete functions (e.g. keys()).
      • Added get_keys() and set_keys() functions to extract and manipulate datasets primary keys respectively.
      • Unexported filtered_data_new, filtered_data_set and filtered_data_set_filters.
      • -
    + +
    -

    Bug fixes

    -
    • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
    • +

      Bug fixes +

      +
        +
      • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
      • Added ability to press “Enter” key without having to set focus to the Submit button for delayed data loading.
      • Allow variable_choices to use datasets with missing labels.
      • Fixed bug that ignores input of NULL to selected argument of select_spec function.
      • -
    + +
    -

    Enhancements

    -
    • Added button to remove all active filters from the Filter Panel.
    • -
    +

    Enhancements +

    +
      +
    • Added button to remove all active filters from the Filter Panel.
    • +
    +
    -

    teal 0.9.2

    +

    teal 0.9.2 +

    -

    New Features

    -
    • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
    • +

      New Features +

      +
        +
      • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
      • NOTE: python_dataset_connector is not yet ready to be deployed on RSConnect because it does not contain numpy and pandas, which are Python libraries used in python_dataset_connector.
      • Added support for filtering on Date and Datetime variables in the Filter Panel.
      • Added buttons for date and datetime filter widgets to reset the value to the original.
      • Added new function check_key_duplicates, which creates a short summary about rows with duplicated primary key (row numbers and the number of duplicates)
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    • Removed include_factors option in get_class_colnames in RawDataset.
    • -
    +

    Miscellaneous +

    +
      +
    • Removed include_factors option in get_class_colnames in RawDataset.
    • +
    +
    -

    teal 0.9.1

    -
    • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
    • +

      teal 0.9.1 +

      +
        +
      • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
      • Nested tabs module now has better alignment with the filter panel on the page.
      • Allow width argument in optionalSelectInput.
      • Added lifecycle badges to all exported functions.
      • @@ -368,10 +492,13 @@

        teal 0.9.1 -

        teal 0.9.0

        -
        • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

        • +

          teal 0.9.0 +

          +
            +
          • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

          • A new teal_data function to include datasets and connectors into teal application.

          • cdisc_data function to include datasets and connectors into teal application where a check argument still could be used and other consistency tests are performed.

          • get_raw_data can be used to derive raw data from R6 objects e.g. (RelationalDataset).

          • @@ -392,91 +519,133 @@

            teal 0.9.0 -

            Refactor of FilteredData (for developers)

            -
            • +
            +
            +

            Refactor of FilteredData (for developers) +

            +
              +
            • FilteredData is now fully reactive. Now filtered data is lazy evaluated as per need. This further opens the door to bookmarking teal apps (bookmarking currently works for the right filtering panel, but we will make this feature more sophisticated in a future release, each module must be reviewed and adapted if it contains reactiveValues).
            • Datasets and materialized connectors are provided to FilteredData by set_datasets_data function located in init_datasets.R file.
            • Renamed get_dataset() method to get_data().
            • Renamed get_filter_call() method to get_filter_expr(); returns an expression rather than a list.
            • Removed argument isolate from get_data() method and similar methods. You must isolate it yourself as needed. If you want to temporarily deactivate Shiny errors due to missing errors, you can set options(shiny.suppressMissingContextError = TRUE). In general, avoid isolate as this breaks reactivity.
            • We added a development module to add several filters at once, e.g. safety filters. This is to be evaluated before it is converted into a proper module and made available to end-users.
            • -
            +

          +

    -

    teal 0.8.5

    -
    • UI bug fix to hide filter elements for not used datasets.
    • -
    +

    teal 0.8.5 +

    +
      +
    • UI bug fix to hide filter elements for not used datasets.
    • +
    +
    -

    teal 0.8.4

    -
    • Progress bar for ui creation in delayed loading module.
    • +

      teal 0.8.4 +

      +
        +
      • Progress bar for ui creation in delayed loading module.
      • Change output of keys function to keys object.
      • Delayed version of choices_selected.
      • Fix an error in choices_selected when selected is not in choices.
      • Fix pickerInput not to display column name as label if it’s missing.
      • -
    + +
    -

    teal 0.8.3

    -
    • Enable teal app to initialize without data. The data are then loaded from within the teal app.
    • +

      teal 0.8.3 +

      +
        +
      • Enable teal app to initialize without data. The data are then loaded from within the teal app.
      • New classes (DatasetConnector, DataConnector) to connect to various data sources, including: * connector to rice API - rice_data and rice_dataset_connector * connector to RDS files - rds_data and rds_dataset_connector
      • Message appears at bottom right of Shiny app when Shiny is busy to update the views.
      • Remove labels argument of cdisc_data function. Labels should now already be present in the data passed to the cdisc_data function. This can be achieved using the var_relabel function.
      • -
    + +
    -

    teal 0.8.2

    -
    • Fixed several BUGS in optionalSelectInput and improved inputs look.
    • +

      teal 0.8.2 +

      +
        +
      • Fixed several BUGS in optionalSelectInput and improved inputs look.
      • Added get_data_labels function to FilteredData class.
      • Improved sep passing within data_extract_spec.
      • -
    + +
    -

    teal 0.8.1

    -
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • -
    +

    teal 0.8.1 +

    +
      +
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • +
    +
    -

    teal 0.8.0

    -
    • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
    • +

      teal 0.8.0 +

      +
        +
      • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
      • Possibility to load custom .css and .js files.
      • Renamed columns_spec to select_spec.
      • Show number of observations on filter panel.
      • Add labeling functions variable_choices and value_choices.
      • -
    + +
    -

    teal 0.7.0

    -
    • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
    • +

      teal 0.7.0 +

      +
        +
      • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
      • Moved teal.utils functions to teal: log_app_usage, stop_shiny.
      • Added *_spec functions.
      • Improvements on usage of PickerInput and SelectInput.
      • -
    + +
    -

    teal 0.6.0

    -
    • Removed deprecated functions tab*.
    • +

      teal 0.6.0 +

      +
        +
      • Removed deprecated functions tab*.
      • Removed data generation functions including generate_sample_data.
      • Incorporate shinyjs package.
      • Added “Copy R code to clipboard” button.
      • -
    + +
    -

    teal 0.0.5

    -
    • Added limit to data_table with scrolling, preventing overlap of ui elements.
    • +

      teal 0.0.5 +

      +
        +
      • Added limit to data_table with scrolling, preventing overlap of ui elements.
      • Boolean filtering.
      • -
    + +
    -

    teal 0.0.4

    -
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • -
    +

    teal 0.0.4 +

    +
      +
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • +
    +
    -

    teal 0.0.3

    -
    • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
    • -
    -
    New features
    -
    • +

      teal 0.0.3 +

      +
        +
      • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
      • +
      +
      +
      New features +
      +
        +
      • tm_scatterplot module.
      • tm_table module.
      • -
      +
    +
    -
    Changes
    -
    • All tabs arguments were renamed to modules.
    • +
      Changes +
      +
        +
      • All tabs arguments were renamed to modules.
      • tab_item function is now called module.
      • @@ -489,29 +658,38 @@
        Changes -

        teal 0.0.2

        -
        • New ‘01_getting_started’ vignette.
        • +

          teal 0.0.2 +

          +
            +
          • New ‘01_getting_started’ vignette.
          • Datanames in FilteredData are now case sensitive.
          • -
    + +
    -

    teal 0.0.1

    -
    • March 28, 2016 - Initial Release.
    • -
    +

    teal 0.0.1 +

    +
      +
    • March 28, 2016 - Initial Release.
    • +
    + + + + + - - + + diff --git a/v0.12.0/pull_request_template.html b/v0.12.0/pull_request_template.html index 03dba800f6..9c861555bc 100644 --- a/v0.12.0/pull_request_template.html +++ b/v0.12.0/pull_request_template.html @@ -1,8 +1,22 @@ - -Pull Request • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -83,17 +103,19 @@

    Fixes #nnn

    - + + + + - - + + diff --git a/v0.12.0/reference/append_module.html b/v0.12.0/reference/append_module.html index 5cfaba4a56..df37b8f546 100644 --- a/v0.12.0/reference/append_module.html +++ b/v0.12.0/reference/append_module.html @@ -1,8 +1,24 @@ - -Function which appends a teal_module onto the children of a teal_modules object — append_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,39 +105,46 @@
    -

    Usage

    +

    Usage +

    append_module(modules, module)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    teal_modules

    module

    teal_module object to be appended onto the children of modules

    -
    + +
    -

    Value

    +

    Value +

    teal_modules object with module appended

    + + + + - - + + diff --git a/v0.12.0/reference/bookmarkableShinyApp.html b/v0.12.0/reference/bookmarkableShinyApp.html index ab602d6623..eb5256f6b0 100644 --- a/v0.12.0/reference/bookmarkableShinyApp.html +++ b/v0.12.0/reference/bookmarkableShinyApp.html @@ -1,5 +1,10 @@ - - + + + + + +Make a Shiny UI function bookmarkable — bookmarkableShinyApp • teal +Make a Shiny UI function bookmarkable — bookmarkableShinyApp • teal + + + + + + + + + + Skip to contents @@ -62,7 +78,8 @@ + + + - + @@ -129,11 +151,15 @@

    To be bookmarkable, the Shiny UI function must have an argument request. This function ensures this.

    When ui is a function, it passes the following to shinyApp

    -

    app <- teal::init(....)
    +

    +
    +
    app <- teal::init(....)
     ui <- app$ui
     ui_new <- function(request) {
       ui() # or just `ui` when ui is already evaluated, e.g. `shiny.tag`
    -}

    +}
    +

    +

    If no bookmarking is needed for teal apps, then you can also call shinyApp(ui = app$ui, server = app$server), where app is returned by init().

    @@ -148,13 +174,16 @@
    -

    Usage

    +

    Usage +

    bookmarkableShinyApp(ui, server, ...)
    -

    Arguments

    -
    ui
    +

    Arguments +

    +
    +
    ui

    function or shiny.tag Shiny UI; either a shiny.tag or a function with no argument or one argument (request)

    @@ -167,26 +196,30 @@

    Arguments -

    Value

    +

    Value +

    shinyApp value

    + + + + - - + + diff --git a/v0.12.0/reference/default_filter.html b/v0.12.0/reference/default_filter.html index b60a5b5e8e..cf48b65a81 100644 --- a/v0.12.0/reference/default_filter.html +++ b/v0.12.0/reference/default_filter.html @@ -1,12 +1,28 @@ - - + + + + + +Refers the default filter state — default_filter • teal +Refers the default filter state — default_filter • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,39 +111,45 @@
    -

    Usage

    +

    Usage +

    default_filter()
    -

    Value

    +

    Value +

    default_filter a default filter object

    -

    Details

    +

    Details +

    This is a simple wrapper around an S3 class.

    -

    Examples

    +

    Examples +

    list() # test printing
     #> list()
     
    + + + + - - + + diff --git a/v0.12.0/reference/dot-log.html b/v0.12.0/reference/dot-log.html index 39c45e3da7..b2dc6ac50c 100644 --- a/v0.12.0/reference/dot-log.html +++ b/v0.12.0/reference/dot-log.html @@ -1,8 +1,24 @@ - -A logging function — .log • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,27 +105,31 @@
    -

    Usage

    +

    Usage +

    .log(..., sep = " ", type = "debug")
    -

    Details

    +

    Details +

    Deprecated. Use teal.logger::register_logger.

    + + + + - - + + diff --git a/v0.12.0/reference/example_module.html b/v0.12.0/reference/example_module.html index 22236f8d15..0a5a3934b5 100644 --- a/v0.12.0/reference/example_module.html +++ b/v0.12.0/reference/example_module.html @@ -1,8 +1,24 @@ - -An example teal module — example_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,25 +105,31 @@
    -

    Usage

    +

    Usage +

    example_module(label = "example teal module")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    character, the label of the module

    -
    + +
    -

    Value

    +

    Value +

    A teal module which can be included in the modules argument to init().

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(
         dataset("IRIS", iris),
    @@ -115,17 +143,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/filter_calls_module.html b/v0.12.0/reference/filter_calls_module.html index b17b56a3fd..06859bea1d 100644 --- a/v0.12.0/reference/filter_calls_module.html +++ b/v0.12.0/reference/filter_calls_module.html @@ -1,12 +1,28 @@ - - + + + + + +Dummy module to show the filter calls generated by the right encoding panel — filter_calls_module • teal +Dummy module to show the filter calls generated by the right encoding panel — filter_calls_module • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,13 +111,16 @@
    -

    Usage

    +

    Usage +

    filter_calls_module(label = "Filter Calls Module", active_datanames = "all")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    character label of module

    @@ -103,10 +128,12 @@

    Arguments to mean all available datasets

    -

    + +
    -

    Examples

    +

    Examples +

    library(scda)
     #> 
     ADSL <- synthetic_cdisc_data("latest")$adsl
    @@ -133,17 +160,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/fold_lines.html b/v0.12.0/reference/fold_lines.html index c2af8fcd91..401e215a27 100644 --- a/v0.12.0/reference/fold_lines.html +++ b/v0.12.0/reference/fold_lines.html @@ -1,10 +1,26 @@ - -Fixed line width folding — fold_lines • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,13 +108,16 @@
    -

    Usage

    +

    Usage +

    fold_lines(txt, width = 80, indent_from = NULL)
    -

    Arguments

    -
    txt
    +

    Arguments +

    +
    +
    txt

    (character) text to be adjusted

    @@ -103,20 +128,23 @@

    Arguments

    + + + + - - + + diff --git a/v0.12.0/reference/get_client_timezone.html b/v0.12.0/reference/get_client_timezone.html index c5293cfab5..722d05c84c 100644 --- a/v0.12.0/reference/get_client_timezone.html +++ b/v0.12.0/reference/get_client_timezone.html @@ -1,12 +1,28 @@ - - + + + + + +Get Client Timezone — get_client_timezone • teal +Get Client Timezone — get_client_timezone • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,20 +111,25 @@
    -

    Usage

    +

    Usage +

    get_client_timezone(ns)
    -

    Arguments

    -
    ns
    +

    Arguments +

    +
    +
    ns

    (function) namespace function passed from the session object in the Shiny server. For Shiny modules this will allow for proper name spacing of the registered input.

    -
    + +
    -

    Value

    +

    Value +

    (Shiny) input variable accessible with input$tz which is a (character) @@ -110,17 +137,19 @@

    Value

    + + + + - - + + diff --git a/v0.12.0/reference/get_datasets_code.html b/v0.12.0/reference/get_datasets_code.html index 52798385f9..22345fdafc 100644 --- a/v0.12.0/reference/get_datasets_code.html +++ b/v0.12.0/reference/get_datasets_code.html @@ -1,8 +1,24 @@ - -Get datasets code — get_datasets_code • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,41 +105,51 @@
    -

    Usage

    +

    Usage +

    get_datasets_code(datanames, datasets)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets to extract code from

    datasets

    (FilteredData) object

    -
    + +
    -

    Value

    +

    Value +

    -

    character(3) containing following elements:

    • code from CodeClass (data loading code)

    • +

      character(3) containing following elements:

      +
        +
      • code from CodeClass (data loading code)

      • hash of loaded objects

      • filter panel code

      • -
    + + + + + + - - + + diff --git a/v0.12.0/reference/get_dummy_cdisc_data.html b/v0.12.0/reference/get_dummy_cdisc_data.html index b98bda5629..c88dee6490 100644 --- a/v0.12.0/reference/get_dummy_cdisc_data.html +++ b/v0.12.0/reference/get_dummy_cdisc_data.html @@ -1,10 +1,26 @@ - -Get dummy CDISC data — get_dummy_cdisc_data • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,12 +108,14 @@
    -

    Usage

    +

    Usage +

    get_dummy_cdisc_data()
    -

    Value

    +

    Value +

    cdisc_data

    @@ -100,17 +124,19 @@

    Value

    + + + + - - + + diff --git a/v0.12.0/reference/get_dummy_datasets.html b/v0.12.0/reference/get_dummy_datasets.html index b59cab003b..70cc312557 100644 --- a/v0.12.0/reference/get_dummy_datasets.html +++ b/v0.12.0/reference/get_dummy_datasets.html @@ -1,8 +1,24 @@ - -Get a dummy datasets object with ADSL data, useful in the examples — get_dummy_datasets • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,29 +105,33 @@
    -

    Usage

    +

    Usage +

    get_dummy_datasets()
    -

    Value

    +

    Value +

    FilteredData with ADSL set

    + + + + - - + + diff --git a/v0.12.0/reference/get_dummy_filter.html b/v0.12.0/reference/get_dummy_filter.html index 1d49484125..892fddddbf 100644 --- a/v0.12.0/reference/get_dummy_filter.html +++ b/v0.12.0/reference/get_dummy_filter.html @@ -1,8 +1,24 @@ - -Get dummy filter states to apply initially — get_dummy_filter • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,35 +105,42 @@
    -

    Usage

    +

    Usage +

    get_dummy_filter(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (TealData)

    -
    + +
    -

    Value

    +

    Value +

    dummy filter states

    + + + + - - + + diff --git a/v0.12.0/reference/get_dummy_modules.html b/v0.12.0/reference/get_dummy_modules.html index cba85b4abb..05741260cb 100644 --- a/v0.12.0/reference/get_dummy_modules.html +++ b/v0.12.0/reference/get_dummy_modules.html @@ -1,10 +1,26 @@ - -Get dummy modules — get_dummy_modules • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,12 +108,14 @@
    -

    Usage

    +

    Usage +

    get_dummy_modules()
    -

    Value

    +

    Value +

    teal_modules

    @@ -100,17 +124,19 @@

    Value

    + + + + - - + + diff --git a/v0.12.0/reference/get_rcode.html b/v0.12.0/reference/get_rcode.html index 2fdb8d0803..8e0792f023 100644 --- a/v0.12.0/reference/get_rcode.html +++ b/v0.12.0/reference/get_rcode.html @@ -1,20 +1,36 @@ - - + + + + + +Returns R Code from a teal module — get_rcode • teal +Returns R Code from a teal module — get_rcode • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + + - + @@ -101,7 +123,8 @@
    -

    Usage

    +

    Usage +

    get_rcode(
       datasets = NULL,
       datanames = if (is.null(datasets)) datasets else datasets$datanames(),
    @@ -114,8 +137,10 @@ 

    Usage

    -

    Arguments

    -
    datasets
    +

    Arguments +

    +
    +
    datasets

    (list) list of FilteredData available inside the server function of any teal module.

    @@ -155,9 +180,11 @@

    Arguments -

    Value

    +

    Value +

    Return the R Code needed to reproduce a teal module. The get_rcode_header() part allows @@ -168,17 +195,20 @@

    Value

    -

    Note

    +

    Note +

    The teal.load_nest_code option is being used to customize the code that sets correct library paths with all packages available. If empty (the default), a placeholder string is being used.

    -

    References

    +

    References +

    show_rcode_modal(), get_rcode_header()

    -

    Examples

    +

    Examples +

    if (FALSE) {
     show_rcode_modal(
       title = "R Code for a Regression Plot",
    @@ -192,17 +222,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/get_rcode_header.html b/v0.12.0/reference/get_rcode_header.html index db696d63aa..951334ac81 100644 --- a/v0.12.0/reference/get_rcode_header.html +++ b/v0.12.0/reference/get_rcode_header.html @@ -1,8 +1,24 @@ - -Generates header text for analysis items — get_rcode_header • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,13 +105,16 @@
    -

    Usage

    +

    Usage +

    get_rcode_header(title = NULL, description = NULL)
    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    A character title of the module

    @@ -97,30 +122,35 @@

    Arguments -

    Value

    +

    Value +

    A character string for the header text

    -

    Author

    +

    Author +

    Sebastian Wolf

    + + + + - - + + diff --git a/v0.12.0/reference/get_rcode_libraries.html b/v0.12.0/reference/get_rcode_libraries.html index c727870f71..f82acf663f 100644 --- a/v0.12.0/reference/get_rcode_libraries.html +++ b/v0.12.0/reference/get_rcode_libraries.html @@ -1,8 +1,24 @@ - -Generates library calls from current session info — get_rcode_libraries • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,29 +105,33 @@
    -

    Usage

    +

    Usage +

    get_rcode_libraries()
    -

    Value

    +

    Value +

    Character object contain code

    + + + + - - + + diff --git a/v0.12.0/reference/get_rcode_srv.html b/v0.12.0/reference/get_rcode_srv.html index 426031191d..6dc685d870 100644 --- a/v0.12.0/reference/get_rcode_srv.html +++ b/v0.12.0/reference/get_rcode_srv.html @@ -1,8 +1,24 @@ - -Server part of get R code module — get_rcode_srv • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,7 +105,8 @@
    -

    Usage

    +

    Usage +

    get_rcode_srv(
       id,
       datasets,
    @@ -95,8 +118,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    An ID string that corresponds with the ID used to call the module's UI function.

    @@ -126,20 +151,23 @@

    Arguments

    + +
    + + - - + + diff --git a/v0.12.0/reference/get_rcode_ui.html b/v0.12.0/reference/get_rcode_ui.html index d20870e9c2..ee441e8910 100644 --- a/v0.12.0/reference/get_rcode_ui.html +++ b/v0.12.0/reference/get_rcode_ui.html @@ -1,8 +1,24 @@ - -Ui part of get R code module — get_rcode_ui • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,35 +105,42 @@
    -

    Usage

    +

    Usage +

    get_rcode_ui(id)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character) id of shiny module

    -
    + +
    -

    Value

    +

    Value +

    (shiny.tag)

    + + + + - - + + diff --git a/v0.12.0/reference/get_teal_bs_theme.html b/v0.12.0/reference/get_teal_bs_theme.html index 9e66233822..1f040f2f35 100644 --- a/v0.12.0/reference/get_teal_bs_theme.html +++ b/v0.12.0/reference/get_teal_bs_theme.html @@ -1,8 +1,24 @@ - -Resolve the expected bootstrap theme — get_teal_bs_theme • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,22 +105,25 @@
    -

    Usage

    +

    Usage +

    get_teal_bs_theme()
    - + + + + - - + + diff --git a/v0.12.0/reference/include_css_files.html b/v0.12.0/reference/include_css_files.html index 976547ee67..a621446da4 100644 --- a/v0.12.0/reference/include_css_files.html +++ b/v0.12.0/reference/include_css_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,35 +111,42 @@
    -

    Usage

    +

    Usage +

    include_css_files(pattern = "*")
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes CSS files

    + + + + - - + + diff --git a/v0.12.0/reference/include_js_files.html b/v0.12.0/reference/include_js_files.html index f1d9e613e5..1196b17456 100644 --- a/v0.12.0/reference/include_js_files.html +++ b/v0.12.0/reference/include_js_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include JS files from /inst/js/ package directory to application header — include_js_files • teal +Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,39 +111,46 @@
    -

    Usage

    +

    Usage +

    include_js_files(pattern = NULL, except = NULL)
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included, passed to system.file

    except

    (character) vector of basename filenames to be excluded

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes JS files

    + + + + - - + + diff --git a/v0.12.0/reference/include_teal_css_js.html b/v0.12.0/reference/include_teal_css_js.html index a58ed69eb5..afaaebad98 100644 --- a/v0.12.0/reference/include_teal_css_js.html +++ b/v0.12.0/reference/include_teal_css_js.html @@ -1,16 +1,32 @@ - - + + + + + +Code to include teal CSS and Javascript files — include_teal_css_js • teal +Code to include teal CSS and Javascript files — include_teal_css_js • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + + - + @@ -95,19 +117,22 @@
    -

    Usage

    +

    Usage +

    include_teal_css_js()
    -

    Value

    +

    Value +

    HTML code to include

    -

    Examples

    +

    Examples +

    shiny_ui <- tagList(
       teal:::include_teal_css_js(),
       p("Hello")
    @@ -115,17 +140,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/index.html b/v0.12.0/reference/index.html index 7999e1c9e0..a9f0496043 100644 --- a/v0.12.0/reference/index.html +++ b/v0.12.0/reference/index.html @@ -1,8 +1,22 @@ - -Function reference • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -77,206 +97,276 @@
    -

    Teal Core Functions

    +

    Teal Core Functions +

    -

    These are the main functions needed to build a teal app.

    +

    +

    These are the main functions needed to build a teal app.

    -
    +
    +
    -
    +
    +
    init()
    Create the Server and UI Function For the Shiny App
    -
    +
    +
    +
    module() toString(<teal_module>) print(<teal_module>)
    Creates a teal_module object.
    -
    +
    +
    +
    modules() toString(<teal_modules>) print(<teal_modules>)
    Creates a teal_modules object.
    -
    +
    +
    +
    srv_teal_with_splash()
    Server function that loads the data through reactive loading and then delegates to srv_teal().
    -
    +
    +
    +
    ui_teal_with_splash()
    -
    UI to show a splash screen in the beginning, then delegate to srv_teal()
    -
    +
    UI to show a splash screen in the beginning, then delegate to srv_teal() +
    +
    +
    +
    default_filter()
    Refers the default filter state
    -
    -

    Example module

    + +
    +
    +

    Example module +

    -

    A simple example teal module

    +

    +

    A simple example teal module

    -
    +
    +
    -
    +
    +
    example_module()
    An example teal module
    -
    -

    Report previewer module

    + +
    +
    +

    Report previewer module +

    -
    +
    +
    -
    +
    +
    reporter_previewer_module()
    Create a teal module for previewing a report
    -
    -

    Functions moved to other packages

    + +
    +
    +

    Functions moved to other packages +

    -

    These functions have been moved from teal and will be deprecated.

    +

    +

    These functions have been moved from teal and will be deprecated.

    -
    +
    +
    -
    +
    +
    log_app_usage()
    Teal Application Usage Logging.
    -
    +
    +
    +
    root_modules()
    Deprecated: Creates the root modules container
    -
    -

    Validation functions

    + +
    +
    +

    Validation functions +

    -
    +
    +
    -
    +
    +
    validate_has_data()
    Validate that dataset has a minimum number of observations
    -
    +
    +
    +
    validate_has_elements()
    Validates that vector has length greater than 0
    -
    +
    +
    +
    validate_has_variable()
    Validates that dataset contains specific variable
    -
    +
    +
    +
    validate_in()
    Validates that vector includes all expected values
    -
    +
    +
    +
    validate_n_levels()
    Validate that variables has expected number of levels
    -
    +
    +
    +
    validate_no_intersection()
    Validates no intersection between two vectors
    -
    +
    +
    +
    validate_one_row_per_id()
    Validate that dataset has unique rows for key variables
    -
    - + +
    +
    + -
    +
    +
    -
    +
    +
    get_rcode()
    Returns R Code from a teal module
    -
    +
    +
    +
    get_rcode_srv()
    Server part of get R code module
    -
    +
    +
    +
    get_rcode_ui()
    Ui part of get R code module
    -
    +
    +
    +
    show_rcode_modal()
    Show R Code Modal
    -
    -

    Deprecated function

    + +
    +
    +

    Deprecated function +

    -
    +
    +
    -
    +
    +
    bookmarkableShinyApp()
    Make a Shiny UI function bookmarkable
    -
    + + + + + + - - + + diff --git a/v0.12.0/reference/init.html b/v0.12.0/reference/init.html index 50cba6af21..543b6508fe 100644 --- a/v0.12.0/reference/init.html +++ b/v0.12.0/reference/init.html @@ -1,18 +1,34 @@ - - + + + + + +Create the Server and UI Function For the Shiny App — init • teal +Create the Server and UI Function For the Shiny App — init • teal + + + + + + + + + + Skip to contents @@ -28,7 +44,8 @@ + + + - + @@ -98,7 +120,8 @@
    -

    Usage

    +

    Usage +

    init(
       data,
       modules,
    @@ -111,8 +134,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (TealData or TealDataset or TealDatasetConnector or list or data.frame or MultiAssayExperiment)
    R6 object as returned by teal.data::cdisc_data(), teal.data::teal_data(), teal.data::cdisc_dataset(), teal.data::dataset(), teal.data::dataset_connector() or teal.data::cdisc_dataset_connector() or a single data.frame or a MultiAssayExperiment @@ -134,27 +159,46 @@

    Arguments
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
    +

    +
    +
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
          <dataname2> = list(...),
          ...)
    -

    +
    +

    +

    For example, filters for variable Sepal.Length in iris can be specified as follows:

    -

    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
    +

    +
    +
    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
     # or
    -list(iris = list(Sepal.Length = c(5.0, 7.0)))

    +list(iris = list(Sepal.Length = c(5.0, 7.0)))
    +

    +

    In case developer would like to include NA and Inf values in the filtered dataset.

    -

    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    -list(Species = c(c(5.0, 7.0), NA, Inf))

    +

    +
    +
    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    +list(Species = c(c(5.0, 7.0), NA, Inf))
    +

    +

    To initialize with specific variable filter with all values on start, one can use

    -

    list(Species = list())

    -

    filter should be set with respect to the class of the column:

    • numeric: selected should be a two elements vector defining the range +

      +
      +
      list(Species = list())
      +

      +
      +

      filter should be set with respect to the class of the column:

      +
        +
      • numeric: selected should be a two elements vector defining the range of the filter.

      • Date: selected should be a two elements vector defining the date-range of the filter

      • @@ -166,7 +210,10 @@

        Arguments
        list(
        +

      +

      +
      +
      list(
         <MAE dataname> = list(
           subjects = list(<column in colData> = ..., <column in colData> = ...),
           <experiment name> = list(
      @@ -176,9 +223,12 @@ 

      Arguments <column in colData of experiment> = ...) ) ) -)

      +)
      +

      +

    By adding the filterable attribute it is possible to control which variables can be filtered for each -dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

    +dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

    +
    header
    @@ -200,16 +250,19 @@

    Argumentsui_teal_with_splash() is then preferred to this function.

    - + +
    -

    Value

    +

    Value +

    named list with server and ui function

    -

    Examples

    +

    Examples +

    library(scda)
     
     ADSL <- synthetic_cdisc_data("latest")$adsl
    @@ -255,17 +308,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/is_arg_used.html b/v0.12.0/reference/is_arg_used.html index d14beeb463..9c0f31fd85 100644 --- a/v0.12.0/reference/is_arg_used.html +++ b/v0.12.0/reference/is_arg_used.html @@ -1,8 +1,24 @@ - -Does the object make use of the arg — is_arg_used • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - +
    @@ -83,7 +106,8 @@
    -

    Usage

    +

    Usage +

    is_arg_used(modules, arg)
     
     # S3 method for default
    @@ -100,17 +124,21 @@ 

    Usage

    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_module or teal_modules) object

    arg

    (character(1)) names of the arguments to be checked against formals of teal modules.

    -
    + +
    -

    Value

    +

    Value +

    logical whether the object makes use of arg

    @@ -119,17 +147,19 @@

    Value

    + +
    + + - - + + diff --git a/v0.12.0/reference/line_pkg_log.html b/v0.12.0/reference/line_pkg_log.html index e5bc0b41b4..0084a6d0c1 100644 --- a/v0.12.0/reference/line_pkg_log.html +++ b/v0.12.0/reference/line_pkg_log.html @@ -1,8 +1,24 @@ - -Package metadata to add to log file — line_pkg_log • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,19 +105,24 @@
    -

    Usage

    +

    Usage +

    line_pkg_log(fields)
    -

    Arguments

    -
    fields
    +

    Arguments +

    +
    +
    fields

    package metadata to be retrieved

    -
    + +
    -

    Examples

    +

    Examples +

    if (FALSE) {
     teal:::line_pkg_log(
       pkgs = c("rtables", "tern", "teal"),
    @@ -105,17 +132,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/line_usage_log.html b/v0.12.0/reference/line_usage_log.html index c6829a4c59..109a4daa50 100644 --- a/v0.12.0/reference/line_usage_log.html +++ b/v0.12.0/reference/line_usage_log.html @@ -1,8 +1,24 @@ - -app usage data fields to add to log file — line_usage_log • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,30 +105,34 @@
    -

    Usage

    +

    Usage +

    line_usage_log(...)
    -

    Examples

    +

    Examples +

    if (FALSE) {
     teal:::line_usage_log("Oncology", "Tecentriq", "NSCLC", "Exploratory")
     }
     
    + + + + - - + + diff --git a/v0.12.0/reference/log_app_usage.html b/v0.12.0/reference/log_app_usage.html index 806a3d9354..978b5178b6 100644 --- a/v0.12.0/reference/log_app_usage.html +++ b/v0.12.0/reference/log_app_usage.html @@ -1,14 +1,30 @@ - - + + + + + +Teal Application Usage Logging. — log_app_usage • teal +Teal Application Usage Logging. — log_app_usage • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + + - + @@ -92,7 +114,8 @@
    -

    Usage

    +

    Usage +

    log_app_usage(
       ta,
       molecule,
    @@ -103,8 +126,10 @@ 

    Usage

    -

    Arguments

    -
    ta
    +

    Arguments +

    +
    +
    ta

    therapeutic area name. required argument. e.g. "I2ON".

    @@ -123,9 +148,11 @@

    Arguments.

    -

    + +
    -

    Details

    +

    Details +

    Each Teal application can implement usage logging by calling this function in the application startup file(s) like app.R. The following data are captured by default: UNIX ID, System Date, Application Directory, Therapeutic Area, Indication, @@ -136,7 +163,8 @@

    Details
    -

    Examples

    +

    Examples +

    if (FALSE) {
     log_app_usage(ta = "Oncology", molecule = "Tecentriq", ind = "NSCLC", anl_type = "Exploratory")
     readLines(file.path("logs", "utilization.log"), warn = FALSE)
    @@ -144,17 +172,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.12.0/reference/module.html b/v0.12.0/reference/module.html index 87f1a68830..8f36f86f33 100644 --- a/v0.12.0/reference/module.html +++ b/v0.12.0/reference/module.html @@ -1,10 +1,26 @@ - -Creates a teal_module object. — module • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,7 +108,8 @@
    -

    Usage

    +

    Usage +

    module(
       label = "module",
       server = function(id, ...) {
    @@ -111,28 +134,38 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module.

    server
    -

    (function) shiny module with following arguments:

    • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

    • +
      +

      (function) shiny module with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

      • input, output, session - (not recommended) then shiny::callModule() will be used to call a module.

      • data (optional) module will receive list of reactive (filtered) data specified in the filters argument. filters can't be NULL

      • datasets (optional) module will receive FilteredData. (See [teal.slice::FilteredData]).

      • reporter (optional) module will receive Reporter. (See teal.reporter::Reporter).

      • ... (optional) server_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    ui
    -

    (function) Shiny ui module function with following arguments:

    • id - teal will set proper shiny namespace for this module.

    • +
      +

      (function) Shiny ui module function with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module.

      • data (optional) module will receive list of reactive (filtered) data specified in the filters argument.

      • datasets (optional) module will receive FilteredData. (See [teal.slice::FilteredData]).

      • ... (optional) ui_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    filters
    @@ -165,16 +198,19 @@

    Arguments -

    Value

    +

    Value +

    object of class teal_module.

    -

    Examples

    +

    Examples +

    library(shiny)
     
     app <- init(
    @@ -203,17 +239,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/modules.html b/v0.12.0/reference/modules.html index 7fca591b4e..bb3cc1fea1 100644 --- a/v0.12.0/reference/modules.html +++ b/v0.12.0/reference/modules.html @@ -1,16 +1,32 @@ - - + + + + + +Creates a teal_modules object. — modules • teal +Creates a teal_modules object. — modules • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + + - + @@ -95,7 +117,8 @@
    -

    Usage

    +

    Usage +

    modules(..., label = "root")
     
     # S3 method for teal_modules
    @@ -106,8 +129,10 @@ 

    Usage

    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    parameters passed to toString

    @@ -125,19 +150,25 @@

    Arguments -

    Value

    +

    Value +

    -

    object of class teal_modules. Object contains following fields

    • label: taken from the label argument

    • +

      object of class teal_modules. Object contains following fields

      +
        +
      • label: taken from the label argument

      • children: a list containing objects passed in .... List elements are named after their label attribute converted to a valid shiny id.

      • -

      (character)

      +
    +

    (character)

    -

    Examples

    +

    Examples +

    library(shiny)
     
     app <- init(
    @@ -187,17 +218,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/modules_depth.html b/v0.12.0/reference/modules_depth.html index 3fc0f0fa1d..6bc2504ae2 100644 --- a/v0.12.0/reference/modules_depth.html +++ b/v0.12.0/reference/modules_depth.html @@ -1,10 +1,26 @@ - -Get module depth — modules_depth • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,13 +108,16 @@
    -

    Usage

    +

    Usage +

    modules_depth(modules, depth = 0L)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (list or teal_modules)
    nested list of teal_modules or module objects. See modules() and module() for more details.

    @@ -101,16 +126,19 @@

    Arguments -

    Value

    +

    Value +

    depth level for given module

    -

    Examples

    +

    Examples +

    mods <- modules(
       label = "d1",
       modules(
    @@ -136,17 +164,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/pad.html b/v0.12.0/reference/pad.html index e6fb57e546..4b199de146 100644 --- a/v0.12.0/reference/pad.html +++ b/v0.12.0/reference/pad.html @@ -1,10 +1,26 @@ - -Pads a string — pad • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,13 +108,16 @@
    -

    Usage

    +

    Usage +

    pad(str, pre = NULL, post = "")
    -

    Arguments

    -
    str
    +

    Arguments +

    +
    +
    str

    (character) vector of lines to be padded

    @@ -103,20 +128,23 @@

    Arguments

    + + + + - - + + diff --git a/v0.12.0/reference/reexports.html b/v0.12.0/reference/reexports.html index 6ddad055fe..581ddca0cc 100644 --- a/v0.12.0/reference/reexports.html +++ b/v0.12.0/reference/reexports.html @@ -1,22 +1,38 @@ - - + + + + + +Objects exported from other packages — reexports • teal +Objects exported from other packages — reexports • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + + + - + @@ -95,25 +117,29 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    magrittr
    +
    +
    magrittr

    %>%

    -
    + + - + + + + - - + + diff --git a/v0.12.0/reference/reporter_previewer_module.html b/v0.12.0/reference/reporter_previewer_module.html index 67d77b5ebf..d955415597 100644 --- a/v0.12.0/reference/reporter_previewer_module.html +++ b/v0.12.0/reference/reporter_previewer_module.html @@ -1,20 +1,36 @@ - - + + + + + +Create a teal module for previewing a report — reporter_previewer_module • teal +Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + + - + @@ -101,35 +123,42 @@
    -

    Usage

    +

    Usage +

    reporter_previewer_module(label = "Report previewer")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module.

    -
    + +
    -

    Value

    +

    Value +

    teal_module containing the teal.reporter previewer functionality

    + + + + - - + + diff --git a/v0.12.0/reference/root_modules.html b/v0.12.0/reference/root_modules.html index ac19158d09..a5433c6581 100644 --- a/v0.12.0/reference/root_modules.html +++ b/v0.12.0/reference/root_modules.html @@ -1,10 +1,26 @@ - -Deprecated: Creates the root modules container — root_modules • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,18 +108,23 @@
    -

    Usage

    +

    Usage +

    root_modules(...)
    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    parameters passed to toString

    -
    + +
    -

    Details

    +

    Details +

    The function modules() can also be used. The purpose of this function is to not confuse the end-user as the label of the top-module will not be displayed as a tab name (because the root is only one element @@ -105,7 +132,8 @@

    Details
    -

    Examples

    +

    Examples +

    library(shiny)
     
     app <- init(
    @@ -151,17 +179,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.12.0/reference/run_js_files.html b/v0.12.0/reference/run_js_files.html index bcad62ea92..78d5aeb6c7 100644 --- a/v0.12.0/reference/run_js_files.html +++ b/v0.12.0/reference/run_js_files.html @@ -1,14 +1,30 @@ - - + + + + + +Run JS file from /inst/js/ package directory — run_js_files • teal +Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + + - + @@ -92,35 +114,42 @@
    -

    Usage

    +

    Usage +

    run_js_files(files)
    -

    Arguments

    -
    files
    +

    Arguments +

    +
    +
    files

    (character) vector of filenames

    -
    + +
    -

    Details

    +

    Details +

    system.file should not be used to access files in other packages, it does not work with devtools. Therefore, we redefine this method in each package as needed. Thus, we do not export this method

    + + + + - - + + diff --git a/v0.12.0/reference/show_rcode_modal.html b/v0.12.0/reference/show_rcode_modal.html index d5ff8dfe94..4981dc1548 100644 --- a/v0.12.0/reference/show_rcode_modal.html +++ b/v0.12.0/reference/show_rcode_modal.html @@ -1,10 +1,26 @@ - -Show R Code Modal — show_rcode_modal • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,13 +108,16 @@
    -

    Usage

    +

    Usage +

    show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())
    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1))
    Title of the modal, displayed in the first comment of the R-code.

    @@ -106,24 +131,28 @@

    Argumentsshiny::getDefaultReactiveDomain() is used.

    -

    + +
    -

    References

    +

    References +

    shiny::showModal() get_rcode()

    + + + + - - + + diff --git a/v0.12.0/reference/srv_nested_tabs.html b/v0.12.0/reference/srv_nested_tabs.html index 2563be3f0c..b5aa43ea95 100644 --- a/v0.12.0/reference/srv_nested_tabs.html +++ b/v0.12.0/reference/srv_nested_tabs.html @@ -1,8 +1,24 @@ - -Server function that returns currently active module — srv_nested_tabs • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,7 +105,8 @@
    -

    Usage

    +

    Usage +

    srv_nested_tabs(
       id,
       datasets,
    @@ -102,8 +125,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character)
    module id to embed it, if provided, the server function must be called with shiny::moduleServer(); @@ -126,42 +151,54 @@

    Arguments -

    Value

    +

    Value +

    reactive which returns the active module that corresponds to the selected tab

    -

    Details

    +

    Details +

    This module calls recursively all elements of the modules returns one which is currently active. To determine which module is active see the diagram. Figure: uml_nested_tabs.jpg Above depicts hypothetical situation in which one has module structure defined in following way:

    -

    + root
    +

    +
    +
    + root
       + tab1
         + test1
         + test2
       + tab2
    -    + test3

    • teal_module returns self as a active module

    • + + test3
    +

    +
    +
      +
    • teal_module returns self as a active module

    • teal_modules returns module active within self which is determined by the input$active_tab. The choice of active module is done recursively (diagram from right to left).

    • -
    + +
    + + + + - - + + diff --git a/v0.12.0/reference/srv_tabs_with_filters.html b/v0.12.0/reference/srv_tabs_with_filters.html index 1e21c0d5eb..6e72df8c7d 100644 --- a/v0.12.0/reference/srv_tabs_with_filters.html +++ b/v0.12.0/reference/srv_tabs_with_filters.html @@ -1,8 +1,24 @@ - -Server function — srv_tabs_with_filters • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,7 +105,8 @@
    -

    Usage

    +

    Usage +

    srv_tabs_with_filters(
       id,
       datasets,
    @@ -94,8 +117,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character)
    module id to embed it, if provided, the server function must be called with shiny::moduleServer(); @@ -120,27 +145,46 @@

    Arguments
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
    +

    +
    +
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
          <dataname2> = list(...),
          ...)
    -

    +
    +

    +

    For example, filters for variable Sepal.Length in iris can be specified as follows:

    -

    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
    +

    +
    +
    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
     # or
    -list(iris = list(Sepal.Length = c(5.0, 7.0)))

    +list(iris = list(Sepal.Length = c(5.0, 7.0)))
    +

    +

    In case developer would like to include NA and Inf values in the filtered dataset.

    -

    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    -list(Species = c(c(5.0, 7.0), NA, Inf))

    +

    +
    +
    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    +list(Species = c(c(5.0, 7.0), NA, Inf))
    +

    +

    To initialize with specific variable filter with all values on start, one can use

    -

    list(Species = list())

    -

    filter should be set with respect to the class of the column:

    • numeric: selected should be a two elements vector defining the range +

      +
      +
      list(Species = list())
      +

      +
      +

      filter should be set with respect to the class of the column:

      +
        +
      • numeric: selected should be a two elements vector defining the range of the filter.

      • Date: selected should be a two elements vector defining the date-range of the filter

      • @@ -152,7 +196,10 @@

        Arguments
        list(
        +

      +

      +
      +
      list(
         <MAE dataname> = list(
           subjects = list(<column in colData> = ..., <column in colData> = ...),
           <experiment name> = list(
      @@ -162,30 +209,37 @@ 

      Arguments <column in colData of experiment> = ...) ) ) -)

      +)
      +

      +

    By adding the filterable attribute it is possible to control which variables can be filtered for each -dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

    +dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

    + - + +
    -

    Value

    +

    Value +

    reactive currently selected active_module

    + + + + - - + + diff --git a/v0.12.0/reference/srv_teal.html b/v0.12.0/reference/srv_teal.html index f0adf3552f..be23273104 100644 --- a/v0.12.0/reference/srv_teal.html +++ b/v0.12.0/reference/srv_teal.html @@ -1,20 +1,36 @@ - - + + + + + +Server function corresponding to teal — srv_teal • teal +Server function corresponding to teal — srv_teal • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + + - + @@ -101,13 +123,16 @@
    -

    Usage

    +

    Usage +

    srv_teal(id, modules, raw_data, filter = list())
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character)
    module id to embed it, if provided, the server function must be called with shiny::moduleServer(); @@ -127,27 +152,46 @@

    Arguments
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
    +

    +
    +
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
          <dataname2> = list(...),
          ...)
    -

    +
    +

    +

    For example, filters for variable Sepal.Length in iris can be specified as follows:

    -

    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
    +

    +
    +
    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
     # or
    -list(iris = list(Sepal.Length = c(5.0, 7.0)))

    +list(iris = list(Sepal.Length = c(5.0, 7.0)))
    +

    +

    In case developer would like to include NA and Inf values in the filtered dataset.

    -

    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    -list(Species = c(c(5.0, 7.0), NA, Inf))

    +

    +
    +
    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    +list(Species = c(c(5.0, 7.0), NA, Inf))
    +

    +

    To initialize with specific variable filter with all values on start, one can use

    -

    list(Species = list())

    -

    filter should be set with respect to the class of the column:

    • numeric: selected should be a two elements vector defining the range +

      +
      +
      list(Species = list())
      +

      +
      +

      filter should be set with respect to the class of the column:

      +
        +
      • numeric: selected should be a two elements vector defining the range of the filter.

      • Date: selected should be a two elements vector defining the date-range of the filter

      • @@ -159,7 +203,10 @@

        Arguments
        list(
        +

      +

      +
      +
      list(
         <MAE dataname> = list(
           subjects = list(<column in colData> = ..., <column in colData> = ...),
           <experiment name> = list(
      @@ -169,34 +216,42 @@ 

      Arguments <column in colData of experiment> = ...) ) ) -)

      +)
      +

      +

      By adding the filterable attribute it is possible to control which variables can be filtered for each -dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

      +dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

      + - + +
      -

      Value

      +

      Value +

      reactive which returns the currently active module

      -

      Details

      +

      Details +

      For more doc, see ui_teal().

      + + + + - - + + diff --git a/v0.12.0/reference/srv_teal_with_splash.html b/v0.12.0/reference/srv_teal_with_splash.html index a488c3c95f..edebac8a89 100644 --- a/v0.12.0/reference/srv_teal_with_splash.html +++ b/v0.12.0/reference/srv_teal_with_splash.html @@ -1,12 +1,28 @@ - -Server function that loads the data through reactive loading and then delegates -to srv_teal(). — srv_teal_with_splash • teal + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ +
    • +
    + - + @@ -89,13 +111,16 @@
    -

    Usage

    +

    Usage +

    srv_teal_with_splash(id, data, modules, filter = list())
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character)
    module id to embed it, if provided, the server function must be called with shiny::moduleServer(); @@ -120,27 +145,46 @@

    Arguments
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
    +

    +
    +
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
          <dataname2> = list(...),
          ...)
    -

    +
    +

    +

    For example, filters for variable Sepal.Length in iris can be specified as follows:

    -

    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
    +

    +
    +
    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
     # or
    -list(iris = list(Sepal.Length = c(5.0, 7.0)))

    +list(iris = list(Sepal.Length = c(5.0, 7.0)))
    +

    +

    In case developer would like to include NA and Inf values in the filtered dataset.

    -

    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    -list(Species = c(c(5.0, 7.0), NA, Inf))

    +

    +
    +
    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    +list(Species = c(c(5.0, 7.0), NA, Inf))
    +

    +

    To initialize with specific variable filter with all values on start, one can use

    -

    list(Species = list())

    -

    filter should be set with respect to the class of the column:

    • numeric: selected should be a two elements vector defining the range +

      +
      +
      list(Species = list())
      +

      +
      +

      filter should be set with respect to the class of the column:

      +
        +
      • numeric: selected should be a two elements vector defining the range of the filter.

      • Date: selected should be a two elements vector defining the date-range of the filter

      • @@ -152,7 +196,10 @@

        Arguments
        list(
        +

      +

      +
      +
      list(
         <MAE dataname> = list(
           subjects = list(<column in colData> = ..., <column in colData> = ...),
           <experiment name> = list(
      @@ -162,13 +209,18 @@ 

      Arguments <column in colData of experiment> = ...) ) ) -)

      +)
      +

      +

      By adding the filterable attribute it is possible to control which variables can be filtered for each -dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

      +dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

      + - + +
      -

      Value

      +

      Value +

      reactive, return value of srv_teal()

      @@ -177,17 +229,19 @@

      Value

      + + + + - - + + diff --git a/v0.12.0/reference/teal-package.html b/v0.12.0/reference/teal-package.html index 6bcb9c96c0..975463ede1 100644 --- a/v0.12.0/reference/teal-package.html +++ b/v0.12.0/reference/teal-package.html @@ -1,10 +1,26 @@ - -teal: Interactive Exploration of Clinical Trials Data — teal-package • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ +
    • +
    + - + @@ -87,36 +109,46 @@
    -

    Details

    +

    Details +

    To learn mode about the package either read the project website at Project Website or read the init manual pages.

    -

    Author

    +

    Author +

    Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com

    -

    Authors:

    + + + + + + - - + + diff --git a/v0.12.0/reference/ui_nested_tabs.html b/v0.12.0/reference/ui_nested_tabs.html index 046b78c014..8e88b4e01a 100644 --- a/v0.12.0/reference/ui_nested_tabs.html +++ b/v0.12.0/reference/ui_nested_tabs.html @@ -1,12 +1,28 @@ - - + + + + + +Create a UI of nested tabs of teal_modules — ui_nested_tabs • teal +Create a UI of nested tabs of teal_modules — ui_nested_tabs • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - +
    @@ -89,7 +112,8 @@
    -

    Usage

    +

    Usage +

    ui_nested_tabs(id, modules, datasets, depth = 0L)
     
     # S3 method for default
    @@ -103,8 +127,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    module id

    @@ -125,23 +151,30 @@

    Arguments -

    Value

    +

    Value +

    -

    depending on class of modules:

    • teal_module: instantiated UI of the module

    • +

      depending on class of modules:

      +
        +
      • teal_module: instantiated UI of the module

      • teal_modules: tabsetPanel with each tab corresponding to recursively calling this function on it.

      • -
    + +
    -

    Details

    +

    Details +

    The datasets argument is required to resolve the teal arguments in an isolated context (with respect to reactivity)

    -

    Examples

    +

    Examples +

    mods <- teal:::get_dummy_modules()
     datasets <- teal:::get_dummy_datasets()
     app <- shinyApp(
    @@ -171,17 +204,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/ui_tabs_with_filters.html b/v0.12.0/reference/ui_tabs_with_filters.html index 09c6f42154..4e9fdbe0c1 100644 --- a/v0.12.0/reference/ui_tabs_with_filters.html +++ b/v0.12.0/reference/ui_tabs_with_filters.html @@ -1,12 +1,28 @@ - - + + + + + +Add right filter panel into each of the top-level teal_modules UIs. — ui_tabs_with_filters • teal +Add right filter panel into each of the top-level teal_modules UIs. — ui_tabs_with_filters • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,13 +111,16 @@
    -

    Usage

    +

    Usage +

    ui_tabs_with_filters(id, modules, datasets)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    module id

    @@ -111,16 +136,19 @@

    Argumentsteal.slice::FilteredData

    -

    + +
    -

    Value

    +

    Value +

    A tagList of The main menu, place holders for filters and place holders for the teal modules

    -

    Details

    +

    Details +

    The right filter panel's filter choices affect the datasets object. Therefore, all modules using the same datasets share the same filters.

    This works with nested modules of depth greater than 2, though the filter @@ -128,7 +156,8 @@

    Details
    -

    Examples

    +

    Examples +

    
     mods <- teal:::get_dummy_modules()
     datasets <- teal:::get_dummy_datasets()
    @@ -202,17 +231,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.12.0/reference/ui_teal.html b/v0.12.0/reference/ui_teal.html index 3078bf5083..587a5268ef 100644 --- a/v0.12.0/reference/ui_teal.html +++ b/v0.12.0/reference/ui_teal.html @@ -1,8 +1,24 @@ - -Teal app UI — ui_teal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,7 +105,8 @@
    -

    Usage

    +

    Usage +

    ui_teal(
       id,
       splash_ui = tags$h2("Starting the Teal App"),
    @@ -94,8 +117,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    module id

    @@ -122,15 +147,18 @@

    Arguments -

    Value

    +

    Value +

    HTML for Shiny module UI

    -

    Details

    +

    Details +

    It displays the splash UI which is used to fetch the data, possibly prompting for a password input to fetch the data. Once the data is ready, the splash screen is replaced by the actual teal UI that is tabsetted and @@ -144,7 +172,8 @@

    Details
    -

    Examples

    +

    Examples +

    mods <- teal:::get_dummy_modules()
     raw_data <- reactive(teal:::get_dummy_cdisc_data())
     app <- shinyApp(
    @@ -161,17 +190,19 @@ 

    Examples

    + +

    + +
    - - + + diff --git a/v0.12.0/reference/ui_teal_with_splash.html b/v0.12.0/reference/ui_teal_with_splash.html index 2440b5797c..f70967d464 100644 --- a/v0.12.0/reference/ui_teal_with_splash.html +++ b/v0.12.0/reference/ui_teal_with_splash.html @@ -1,22 +1,38 @@ - - + + + + + +UI to show a splash screen in the beginning, then delegate to srv_teal() — ui_teal_with_splash • teal +UI to show a splash screen in the beginning, then delegate to srv_teal() — ui_teal_with_splash • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + + + - +
    @@ -104,7 +127,8 @@
    -

    Usage

    +

    Usage +

    ui_teal_with_splash(
       id,
       data,
    @@ -115,8 +139,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    module id

    @@ -147,20 +173,23 @@

    Arguments

    + +
    + + - - + + diff --git a/v0.12.0/reference/validate_has_data.html b/v0.12.0/reference/validate_has_data.html index 0bec1635d7..590bafa2f9 100644 --- a/v0.12.0/reference/validate_has_data.html +++ b/v0.12.0/reference/validate_has_data.html @@ -1,8 +1,24 @@ - -Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,7 +105,8 @@
    -

    Usage

    +

    Usage +

    validate_has_data(
       x,
       min_nrow = NULL,
    @@ -94,8 +117,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    a data.frame

    @@ -115,10 +140,12 @@

    Arguments -

    Examples

    +

    Examples +

    library(scda)
     ADSL <- synthetic_cdisc_data("latest")$adsl
     
    @@ -144,17 +171,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/validate_has_elements.html b/v0.12.0/reference/validate_has_elements.html index 2759142151..371b8a15b7 100644 --- a/v0.12.0/reference/validate_has_elements.html +++ b/v0.12.0/reference/validate_has_elements.html @@ -1,8 +1,24 @@ - -Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,23 +105,28 @@
    -

    Usage

    +

    Usage +

    validate_has_elements(x, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    msg

    message to display

    -
    + +
    -

    Examples

    +

    Examples +

    library(scda)
     ADSL <- synthetic_cdisc_data("latest")$adsl
     
    @@ -133,17 +160,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/validate_has_variable.html b/v0.12.0/reference/validate_has_variable.html index fb44cbd8df..f60c96093a 100644 --- a/v0.12.0/reference/validate_has_variable.html +++ b/v0.12.0/reference/validate_has_variable.html @@ -1,8 +1,24 @@ - -Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,13 +105,16 @@
    -

    Usage

    +

    Usage +

    validate_has_variable(data, varname, msg)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    a data.frame

    @@ -100,10 +125,12 @@

    Arguments -

    Examples

    +

    Examples +

    library(scda)
     ADSL <- synthetic_cdisc_data("latest")$adsl
     
    @@ -128,17 +155,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/validate_in.html b/v0.12.0/reference/validate_in.html index db1b104907..63202833c5 100644 --- a/v0.12.0/reference/validate_in.html +++ b/v0.12.0/reference/validate_in.html @@ -1,8 +1,24 @@ - -Validates that vector includes all expected values — validate_in • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,13 +105,16 @@
    -

    Usage

    +

    Usage +

    validate_in(x, choices, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    values to test. All must be in choices

    @@ -100,10 +125,12 @@

    Arguments -

    Examples

    +

    Examples +

    library(scda)
     
     ADSL <- synthetic_cdisc_data("latest")$adsl
    @@ -133,17 +160,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/validate_n_levels.html b/v0.12.0/reference/validate_n_levels.html index d5a8926f8d..c200a7201e 100644 --- a/v0.12.0/reference/validate_n_levels.html +++ b/v0.12.0/reference/validate_n_levels.html @@ -1,8 +1,24 @@ - -Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,13 +105,16 @@
    -

    Usage

    +

    Usage +

    validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    variable name. If x is not a factor, the unique values are treated as levels.

    @@ -106,15 +131,18 @@

    Arguments -

    Details

    +

    Details +

    If the number of levels of x is less than min_levels or greater than max_levels the validation will fail.

    -

    Examples

    +

    Examples +

    library(scda)
     
     ADSL <- synthetic_cdisc_data("latest")$adsl
    @@ -146,17 +174,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/validate_no_intersection.html b/v0.12.0/reference/validate_no_intersection.html index a626dff976..0eeda826f5 100644 --- a/v0.12.0/reference/validate_no_intersection.html +++ b/v0.12.0/reference/validate_no_intersection.html @@ -1,8 +1,24 @@ - -Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,13 +105,16 @@
    -

    Usage

    +

    Usage +

    validate_no_intersection(x, y, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    @@ -100,10 +125,12 @@

    Arguments -

    Examples

    +

    Examples +

    library(scda)
     ADSL <- synthetic_cdisc_data("latest")$adsl
     
    @@ -141,17 +168,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.12.0/reference/validate_one_row_per_id.html b/v0.12.0/reference/validate_one_row_per_id.html index c901a0790a..99b2cb41b8 100644 --- a/v0.12.0/reference/validate_one_row_per_id.html +++ b/v0.12.0/reference/validate_one_row_per_id.html @@ -1,8 +1,24 @@ - -Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,23 +105,28 @@
    -

    Usage

    +

    Usage +

    validate_one_row_per_id(x, key = c("USUBJID", "STUDYID"))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    a data.frame

    key

    a vector of ID variables from x that identify unique records

    -
    + +
    -

    Examples

    +

    Examples +

    library(scda)
     ADSL <- synthetic_cdisc_data("latest")$adsl
     
    @@ -125,17 +152,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/404.html b/v0.13.0/404.html index 92331e8d0e..4838e85508 100644 --- a/v0.13.0/404.html +++ b/v0.13.0/404.html @@ -1,5 +1,4 @@ - - + @@ -56,24 +55,25 @@ - - - +v0.12.0 + + + diff --git a/v0.13.0/CODE_OF_CONDUCT.html b/v0.13.0/CODE_OF_CONDUCT.html index 07ec1545bd..7963c60133 100644 --- a/v0.13.0/CODE_OF_CONDUCT.html +++ b/v0.13.0/CODE_OF_CONDUCT.html @@ -1,8 +1,22 @@ - -Contributor Covenant Code of Conduct • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -80,65 +100,80 @@
    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    • Demonstrating empathy and kindness toward other people
    • +
        +
      • Demonstrating empathy and kindness toward other people
      • Being respectful of differing opinions, viewpoints, and experiences
      • Giving and gracefully accepting constructive feedback
      • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
      • Focusing on what is best not just for us as individuals, but for the overall community
      • -

      Examples of unacceptable behavior include:

      -
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • +
      +

      Examples of unacceptable behavior include:

      +
        +
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • Trolling, insulting or derogatory comments, and personal or political attacks
      • Public or private harassment
      • Publishing others’ private information, such as a physical or email address, without their explicit permission
      • Other conduct which could reasonably be considered inappropriate in a professional setting
      • -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -146,17 +181,19 @@

    Attribution

    + + + + - - + + diff --git a/v0.13.0/CONTRIBUTING.html b/v0.13.0/CONTRIBUTING.html index d986dc2102..72fee2e79c 100644 --- a/v0.13.0/CONTRIBUTING.html +++ b/v0.13.0/CONTRIBUTING.html @@ -1,8 +1,22 @@ - -Contribution Guidelines • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -82,7 +102,8 @@

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -93,38 +114,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    Github Flow

    +

    Github Flow +

    This repository uses the Github Flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes

        Make sure your code

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR)

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -138,76 +168,93 @@

        Github Flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    -

    Coding guidelines

    +

    Coding guidelines +

    This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Dependency management

    +

    Dependency management +

    Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

    -

    Dependency version management

    +

    Dependency version management +

    If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    -
    • Minimum 5% of lines of code authored* (determined by git blame query) OR
    • +
        +
      • Minimum 5% of lines of code authored* (determined by git blame query) OR
      • Being at the top 5 contributors in terms of number of commits OR lines added OR lines removed*
      • -

      *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

      +
    +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + + + - - + + diff --git a/v0.13.0/LICENSE-text.html b/v0.13.0/LICENSE-text.html index d6eb703d67..300e43cd4f 100644 --- a/v0.13.0/LICENSE-text.html +++ b/v0.13.0/LICENSE-text.html @@ -1,8 +1,22 @@ - -License • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -92,17 +112,19 @@ limitations under the License. - + + + + - - + + diff --git a/v0.13.0/SECURITY.html b/v0.13.0/SECURITY.html index 01bc1d79e0..7f9f4d4172 100644 --- a/v0.13.0/SECURITY.html +++ b/v0.13.0/SECURITY.html @@ -1,8 +1,22 @@ - -Security Policy • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -80,38 +100,44 @@
    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    -
    • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
    • +
        +
      • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
      • Full paths of source file(s) related to the manifestation of the issue
      • The location of the affected source code (tag/branch/commit or direct URL)
      • Any special configuration required to reproduce the issue
      • Step-by-step instructions to reproduce the issue
      • Proof-of-concept or exploit code (if possible)
      • Impact of the issue, including how an attacker might exploit the issue
      • -

      This information will help us triage your report more quickly.

      +
    +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + + + - - + + diff --git a/v0.13.0/articles/adding-support-for-reporting.html b/v0.13.0/articles/adding-support-for-reporting.html index 6bc52b7235..bbfb06922c 100644 --- a/v0.13.0/articles/adding-support-for-reporting.html +++ b/v0.13.0/articles/adding-support-for-reporting.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.13.0/articles/creating-custom-modules.html b/v0.13.0/articles/creating-custom-modules.html index 8ba93b99b5..1eea0a3dc8 100644 --- a/v0.13.0/articles/creating-custom-modules.html +++ b/v0.13.0/articles/creating-custom-modules.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.13.0/articles/including-adam-data-in-teal.html b/v0.13.0/articles/including-adam-data-in-teal.html index bba3079fe1..3a9b901d2f 100644 --- a/v0.13.0/articles/including-adam-data-in-teal.html +++ b/v0.13.0/articles/including-adam-data-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.13.0/articles/including-general-data-in-teal.html b/v0.13.0/articles/including-general-data-in-teal.html index 0183bc2d95..98e39755a7 100644 --- a/v0.13.0/articles/including-general-data-in-teal.html +++ b/v0.13.0/articles/including-general-data-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.13.0/articles/including-mae-data-in-teal.html b/v0.13.0/articles/including-mae-data-in-teal.html index ace8b9041e..c04b432661 100644 --- a/v0.13.0/articles/including-mae-data-in-teal.html +++ b/v0.13.0/articles/including-mae-data-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.13.0/articles/index.html b/v0.13.0/articles/index.html index d0769bd4fe..258672ce34 100644 --- a/v0.13.0/articles/index.html +++ b/v0.13.0/articles/index.html @@ -1,8 +1,22 @@ - -Articles • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -80,36 +100,49 @@

    Articles

    -
    Getting Started with Teal
    +
    +
    Getting Started with Teal
    -
    Input general data in a teal application
    + +
    Input general data in a teal application
    -
    Input ADaM data in a teal application
    + +
    Input ADaM data in a teal application
    -
    Input MultiAssayExperiment data in a teal application
    + +
    Input MultiAssayExperiment data in a teal application
    -
    Pre-processing data
    + +
    Pre-processing data
    -
    Creating Custom Modules
    + +
    Creating Custom Modules
    -
    Adding support for Reporting to custom modules
    + +
    Adding support for Reporting to custom modules
    -
    Modifying a Teal application with R options
    + +
    Modifying a Teal application with R options
    -
    Teal and Bootstrap Themes
    + +
    Teal and Bootstrap Themes
    -
    - + +
    + + + + + - - + + diff --git a/v0.13.0/articles/preprocessing-data.html b/v0.13.0/articles/preprocessing-data.html index 7b078e4780..8c36c7e6e2 100644 --- a/v0.13.0/articles/preprocessing-data.html +++ b/v0.13.0/articles/preprocessing-data.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.13.0/articles/teal-bs-themes.html b/v0.13.0/articles/teal-bs-themes.html index d2c5b0feb2..9bfe06720f 100644 --- a/v0.13.0/articles/teal-bs-themes.html +++ b/v0.13.0/articles/teal-bs-themes.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.13.0/articles/teal-options.html b/v0.13.0/articles/teal-options.html index 272d795dba..78f1dc62af 100644 --- a/v0.13.0/articles/teal-options.html +++ b/v0.13.0/articles/teal-options.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.13.0/articles/teal.html b/v0.13.0/articles/teal.html index c48f11c6f9..f9b882fd6b 100644 --- a/v0.13.0/articles/teal.html +++ b/v0.13.0/articles/teal.html @@ -1,5 +1,4 @@ - - + @@ -58,24 +57,25 @@ - - - +v0.12.0 + + + diff --git a/v0.13.0/authors.html b/v0.13.0/authors.html index ac31b768ad..84a0031499 100644 --- a/v0.13.0/authors.html +++ b/v0.13.0/authors.html @@ -1,8 +1,22 @@ - -Authors and Citation • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -79,7 +99,8 @@

    Authors

    -
    • +
        +
      • Dawid Kaledkowski. Author, maintainer.

      • @@ -119,7 +140,8 @@

        Authors

        Maximilian Mordig. Contributor.

        -
    + +

    Citation

    @@ -137,17 +159,19 @@

    Citation

    }
    + + + + - - + + diff --git a/v0.13.0/index.html b/v0.13.0/index.html index d08ff5b392..1b2566e220 100644 --- a/v0.13.0/index.html +++ b/v0.13.0/index.html @@ -1,5 +1,4 @@ - - + @@ -64,24 +63,25 @@ - - - +v0.12.0 + + + diff --git a/v0.13.0/news/index.html b/v0.13.0/news/index.html index cc91888b6c..f0260d19c6 100644 --- a/v0.13.0/news/index.html +++ b/v0.13.0/news/index.html @@ -1,8 +1,22 @@ - -Changelog • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -78,78 +98,113 @@
    -

    teal 0.13.0

    +

    teal 0.13.0 +

    -

    Breaking changes

    -
    • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
    • +

      Breaking changes +

      +
        +
      • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
      • Due to deprecation of chunks in teal.code, the teal framework now uses their replacement (qenv) instead. The documentation in teal has been updated to reflect this and custom modules written with chunks should be updated to use qenv.
      • Due to deprecation of chunks in teal.code, get_rcode, get_rcode_srv, and get_rcode_ui have been removed.
      • -
    + +
    -

    New features

    -
    • Added the validate_inputs function that transfers input validation messages to app output.
    • +

      New features +

      +
        +
      • Added the validate_inputs function that transfers input validation messages to app output.
      • modules argument of init accepts teal_module type of object. There is no need to wrap up a single module in modules() or list().
      • Updated module_nested_tabs so that only active modules are calculated in a teal app.
      • -
    + +
    -

    Miscellaneous

    -
    • Updated examples to use scda.2022.
    • +

      Miscellaneous +

      +
        +
      • Updated examples to use scda.2022.
      • Added R session information into a link in the footer of teal applications.
      • Added data hashing step using rlang instead of digest package to calculate the hash (which has been moved from teal.data and teal.slice). There is now an explicit hashing check in the reproducible code output.
      • Removed deprecated functions: root_modules, default_filter, bookmarkableShinyApp, as well as deprecated logging mechanism, including the functions log_app_usage and .log.
      • Updated the “Teal and Bootstrap Themes” vignette to provide more details customizing a teal app with bslib::run_with_themer.
      • Removed outdated diagram from srv_nested_tabs documentation.
      • Changed default values of header and footer arguments in init to empty text.
      • -
    + +
    -

    teal 0.12.0

    -
    -

    New features

    -
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • -
    +

    teal 0.12.0 +

    +
    +

    New features +

    +
      +
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • +
    +
    -

    Enhancements

    -
    • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
    • +

      Enhancements +

      +
        +
      • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
      • Updated teal_module to have data argument which receives a list of reactive filter data with "code" and "join_keys" attributes.
      • Updated teal_module to have filter_panel_api argument which receives a FilterPanelAPI object.
      • Updated the internals of module_teal to reflect changes in teal.slice.
      • -
    + +
    -

    Breaking changes

    -
    • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
    • +

      Breaking changes +

      +
        +
      • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
      • Deprecated merge_expression argument in get_rcode_srv function and removed it in get_rcode function.
      • Deprecated session argument in get_rcode function.
      • -
    + +
    -

    Miscellaneous

    -
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • -
    +

    Miscellaneous +

    +
      +
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • +
    +
    -

    teal 0.11.1

    +

    teal 0.11.1 +

    -

    Enhancements

    -
    • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
    • +

      Enhancements +

      +
        +
      • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
      • Updated teal to support modules which include reporting. If any module which supports reporting is included then a reporter_previewer_module is included.
      • Added default arguments to module() and the server argument is now a function where the second argument can be ... or datasets.
      • -
    + +
    -

    Breaking changes

    -
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • -
    +

    Breaking changes +

    +
      +
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • +
    +
    -

    Miscellaneous

    -
    • Added a template to the pkgdown configuration.
    • +

      Miscellaneous +

      +
        +
      • Added a template to the pkgdown configuration.
      • Removed unneeded shinytest app tests.
      • Updated package authors.
      • Added package vignettes.
      • -
    + +
    -

    teal 0.11.0

    -
    +

    The teal package contains the code to create apps (teal::init), to create a module (teal::module) and to group modules in the app (teal::modules). teal depends on teal.transform and teal.data which contain the functions that teal app creators are likely to need. The other package teal only imports from and therefore teal module creators should either fully specify functions from these packages when required or import them into custom packages as library(teal) will not load them.

    +
    +

    New features +

    +
      +
    • A simple new teal module named example_module has been included in the package.
    • +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • teal package has been split into multiple smaller packages, see above.
      • Deprecated root_modules function, users should use modules directly inside init.
      • Due to deprecation of root_modules any label argument to modules must be explicitly named. For example modules("lab", mod1, mod2) should be replaced with modules(label = "lab", mod1, mod2).
      • -
    + +
    -

    Miscellaneous

    -
    • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
    • +

      Miscellaneous +

      +
        +
      • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
      • MultiAssayExperiment is now suggested packages, not required. Objects dependent on MultiAssayExperiment are changed to lazy-load this now suggested package.
      • -
    + +
    -

    Bug fixes

    -
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • -
    +

    Bug fixes +

    +
      +
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • +
    +
    -

    teal 0.10.1

    +

    teal 0.10.1 +

    -

    Breaking changes

    -
    • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
    • +

      Breaking changes +

      +
        +
      • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
      • Deprecated all functions related to connectors that have been moved to their own separate packages.
      • Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational.
      • Removed rcd_connection and rcd_data; scda_dataset_connectors can be passed into cdisc_data and teal_data directly.
      • Replaced rcd_dataset_connector and rcd_cdisc_dataset_connector with scda_dataset_connector and scda_cdisc_dataset_connector respectively.
      • Renamed teal_show_js_log option into teal.show_js_log to match options naming convention.
      • Removed %is_in% and stop_shiny internal utility functions.
      • -
    + +
    -

    New features

    +

    New features +

    -
    Logging
    -
    • Added support for logging using the logger package.
    • +
      Logging +
      +
        +
      • Added support for logging using the logger package.
      • Added a new function register_logger, which registers a logger in a given namespace.
      • Added trace and info levels log messages to the teal framework.
      • Added pid and shiny session token into footnote so app developers can identify logs for apps.
      • -
    + +
    -
    Other
    -
    • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

    • +
      Other +
      +
        +
      • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

      • Added public facing constructor functions for CDISCDataConnector, RelationalDataConnector, and DataConnection classes.

      • Modified data_extract_spec to allow both the filter and select parameters to be NULL, which results in the data_extract_ui acting as if a filter_spec with all variables as possible choices had been supplied as the filter argument and a select_spec with the multiple parameter set to TRUE had been supplied as the select argument.

      • Added support of the full screen for a module when the filters argument is equal NULL.

      • @@ -216,11 +294,14 @@
        Other -

        Bug fixes

        -
    + +
    -

    teal 0.10.0

    +

    teal 0.10.0 +

    -

    New features

    -
    • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
    • +

      New features +

      +
        +
      • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
      • Refactored filter panel to use MultiAssayExperiment objects. Filters can be set on a subject level (colData of MAE object) and on a experiment level (colData and rowData of an assay).
      • Added cdse_dataset_connector to create delayed data objects from CDSE.
      • Added datasetdb_dataset_connector to create delayed data objects from DataSetDB.
      • Added ricepass_connection to create delayed data objects from entimICE via ricepass.
      • Refactor of the filter panel: -
        • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
        • +
            +
          • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
          • Dataset type determines an appearance and a functionality of related filters and filters summary.
          • Datasets are passed (by reference) from DDL to FilteredData skipping extracting data and their attributes.
          • Redesigned variable filter labels in “Active Filter Variables” panel.
          • Fully testable server functions.
          • -
          -
    + + + +
    -

    Bug fixes

    -
    • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
    • +

      Bug fixes +

      +
        +
      • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
      • Fixed a bug that caused the output of get_code function to not reproduce its raw data set.
      • Changed filter_spec to allow no variable selection upon app initialization, where the first possible value was previously selected.
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal 0.9.5

    +

    teal 0.9.5 +

    -

    Enhancements

    -
    • Added informational stop message when using mutate_data with RelationalDataConnector.
    • +

      Enhancements +

      +
        +
      • Added informational stop message when using mutate_data with RelationalDataConnector.
      • Modified as_cdisc to behave similarly to cdisc_dataset when called on a Dataset object.
      • Changed the displayed format of the data name and the column name in data_extract_spec UI elements. Both are now compressed to <data name>.<column name> if they don’t change during runtime of the app.
      • Added ADSAFTTE to the list of recognized ADaM dataset names.
      • Added another example to data_extract_spec’s doc string showcasing app users can choose a variable used for filtering in the encoding panel.
      • Added CSS styling to tool tips in teal modules.
      • -
    + +
    -

    Bug fixes

    -
    • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
    • +

      Bug fixes +

      +
        +
      • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
      • Fixed a bug that crashes app whenever a Date or datetime column is selected from a filter_spec.
      • -
    + +
    -

    teal 0.9.4

    +

    teal 0.9.4 +

    -

    Enhancements

    -
    • Released snowflake connection and connectors.
    • +

      Enhancements +

      +
        +
      • Released snowflake connection and connectors.
      • Changed ordering of datasets to be more intuitive (topologically first for CDISC datasets only and then according to input datasets order).
      • When closing a teal app (ending a user shiny session), all DataConnections will now try to close their connections.
      • Added ADHY keys to configuration file.
      • Extended the filter_spec function: the parameter choices is no longer mandatory (the function will take all possible choices by default) and the vars parameter additionally accepts the choices_selected and allows to change the variables for filtering using the UI elements in the encoding panel.
      • -
    + +
    -

    Bug fixes

    -
    • Cleaned up imports in the package.
    • -
    • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
    • +

      Bug fixes +

      +
        +
      • Cleaned up imports in the package.
      • +
      • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
        +
      • Fixed issue with cloning Callable class.
      • -
    + +
    -

    teal 0.9.3

    +

    teal 0.9.3 +

    -

    New Features

    -
    • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
    • +

      New Features +

      +
        +
      • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
      • New JoinKeys class (with join_keys() constructors and join_key() constructor for its elements) to store joining key columns between datasets.
      • Refactored the most basic dataset() constructor, added cdisc_dataset() constructor and as_cdisc() conversion function.
      • Soft-deprecate removed class constructors and obsolete functions (e.g. keys()).
      • Added get_keys() and set_keys() functions to extract and manipulate datasets primary keys respectively.
      • Unexported filtered_data_new, filtered_data_set and filtered_data_set_filters.
      • -
    + +
    -

    Bug fixes

    -
    • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
    • +

      Bug fixes +

      +
        +
      • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
      • Added ability to press “Enter” key without having to set focus to the Submit button for delayed data loading.
      • Allow variable_choices to use datasets with missing labels.
      • Fixed bug that ignores input of NULL to selected argument of select_spec function.
      • -
    + +
    -

    Enhancements

    -
    • Added button to remove all active filters from the Filter Panel.
    • -
    +

    Enhancements +

    +
      +
    • Added button to remove all active filters from the Filter Panel.
    • +
    +
    -

    teal 0.9.2

    +

    teal 0.9.2 +

    -

    New Features

    -
    • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
    • +

      New Features +

      +
        +
      • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
      • NOTE: python_dataset_connector is not yet ready to be deployed on RSConnect because it does not contain numpy and pandas, which are Python libraries used in python_dataset_connector.
      • Added support for filtering on Date and Datetime variables in the Filter Panel.
      • Added buttons for date and datetime filter widgets to reset the value to the original.
      • Added new function check_key_duplicates, which creates a short summary about rows with duplicated primary key (row numbers and the number of duplicates)
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    • Removed include_factors option in get_class_colnames in RawDataset.
    • -
    +

    Miscellaneous +

    +
      +
    • Removed include_factors option in get_class_colnames in RawDataset.
    • +
    +
    -

    teal 0.9.1

    -
    • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
    • +

      teal 0.9.1 +

      +
        +
      • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
      • Nested tabs module now has better alignment with the filter panel on the page.
      • Allow width argument in optionalSelectInput.
      • Added lifecycle badges to all exported functions.
      • @@ -397,10 +534,13 @@

        teal 0.9.1 -

        teal 0.9.0

        -
        • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

        • +

          teal 0.9.0 +

          +
            +
          • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

          • A new teal_data function to include datasets and connectors into teal application.

          • cdisc_data function to include datasets and connectors into teal application where a check argument still could be used and other consistency tests are performed.

          • get_raw_data can be used to derive raw data from R6 objects e.g. (RelationalDataset).

          • @@ -421,91 +561,133 @@

            teal 0.9.0 -

            Refactor of FilteredData (for developers)

            -
            • +
            +
            +

            Refactor of FilteredData (for developers) +

            +
              +
            • FilteredData is now fully reactive. Now filtered data is lazy evaluated as per need. This further opens the door to bookmarking teal apps (bookmarking currently works for the right filtering panel, but we will make this feature more sophisticated in a future release, each module must be reviewed and adapted if it contains reactiveValues).
            • Datasets and materialized connectors are provided to FilteredData by set_datasets_data function located in init_datasets.R file.
            • Renamed get_dataset() method to get_data().
            • Renamed get_filter_call() method to get_filter_expr(); returns an expression rather than a list.
            • Removed argument isolate from get_data() method and similar methods. You must isolate it yourself as needed. If you want to temporarily deactivate Shiny errors due to missing errors, you can set options(shiny.suppressMissingContextError = TRUE). In general, avoid isolate as this breaks reactivity.
            • We added a development module to add several filters at once, e.g. safety filters. This is to be evaluated before it is converted into a proper module and made available to end-users.
            • -
            +

          +

    -

    teal 0.8.5

    -
    • UI bug fix to hide filter elements for not used datasets.
    • -
    +

    teal 0.8.5 +

    +
      +
    • UI bug fix to hide filter elements for not used datasets.
    • +
    +
    -

    teal 0.8.4

    -
    • Progress bar for ui creation in delayed loading module.
    • +

      teal 0.8.4 +

      +
        +
      • Progress bar for ui creation in delayed loading module.
      • Change output of keys function to keys object.
      • Delayed version of choices_selected.
      • Fix an error in choices_selected when selected is not in choices.
      • Fix pickerInput not to display column name as label if it’s missing.
      • -
    + +
    -

    teal 0.8.3

    -
    • Enable teal app to initialize without data. The data are then loaded from within the teal app.
    • +

      teal 0.8.3 +

      +
        +
      • Enable teal app to initialize without data. The data are then loaded from within the teal app.
      • New classes (DatasetConnector, DataConnector) to connect to various data sources, including: * connector to rice API - rice_data and rice_dataset_connector * connector to RDS files - rds_data and rds_dataset_connector
      • Message appears at bottom right of Shiny app when Shiny is busy to update the views.
      • Remove labels argument of cdisc_data function. Labels should now already be present in the data passed to the cdisc_data function. This can be achieved using the var_relabel function.
      • -
    + +
    -

    teal 0.8.2

    -
    • Fixed several BUGS in optionalSelectInput and improved inputs look.
    • +

      teal 0.8.2 +

      +
        +
      • Fixed several BUGS in optionalSelectInput and improved inputs look.
      • Added get_data_labels function to FilteredData class.
      • Improved sep passing within data_extract_spec.
      • -
    + +
    -

    teal 0.8.1

    -
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • -
    +

    teal 0.8.1 +

    +
      +
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • +
    +
    -

    teal 0.8.0

    -
    • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
    • +

      teal 0.8.0 +

      +
        +
      • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
      • Possibility to load custom .css and .js files.
      • Renamed columns_spec to select_spec.
      • Show number of observations on filter panel.
      • Add labeling functions variable_choices and value_choices.
      • -
    + +
    -

    teal 0.7.0

    -
    • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
    • +

      teal 0.7.0 +

      +
        +
      • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
      • Moved teal.utils functions to teal: log_app_usage, stop_shiny.
      • Added *_spec functions.
      • Improvements on usage of PickerInput and SelectInput.
      • -
    + +
    -

    teal 0.6.0

    -
    • Removed deprecated functions tab*.
    • +

      teal 0.6.0 +

      +
        +
      • Removed deprecated functions tab*.
      • Removed data generation functions including generate_sample_data.
      • Incorporate shinyjs package.
      • Added “Copy R code to clipboard” button.
      • -
    + +
    -

    teal 0.0.5

    -
    • Added limit to data_table with scrolling, preventing overlap of ui elements.
    • +

      teal 0.0.5 +

      +
        +
      • Added limit to data_table with scrolling, preventing overlap of ui elements.
      • Boolean filtering.
      • -
    + +
    -

    teal 0.0.4

    -
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • -
    +

    teal 0.0.4 +

    +
      +
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • +
    +
    -

    teal 0.0.3

    -
    • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
    • -
    -
    New features
    -
    • +

      teal 0.0.3 +

      +
        +
      • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
      • +
      +
      +
      New features +
      +
        +
      • tm_scatterplot module.
      • tm_table module.
      • -
      +
    +
    -
    Changes
    -
    • All tabs arguments were renamed to modules.
    • +
      Changes +
      +
        +
      • All tabs arguments were renamed to modules.
      • tab_item function is now called module.
      • @@ -518,29 +700,38 @@
        Changes -

        teal 0.0.2

        -
        • New ‘01_getting_started’ vignette.
        • +

          teal 0.0.2 +

          +
            +
          • New ‘01_getting_started’ vignette.
          • Datanames in FilteredData are now case sensitive.
          • -
    + +
    -

    teal 0.0.1

    -
    • March 28, 2016 - Initial Release.
    • -
    +

    teal 0.0.1 +

    +
      +
    • March 28, 2016 - Initial Release.
    • +
    + + + + + - - + + diff --git a/v0.13.0/pull_request_template.html b/v0.13.0/pull_request_template.html index b199405998..7a3635aa2c 100644 --- a/v0.13.0/pull_request_template.html +++ b/v0.13.0/pull_request_template.html @@ -1,8 +1,22 @@ - -Pull Request • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -83,17 +103,19 @@

    Fixes #nnn

    - + + + + - - + + diff --git a/v0.13.0/reference/append_module.html b/v0.13.0/reference/append_module.html index b8769053a8..a7a46f6b49 100644 --- a/v0.13.0/reference/append_module.html +++ b/v0.13.0/reference/append_module.html @@ -1,8 +1,24 @@ - -Function which appends a teal_module onto the children of a teal_modules object — append_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,39 +105,46 @@
    -

    Usage

    +

    Usage +

    append_module(modules, module)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    teal_modules

    module

    teal_module object to be appended onto the children of modules

    -
    + +
    -

    Value

    +

    Value +

    teal_modules object with module appended

    + + + + - - + + diff --git a/v0.13.0/reference/calculate_hashes.html b/v0.13.0/reference/calculate_hashes.html index 3b2dc7c9eb..53b973ae3d 100644 --- a/v0.13.0/reference/calculate_hashes.html +++ b/v0.13.0/reference/calculate_hashes.html @@ -1,8 +1,24 @@ - -Get the hash of a dataset — calculate_hashes • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,39 +105,46 @@
    -

    Usage

    +

    Usage +

    calculate_hashes(datanames, datasets)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets

    datasets

    (FilteredData) object holding the data

    -
    + +
    -

    Value

    +

    Value +

    A list of hashes per dataset

    + + + + - - + + diff --git a/v0.13.0/reference/dot-datasets_to_data.html b/v0.13.0/reference/dot-datasets_to_data.html index 41e1ddf4b7..522576961e 100644 --- a/v0.13.0/reference/dot-datasets_to_data.html +++ b/v0.13.0/reference/dot-datasets_to_data.html @@ -1,12 +1,28 @@ - - + + + + + +Convert FilteredData to reactive list of datasets of the tdata type. — .datasets_to_data • teal +Convert FilteredData to reactive list of datasets of the tdata type. — .datasets_to_data • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,13 +111,16 @@
    -

    Usage

    +

    Usage +

    .datasets_to_data(module, datasets, trigger_data = reactiveVal(1L))
    -

    Arguments

    -
    module
    +

    Arguments +

    +
    +
    module

    (teal_module) module where needed filters are taken from

    @@ -106,28 +131,35 @@

    Arguments -

    Value

    +

    Value +

    -

    list of reactive datasets with following attributes:

    • code (character) containing datasets reproducible code.

    • +

      list of reactive datasets with following attributes:

      +
        +
      • code (character) containing datasets reproducible code.

      • join_keys (JoinKeys) containing relationships between datasets.

      • metadata (list) containing metadata of datasets.

      • -
    + + + + + + - - + + diff --git a/v0.13.0/reference/example_module.html b/v0.13.0/reference/example_module.html index 5716941d90..642d5ef259 100644 --- a/v0.13.0/reference/example_module.html +++ b/v0.13.0/reference/example_module.html @@ -1,8 +1,24 @@ - -An example teal module — example_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,25 +105,31 @@
    -

    Usage

    +

    Usage +

    example_module(label = "example teal module")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    character, the label of the module

    -
    + +
    -

    Value

    +

    Value +

    A teal module which can be included in the modules argument to init().

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(
         dataset("IRIS", iris),
    @@ -115,17 +143,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/filter_calls_module.html b/v0.13.0/reference/filter_calls_module.html index 6677485768..eec3aa3a3a 100644 --- a/v0.13.0/reference/filter_calls_module.html +++ b/v0.13.0/reference/filter_calls_module.html @@ -1,12 +1,28 @@ - - + + + + + +Dummy module to show the filter calls generated by the right encoding panel — filter_calls_module • teal +Dummy module to show the filter calls generated by the right encoding panel — filter_calls_module • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,19 +111,24 @@
    -

    Usage

    +

    Usage +

    filter_calls_module(label = "Filter Calls Module")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    character label of module

    -
    + +
    -

    Examples

    +

    Examples +

    library(scda)
     #> 
     ADSL <- synthetic_cdisc_data("latest")$adsl
    @@ -126,17 +153,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/fold_lines.html b/v0.13.0/reference/fold_lines.html index 41b8f41ac0..750af728ef 100644 --- a/v0.13.0/reference/fold_lines.html +++ b/v0.13.0/reference/fold_lines.html @@ -1,10 +1,26 @@ - -Fixed line width folding — fold_lines • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,13 +108,16 @@
    -

    Usage

    +

    Usage +

    fold_lines(txt, width = 80, indent_from = NULL)
    -

    Arguments

    -
    txt
    +

    Arguments +

    +
    +
    txt

    (character) text to be adjusted

    @@ -103,20 +128,23 @@

    Arguments

    + + + + - - + + diff --git a/v0.13.0/reference/get_client_timezone.html b/v0.13.0/reference/get_client_timezone.html index f200f6d0c4..ce4f6505d1 100644 --- a/v0.13.0/reference/get_client_timezone.html +++ b/v0.13.0/reference/get_client_timezone.html @@ -1,12 +1,28 @@ - - + + + + + +Get Client Timezone — get_client_timezone • teal +Get Client Timezone — get_client_timezone • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,20 +111,25 @@
    -

    Usage

    +

    Usage +

    get_client_timezone(ns)
    -

    Arguments

    -
    ns
    +

    Arguments +

    +
    +
    ns

    (function) namespace function passed from the session object in the Shiny server. For Shiny modules this will allow for proper name spacing of the registered input.

    -
    + +
    -

    Value

    +

    Value +

    (Shiny) input variable accessible with input$tz which is a (character) @@ -110,17 +137,19 @@

    Value

    + + + + - - + + diff --git a/v0.13.0/reference/get_code_tdata.html b/v0.13.0/reference/get_code_tdata.html index 6646520d13..fa1c5bc870 100644 --- a/v0.13.0/reference/get_code_tdata.html +++ b/v0.13.0/reference/get_code_tdata.html @@ -1,12 +1,28 @@ - -Wrapper for get_code.tdata -This wrapper is to be used by downstream packages to extract the code of a tdata object — get_code_tdata • teal + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,35 +111,42 @@
    -

    Usage

    +

    Usage +

    get_code_tdata(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    (character) code used in the tdata object.

    + + + + - - + + diff --git a/v0.13.0/reference/get_datasets_code.html b/v0.13.0/reference/get_datasets_code.html index bb8773fd94..76fd9220a9 100644 --- a/v0.13.0/reference/get_datasets_code.html +++ b/v0.13.0/reference/get_datasets_code.html @@ -1,8 +1,24 @@ - -Get datasets code — get_datasets_code • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,13 +105,16 @@
    -

    Usage

    +

    Usage +

    get_datasets_code(datanames, datasets, hashes)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets to extract code from

    @@ -100,27 +125,34 @@

    Arguments -

    Value

    +

    Value +

    -

    character(3) containing following elements:

    • code from CodeClass (data loading code)

    • +

      character(3) containing following elements:

      +
        +
      • code from CodeClass (data loading code)

      • hash check of loaded objects

      • -
    + + + + + + - - + + diff --git a/v0.13.0/reference/get_dummy_cdisc_data.html b/v0.13.0/reference/get_dummy_cdisc_data.html index 64ae551a88..c1a7721167 100644 --- a/v0.13.0/reference/get_dummy_cdisc_data.html +++ b/v0.13.0/reference/get_dummy_cdisc_data.html @@ -1,10 +1,26 @@ - -Get dummy CDISC data — get_dummy_cdisc_data • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,12 +108,14 @@
    -

    Usage

    +

    Usage +

    get_dummy_cdisc_data()
    -

    Value

    +

    Value +

    cdisc_data

    @@ -100,17 +124,19 @@

    Value

    + + + + - - + + diff --git a/v0.13.0/reference/get_dummy_datasets.html b/v0.13.0/reference/get_dummy_datasets.html index 771538d4c1..78a251ccff 100644 --- a/v0.13.0/reference/get_dummy_datasets.html +++ b/v0.13.0/reference/get_dummy_datasets.html @@ -1,8 +1,24 @@ - -Get a dummy datasets object with ADSL data, useful in the examples — get_dummy_datasets • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,29 +105,33 @@
    -

    Usage

    +

    Usage +

    get_dummy_datasets()
    -

    Value

    +

    Value +

    FilteredData with ADSL set

    + + + + - - + + diff --git a/v0.13.0/reference/get_dummy_filter.html b/v0.13.0/reference/get_dummy_filter.html index 625231fe5d..48aed9952c 100644 --- a/v0.13.0/reference/get_dummy_filter.html +++ b/v0.13.0/reference/get_dummy_filter.html @@ -1,8 +1,24 @@ - -Get dummy filter states to apply initially — get_dummy_filter • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,35 +105,42 @@
    -

    Usage

    +

    Usage +

    get_dummy_filter(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (TealData)

    -
    + +
    -

    Value

    +

    Value +

    dummy filter states

    + + + + - - + + diff --git a/v0.13.0/reference/get_dummy_modules.html b/v0.13.0/reference/get_dummy_modules.html index a829581dd1..a18650a8c3 100644 --- a/v0.13.0/reference/get_dummy_modules.html +++ b/v0.13.0/reference/get_dummy_modules.html @@ -1,10 +1,26 @@ - -Get dummy modules — get_dummy_modules • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,12 +108,14 @@
    -

    Usage

    +

    Usage +

    get_dummy_modules()
    -

    Value

    +

    Value +

    teal_modules

    @@ -100,17 +124,19 @@

    Value

    + + + + - - + + diff --git a/v0.13.0/reference/get_join_keys.html b/v0.13.0/reference/get_join_keys.html index 92dc479000..ece914f20b 100644 --- a/v0.13.0/reference/get_join_keys.html +++ b/v0.13.0/reference/get_join_keys.html @@ -1,8 +1,24 @@ - -Function to get join keys from a tdata object — get_join_keys • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,7 +105,8 @@
    -

    Usage

    +

    Usage +

    get_join_keys(data)
     
     # S3 method for tdata
    @@ -94,30 +117,36 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    tdata - object to extract the join keys

    -
    + +
    -

    Value

    +

    Value +

    Either JoinKeys object or NULL if no join keys

    + + + + - - + + diff --git a/v0.13.0/reference/get_metadata.html b/v0.13.0/reference/get_metadata.html index c1f779b127..03fa529725 100644 --- a/v0.13.0/reference/get_metadata.html +++ b/v0.13.0/reference/get_metadata.html @@ -1,8 +1,24 @@ - -Function to get metadata from a tdata object — get_metadata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,7 +105,8 @@
    -

    Usage

    +

    Usage +

    get_metadata(data, dataname)
     
     # S3 method for tdata
    @@ -94,34 +117,40 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    tdata - object to extract the data from

    dataname

    character(1) the dataset name whose metadata is requested

    -
    + +
    -

    Value

    +

    Value +

    Either list of metadata or NULL if no metadata

    + + + + - - + + diff --git a/v0.13.0/reference/get_rcode.html b/v0.13.0/reference/get_rcode.html index 49eb34cdee..8f575737f3 100644 --- a/v0.13.0/reference/get_rcode.html +++ b/v0.13.0/reference/get_rcode.html @@ -1,20 +1,36 @@ - - + + + + + +Returns R Code from a teal module — get_rcode • teal +Returns R Code from a teal module — get_rcode • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + + - + @@ -101,7 +123,8 @@
    -

    Usage

    +

    Usage +

    get_rcode(
       datasets = NULL,
       datanames = if (is.null(datasets)) datasets else datasets$datanames(),
    @@ -114,8 +137,10 @@ 

    Usage

    -

    Arguments

    -
    datasets
    +

    Arguments +

    +
    +
    datasets

    (list) list of FilteredData available inside the server function of any teal module.

    @@ -155,9 +180,11 @@

    Arguments -

    Value

    +

    Value +

    Return the R Code needed to reproduce a teal module. The get_rcode_header() part allows @@ -168,17 +195,20 @@

    Value

    -

    Note

    +

    Note +

    The teal.load_nest_code option is being used to customize the code that sets correct library paths with all packages available. If empty (the default), a placeholder string is being used.

    -

    References

    +

    References +

    show_rcode_modal(), get_rcode_header()

    -

    Examples

    +

    Examples +

    if (FALSE) {
     show_rcode_modal(
       title = "R Code for a Regression Plot",
    @@ -192,17 +222,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/get_rcode_header.html b/v0.13.0/reference/get_rcode_header.html index e73866c623..702b5d090f 100644 --- a/v0.13.0/reference/get_rcode_header.html +++ b/v0.13.0/reference/get_rcode_header.html @@ -1,8 +1,24 @@ - -Generates header text for analysis items — get_rcode_header • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,13 +105,16 @@
    -

    Usage

    +

    Usage +

    get_rcode_header(title = NULL, description = NULL)
    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    A character title of the module

    @@ -97,30 +122,35 @@

    Arguments -

    Value

    +

    Value +

    A character string for the header text

    -

    Author

    +

    Author +

    Sebastian Wolf

    + + + + - - + + diff --git a/v0.13.0/reference/get_rcode_libraries.html b/v0.13.0/reference/get_rcode_libraries.html index 4884edd40e..d36dbb9f4e 100644 --- a/v0.13.0/reference/get_rcode_libraries.html +++ b/v0.13.0/reference/get_rcode_libraries.html @@ -1,8 +1,24 @@ - -Generates library calls from current session info — get_rcode_libraries • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,29 +105,33 @@
    -

    Usage

    +

    Usage +

    get_rcode_libraries()
    -

    Value

    +

    Value +

    Character object contain code

    + + + + - - + + diff --git a/v0.13.0/reference/get_rcode_srv.html b/v0.13.0/reference/get_rcode_srv.html index c60b3a1fef..57935c732f 100644 --- a/v0.13.0/reference/get_rcode_srv.html +++ b/v0.13.0/reference/get_rcode_srv.html @@ -1,8 +1,24 @@ - -Server part of get R code module — get_rcode_srv • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,7 +105,8 @@
    -

    Usage

    +

    Usage +

    get_rcode_srv(
       id,
       datasets,
    @@ -95,8 +118,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    An ID string that corresponds with the ID used to call the module's UI function.

    @@ -126,20 +151,23 @@

    Arguments

    + +
    + + - - + + diff --git a/v0.13.0/reference/get_rcode_ui.html b/v0.13.0/reference/get_rcode_ui.html index 4c0f43491c..a06b239dec 100644 --- a/v0.13.0/reference/get_rcode_ui.html +++ b/v0.13.0/reference/get_rcode_ui.html @@ -1,8 +1,24 @@ - -Ui part of get R code module — get_rcode_ui • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,35 +105,42 @@
    -

    Usage

    +

    Usage +

    get_rcode_ui(id)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character) id of shiny module

    -
    + +
    -

    Value

    +

    Value +

    (shiny.tag)

    + + + + - - + + diff --git a/v0.13.0/reference/get_teal_bs_theme.html b/v0.13.0/reference/get_teal_bs_theme.html index ccc80f6f59..a6255aab2e 100644 --- a/v0.13.0/reference/get_teal_bs_theme.html +++ b/v0.13.0/reference/get_teal_bs_theme.html @@ -1,8 +1,24 @@ - -Resolve the expected bootstrap theme — get_teal_bs_theme • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,22 +105,25 @@
    -

    Usage

    +

    Usage +

    get_teal_bs_theme()
    - + + + + - - + + diff --git a/v0.13.0/reference/include_css_files.html b/v0.13.0/reference/include_css_files.html index 56df8e2b87..091509637b 100644 --- a/v0.13.0/reference/include_css_files.html +++ b/v0.13.0/reference/include_css_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,35 +111,42 @@
    -

    Usage

    +

    Usage +

    include_css_files(pattern = "*")
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes CSS files

    + + + + - - + + diff --git a/v0.13.0/reference/include_js_files.html b/v0.13.0/reference/include_js_files.html index 00bae91bf0..6a5869440f 100644 --- a/v0.13.0/reference/include_js_files.html +++ b/v0.13.0/reference/include_js_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include JS files from /inst/js/ package directory to application header — include_js_files • teal +Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,39 +111,46 @@
    -

    Usage

    +

    Usage +

    include_js_files(pattern = NULL, except = NULL)
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included, passed to system.file

    except

    (character) vector of basename filenames to be excluded

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes JS files

    + + + + - - + + diff --git a/v0.13.0/reference/include_teal_css_js.html b/v0.13.0/reference/include_teal_css_js.html index 261a83ac07..09afa2e05e 100644 --- a/v0.13.0/reference/include_teal_css_js.html +++ b/v0.13.0/reference/include_teal_css_js.html @@ -1,16 +1,32 @@ - - + + + + + +Code to include teal CSS and Javascript files — include_teal_css_js • teal +Code to include teal CSS and Javascript files — include_teal_css_js • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + + - + @@ -95,19 +117,22 @@
    -

    Usage

    +

    Usage +

    include_teal_css_js()
    -

    Value

    +

    Value +

    HTML code to include

    -

    Examples

    +

    Examples +

    shiny_ui <- tagList(
       teal:::include_teal_css_js(),
       p("Hello")
    @@ -115,17 +140,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/index.html b/v0.13.0/reference/index.html index 60d1106d53..0d0f7f9a7c 100644 --- a/v0.13.0/reference/index.html +++ b/v0.13.0/reference/index.html @@ -1,8 +1,22 @@ - -Function reference • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + + - + @@ -77,207 +97,277 @@
    -

    Teal Core Functions

    +

    Teal Core Functions +

    -

    These are the main functions needed to build a teal app.

    +

    +

    These are the main functions needed to build a teal app.

    -
    +
    +
    -
    +
    +
    init()
    Create the Server and UI Function For the Shiny App
    -
    +
    +
    +
    module() toString(<teal_module>) print(<teal_module>)
    Creates a teal_module object.
    -
    +
    +
    +
    modules() toString(<teal_modules>) print(<teal_modules>)
    Creates a teal_modules object.
    -
    +
    +
    +
    srv_teal_with_splash()
    Server function that loads the data through reactive loading and then delegates to srv_teal().
    -
    +
    +
    +
    ui_teal_with_splash()
    -
    UI to show a splash screen in the beginning, then delegate to srv_teal()
    -
    -

    Example module

    +
    UI to show a splash screen in the beginning, then delegate to srv_teal() +
    + +
    +
    +

    Example module +

    -

    A simple example teal module

    +

    +

    A simple example teal module

    -
    +
    +
    -
    +
    +
    example_module()
    An example teal module
    -
    -

    Report previewer module

    + +
    +
    +

    Report previewer module +

    -
    +
    +
    -
    +
    +
    reporter_previewer_module()
    Create a teal module for previewing a report
    -
    -

    Functions for module developers

    + +
    +
    +

    Functions for module developers +

    -
    +
    +
    -
    +
    +
    new_tdata() get_code(<tdata>)
    Create a tdata Object
    -
    +
    +
    +
    get_code_tdata()
    Wrapper for get_code.tdata This wrapper is to be used by downstream packages to extract the code of a tdata object
    -
    +
    +
    +
    get_join_keys()
    Function to get join keys from a tdata object
    -
    +
    +
    +
    get_metadata()
    Function to get metadata from a tdata object
    -
    +
    +
    +
    tdata2env()
    Function to convert a tdata object to an environment Any reactives inside tdata are first evaluated
    -
    +
    +
    +
    show_rcode_modal()
    Show R Code Modal
    -
    -

    Validation functions

    + +
    +
    +

    Validation functions +

    -
    +
    +
    -
    +
    +
    validate_has_data()
    Validate that dataset has a minimum number of observations
    -
    +
    +
    +
    validate_has_elements()
    Validates that vector has length greater than 0
    -
    +
    +
    +
    validate_has_variable()
    Validates that dataset contains specific variable
    -
    +
    +
    +
    validate_in()
    Validates that vector includes all expected values
    -
    +
    +
    +
    validate_inputs()
    Send input validation messages to output.
    -
    +
    +
    +
    validate_n_levels()
    Validate that variables has expected number of levels
    -
    +
    +
    +
    validate_no_intersection()
    Validates no intersection between two vectors
    -
    +
    +
    +
    validate_one_row_per_id()
    Validate that dataset has unique rows for key variables
    -
    -

    Deprecated functions

    + +
    +
    +

    Deprecated functions +

    -
    +
    +
    -
    +
    +
    get_rcode()
    Returns R Code from a teal module
    -
    +
    +
    +
    get_rcode_srv()
    Server part of get R code module
    -
    +
    +
    +
    get_rcode_ui()
    Ui part of get R code module
    -
    + + + + + + - - + + diff --git a/v0.13.0/reference/init.html b/v0.13.0/reference/init.html index 91402a6404..5c46da3ed3 100644 --- a/v0.13.0/reference/init.html +++ b/v0.13.0/reference/init.html @@ -1,18 +1,34 @@ - - + + + + + +Create the Server and UI Function For the Shiny App — init • teal +Create the Server and UI Function For the Shiny App — init • teal + + + + + + + + + + Skip to contents @@ -28,7 +44,8 @@ + + + - + @@ -98,7 +120,8 @@
    -

    Usage

    +

    Usage +

    init(
       data,
       modules,
    @@ -111,8 +134,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (TealData or TealDataset or TealDatasetConnector or list or data.frame or MultiAssayExperiment)
    R6 object as returned by teal.data::cdisc_data(), teal.data::teal_data(), teal.data::cdisc_dataset(), teal.data::dataset(), teal.data::dataset_connector() or @@ -137,27 +162,46 @@

    Arguments
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
    +

    +
    +
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
          <dataname2> = list(...),
          ...)
    -

    +
    +

    +

    For example, filters for variable Sepal.Length in iris can be specified as follows:

    -

    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
    +

    +
    +
    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
     # or
    -list(iris = list(Sepal.Length = c(5.0, 7.0)))

    +list(iris = list(Sepal.Length = c(5.0, 7.0)))
    +

    +

    In case developer would like to include NA and Inf values in the filtered dataset.

    -

    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    -list(Species = c(c(5.0, 7.0), NA, Inf))

    +

    +
    +
    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    +list(Species = c(c(5.0, 7.0), NA, Inf))
    +

    +

    To initialize with specific variable filter with all values on start, one can use

    -

    list(Species = list())

    -

    filter should be set with respect to the class of the column:

    • numeric: selected should be a two elements vector defining the range +

      +
      +
      list(Species = list())
      +

      +
      +

      filter should be set with respect to the class of the column:

      +
        +
      • numeric: selected should be a two elements vector defining the range of the filter.

      • Date: selected should be a two elements vector defining the date-range of the filter

      • @@ -169,7 +213,10 @@

        Arguments
        list(
        +

      +

      +
      +
      list(
         <MAE dataname> = list(
           subjects = list(<column in colData> = ..., <column in colData> = ...),
           <experiment name> = list(
      @@ -179,9 +226,12 @@ 

      Arguments <column in colData of experiment> = ...) ) ) -)

      +)
      +

      +

    By adding the filterable attribute it is possible to control which variables can be filtered for each -dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

    +dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

    +
    header
    @@ -203,16 +253,19 @@

    Argumentsui_teal_with_splash() is then preferred to this function.

    - + +
    -

    Value

    +

    Value +

    named list with server and ui function

    -

    Examples

    +

    Examples +

    library(scda)
     
     ADSL <- synthetic_cdisc_data("latest")$adsl
    @@ -256,17 +309,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/is_arg_used.html b/v0.13.0/reference/is_arg_used.html index 98651de922..54bd30bd7a 100644 --- a/v0.13.0/reference/is_arg_used.html +++ b/v0.13.0/reference/is_arg_used.html @@ -1,8 +1,24 @@ - -Does the object make use of the arg — is_arg_used • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - +
    @@ -83,7 +106,8 @@
    -

    Usage

    +

    Usage +

    is_arg_used(modules, arg)
     
     # S3 method for default
    @@ -100,17 +124,21 @@ 

    Usage

    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_module or teal_modules) object

    arg

    (character(1)) names of the arguments to be checked against formals of teal modules.

    -
    + +
    -

    Value

    +

    Value +

    logical whether the object makes use of arg

    @@ -119,17 +147,19 @@

    Value

    + +
    + + - - + + diff --git a/v0.13.0/reference/module.html b/v0.13.0/reference/module.html index 1430192810..8274c642bd 100644 --- a/v0.13.0/reference/module.html +++ b/v0.13.0/reference/module.html @@ -1,10 +1,26 @@ - -Creates a teal_module object. — module • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,7 +108,8 @@
    -

    Usage

    +

    Usage +

    module(
       label = "module",
       server = function(id, ...) {
    @@ -111,28 +134,38 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module.

    server
    -

    (function) shiny module with following arguments:

    • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

    • +
      +

      (function) shiny module with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

      • input, output, session - (not recommended) then shiny::callModule() will be used to call a module.

      • data (optional) module will receive a tdata object, a list of reactive (filtered) data specified in the filters argument.

      • datasets (optional) module will receive FilteredData. (See [teal.slice::FilteredData]).

      • reporter (optional) module will receive Reporter. (See teal.reporter::Reporter).

      • ... (optional) server_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    ui
    -

    (function) Shiny ui module function with following arguments:

    • id - teal will set proper shiny namespace for this module.

    • +
      +

      (function) Shiny ui module function with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module.

      • data (optional) module will receive list of reactive (filtered) data specified in the filters argument.

      • datasets (optional) module will receive FilteredData. (See [teal.slice::FilteredData]).

      • ... (optional) ui_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    filters
    @@ -164,16 +197,19 @@

    Arguments -

    Value

    +

    Value +

    object of class teal_module.

    -

    Examples

    +

    Examples +

    library(shiny)
     
     app <- init(
    @@ -202,17 +238,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/modules.html b/v0.13.0/reference/modules.html index 39d99e6137..2b252bc2bc 100644 --- a/v0.13.0/reference/modules.html +++ b/v0.13.0/reference/modules.html @@ -1,16 +1,32 @@ - - + + + + + +Creates a teal_modules object. — modules • teal +Creates a teal_modules object. — modules • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + + - + @@ -95,7 +117,8 @@
    -

    Usage

    +

    Usage +

    modules(..., label = "root")
     
     # S3 method for teal_modules
    @@ -106,8 +129,10 @@ 

    Usage

    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    parameters passed to toString

    @@ -125,19 +150,25 @@

    Arguments -

    Value

    +

    Value +

    -

    object of class teal_modules. Object contains following fields

    • label: taken from the label argument

    • +

      object of class teal_modules. Object contains following fields

      +
        +
      • label: taken from the label argument

      • children: a list containing objects passed in .... List elements are named after their label attribute converted to a valid shiny id.

      • -

      (character)

      +
    +

    (character)

    -

    Examples

    +

    Examples +

    library(shiny)
     
     app <- init(
    @@ -187,17 +218,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/modules_depth.html b/v0.13.0/reference/modules_depth.html index c6277f0a44..53be03de50 100644 --- a/v0.13.0/reference/modules_depth.html +++ b/v0.13.0/reference/modules_depth.html @@ -1,10 +1,26 @@ - -Get module depth — modules_depth • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,13 +108,16 @@
    -

    Usage

    +

    Usage +

    modules_depth(modules, depth = 0L)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (list, teal_modules or teal_module)
    nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -103,16 +128,19 @@

    Arguments -

    Value

    +

    Value +

    depth level for given module

    -

    Examples

    +

    Examples +

    mods <- modules(
       label = "d1",
       modules(
    @@ -138,17 +166,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/pad.html b/v0.13.0/reference/pad.html index da9679f53c..ed6dbd2f96 100644 --- a/v0.13.0/reference/pad.html +++ b/v0.13.0/reference/pad.html @@ -1,10 +1,26 @@ - -Pads a string — pad • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,13 +108,16 @@
    -

    Usage

    +

    Usage +

    pad(str, pre = NULL, post = "")
    -

    Arguments

    -
    str
    +

    Arguments +

    +
    +
    str

    (character) vector of lines to be padded

    @@ -103,20 +128,23 @@

    Arguments

    + + + + - - + + diff --git a/v0.13.0/reference/reexports.html b/v0.13.0/reference/reexports.html index 53492ef04f..e8fe5bd6ce 100644 --- a/v0.13.0/reference/reexports.html +++ b/v0.13.0/reference/reexports.html @@ -1,22 +1,38 @@ - - + + + + + +Objects exported from other packages — reexports • teal +Objects exported from other packages — reexports • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + + + - + @@ -95,25 +117,29 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    magrittr
    +
    +
    magrittr

    %>%

    -
    + + - + + + + - - + + diff --git a/v0.13.0/reference/reporter_previewer_module.html b/v0.13.0/reference/reporter_previewer_module.html index f3ef7920c3..f118034ca4 100644 --- a/v0.13.0/reference/reporter_previewer_module.html +++ b/v0.13.0/reference/reporter_previewer_module.html @@ -1,20 +1,36 @@ - - + + + + + +Create a teal module for previewing a report — reporter_previewer_module • teal +Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + + - + @@ -101,35 +123,42 @@
    -

    Usage

    +

    Usage +

    reporter_previewer_module(label = "Report previewer")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module.

    -
    + +
    -

    Value

    +

    Value +

    teal_module containing the teal.reporter previewer functionality

    + + + + - - + + diff --git a/v0.13.0/reference/run_js_files.html b/v0.13.0/reference/run_js_files.html index cbdc42e8d4..ab319dd8c7 100644 --- a/v0.13.0/reference/run_js_files.html +++ b/v0.13.0/reference/run_js_files.html @@ -1,14 +1,30 @@ - - + + + + + +Run JS file from /inst/js/ package directory — run_js_files • teal +Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + + - + @@ -92,35 +114,42 @@
    -

    Usage

    +

    Usage +

    run_js_files(files)
    -

    Arguments

    -
    files
    +

    Arguments +

    +
    +
    files

    (character) vector of filenames

    -
    + +
    -

    Details

    +

    Details +

    system.file should not be used to access files in other packages, it does not work with devtools. Therefore, we redefine this method in each package as needed. Thus, we do not export this method

    + + + + - - + + diff --git a/v0.13.0/reference/show_rcode_modal.html b/v0.13.0/reference/show_rcode_modal.html index 62fbf4f523..a10ec7993f 100644 --- a/v0.13.0/reference/show_rcode_modal.html +++ b/v0.13.0/reference/show_rcode_modal.html @@ -1,10 +1,26 @@ - -Show R Code Modal — show_rcode_modal • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,13 +108,16 @@
    -

    Usage

    +

    Usage +

    show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())
    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1))
    Title of the modal, displayed in the first comment of the R-code.

    @@ -106,24 +131,28 @@

    Argumentsshiny::getDefaultReactiveDomain() is used.

    -

    + +
    -

    References

    +

    References +

    shiny::showModal() teal.code::get_code()

    + + + + - - + + diff --git a/v0.13.0/reference/srv_nested_tabs.html b/v0.13.0/reference/srv_nested_tabs.html index 3aa75df870..8d8e9b2736 100644 --- a/v0.13.0/reference/srv_nested_tabs.html +++ b/v0.13.0/reference/srv_nested_tabs.html @@ -1,8 +1,24 @@ - -Server function that returns currently active module — srv_nested_tabs • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,7 +105,8 @@
    -

    Usage

    +

    Usage +

    srv_nested_tabs(
       id,
       datasets,
    @@ -117,8 +140,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character)
    module id to embed it, if provided, the server function must be called with shiny::moduleServer(); @@ -141,32 +166,37 @@

    Arguments -

    Value

    +

    Value +

    reactive which returns the active module that corresponds to the selected tab

    -

    Details

    +

    Details +

    This module calls recursively all elements of the modules returns one which is currently active.
    teal_module returns self as a active module. teal_modules also returns module active within self which is determined by the input$active_tab.

    + + + + - - + + diff --git a/v0.13.0/reference/srv_tabs_with_filters.html b/v0.13.0/reference/srv_tabs_with_filters.html index 136b18d338..7682942d07 100644 --- a/v0.13.0/reference/srv_tabs_with_filters.html +++ b/v0.13.0/reference/srv_tabs_with_filters.html @@ -1,8 +1,24 @@ - -Server function — srv_tabs_with_filters • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,7 +105,8 @@
    -

    Usage

    +

    Usage +

    srv_tabs_with_filters(
       id,
       datasets,
    @@ -94,8 +117,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character)
    module id to embed it, if provided, the server function must be called with shiny::moduleServer(); @@ -120,27 +145,46 @@

    Arguments
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
    +

    +
    +
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
          <dataname2> = list(...),
          ...)
    -

    +
    +

    +

    For example, filters for variable Sepal.Length in iris can be specified as follows:

    -

    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
    +

    +
    +
    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
     # or
    -list(iris = list(Sepal.Length = c(5.0, 7.0)))

    +list(iris = list(Sepal.Length = c(5.0, 7.0)))
    +

    +

    In case developer would like to include NA and Inf values in the filtered dataset.

    -

    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    -list(Species = c(c(5.0, 7.0), NA, Inf))

    +

    +
    +
    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    +list(Species = c(c(5.0, 7.0), NA, Inf))
    +

    +

    To initialize with specific variable filter with all values on start, one can use

    -

    list(Species = list())

    -

    filter should be set with respect to the class of the column:

    • numeric: selected should be a two elements vector defining the range +

      +
      +
      list(Species = list())
      +

      +
      +

      filter should be set with respect to the class of the column:

      +
        +
      • numeric: selected should be a two elements vector defining the range of the filter.

      • Date: selected should be a two elements vector defining the date-range of the filter

      • @@ -152,7 +196,10 @@

        Arguments
        list(
        +

      +

      +
      +
      list(
         <MAE dataname> = list(
           subjects = list(<column in colData> = ..., <column in colData> = ...),
           <experiment name> = list(
      @@ -162,30 +209,37 @@ 

      Arguments <column in colData of experiment> = ...) ) ) -)

      +)
      +

      +

    By adding the filterable attribute it is possible to control which variables can be filtered for each -dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

    +dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

    + - + +
    -

    Value

    +

    Value +

    reactive currently selected active_module

    + + + + - - + + diff --git a/v0.13.0/reference/srv_teal.html b/v0.13.0/reference/srv_teal.html index 511efd54be..ce00d03964 100644 --- a/v0.13.0/reference/srv_teal.html +++ b/v0.13.0/reference/srv_teal.html @@ -1,20 +1,36 @@ - - + + + + + +Server function corresponding to teal — srv_teal • teal +Server function corresponding to teal — srv_teal • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + + - + @@ -101,13 +123,16 @@
    -

    Usage

    +

    Usage +

    srv_teal(id, modules, raw_data, filter = list())
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character)
    module id to embed it, if provided, the server function must be called with shiny::moduleServer(); @@ -129,27 +154,46 @@

    Arguments
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
    +

    +
    +
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
          <dataname2> = list(...),
          ...)
    -

    +
    +

    +

    For example, filters for variable Sepal.Length in iris can be specified as follows:

    -

    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
    +

    +
    +
    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
     # or
    -list(iris = list(Sepal.Length = c(5.0, 7.0)))

    +list(iris = list(Sepal.Length = c(5.0, 7.0)))
    +

    +

    In case developer would like to include NA and Inf values in the filtered dataset.

    -

    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    -list(Species = c(c(5.0, 7.0), NA, Inf))

    +

    +
    +
    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    +list(Species = c(c(5.0, 7.0), NA, Inf))
    +

    +

    To initialize with specific variable filter with all values on start, one can use

    -

    list(Species = list())

    -

    filter should be set with respect to the class of the column:

    • numeric: selected should be a two elements vector defining the range +

      +
      +
      list(Species = list())
      +

      +
      +

      filter should be set with respect to the class of the column:

      +
        +
      • numeric: selected should be a two elements vector defining the range of the filter.

      • Date: selected should be a two elements vector defining the date-range of the filter

      • @@ -161,7 +205,10 @@

        Arguments
        list(
        +

      +

      +
      +
      list(
         <MAE dataname> = list(
           subjects = list(<column in colData> = ..., <column in colData> = ...),
           <experiment name> = list(
      @@ -171,34 +218,42 @@ 

      Arguments <column in colData of experiment> = ...) ) ) -)

      +)
      +

      +

      By adding the filterable attribute it is possible to control which variables can be filtered for each -dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

      +dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

      + - + +
      -

      Value

      +

      Value +

      reactive which returns the currently active module

      -

      Details

      +

      Details +

      For more doc, see ui_teal().

      + + + + - - + + diff --git a/v0.13.0/reference/srv_teal_with_splash.html b/v0.13.0/reference/srv_teal_with_splash.html index 6ced81b8a6..89df0fcf5c 100644 --- a/v0.13.0/reference/srv_teal_with_splash.html +++ b/v0.13.0/reference/srv_teal_with_splash.html @@ -1,12 +1,28 @@ - -Server function that loads the data through reactive loading and then delegates -to srv_teal(). — srv_teal_with_splash • teal + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ +
    • +
    + - + @@ -89,13 +111,16 @@
    -

    Usage

    +

    Usage +

    srv_teal_with_splash(id, data, modules, filter = list())
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character)
    module id to embed it, if provided, the server function must be called with shiny::moduleServer(); @@ -121,27 +146,46 @@

    Arguments
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
    +

    +
    +
    list(<dataname1> = list(<varname1> = ..., <varname2> = ...),
          <dataname2> = list(...),
          ...)
    -

    +
    +

    +

    For example, filters for variable Sepal.Length in iris can be specified as follows:

    -

    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
    +

    +
    +
    list(iris = list(Sepal.Length = list(selected = c(5.0, 7.0))))
     # or
    -list(iris = list(Sepal.Length = c(5.0, 7.0)))

    +list(iris = list(Sepal.Length = c(5.0, 7.0)))
    +

    +

    In case developer would like to include NA and Inf values in the filtered dataset.

    -

    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    -list(Species = c(c(5.0, 7.0), NA, Inf))

    +

    +
    +
    list(Species = list(selected = c(5.0, 7.0), keep_na = TRUE, keep_inf = TRUE))
    +list(Species = c(c(5.0, 7.0), NA, Inf))
    +

    +

    To initialize with specific variable filter with all values on start, one can use

    -

    list(Species = list())

    -

    filter should be set with respect to the class of the column:

    • numeric: selected should be a two elements vector defining the range +

      +
      +
      list(Species = list())
      +

      +
      +

      filter should be set with respect to the class of the column:

      +
        +
      • numeric: selected should be a two elements vector defining the range of the filter.

      • Date: selected should be a two elements vector defining the date-range of the filter

      • @@ -153,7 +197,10 @@

        Arguments
        list(
        +

      +

      +
      +
      list(
         <MAE dataname> = list(
           subjects = list(<column in colData> = ..., <column in colData> = ...),
           <experiment name> = list(
      @@ -163,13 +210,18 @@ 

      Arguments <column in colData of experiment> = ...) ) ) -)

      +)
      +

      +

      By adding the filterable attribute it is possible to control which variables can be filtered for each -dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

      +dataset. See the example below where ADSL can only be filtered by AGE, SEX or RACE.

      + - + +
      -

      Value

      +

      Value +

      reactive, return value of srv_teal()

      @@ -178,17 +230,19 @@

      Value

      + + + + - - + + diff --git a/v0.13.0/reference/tdata.html b/v0.13.0/reference/tdata.html index 7ae56f1f06..ebe59caac4 100644 --- a/v0.13.0/reference/tdata.html +++ b/v0.13.0/reference/tdata.html @@ -1,20 +1,36 @@ - - + + + + + +Create a tdata Object — tdata • teal +Create a tdata Object — tdata • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ +
    • +
    + - + @@ -92,13 +114,17 @@

    Create a new object called tdata which contains data, a reactive list of data.frames -(or MultiAssayExperiment), with attributes:

    • code (reactive) containing code used to generate the data

    • +(or MultiAssayExperiment), with attributes:

      +
        +
      • code (reactive) containing code used to generate the data

      • join_keys (JoinKeys) containing the relationships between the data

      • metadata (named list) containing any metadata associated with the data frames

      • -
    + +
    -

    Usage

    +

    Usage +

    new_tdata(data, code = "", join_keys = NULL, metadata = NULL)
     
     # S3 method for tdata
    @@ -106,8 +132,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    A named list of data.frames (or MultiAssayExperiment) which optionally can be reactive. Inside this object all of these items will be made reactive.

    @@ -137,16 +165,19 @@

    Arguments -

    Value

    +

    Value +

    A tdata object

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars), dd = data.frame(x = 1:10)),
    @@ -323,17 +354,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/tdata2env.html b/v0.13.0/reference/tdata2env.html index 3ff3ab4e01..8909995eb7 100644 --- a/v0.13.0/reference/tdata2env.html +++ b/v0.13.0/reference/tdata2env.html @@ -1,12 +1,28 @@ - -Function to convert a tdata object to an environment -Any reactives inside tdata are first evaluated — tdata2env • teal + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,18 +111,23 @@
    -

    Usage

    +

    Usage +

    tdata2env(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    a tdata object

    -
    + +
    -

    Value

    +

    Value +

    an environment

    @@ -109,7 +136,8 @@

    Value

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars)),
    @@ -122,17 +150,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/teal-package.html b/v0.13.0/reference/teal-package.html index 6f1457cc56..1b68b0916c 100644 --- a/v0.13.0/reference/teal-package.html +++ b/v0.13.0/reference/teal-package.html @@ -1,10 +1,26 @@ - -teal: Interactive Exploration of Clinical Trials Data — teal-package • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -87,36 +109,46 @@
    -

    Details

    +

    Details +

    To learn mode about the package either read the project website at Project Website or read the init manual pages.

    -

    Author

    +

    Author +

    Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com

    -

    Authors:

    + + + + + + - - + + diff --git a/v0.13.0/reference/ui_nested_tabs.html b/v0.13.0/reference/ui_nested_tabs.html index 0f7a245da7..2d539b2d2a 100644 --- a/v0.13.0/reference/ui_nested_tabs.html +++ b/v0.13.0/reference/ui_nested_tabs.html @@ -1,12 +1,28 @@ - - + + + + + +Create a UI of nested tabs of teal_modules — ui_nested_tabs • teal +Create a UI of nested tabs of teal_modules — ui_nested_tabs • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - +
    @@ -89,7 +112,8 @@
    -

    Usage

    +

    Usage +

    ui_nested_tabs(id, modules, datasets, depth = 0L)
     
     # S3 method for default
    @@ -103,8 +127,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    module id

    @@ -124,23 +150,30 @@

    Arguments -

    Value

    +

    Value +

    -

    depending on class of modules:

    • teal_module: instantiated UI of the module

    • +

      depending on class of modules:

      +
        +
      • teal_module: instantiated UI of the module

      • teal_modules: tabsetPanel with each tab corresponding to recursively calling this function on it.

      • -
    + +
    -

    Details

    +

    Details +

    The datasets argument is required to resolve the teal arguments in an isolated context (with respect to reactivity)

    -

    Examples

    +

    Examples +

    mods <- teal:::get_dummy_modules()
     datasets <- teal:::get_dummy_datasets()
     app <- shinyApp(
    @@ -170,17 +203,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/ui_tabs_with_filters.html b/v0.13.0/reference/ui_tabs_with_filters.html index 7c15c2c727..70862250a0 100644 --- a/v0.13.0/reference/ui_tabs_with_filters.html +++ b/v0.13.0/reference/ui_tabs_with_filters.html @@ -1,12 +1,28 @@ - - + + + + + +Add right filter panel into each of the top-level teal_modules UIs. — ui_tabs_with_filters • teal +Add right filter panel into each of the top-level teal_modules UIs. — ui_tabs_with_filters • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + + - + @@ -89,13 +111,16 @@
    -

    Usage

    +

    Usage +

    ui_tabs_with_filters(id, modules, datasets)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    module id

    @@ -110,16 +135,19 @@

    Argumentsteal.slice::FilteredData

    -

    + +
    -

    Value

    +

    Value +

    A tagList of The main menu, place holders for filters and place holders for the teal modules

    -

    Details

    +

    Details +

    The right filter panel's filter choices affect the datasets object. Therefore, all modules using the same datasets share the same filters.

    This works with nested modules of depth greater than 2, though the filter @@ -127,7 +155,8 @@

    Details
    -

    Examples

    +

    Examples +

    
     mods <- teal:::get_dummy_modules()
     datasets <- teal:::get_dummy_datasets()
    @@ -201,17 +230,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.13.0/reference/ui_teal.html b/v0.13.0/reference/ui_teal.html index d28209866a..31be142172 100644 --- a/v0.13.0/reference/ui_teal.html +++ b/v0.13.0/reference/ui_teal.html @@ -1,8 +1,24 @@ - -Teal app UI — ui_teal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,7 +105,8 @@
    -

    Usage

    +

    Usage +

    ui_teal(
       id,
       splash_ui = tags$h2("Starting the Teal App"),
    @@ -94,8 +117,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    module id

    @@ -122,15 +147,18 @@

    Arguments -

    Value

    +

    Value +

    HTML for Shiny module UI

    -

    Details

    +

    Details +

    It displays the splash UI which is used to fetch the data, possibly prompting for a password input to fetch the data. Once the data is ready, the splash screen is replaced by the actual teal UI that is tabsetted and @@ -144,7 +172,8 @@

    Details
    -

    Examples

    +

    Examples +

    mods <- teal:::get_dummy_modules()
     raw_data <- reactive(teal:::get_dummy_cdisc_data())
     app <- shinyApp(
    @@ -161,17 +190,19 @@ 

    Examples

    + +

    + +
    - - + + diff --git a/v0.13.0/reference/ui_teal_with_splash.html b/v0.13.0/reference/ui_teal_with_splash.html index 9fd248ef03..bbc724e6eb 100644 --- a/v0.13.0/reference/ui_teal_with_splash.html +++ b/v0.13.0/reference/ui_teal_with_splash.html @@ -1,22 +1,38 @@ - - + + + + + +UI to show a splash screen in the beginning, then delegate to srv_teal() — ui_teal_with_splash • teal +UI to show a splash screen in the beginning, then delegate to srv_teal() — ui_teal_with_splash • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + + + - +
    @@ -104,7 +127,8 @@
    -

    Usage

    +

    Usage +

    ui_teal_with_splash(
       id,
       data,
    @@ -115,8 +139,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    module id

    @@ -148,20 +174,23 @@

    Arguments

    + +
    + + - - + + diff --git a/v0.13.0/reference/validate_has_data.html b/v0.13.0/reference/validate_has_data.html index 1dc154d166..839af2ae4e 100644 --- a/v0.13.0/reference/validate_has_data.html +++ b/v0.13.0/reference/validate_has_data.html @@ -1,8 +1,24 @@ - -Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,7 +105,8 @@
    -

    Usage

    +

    Usage +

    validate_has_data(
       x,
       min_nrow = NULL,
    @@ -94,8 +117,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    a data.frame

    @@ -115,14 +140,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(scda)
     ADSL <- synthetic_cdisc_data("latest")$adsl
     
    @@ -148,17 +176,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/validate_has_elements.html b/v0.13.0/reference/validate_has_elements.html index 1e0f470777..8b7d460ef9 100644 --- a/v0.13.0/reference/validate_has_elements.html +++ b/v0.13.0/reference/validate_has_elements.html @@ -1,8 +1,24 @@ - -Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,27 +105,33 @@
    -

    Usage

    +

    Usage +

    validate_has_elements(x, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    msg

    message to display

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(scda)
     ADSL <- synthetic_cdisc_data("latest")$adsl
     
    @@ -137,17 +165,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/validate_has_variable.html b/v0.13.0/reference/validate_has_variable.html index ecced9dee0..981d41a906 100644 --- a/v0.13.0/reference/validate_has_variable.html +++ b/v0.13.0/reference/validate_has_variable.html @@ -1,8 +1,24 @@ - -Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,13 +105,16 @@
    -

    Usage

    +

    Usage +

    validate_has_variable(data, varname, msg)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    a data.frame

    @@ -100,14 +125,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(scda)
     ADSL <- synthetic_cdisc_data("latest")$adsl
     
    @@ -132,17 +160,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/validate_in.html b/v0.13.0/reference/validate_in.html index 8a3441ac5b..8960bc0d1d 100644 --- a/v0.13.0/reference/validate_in.html +++ b/v0.13.0/reference/validate_in.html @@ -1,8 +1,24 @@ - -Validates that vector includes all expected values — validate_in • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,13 +105,16 @@
    -

    Usage

    +

    Usage +

    validate_in(x, choices, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    values to test. All must be in choices

    @@ -100,14 +125,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(scda)
     
     ADSL <- synthetic_cdisc_data("latest")$adsl
    @@ -137,17 +165,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/validate_inputs.html b/v0.13.0/reference/validate_inputs.html index a1adac6ef9..ad9fce5f75 100644 --- a/v0.13.0/reference/validate_inputs.html +++ b/v0.13.0/reference/validate_inputs.html @@ -1,10 +1,26 @@ - -Send input validation messages to output. — validate_inputs • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + + - + @@ -86,13 +108,16 @@
    -

    Usage

    +

    Usage +

    validate_inputs(..., header = "Some inputs require attention")
    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    either any number of InputValidator objects or an optionally named, possibly nested list of InputValidator objects, see Details

    @@ -101,15 +126,18 @@

    Arguments -

    Value

    +

    Value +

    Returns NULL if the final validation call passes and a shiny.silent.error if it fails.

    -

    Details

    +

    Details +

    shiny::validate is used to withhold rendering of an output element until certain conditions are met and to print a validation message in place of the output element. @@ -128,12 +156,14 @@

    Detailsheader.

    -

    Examples

    +

    Examples +

    library(shiny)
     library(shinyvalidate)
     
    @@ -203,17 +233,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/validate_n_levels.html b/v0.13.0/reference/validate_n_levels.html index 1019446f5a..752a8fe951 100644 --- a/v0.13.0/reference/validate_n_levels.html +++ b/v0.13.0/reference/validate_n_levels.html @@ -1,8 +1,24 @@ - -Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,13 +105,16 @@
    -

    Usage

    +

    Usage +

    validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    variable name. If x is not a factor, the unique values are treated as levels.

    @@ -106,16 +131,19 @@

    Arguments -

    Details

    +

    Details +

    If the number of levels of x is less than min_levels or greater than max_levels the validation will fail. This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(scda)
     
     ADSL <- synthetic_cdisc_data("latest")$adsl
    @@ -147,17 +175,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/validate_no_intersection.html b/v0.13.0/reference/validate_no_intersection.html index 7f613908cd..68bbf8e37b 100644 --- a/v0.13.0/reference/validate_no_intersection.html +++ b/v0.13.0/reference/validate_no_intersection.html @@ -1,8 +1,24 @@ - -Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,13 +105,16 @@
    -

    Usage

    +

    Usage +

    validate_no_intersection(x, y, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    @@ -100,14 +125,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(scda)
     ADSL <- synthetic_cdisc_data("latest")$adsl
     
    @@ -145,17 +173,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.13.0/reference/validate_one_row_per_id.html b/v0.13.0/reference/validate_one_row_per_id.html index b983b66815..1045083777 100644 --- a/v0.13.0/reference/validate_one_row_per_id.html +++ b/v0.13.0/reference/validate_one_row_per_id.html @@ -1,8 +1,24 @@ - -Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + + - + @@ -83,27 +105,33 @@
    -

    Usage

    +

    Usage +

    validate_one_row_per_id(x, key = c("USUBJID", "STUDYID"))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    a data.frame

    key

    a vector of ID variables from x that identify unique records

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(scda)
     ADSL <- synthetic_cdisc_data("latest")$adsl
     
    @@ -129,17 +157,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/404.html b/v0.14.0/404.html index bdb349a7b8..2fc4b8e0e5 100644 --- a/v0.14.0/404.html +++ b/v0.14.0/404.html @@ -1,5 +1,4 @@ - - + @@ -57,23 +56,7 @@ - - + - + + diff --git a/v0.14.0/CODE_OF_CONDUCT.html b/v0.14.0/CODE_OF_CONDUCT.html index e553be4fa6..d6500172fc 100644 --- a/v0.14.0/CODE_OF_CONDUCT.html +++ b/v0.14.0/CODE_OF_CONDUCT.html @@ -1,8 +1,22 @@ - -Contributor Covenant Code of Conduct • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -88,65 +108,80 @@
    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    • Demonstrating empathy and kindness toward other people
    • +
        +
      • Demonstrating empathy and kindness toward other people
      • Being respectful of differing opinions, viewpoints, and experiences
      • Giving and gracefully accepting constructive feedback
      • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
      • Focusing on what is best not just for us as individuals, but for the overall community
      • -

      Examples of unacceptable behavior include:

      -
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • +
      +

      Examples of unacceptable behavior include:

      +
        +
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • Trolling, insulting or derogatory comments, and personal or political attacks
      • Public or private harassment
      • Publishing others’ private information, such as a physical or email address, without their explicit permission
      • Other conduct which could reasonably be considered inappropriate in a professional setting
      • -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -154,17 +189,19 @@

    Attribution

    + + + + - - + + diff --git a/v0.14.0/CONTRIBUTING.html b/v0.14.0/CONTRIBUTING.html index 8c69229ad0..ef3e057f40 100644 --- a/v0.14.0/CONTRIBUTING.html +++ b/v0.14.0/CONTRIBUTING.html @@ -1,8 +1,22 @@ - -Contribution Guidelines • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -90,7 +110,8 @@

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -101,38 +122,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    GitHub Flow

    +

    GitHub Flow +

    This repository uses the GitHub Flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes

        Make sure your code

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR)

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -146,76 +176,93 @@

        GitHub Flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    -

    Coding guidelines

    +

    Coding guidelines +

    This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Dependency management

    +

    Dependency management +

    Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

    -

    Dependency version management

    +

    Dependency version management +

    If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    -
    • Minimum 5% of lines of code authored* (determined by git blame query) OR
    • +
        +
      • Minimum 5% of lines of code authored* (determined by git blame query) OR
      • Being at the top 5 contributors in terms of number of commits OR lines added OR lines removed*
      • -

      *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

      +
    +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + + + - - + + diff --git a/v0.14.0/LICENSE-text.html b/v0.14.0/LICENSE-text.html index 0576524d09..7be92283fe 100644 --- a/v0.14.0/LICENSE-text.html +++ b/v0.14.0/LICENSE-text.html @@ -1,8 +1,22 @@ - -License • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -100,17 +120,19 @@ limitations under the License. - + + + + - - + + diff --git a/v0.14.0/SECURITY.html b/v0.14.0/SECURITY.html index 1608c09e70..3a4bf1196b 100644 --- a/v0.14.0/SECURITY.html +++ b/v0.14.0/SECURITY.html @@ -1,8 +1,22 @@ - -Security Policy • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -88,38 +108,44 @@
    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    -
    • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
    • +
        +
      • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
      • Full paths of source file(s) related to the manifestation of the issue
      • The location of the affected source code (tag/branch/commit or direct URL)
      • Any special configuration required to reproduce the issue
      • Step-by-step instructions to reproduce the issue
      • Proof-of-concept or exploit code (if possible)
      • Impact of the issue, including how an attacker might exploit the issue
      • -

      This information will help us triage your report more quickly.

      +
    +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + + + - - + + diff --git a/v0.14.0/articles/adding-support-for-reporting.html b/v0.14.0/articles/adding-support-for-reporting.html index 2751882e33..b1f27cfae2 100644 --- a/v0.14.0/articles/adding-support-for-reporting.html +++ b/v0.14.0/articles/adding-support-for-reporting.html @@ -1,5 +1,4 @@ - - + @@ -59,23 +58,7 @@ - - + - + + diff --git a/v0.14.0/articles/creating-custom-modules.html b/v0.14.0/articles/creating-custom-modules.html index 8cc8a47abd..8a5a4886c9 100644 --- a/v0.14.0/articles/creating-custom-modules.html +++ b/v0.14.0/articles/creating-custom-modules.html @@ -1,5 +1,4 @@ - - + @@ -59,23 +58,7 @@ - - + - + + diff --git a/v0.14.0/articles/filter-panel.html b/v0.14.0/articles/filter-panel.html index cb2b2cff5c..64c22bb23a 100644 --- a/v0.14.0/articles/filter-panel.html +++ b/v0.14.0/articles/filter-panel.html @@ -1,5 +1,4 @@ - - + @@ -59,23 +58,7 @@ - - + - + + diff --git a/v0.14.0/articles/including-adam-data-in-teal.html b/v0.14.0/articles/including-adam-data-in-teal.html index cce747fedd..799c903138 100644 --- a/v0.14.0/articles/including-adam-data-in-teal.html +++ b/v0.14.0/articles/including-adam-data-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -59,23 +58,7 @@ - - + - + + diff --git a/v0.14.0/articles/including-general-data-in-teal.html b/v0.14.0/articles/including-general-data-in-teal.html index e6e86cc708..58cfca495b 100644 --- a/v0.14.0/articles/including-general-data-in-teal.html +++ b/v0.14.0/articles/including-general-data-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -59,23 +58,7 @@ - - + - + + diff --git a/v0.14.0/articles/including-mae-data-in-teal.html b/v0.14.0/articles/including-mae-data-in-teal.html index 5e57ef5112..f11fb4be10 100644 --- a/v0.14.0/articles/including-mae-data-in-teal.html +++ b/v0.14.0/articles/including-mae-data-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -59,23 +58,7 @@ - - + - + + diff --git a/v0.14.0/articles/index.html b/v0.14.0/articles/index.html index 45235b2337..a03e269eb3 100644 --- a/v0.14.0/articles/index.html +++ b/v0.14.0/articles/index.html @@ -1,8 +1,22 @@ - -Articles • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -88,38 +108,52 @@

    Articles

    -
    Getting Started with teal
    +
    +
    Getting Started with teal
    -
    Filter Panel
    + +
    Filter Panel
    -
    Input general data in a teal application
    + +
    Input general data in a teal application
    -
    Input `ADaM` data in a teal application
    + +
    Input `ADaM` data in a teal application
    -
    Input `MultiAssayExperiment` data in a teal application
    + +
    Input `MultiAssayExperiment` data in a teal application
    -
    Preprocessing data
    + +
    Preprocessing data
    -
    Creating Custom Modules
    + +
    Creating Custom Modules
    -
    Adding support for Reporting to custom modules
    + +
    Adding support for Reporting to custom modules
    -
    Modifying a teal application with R options
    + +
    Modifying a teal application with R options
    -
    teal and Bootstrap Themes
    + +
    teal and Bootstrap Themes
    -
    - + +
    + + + + + - - + + diff --git a/v0.14.0/articles/preprocessing-data.html b/v0.14.0/articles/preprocessing-data.html index bc16035c44..29336fa303 100644 --- a/v0.14.0/articles/preprocessing-data.html +++ b/v0.14.0/articles/preprocessing-data.html @@ -1,5 +1,4 @@ - - + @@ -59,23 +58,7 @@ - - + - + + diff --git a/v0.14.0/articles/teal-bs-themes.html b/v0.14.0/articles/teal-bs-themes.html index cb1b62d3fb..487d0fd067 100644 --- a/v0.14.0/articles/teal-bs-themes.html +++ b/v0.14.0/articles/teal-bs-themes.html @@ -1,5 +1,4 @@ - - + @@ -59,23 +58,7 @@ - - + - + + diff --git a/v0.14.0/articles/teal-options.html b/v0.14.0/articles/teal-options.html index 8e87635a9e..4891fb3301 100644 --- a/v0.14.0/articles/teal-options.html +++ b/v0.14.0/articles/teal-options.html @@ -1,5 +1,4 @@ - - + @@ -59,23 +58,7 @@ - - + - + + diff --git a/v0.14.0/articles/teal.html b/v0.14.0/articles/teal.html index fdc1e2bbca..d89ff3ba50 100644 --- a/v0.14.0/articles/teal.html +++ b/v0.14.0/articles/teal.html @@ -1,5 +1,4 @@ - - + @@ -59,23 +58,7 @@ - - + - + + diff --git a/v0.14.0/authors.html b/v0.14.0/authors.html index 215516967e..0e9d91f5ee 100644 --- a/v0.14.0/authors.html +++ b/v0.14.0/authors.html @@ -1,8 +1,22 @@ - -Authors and Citation • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -87,7 +107,8 @@

    Authors

    -
    • +
        +
      • Dawid Kaledkowski. Author, maintainer.

      • @@ -147,7 +168,8 @@

        Authors

        Maximilian Mordig. Contributor.

        -
    + +

    Citation

    @@ -165,17 +187,19 @@

    Citation

    }
    + + + + - - + + diff --git a/v0.14.0/coverage-report/index.html b/v0.14.0/coverage-report/index.html index a467d80459..e03d16fd2b 100644 --- a/v0.14.0/coverage-report/index.html +++ b/v0.14.0/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -284,21 +283,24 @@

    teal coverage - 73.28%

    25 - 32x + 32x +
      checkmate::assert_class(data, "TealDataAbstract")
    26 - 32x + 32x +
      is_pulled_data <- teal.data::is_pulled(data)
    27 - 32x + 32x +
      ns <- NS(id)
    @@ -340,7 +342,8 @@

    teal coverage - 73.28%

    33 - 32x + 32x +
      splash_ui <- if (is_pulled_data) {
    @@ -354,7 +357,8 @@

    teal coverage - 73.28%

    35 - 28x + 28x +
        div()
    @@ -368,14 +372,16 @@

    teal coverage - 73.28%

    37 - 4x + 4x +
        message("App was initialized with delayed data loading.")
    38 - 4x + 4x +
        data$get_ui(ns("startapp_module"))
    @@ -396,7 +402,8 @@

    teal coverage - 73.28%

    41 - 32x + 32x +
      ui_teal(id = ns("teal"), splash_ui = splash_ui, title = title, header = header, footer = footer)
    @@ -515,28 +522,32 @@

    teal coverage - 73.28%

    58 - 4x + 4x +
      checkmate::assert_class(data, "TealDataAbstract")
    59 - 4x + 4x +
      moduleServer(id, function(input, output, session) {
    60 - 4x + 4x +
        logger::log_trace(
    61 - 4x + 4x +
          "srv_teal_with_splash initializing module with data { paste(data$get_datanames(), collapse = ' ')}."
    @@ -557,7 +568,8 @@

    teal coverage - 73.28%

    64 - 4x + 4x +
        if (getOption("teal.show_js_log", default = FALSE)) {
    @@ -585,7 +597,8 @@

    teal coverage - 73.28%

    68 - 4x + 4x +
        is_pulled_data <- teal.data::is_pulled(data)
    @@ -613,14 +626,16 @@

    teal coverage - 73.28%

    72 - 4x + 4x +
        if (is_pulled_data) {
    73 - 2x + 2x +
          raw_data <- reactiveVal(data) # will trigger by setting it
    @@ -634,14 +649,16 @@

    teal coverage - 73.28%

    75 - 2x + 2x +
          raw_data <- data$get_server()(id = "startapp_module")
    76 - 2x + 2x +
          if (!is.reactive(raw_data)) {
    @@ -676,21 +693,24 @@

    teal coverage - 73.28%

    81 - 4x + 4x +
        res <- srv_teal(id = "teal", modules = modules, raw_data = raw_data, filter = filter)
    82 - 4x + 4x +
        logger::log_trace(
    83 - 4x + 4x +
          "srv_teal_with_splash initialized the module with data { paste(data$get_datanames(), collapse = ' ') }."
    @@ -704,7 +724,8 @@

    teal coverage - 73.28%

    85 - 4x + 4x +
        return(res)
    @@ -1207,42 +1228,48 @@

    teal coverage - 73.28%

    69 - 79x + 79x +
      checkmate::assert_string(label)
    70 - 77x + 77x +
      submodules <- list(...)
    71 - 77x + 77x +
      if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
    72 - 2x + 2x +
        stop(
    73 - 2x + 2x +
          "The only character argument to modules() must be 'label' and it must be named, ",
    74 - 2x + 2x +
          "change modules('lab', ...) to modules(label = 'lab', ...)"
    @@ -1270,7 +1297,8 @@

    teal coverage - 73.28%

    78 - 75x + 75x +
      checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -1291,42 +1319,48 @@

    teal coverage - 73.28%

    81 - 72x + 72x +
      labels <- vapply(submodules, function(submodule) submodule$label, character(1))
    82 - 72x + 72x +
      names(submodules) <- make.unique(gsub("[^[:alnum:]]+", "_", labels), sep = "_")
    83 - 72x + 72x +
      structure(
    84 - 72x + 72x +
        list(
    85 - 72x + 72x +
          label = label,
    86 - 72x + 72x +
          children = submodules
    @@ -1340,7 +1374,8 @@

    teal coverage - 73.28%

    88 - 72x + 72x +
        class = "teal_modules"
    @@ -1410,42 +1445,48 @@

    teal coverage - 73.28%

    98 - 7x + 7x +
      checkmate::assert_class(modules, "teal_modules")
    99 - 5x + 5x +
      checkmate::assert_class(module, "teal_module")
    100 - 3x + 3x +
      modules$children <- c(modules$children, list(module))
    101 - 3x + 3x +
      labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
    102 - 3x + 3x +
      names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
    103 - 3x + 3x +
      modules
    @@ -1522,49 +1563,56 @@

    teal coverage - 73.28%

    114 - 285x + 285x +
      checkmate::assert_string(arg)
    115 - 282x + 282x +
      if (inherits(modules, "teal_modules")) {
    116 - 19x + 19x +
        any(unlist(lapply(modules$children, is_arg_used, arg)))
    117 - 263x + 263x +
      } else if (inherits(modules, "teal_module")) {
    118 - 32x + 32x +
        is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
    119 - 231x + 231x +
      } else if (is.function(modules)) {
    120 - 229x + 229x +
        isTRUE(arg %in% names(formals(modules)))
    @@ -1578,7 +1626,8 @@

    teal coverage - 73.28%

    122 - 2x + 2x +
        stop("is_arg_used function not implemented for this object")
    @@ -2047,7 +2096,8 @@

    teal coverage - 73.28%

    189 - 1x + 1x +
                         moduleServer(id, function(input, output, session) {}) # nolint
    @@ -2068,7 +2118,8 @@

    teal coverage - 73.28%

    192 - 1x + 1x +
                         tags$p(paste0("This module has no UI (id: ", id, " )"))
    @@ -2110,42 +2161,48 @@

    teal coverage - 73.28%

    198 - 109x + 109x +
      checkmate::assert_string(label)
    199 - 106x + 106x +
      checkmate::assert_function(server)
    200 - 106x + 106x +
      checkmate::assert_function(ui)
    201 - 106x + 106x +
      checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
    202 - 105x + 105x +
      checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
    203 - 103x + 103x +
      checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
    @@ -2159,7 +2216,8 @@

    teal coverage - 73.28%

    205 - 101x + 101x +
      if (!missing(filters)) {
    @@ -2222,14 +2280,16 @@

    teal coverage - 73.28%

    214 - 101x + 101x +
      if (label == "global_filters") {
    215 - 1x + 1x +
        stop("Label 'global_filters' is reserved in teal. Please change to something else.")
    @@ -2243,28 +2303,32 @@

    teal coverage - 73.28%

    217 - 100x + 100x +
      server_formals <- names(formals(server))
    218 - 100x + 100x +
      if (!(
    219 - 100x + 100x +
        "id" %in% server_formals ||
    220 - 100x + 100x +
          all(c("input", "output", "session") %in% server_formals)
    @@ -2278,70 +2342,80 @@

    teal coverage - 73.28%

    222 - 2x + 2x +
        stop(
    223 - 2x + 2x +
          "\nmodule() `server` argument requires a function with following arguments:",
    224 - 2x + 2x +
          "\n - id - teal will set proper shiny namespace for this module.",
    225 - 2x + 2x +
          "\n - input, output, session (not recommended) - then shiny::callModule will be used to call a module.",
    226 - 2x + 2x +
          "\n\nFollowing arguments can be used optionaly:",
    227 - 2x + 2x +
          "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
    228 - 2x + 2x +
          "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
    229 - 2x + 2x +
          "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
    230 - 2x + 2x +
          "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
    231 - 2x + 2x +
          "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
    @@ -2369,21 +2443,24 @@

    teal coverage - 73.28%

    235 - 98x + 98x +
      if (!is.element("data", server_formals)) {
    236 - 71x + 71x +
        message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
    237 - 71x + 71x +
        datanames <- NULL
    @@ -2404,42 +2481,48 @@

    teal coverage - 73.28%

    240 - 98x + 98x +
      srv_extra_args <- setdiff(names(server_args), server_formals)
    241 - 98x + 98x +
      if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
    242 - 1x + 1x +
        stop(
    243 - 1x + 1x +
          "\nFollowing `server_args` elements have no equivalent in the formals of the `server`:\n",
    244 - 1x + 1x +
          paste(paste(" -", srv_extra_args), collapse = "\n"),
    245 - 1x + 1x +
          "\n\nUpdate the `server` arguments by including above or add `...`"
    @@ -2467,63 +2550,72 @@

    teal coverage - 73.28%

    249 - 97x + 97x +
      ui_formals <- names(formals(ui))
    250 - 97x + 97x +
      if (!"id" %in% ui_formals) {
    251 - 1x + 1x +
        stop(
    252 - 1x + 1x +
          "\nmodule() `ui` argument requires a function with following arguments:",
    253 - 1x + 1x +
          "\n - id - teal will set proper shiny namespace for this module.",
    254 - 1x + 1x +
          "\n\nFollowing arguments can be used optionaly:",
    255 - 1x + 1x +
          "\n - `data` - module will receive list of reactive (filtered) data specied in the `filters` argument",
    256 - 1x + 1x +
          "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
    257 - 1x + 1x +
          "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
    @@ -2551,42 +2643,48 @@

    teal coverage - 73.28%

    261 - 96x + 96x +
      ui_extra_args <- setdiff(names(ui_args), ui_formals)
    262 - 96x + 96x +
      if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
    263 - 1x + 1x +
        stop(
    264 - 1x + 1x +
          "\nFollowing `ui_args` elements have no equivalent in the formals of `ui`:\n",
    265 - 1x + 1x +
          paste(paste(" -", ui_extra_args), collapse = "\n"),
    266 - 1x + 1x +
          "\n\nUpdate the `ui` arguments by including above or add `...`"
    @@ -2614,35 +2712,40 @@

    teal coverage - 73.28%

    270 - 95x + 95x +
      structure(
    271 - 95x + 95x +
        list(
    272 - 95x + 95x +
          label = label,
    273 - 95x + 95x +
          server = server, ui = ui, datanames = datanames,
    274 - 95x + 95x +
          server_args = server_args, ui_args = ui_args
    @@ -2656,7 +2759,8 @@

    teal coverage - 73.28%

    276 - 95x + 95x +
        class = "teal_module"
    @@ -2936,21 +3040,24 @@

    teal coverage - 73.28%

    316 - 12x + 12x +
      checkmate::assert(
    317 - 12x + 12x +
        checkmate::check_class(modules, "teal_module"),
    318 - 12x + 12x +
        checkmate::check_class(modules, "teal_modules")
    @@ -2964,21 +3071,24 @@

    teal coverage - 73.28%

    320 - 12x + 12x +
      checkmate::assert_int(depth, lower = 0)
    321 - 11x + 11x +
      if (inherits(modules, "teal_modules")) {
    322 - 4x + 4x +
        max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
    @@ -2992,7 +3102,8 @@

    teal coverage - 73.28%

    324 - 7x + 7x +
        depth
    @@ -4020,42 +4131,48 @@

    teal coverage - 73.28%

    89 - 7x + 7x +
      checkmate::assert_character(id)
    90 - 7x + 7x +
      checkmate::assert_true(is.reactive(slices_global))
    91 - 7x + 7x +
      checkmate::assert_class(isolate(slices_global()), "teal_slices")
    92 - 7x + 7x +
      checkmate::assert_true(is.reactive(mapping_matrix))
    93 - 7x + 7x +
      checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
    94 - 7x + 7x +
      checkmate::assert_list(filtered_data_list, types = "FilteredData", any.missing = FALSE, names = "named")
    @@ -4069,14 +4186,16 @@

    teal coverage - 73.28%

    96 - 7x + 7x +
      moduleServer(id, function(input, output, session) {
    97 - 7x + 7x +
        ns <- session$ns
    @@ -4097,28 +4216,32 @@

    teal coverage - 73.28%

    100 - 7x + 7x +
        filter <- isolate(slices_global())
    101 - 7x + 7x +
        snapshot_history <- reactiveVal({
    102 - 7x + 7x +
          list(
    103 - 7x + 7x +
            "Initial application state" = as.list(filter, recursive = TRUE)
    @@ -4153,7 +4276,8 @@

    teal coverage - 73.28%

    108 - 7x + 7x +
        observeEvent(input$snapshot_add, {
    @@ -4244,7 +4368,8 @@

    teal coverage - 73.28%

    121 - 7x + 7x +
        observeEvent(input$snapshot_name_accept, {
    @@ -4433,7 +4558,8 @@

    teal coverage - 73.28%

    148 - 7x + 7x +
        observeEvent(input$snapshot_reset, {
    @@ -4594,21 +4720,24 @@

    teal coverage - 73.28%

    171 - 7x + 7x +
        observers <- reactiveValues()
    172 - 7x + 7x +
        handlers <- reactiveValues()
    173 - 7x + 7x +
        divs <- reactiveValues()
    @@ -4622,14 +4751,16 @@

    teal coverage - 73.28%

    175 - 7x + 7x +
        observeEvent(snapshot_history(), {
    176 - 3x + 3x +
          lapply(names(snapshot_history())[-1L], function(s) {
    @@ -5000,42 +5131,48 @@

    teal coverage - 73.28%

    229 - 7x + 7x +
        output$snapshot_list <- renderUI({
    230 - 3x + 3x +
          rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
    231 - 3x + 3x +
          if (length(rows) == 0L) {
    232 - 3x + 3x +
            div(
    233 - 3x + 3x +
              class = "snapshot_manager_placeholder",
    234 - 3x + 3x +
              "Snapshots will appear here."
    @@ -5720,42 +5857,48 @@

    teal coverage - 73.28%

    49 - 1x + 1x +
      ns <- NS(id)
    50 - 1x + 1x +
      tags$button(
    51 - 1x + 1x +
        id = ns("show"),
    52 - 1x + 1x +
        class = "btn action-button filter_manager_button",
    53 - 1x + 1x +
        title = "Show filters manager modal",
    54 - 1x + 1x +
        icon("gear")
    @@ -5797,14 +5940,16 @@

    teal coverage - 73.28%

    60 - 4x + 4x +
      moduleServer(id, function(input, output, session) {
    61 - 4x + 4x +
        observeEvent(input$show, {
    @@ -5888,7 +6033,8 @@

    teal coverage - 73.28%

    73 - 4x + 4x +
        filter_manager_srv("filter_manager", filtered_data_list, filter)
    @@ -6147,14 +6293,16 @@

    teal coverage - 73.28%

    110 - 6x + 6x +
      moduleServer(id, function(input, output, session) {
    111 - 6x + 6x +
        logger::log_trace("filter_manager_srv initializing for: { paste(names(filtered_data_list), collapse = ', ')}.")
    @@ -6168,7 +6316,8 @@

    teal coverage - 73.28%

    113 - 6x + 6x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    @@ -6210,7 +6359,8 @@

    teal coverage - 73.28%

    119 - 6x + 6x +
        slices_global <- reactiveVal(filter)
    @@ -6224,14 +6374,16 @@

    teal coverage - 73.28%

    121 - 6x + 6x +
        filtered_data_list <-
    122 - 6x + 6x +
          if (!is_module_specific) {
    @@ -6252,7 +6404,8 @@

    teal coverage - 73.28%

    125 - 5x + 5x +
            list(global_filters = unlist(filtered_data_list)[[1]])
    @@ -6280,21 +6433,24 @@

    teal coverage - 73.28%

    129 - 1x + 1x +
            flatten_nested <- function(x, name = NULL) {
    130 - 5x + 5x +
              if (inherits(x, "FilteredData")) {
    131 - 3x + 3x +
                setNames(list(x), name)
    @@ -6308,7 +6464,8 @@

    teal coverage - 73.28%

    133 - 2x + 2x +
                unlist(lapply(names(x), function(name) flatten_nested(x[[name]], name)))
    @@ -6329,7 +6486,8 @@

    teal coverage - 73.28%

    136 - 1x + 1x +
            flatten_nested(filtered_data_list)
    @@ -6364,49 +6522,56 @@

    teal coverage - 73.28%

    141 - 6x + 6x +
        mapping_matrix <- reactive({
    142 - 6x + 6x +
          state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
    143 - 6x + 6x +
          mapping_smooth <- lapply(filtered_data_list, function(x) {
    144 - 8x + 8x +
            state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
    145 - 8x + 8x +
            state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
    146 - 8x + 8x +
            states_active <- state_ids_global %in% state_ids_local
    147 - 8x + 8x +
            ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
    @@ -6427,7 +6592,8 @@

    teal coverage - 73.28%

    150 - 6x + 6x +
          as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
    @@ -6448,14 +6614,16 @@

    teal coverage - 73.28%

    153 - 6x + 6x +
        output$slices_table <- renderTable(
    154 - 6x + 6x +
          expr = {
    @@ -6469,28 +6637,32 @@

    teal coverage - 73.28%

    156 - 3x + 3x +
            mm <- mapping_matrix()
    157 - 3x + 3x +
            mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
    158 - 3x + 3x +
            mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
    159 - 3x + 3x +
            if (!is_module_specific) colnames(mm) <- "Global Filters"
    @@ -6511,21 +6683,24 @@

    teal coverage - 73.28%

    162 - 3x + 3x +
            if (nrow(mm) == 0L) {
    163 - 3x + 3x +
              mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
    164 - 3x + 3x +
              rownames(mm) <- ""
    @@ -6546,7 +6721,8 @@

    teal coverage - 73.28%

    167 - 3x + 3x +
            mm
    @@ -6560,14 +6736,16 @@

    teal coverage - 73.28%

    169 - 6x + 6x +
          align = paste(c("l", rep("c", length(filtered_data_list))), collapse = ""),
    170 - 6x + 6x +
          rownames = TRUE
    @@ -6595,35 +6773,40 @@

    teal coverage - 73.28%

    174 - 6x + 6x +
        modules_out <- lapply(names(filtered_data_list), function(module_name) {
    175 - 8x + 8x +
          filter_manager_module_srv(
    176 - 8x + 8x +
            id = module_name,
    177 - 8x + 8x +
            module_fd = filtered_data_list[[module_name]],
    178 - 8x + 8x +
            slices_global = slices_global
    @@ -6658,7 +6841,8 @@

    teal coverage - 73.28%

    183 - 6x + 6x +
        snapshot_manager_srv("snapshot_manager", slices_global, mapping_matrix, filtered_data_list)
    @@ -6672,7 +6856,8 @@

    teal coverage - 73.28%

    185 - 6x + 6x +
        modules_out # returned for testing purpose
    @@ -6861,7 +7046,8 @@

    teal coverage - 73.28%

    212 - 8x + 8x +
      moduleServer(id, function(input, output, session) {
    @@ -6875,7 +7061,8 @@

    teal coverage - 73.28%

    214 - 8x + 8x +
        module_fd$set_available_teal_slices(reactive(slices_global()))
    @@ -6896,7 +7083,8 @@

    teal coverage - 73.28%

    217 - 8x + 8x +
        slices_module <- reactive(module_fd$get_filter_state())
    @@ -6917,14 +7105,16 @@

    teal coverage - 73.28%

    220 - 8x + 8x +
        previous_slices <- reactiveVal(isolate(slices_module()))
    221 - 8x + 8x +
        slices_added <- reactiveVal(NULL)
    @@ -6945,21 +7135,24 @@

    teal coverage - 73.28%

    224 - 8x + 8x +
        observeEvent(slices_module(), ignoreNULL = FALSE, {
    225 - 3x + 3x +
          logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
    226 - 3x + 3x +
          added <- setdiff_teal_slices(slices_module(), slices_global())
    @@ -6973,7 +7166,8 @@

    teal coverage - 73.28%

    228 - 3x + 3x +
          previous_slices(slices_module())
    @@ -6994,7 +7188,8 @@

    teal coverage - 73.28%

    231 - 8x + 8x +
        observeEvent(slices_added(), ignoreNULL = TRUE, {
    @@ -7113,7 +7308,8 @@

    teal coverage - 73.28%

    248 - 8x + 8x +
        slices_module # returned for testing purpose
    @@ -7861,14 +8057,16 @@

    teal coverage - 73.28%

    104 - 36x + 36x +
      dots <- list(...)
    105 - 2x + 2x +
      if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
    @@ -7882,21 +8080,24 @@

    teal coverage - 73.28%

    107 - 34x + 34x +
      messages <- extract_validator(dots, header)
    108 - 34x + 34x +
      failings <- if (!any_names(dots)) {
    109 - 29x + 29x +
        add_header(messages, header)
    @@ -7910,7 +8111,8 @@

    teal coverage - 73.28%

    111 - 5x + 5x +
        unlist(messages)
    @@ -7931,7 +8133,8 @@

    teal coverage - 73.28%

    114 - 34x + 34x +
      shiny::validate(shiny::need(is.null(failings), failings))
    @@ -7994,7 +8197,8 @@

    teal coverage - 73.28%

    123 - 118x + 118x +
      all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
    @@ -8050,7 +8254,8 @@

    teal coverage - 73.28%

    131 - 49x + 49x +
      x$.__enclos_env__$private$enabled
    @@ -8099,14 +8304,16 @@

    teal coverage - 73.28%

    138 - 113x + 113x +
      if (inherits(iv, "InputValidator")) {
    139 - 49x + 49x +
        add_header(gather_messages(iv), header)
    @@ -8120,14 +8327,16 @@

    teal coverage - 73.28%

    141 - 58x + 58x +
        if (is.null(names(iv))) names(iv) <- rep("", length(iv))
    142 - 64x + 64x +
        mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
    @@ -8183,28 +8392,32 @@

    teal coverage - 73.28%

    150 - 49x + 49x +
      if (validator_enabled(iv)) {
    151 - 46x + 46x +
        status <- iv$validate()
    152 - 46x + 46x +
        failing_inputs <- Filter(Negate(is.null), status)
    153 - 46x + 46x +
        unique(lapply(failing_inputs, function(x) x[["message"]]))
    @@ -8218,14 +8431,16 @@

    teal coverage - 73.28%

    155 - 3x + 3x +
        logger::log_warn("Validator is disabled and will be omitted.")
    156 - 3x + 3x +
        list()
    @@ -8274,21 +8489,24 @@

    teal coverage - 73.28%

    163 - 78x + 78x +
      ans <- unlist(messages)
    164 - 78x + 78x +
      if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
    165 - 31x + 31x +
        ans <- c(paste0(header, "\n"), ans, "\n")
    @@ -8302,7 +8520,8 @@

    teal coverage - 73.28%

    167 - 78x + 78x +
      ans
    @@ -8344,21 +8563,24 @@

    teal coverage - 73.28%

    173 - 103x + 103x +
      any(
    174 - 103x + 103x +
        if (is.list(x)) {
    175 - 58x + 58x +
          if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
    @@ -8372,7 +8594,8 @@

    teal coverage - 73.28%

    177 - 40x + 40x +
          FALSE
    @@ -8483,21 +8706,24 @@

    teal coverage - 73.28%

    12 - 32x + 32x +
      css_files <- list.files(
    13 - 32x + 32x +
        system.file("css", package = "teal", mustWork = TRUE),
    14 - 32x + 32x +
        pattern = pattern, full.names = TRUE
    @@ -8511,21 +8737,24 @@

    teal coverage - 73.28%

    16 - 32x + 32x +
      return(
    17 - 32x + 32x +
        shiny::singleton(
    18 - 32x + 32x +
          shiny::tags$head(lapply(css_files, shiny::includeCSS))
    @@ -8644,21 +8873,24 @@

    teal coverage - 73.28%

    35 - 32x + 32x +
      checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
    36 - 32x + 32x +
      js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
    37 - 32x + 32x +
      js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
    @@ -8672,7 +8904,8 @@

    teal coverage - 73.28%

    39 - 32x + 32x +
      return(singleton(lapply(js_files, includeScript)))
    @@ -8791,21 +9024,24 @@

    teal coverage - 73.28%

    56 - 8x + 8x +
      checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
    57 - 8x + 8x +
      lapply(files, function(file) {
    58 - 8x + 8x +
        shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
    @@ -8819,7 +9055,8 @@

    teal coverage - 73.28%

    60 - 8x + 8x +
      return(invisible(NULL))
    @@ -8952,21 +9189,24 @@

    teal coverage - 73.28%

    79 - 32x + 32x +
      tagList(
    80 - 32x + 32x +
        shinyjs::useShinyjs(),
    81 - 32x + 32x +
        include_css_files(),
    @@ -8980,14 +9220,16 @@

    teal coverage - 73.28%

    83 - 32x + 32x +
        include_js_files(except = "init.js"),
    84 - 32x + 32x +
        shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
    @@ -9476,7 +9718,8 @@

    teal coverage - 73.28%

    67 - 32x + 32x +
      if (checkmate::test_string(header)) {
    @@ -9497,7 +9740,8 @@

    teal coverage - 73.28%

    70 - 32x + 32x +
      if (checkmate::test_string(footer)) {
    @@ -9518,28 +9762,32 @@

    teal coverage - 73.28%

    73 - 32x + 32x +
      checkmate::assert(
    74 - 32x + 32x +
        checkmate::check_class(splash_ui, "shiny.tag"),
    75 - 32x + 32x +
        checkmate::check_class(splash_ui, "shiny.tag.list"),
    76 - 32x + 32x +
        checkmate::check_class(splash_ui, "html")
    @@ -9553,28 +9801,32 @@

    teal coverage - 73.28%

    78 - 32x + 32x +
      checkmate::assert(
    79 - 32x + 32x +
        checkmate::check_class(header, "shiny.tag"),
    80 - 32x + 32x +
        checkmate::check_class(header, "shiny.tag.list"),
    81 - 32x + 32x +
        checkmate::check_class(header, "html")
    @@ -9588,28 +9840,32 @@

    teal coverage - 73.28%

    83 - 32x + 32x +
      checkmate::assert(
    84 - 32x + 32x +
        checkmate::check_class(footer, "shiny.tag"),
    85 - 32x + 32x +
        checkmate::check_class(footer, "shiny.tag.list"),
    86 - 32x + 32x +
        checkmate::check_class(footer, "html")
    @@ -9630,7 +9886,8 @@

    teal coverage - 73.28%

    89 - 32x + 32x +
      ns <- NS(id)
    @@ -9644,7 +9901,8 @@

    teal coverage - 73.28%

    91 - 32x + 32x +
      splash_ui <- div(
    @@ -9658,7 +9916,8 @@

    teal coverage - 73.28%

    93 - 32x + 32x +
        id = ns("main_ui_container"),
    @@ -9679,7 +9938,8 @@

    teal coverage - 73.28%

    96 - 32x + 32x +
        div(splash_ui)
    @@ -9714,35 +9974,40 @@

    teal coverage - 73.28%

    101 - 32x + 32x +
      shiny_busy_message_panel <- conditionalPanel(
    102 - 32x + 32x +
        condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint
    103 - 32x + 32x +
        div(
    104 - 32x + 32x +
          icon("arrows-rotate", "spin fa-spin"),
    105 - 32x + 32x +
          "Computing ...",
    @@ -9756,7 +10021,8 @@

    teal coverage - 73.28%

    107 - 32x + 32x +
          class = "shinybusymessage"
    @@ -9784,98 +10050,112 @@

    teal coverage - 73.28%

    111 - 32x + 32x +
      res <- fluidPage(
    112 - 32x + 32x +
        title = title,
    113 - 32x + 32x +
        theme = get_teal_bs_theme(),
    114 - 32x + 32x +
        include_teal_css_js(),
    115 - 32x + 32x +
        tags$header(header),
    116 - 32x + 32x +
        tags$hr(class = "my-2"),
    117 - 32x + 32x +
        shiny_busy_message_panel,
    118 - 32x + 32x +
        splash_ui,
    119 - 32x + 32x +
        tags$hr(),
    120 - 32x + 32x +
        tags$footer(
    121 - 32x + 32x +
          div(
    122 - 32x + 32x +
            footer,
    123 - 32x + 32x +
            teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
    124 - 32x + 32x +
            textOutput(ns("identifier"))
    @@ -9903,7 +10183,8 @@

    teal coverage - 73.28%

    128 - 32x + 32x +
      return(res)
    @@ -9945,21 +10226,24 @@

    teal coverage - 73.28%

    134 - 9x + 9x +
      stopifnot(is.reactive(raw_data))
    135 - 8x + 8x +
      moduleServer(id, function(input, output, session) {
    136 - 8x + 8x +
        logger::log_trace("srv_teal initializing the module.")
    @@ -9973,14 +10257,16 @@

    teal coverage - 73.28%

    138 - 8x + 8x +
        output$identifier <- renderText(
    139 - 8x + 8x +
          paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
    @@ -10001,28 +10287,32 @@

    teal coverage - 73.28%

    142 - 8x + 8x +
        teal.widgets::verbatim_popup_srv(
    143 - 8x + 8x +
          "sessionInfo",
    144 - 8x + 8x +
          verbatim_content = utils::capture.output(utils::sessionInfo()),
    145 - 8x + 8x +
          title = "SessionInfo"
    @@ -10050,7 +10340,8 @@

    teal coverage - 73.28%

    149 - 8x + 8x +
        run_js_files(files = "init.js") # `JavaScript` code to make the clipboard accessible
    @@ -10078,35 +10369,40 @@

    teal coverage - 73.28%

    153 - 8x + 8x +
        get_client_timezone(session$ns)
    154 - 8x + 8x +
        observeEvent(
    155 - 8x + 8x +
          eventExpr = input$timezone,
    156 - 8x + 8x +
          once = TRUE,
    157 - 8x + 8x +
          handlerExpr = {
    @@ -10155,28 +10451,32 @@

    teal coverage - 73.28%

    164 - 8x + 8x +
        env <- environment()
    165 - 8x + 8x +
        datasets_reactive <- reactive({
    166 - 6x + 6x +
          if (is.null(raw_data())) {
    167 - 1x + 1x +
            return(NULL)
    @@ -10190,14 +10490,16 @@

    teal coverage - 73.28%

    169 - 5x + 5x +
          env$progress <- shiny::Progress$new(session)
    170 - 5x + 5x +
          env$progress$set(0.25, message = "Setting data")
    @@ -10225,7 +10527,8 @@

    teal coverage - 73.28%

    174 - 5x + 5x +
          datasets_singleton <- teal.slice::init_filtered_data(raw_data())
    @@ -10239,63 +10542,72 @@

    teal coverage - 73.28%

    176 - 5x + 5x +
          filter_global <- Filter(function(x) x$id %in% attr(filter, "mapping")$global_filters, filter)
    177 - 5x + 5x +
          datasets_singleton$set_filter_state(filter_global)
    178 - 5x + 5x +
          module_datasets <- function(modules) {
    179 - 19x + 19x +
            if (inherits(modules, "teal_modules")) {
    180 - 8x + 8x +
              datasets <- lapply(modules$children, module_datasets)
    181 - 8x + 8x +
              labels <- vapply(modules$children, `[[`, character(1), "label")
    182 - 8x + 8x +
              names(datasets) <- labels
    183 - 8x + 8x +
              datasets
    184 - 11x + 11x +
            } else if (isTRUE(attr(filter, "module_specific"))) {
    @@ -10316,63 +10628,72 @@

    teal coverage - 73.28%

    187 - 3x + 3x +
              datanames <- if (is.null(modules$datanames)) raw_data()$get_datanames() else modules$datanames
    188 - 3x + 3x +
              data_objects <- sapply(
    189 - 3x + 3x +
                datanames,
    190 - 3x + 3x +
                function(dataname) {
    191 - 6x + 6x +
                  dataset <- raw_data()$get_dataset(dataname)
    192 - 6x + 6x +
                  list(
    193 - 6x + 6x +
                    dataset = dataset$get_raw_data(),
    194 - 6x + 6x +
                    metadata = dataset$get_metadata(),
    195 - 6x + 6x +
                    label = dataset$get_dataset_label()
    @@ -10393,7 +10714,8 @@

    teal coverage - 73.28%

    198 - 3x + 3x +
                simplify = FALSE
    @@ -10407,35 +10729,40 @@

    teal coverage - 73.28%

    200 - 3x + 3x +
              datasets_module <- teal.slice::init_filtered_data(
    201 - 3x + 3x +
                data_objects,
    202 - 3x + 3x +
                join_keys = raw_data()$get_join_keys(),
    203 - 3x + 3x +
                code = raw_data()$get_code_class(),
    204 - 3x + 3x +
                check = raw_data()$get_check()
    @@ -10463,7 +10790,8 @@

    teal coverage - 73.28%

    208 - 3x + 3x +
              slices <- Filter(x = filter, f = function(x) {
    @@ -10491,42 +10819,48 @@

    teal coverage - 73.28%

    212 - 3x + 3x +
              include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
    213 - 3x + 3x +
              exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
    214 - 3x + 3x +
              slices$include_varnames <- include_varnames
    215 - 3x + 3x +
              slices$exclude_varnames <- exclude_varnames
    216 - 3x + 3x +
              datasets_module$set_filter_state(slices)
    217 - 3x + 3x +
              datasets_module
    @@ -10540,7 +10874,8 @@

    teal coverage - 73.28%

    219 - 8x + 8x +
              datasets_singleton
    @@ -10561,7 +10896,8 @@

    teal coverage - 73.28%

    222 - 5x + 5x +
          datasets <- module_datasets(modules)
    @@ -10575,14 +10911,16 @@

    teal coverage - 73.28%

    224 - 5x + 5x +
          logger::log_trace("srv_teal@4 Raw Data transferred to FilteredData.")
    225 - 5x + 5x +
          datasets
    @@ -10603,14 +10941,16 @@

    teal coverage - 73.28%

    228 - 8x + 8x +
        reporter <- teal.reporter::Reporter$new()
    229 - 8x + 8x +
        is_any_previewer <- function(modules) {
    @@ -10673,7 +11013,8 @@

    teal coverage - 73.28%

    238 - 8x + 8x +
        if (is_arg_used(modules, "reporter") && !is_any_previewer(modules)) {
    @@ -10736,28 +11077,32 @@

    teal coverage - 73.28%

    247 - 8x + 8x +
        observeEvent(datasets_reactive(), ignoreNULL = TRUE, once = TRUE, {
    248 - 1x + 1x +
          logger::log_trace("srv_teal@5 setting main ui after data was pulled")
    249 - 1x + 1x +
          env$progress$set(0.5, message = "Setting up main UI")
    250 - 1x + 1x +
          on.exit(env$progress$close())
    @@ -10778,28 +11123,32 @@

    teal coverage - 73.28%

    253 - 1x + 1x +
          removeUI(sprintf("#%s:first-child", session$ns("main_ui_container")))
    254 - 1x + 1x +
          insertUI(
    255 - 1x + 1x +
            selector = paste0("#", session$ns("main_ui_container")),
    256 - 1x + 1x +
            where = "beforeEnd",
    @@ -10820,35 +11169,40 @@

    teal coverage - 73.28%

    259 - 1x + 1x +
            ui = div(ui_tabs_with_filters(
    260 - 1x + 1x +
              session$ns("main_ui"),
    261 - 1x + 1x +
              modules = modules,
    262 - 1x + 1x +
              datasets = datasets_reactive(),
    263 - 1x + 1x +
              filter = filter
    @@ -10876,7 +11230,8 @@

    teal coverage - 73.28%

    267 - 1x + 1x +
            immediate = TRUE
    @@ -10911,42 +11266,48 @@

    teal coverage - 73.28%

    272 - 1x + 1x +
          active_module <- srv_tabs_with_filters(
    273 - 1x + 1x +
            id = "main_ui",
    274 - 1x + 1x +
            datasets = datasets_reactive(),
    275 - 1x + 1x +
            modules = modules,
    276 - 1x + 1x +
            reporter = reporter,
    277 - 1x + 1x +
            filter = filter
    @@ -10960,7 +11321,8 @@

    teal coverage - 73.28%

    279 - 1x + 1x +
          return(active_module)
    @@ -11666,28 +12028,32 @@

    teal coverage - 73.28%

    97 - 15x + 15x +
      checkmate::assert_string(label)
    98 - 15x + 15x +
      module(
    99 - 15x + 15x +
        label,
    100 - 15x + 15x +
        server = function(id, data) {
    @@ -11729,7 +12095,8 @@

    teal coverage - 73.28%

    106 - 15x + 15x +
        ui = function(id, data) {
    @@ -11778,7 +12145,8 @@

    teal coverage - 73.28%

    113 - 15x + 15x +
        datanames = datanames
    @@ -11869,70 +12237,80 @@

    teal coverage - 73.28%

    126 - 2x + 2x +
      checkmate::assert_subset(datanames, c("ADSL", "ADTTE"))
    127 - 2x + 2x +
      mods <- modules(
    128 - 2x + 2x +
        label = "d1",
    129 - 2x + 2x +
        modules(
    130 - 2x + 2x +
          label = "d2",
    131 - 2x + 2x +
          modules(
    132 - 2x + 2x +
            label = "d3",
    133 - 2x + 2x +
            example_module(label = "aaa1", datanames = datanames),
    134 - 2x + 2x +
            example_module(label = "aaa2", datanames = datanames),
    135 - 2x + 2x +
            example_module(label = "aaa3", datanames = datanames)
    @@ -11946,7 +12324,8 @@

    teal coverage - 73.28%

    137 - 2x + 2x +
          example_module(label = "bbb", datanames = datanames)
    @@ -11960,7 +12339,8 @@

    teal coverage - 73.28%

    139 - 2x + 2x +
        example_module(label = "ccc", datanames = datanames)
    @@ -11974,7 +12354,8 @@

    teal coverage - 73.28%

    141 - 2x + 2x +
      return(mods)
    @@ -12092,21 +12473,24 @@

    teal coverage - 73.28%

    15 - 8x + 8x +
      script <- sprintf(
    16 - 8x + 8x +
        "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
    17 - 8x + 8x +
        ns("timezone")
    @@ -12120,14 +12504,16 @@

    teal coverage - 73.28%

    19 - 8x + 8x +
      shinyjs::runjs(script) # function does not return anything
    20 - 8x + 8x +
      return(invisible(NULL))
    @@ -12169,42 +12555,48 @@

    teal coverage - 73.28%

    26 - 36x + 36x +
      bs_theme <- getOption("teal.bs_theme")
    27 - 36x + 36x +
      if (is.null(bs_theme)) {
    28 - 33x + 33x +
        NULL
    29 - 3x + 3x +
      } else if (!inherits(bs_theme, "bs_theme")) {
    30 - 2x + 2x +
        warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
    31 - 2x + 2x +
        NULL
    @@ -12218,7 +12610,8 @@

    teal coverage - 73.28%

    33 - 1x + 1x +
        bs_theme
    @@ -12253,42 +12646,48 @@

    teal coverage - 73.28%

    38 - 145x + 145x +
      parents <- character(0)
    39 - 145x + 145x +
      for (i in dataname) {
    40 - 25x + 25x +
        while (length(i) > 0) {
    41 - 25x + 25x +
          parent_i <- join_keys$get_parent(i)
    42 - 25x + 25x +
          parents <- c(parent_i, parents)
    43 - 25x + 25x +
          i <- parent_i
    @@ -12316,7 +12715,8 @@

    teal coverage - 73.28%

    47 - 145x + 145x +
      return(unique(c(parents, dataname)))
    @@ -12749,21 +13149,24 @@

    teal coverage - 73.28%

    60 - 1x + 1x +
      checkmate::assert_class(modules, "teal_modules")
    61 - 1x + 1x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    62 - 1x + 1x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -12777,14 +13180,16 @@

    teal coverage - 73.28%

    64 - 1x + 1x +
      ns <- NS(id)
    65 - 1x + 1x +
      is_module_specific <- isTRUE(attr(filter, "module_specific"))
    @@ -12798,63 +13203,72 @@

    teal coverage - 73.28%

    67 - 1x + 1x +
      teal_ui <- ui_nested_tabs(ns("root"), modules = modules, datasets, is_module_specific = is_module_specific)
    68 - 1x + 1x +
      filter_panel_btns <- tags$li(
    69 - 1x + 1x +
        class = "flex-grow",
    70 - 1x + 1x +
        tags$button(
    71 - 1x + 1x +
          class = "btn action-button filter_hamburger", # see sidebar.css for style filter_hamburger
    72 - 1x + 1x +
          href = "javascript:void(0)",
    73 - 1x + 1x +
          onclick = "toggleFilterPanel();", # see sidebar.js
    74 - 1x + 1x +
          title = "Toggle filter panels",
    75 - 1x + 1x +
          icon("fas fa-bars")
    @@ -12868,7 +13282,8 @@

    teal coverage - 73.28%

    77 - 1x + 1x +
        filter_manager_modal_ui(ns("filter_manager"))
    @@ -12882,7 +13297,8 @@

    teal coverage - 73.28%

    79 - 1x + 1x +
      teal_ui$children[[1]] <- tagAppendChild(teal_ui$children[[1]], filter_panel_btns)
    @@ -12896,7 +13312,8 @@

    teal coverage - 73.28%

    81 - 1x + 1x +
      if (!is_module_specific) {
    @@ -12910,63 +13327,72 @@

    teal coverage - 73.28%

    83 - 1x + 1x +
        tabset_bar <- teal_ui$children[[1]]
    84 - 1x + 1x +
        teal_modules <- teal_ui$children[[2]]
    85 - 1x + 1x +
        filter_ui <- unlist(datasets)[[1]]$ui_filter_panel(ns("filter_panel"))
    86 - 1x + 1x +
        list(
    87 - 1x + 1x +
          tabset_bar,
    88 - 1x + 1x +
          tags$hr(class = "my-2"),
    89 - 1x + 1x +
          fluidRow(
    90 - 1x + 1x +
            column(width = 9, teal_modules, class = "teal_primary_col"),
    91 - 1x + 1x +
            column(width = 3, filter_ui, class = "teal_secondary_col")
    @@ -13064,28 +13490,32 @@

    teal coverage - 73.28%

    105 - 6x + 6x +
      checkmate::assert_class(modules, "teal_modules")
    106 - 6x + 6x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    107 - 6x + 6x +
      checkmate::assert_class(reporter, "Reporter")
    108 - 4x + 4x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -13099,14 +13529,16 @@

    teal coverage - 73.28%

    110 - 4x + 4x +
      moduleServer(id, function(input, output, session) {
    111 - 4x + 4x +
        logger::log_trace("srv_tabs_with_filters initializing the module.")
    @@ -13120,14 +13552,16 @@

    teal coverage - 73.28%

    113 - 4x + 4x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    114 - 4x + 4x +
        manager_out <- filter_manager_modal_srv("filter_manager", filtered_data_list = datasets, filter = filter)
    @@ -13141,42 +13575,48 @@

    teal coverage - 73.28%

    116 - 4x + 4x +
        active_module <- srv_nested_tabs(
    117 - 4x + 4x +
          id = "root",
    118 - 4x + 4x +
          datasets = datasets,
    119 - 4x + 4x +
          modules = modules,
    120 - 4x + 4x +
          reporter = reporter,
    121 - 4x + 4x +
          is_module_specific = is_module_specific
    @@ -13197,28 +13637,32 @@

    teal coverage - 73.28%

    124 - 4x + 4x +
        if (!is_module_specific) {
    125 - 4x + 4x +
          active_datanames <- reactive(active_module()$datanames)
    126 - 4x + 4x +
          singleton <- unlist(datasets)[[1]]
    127 - 4x + 4x +
          singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
    @@ -13232,28 +13676,32 @@

    teal coverage - 73.28%

    129 - 4x + 4x +
          observeEvent(
    130 - 4x + 4x +
            eventExpr = active_datanames(),
    131 - 4x + 4x +
            handlerExpr = {
    132 - 5x + 5x +
              script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
    @@ -13267,7 +13715,8 @@

    teal coverage - 73.28%

    134 - 1x + 1x +
                "handleNoActiveDatasets();"
    @@ -13288,7 +13737,8 @@

    teal coverage - 73.28%

    137 - 4x + 4x +
                "handleActiveDatasetsPresent();"
    @@ -13302,7 +13752,8 @@

    teal coverage - 73.28%

    139 - 5x + 5x +
              shinyjs::runjs(script)
    @@ -13316,7 +13767,8 @@

    teal coverage - 73.28%

    141 - 4x + 4x +
            ignoreNULL = FALSE
    @@ -13344,21 +13796,24 @@

    teal coverage - 73.28%

    145 - 4x + 4x +
        showNotification("Data loaded - App fully started up")
    146 - 4x + 4x +
        logger::log_trace("srv_tabs_with_filters initialized the module")
    147 - 4x + 4x +
        return(active_module)
    @@ -14190,14 +14645,16 @@

    teal coverage - 73.28%

    116 - 38x + 38x +
      logger::log_trace("init initializing teal app with: data ({ class(data)[1] }).")
    117 - 38x + 38x +
      data <- teal.data::to_relational_data(data = data)
    @@ -14211,42 +14668,48 @@

    teal coverage - 73.28%

    119 - 33x + 33x +
      checkmate::assert_class(data, "TealData")
    120 - 33x + 33x +
      checkmate::assert_multi_class(modules, c("teal_module", "list", "teal_modules"))
    121 - 33x + 33x +
      checkmate::assert_string(title, null.ok = TRUE)
    122 - 33x + 33x +
      checkmate::assert(
    123 - 33x + 33x +
        checkmate::check_class(filter, "teal_slices"),
    124 - 33x + 33x +
        checkmate::check_list(filter, names = "named")
    @@ -14260,21 +14723,24 @@

    teal coverage - 73.28%

    126 - 32x + 32x +
      checkmate::assert_multi_class(header, c("shiny.tag", "character"))
    127 - 32x + 32x +
      checkmate::assert_multi_class(footer, c("shiny.tag", "character"))
    128 - 32x + 32x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -14288,7 +14754,8 @@

    teal coverage - 73.28%

    130 - 32x + 32x +
      teal.logger::log_system_info()
    @@ -14302,14 +14769,16 @@

    teal coverage - 73.28%

    132 - 32x + 32x +
      if (inherits(modules, "teal_module")) {
    133 - 1x + 1x +
        modules <- list(modules)
    @@ -14323,14 +14792,16 @@

    teal coverage - 73.28%

    135 - 32x + 32x +
      if (inherits(modules, "list")) {
    136 - 2x + 2x +
        modules <- do.call(teal::modules, modules)
    @@ -14358,42 +14829,48 @@

    teal coverage - 73.28%

    140 - 32x + 32x +
      datanames <- teal.data::get_dataname(data)
    141 - 32x + 32x +
      join_keys <- data$get_join_keys()
    142 - 32x + 32x +
      resolve_modules_datanames <- function(modules) {
    143 - 240x + 240x +
        if (inherits(modules, "teal_modules")) {
    144 - 90x + 90x +
          modules$children <- sapply(modules$children, resolve_modules_datanames, simplify = FALSE)
    145 - 90x + 90x +
          modules
    @@ -14407,35 +14884,40 @@

    teal coverage - 73.28%

    147 - 150x + 150x +
          modules$datanames <- if (identical(modules$datanames, "all")) {
    148 - 5x + 5x +
            datanames
    149 - 150x + 150x +
          } else if (is.character(modules$datanames)) {
    150 - 145x + 145x +
            datanames_adjusted <- intersect(modules$datanames, datanames)
    151 - 145x + 145x +
            include_parent_datanames(dataname = datanames_adjusted, join_keys = join_keys)
    @@ -14449,7 +14931,8 @@

    teal coverage - 73.28%

    153 - 150x + 150x +
          modules
    @@ -14470,7 +14953,8 @@

    teal coverage - 73.28%

    156 - 32x + 32x +
      modules <- resolve_modules_datanames(modules = modules)
    @@ -14484,14 +14968,16 @@

    teal coverage - 73.28%

    158 - 32x + 32x +
      if (!inherits(filter, "teal_slices")) {
    159 - 1x + 1x +
        checkmate::assert_subset(names(filter), choices = datanames)
    @@ -14512,7 +14998,8 @@

    teal coverage - 73.28%

    162 - 1x + 1x +
        filter <- list_to_teal_slices(filter)
    @@ -14533,7 +15020,8 @@

    teal coverage - 73.28%

    165 - 32x + 32x +
      filter <- as.teal_slices(as.list(filter))
    @@ -14554,21 +15042,24 @@

    teal coverage - 73.28%

    168 - 32x + 32x +
      for (i in seq_along(filter)) {
    169 - 2x + 2x +
        dataname_i <- shiny::isolate(filter[[i]]$dataname)
    170 - 2x + 2x +
        if (!dataname_i %in% datanames) {
    @@ -14652,7 +15143,8 @@

    teal coverage - 73.28%

    182 - 32x + 32x +
      if (isTRUE(attr(filter, "module_specific"))) {
    @@ -14862,21 +15354,24 @@

    teal coverage - 73.28%

    212 - 32x + 32x +
      res <- list(
    213 - 32x + 32x +
        ui = ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
    214 - 32x + 32x +
        server = function(input, output, session) {
    @@ -14925,14 +15420,16 @@

    teal coverage - 73.28%

    221 - 32x + 32x +
      logger::log_trace("init teal app has been initialized.")
    222 - 32x + 32x +
      return(res)
    @@ -15525,28 +16022,32 @@

    teal coverage - 73.28%

    44 - 40x + 40x +
      checkmate::assert_list(
    45 - 40x + 40x +
        data,
    46 - 40x + 40x +
        any.missing = FALSE, names = "unique",
    47 - 40x + 40x +
        types = c("data.frame", "reactive", "MultiAssayExperiment")
    @@ -15560,14 +16061,16 @@

    teal coverage - 73.28%

    49 - 36x + 36x +
      checkmate::assert_class(join_keys, "JoinKeys", null.ok = TRUE)
    50 - 35x + 35x +
      checkmate::assert_multi_class(code, c("character", "reactive"))
    @@ -15581,21 +16084,24 @@

    teal coverage - 73.28%

    52 - 34x + 34x +
      checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
    53 - 32x + 32x +
      checkmate::assert_subset(names(metadata), names(data))
    54 - 20x + 20x +
      for (m in metadata) teal.data::validate_metadata(m)
    @@ -15609,14 +16115,16 @@

    teal coverage - 73.28%

    56 - 31x + 31x +
      if (is.reactive(code)) {
    57 - 15x + 15x +
        isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
    @@ -15644,21 +16152,24 @@

    teal coverage - 73.28%

    61 - 30x + 30x +
      for (x in names(data)) {
    62 - 49x + 49x +
        if (!is.reactive(data[[x]])) {
    63 - 29x + 29x +
          data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
    @@ -15672,28 +16183,32 @@

    teal coverage - 73.28%

    65 - 20x + 20x +
          isolate(
    66 - 20x + 20x +
            checkmate::assert_multi_class(
    67 - 20x + 20x +
              data[[x]](), c("data.frame", "MultiAssayExperiment"),
    68 - 20x + 20x +
              .var.name = "data"
    @@ -15742,21 +16257,24 @@

    teal coverage - 73.28%

    75 - 29x + 29x +
      attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
    76 - 29x + 29x +
      attr(data, "join_keys") <- join_keys
    77 - 29x + 29x +
      attr(data, "metadata") <- metadata
    @@ -15777,14 +16295,16 @@

    teal coverage - 73.28%

    80 - 29x + 29x +
      class(data) <- c("tdata", class(data))
    81 - 29x + 29x +
      data
    @@ -15917,14 +16437,16 @@

    teal coverage - 73.28%

    100 - 2x + 2x +
      checkmate::assert_class(data, "tdata")
    101 - 1x + 1x +
      list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
    @@ -15987,7 +16509,8 @@

    teal coverage - 73.28%

    110 - 6x + 6x +
      attr(x, "code")()
    @@ -16071,14 +16594,16 @@

    teal coverage - 73.28%

    122 - 4x + 4x +
      checkmate::assert_class(data, "tdata")
    123 - 2x + 2x +
      get_code(data)
    @@ -16141,7 +16666,8 @@

    teal coverage - 73.28%

    132 - 3x + 3x +
      UseMethod("get_join_keys", data)
    @@ -16190,7 +16716,8 @@

    teal coverage - 73.28%

    139 - 3x + 3x +
      attr(data, "join_keys")
    @@ -16302,14 +16829,16 @@

    teal coverage - 73.28%

    155 - 6x + 6x +
      checkmate::assert_string(dataname)
    156 - 6x + 6x +
      UseMethod("get_metadata", data)
    @@ -16351,21 +16880,24 @@

    teal coverage - 73.28%

    162 - 6x + 6x +
      metadata <- attr(data, "metadata")
    163 - 6x + 6x +
      if (is.null(metadata)) {
    164 - 1x + 1x +
        return(NULL)
    @@ -16379,7 +16911,8 @@

    teal coverage - 73.28%

    166 - 5x + 5x +
      metadata[[dataname]]
    @@ -16882,21 +17415,24 @@

    teal coverage - 73.28%

    64 - 2x + 2x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    65 - 2x + 2x +
      checkmate::assert_count(depth)
    66 - 2x + 2x +
      UseMethod("ui_nested_tabs", modules)
    @@ -16980,35 +17516,40 @@

    teal coverage - 73.28%

    78 - 1x + 1x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    79 - 1x + 1x +
      ns <- NS(id)
    80 - 1x + 1x +
      do.call(
    81 - 1x + 1x +
        tabsetPanel,
    82 - 1x + 1x +
        c(
    @@ -17022,21 +17563,24 @@

    teal coverage - 73.28%

    84 - 1x + 1x +
          list(
    85 - 1x + 1x +
            id = ns("active_tab"),
    86 - 1x + 1x +
            type = if (modules$label == "root") "pills" else "tabs"
    @@ -17050,91 +17594,104 @@

    teal coverage - 73.28%

    88 - 1x + 1x +
          lapply(
    89 - 1x + 1x +
            names(modules$children),
    90 - 1x + 1x +
            function(module_id) {
    91 - 1x + 1x +
              module_label <- modules$children[[module_id]]$label
    92 - 1x + 1x +
              tabPanel(
    93 - 1x + 1x +
                title = module_label,
    94 - 1x + 1x +
                value = module_id, # when clicked this tab value changes input$<tabset panel id>
    95 - 1x + 1x +
                ui_nested_tabs(
    96 - 1x + 1x +
                  id = ns(module_id),
    97 - 1x + 1x +
                  modules = modules$children[[module_id]],
    98 - 1x + 1x +
                  datasets = datasets[[module_label]],
    99 - 1x + 1x +
                  depth = depth + 1L,
    100 - 1x + 1x +
                  is_module_specific = is_module_specific
    @@ -17218,14 +17775,16 @@

    teal coverage - 73.28%

    112 - 1x + 1x +
      checkmate::assert_class(datasets, class = "FilteredData")
    113 - 1x + 1x +
      ns <- NS(id)
    @@ -17239,14 +17798,16 @@

    teal coverage - 73.28%

    115 - 1x + 1x +
      args <- isolate(teal.transform::resolve_delayed(modules$ui_args, datasets))
    116 - 1x + 1x +
      args <- c(list(id = ns("module")), args)
    @@ -17260,7 +17821,8 @@

    teal coverage - 73.28%

    118 - 1x + 1x +
      if (is_arg_used(modules$ui, "datasets")) {
    @@ -17288,7 +17850,8 @@

    teal coverage - 73.28%

    122 - 1x + 1x +
      if (is_arg_used(modules$ui, "data")) {
    @@ -17323,49 +17886,56 @@

    teal coverage - 73.28%

    127 - 1x + 1x +
      teal_ui <- tags$div(
    128 - 1x + 1x +
        id = id,
    129 - 1x + 1x +
        class = "teal_module",
    130 - 1x + 1x +
        uiOutput(ns("data_reactive"), inline = TRUE),
    131 - 1x + 1x +
        tagList(
    132 - 1x + 1x +
          if (depth >= 2L) div(style = "mt-6"),
    133 - 1x + 1x +
          do.call(modules$ui, args)
    @@ -17393,7 +17963,8 @@

    teal coverage - 73.28%

    137 - 1x + 1x +
      if (!is.null(modules$datanames) && is_module_specific) {
    @@ -17463,7 +18034,8 @@

    teal coverage - 73.28%

    147 - 1x + 1x +
        teal_ui
    @@ -17512,21 +18084,24 @@

    teal coverage - 73.28%

    154 - 54x + 54x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    155 - 54x + 54x +
      checkmate::assert_class(reporter, "Reporter")
    156 - 53x + 53x +
      UseMethod("srv_nested_tabs", modules)
    @@ -17624,7 +18199,8 @@

    teal coverage - 73.28%

    170 - 24x + 24x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    @@ -17638,14 +18214,16 @@

    teal coverage - 73.28%

    172 - 24x + 24x +
      moduleServer(id = id, module = function(input, output, session) {
    173 - 24x + 24x +
        logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
    @@ -17659,70 +18237,80 @@

    teal coverage - 73.28%

    175 - 24x + 24x +
        labels <- vapply(modules$children, `[[`, character(1), "label")
    176 - 24x + 24x +
        modules_reactive <- sapply(
    177 - 24x + 24x +
          names(modules$children),
    178 - 24x + 24x +
          function(module_id) {
    179 - 35x + 35x +
            srv_nested_tabs(
    180 - 35x + 35x +
              id = module_id,
    181 - 35x + 35x +
              datasets = datasets[[labels[module_id]]],
    182 - 35x + 35x +
              modules = modules$children[[module_id]],
    183 - 35x + 35x +
              is_module_specific = is_module_specific,
    184 - 35x + 35x +
              reporter = reporter
    @@ -17743,7 +18331,8 @@

    teal coverage - 73.28%

    187 - 24x + 24x +
          simplify = FALSE
    @@ -17771,21 +18360,24 @@

    teal coverage - 73.28%

    191 - 24x + 24x +
        input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
    192 - 24x + 24x +
        get_active_module <- reactive({
    193 - 13x + 13x +
          if (length(modules$children) == 1L) {
    @@ -17799,7 +18391,8 @@

    teal coverage - 73.28%

    195 - 2x + 2x +
            modules_reactive[[1]]()
    @@ -17820,7 +18413,8 @@

    teal coverage - 73.28%

    198 - 11x + 11x +
            modules_reactive[[input_validated()]]()
    @@ -17848,7 +18442,8 @@

    teal coverage - 73.28%

    202 - 24x + 24x +
        get_active_module
    @@ -17904,14 +18499,16 @@

    teal coverage - 73.28%

    210 - 29x + 29x +
      checkmate::assert_class(datasets, "FilteredData")
    211 - 29x + 29x +
      logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
    @@ -17925,21 +18522,24 @@

    teal coverage - 73.28%

    213 - 29x + 29x +
      moduleServer(id = id, module = function(input, output, session) {
    214 - 29x + 29x +
        modules$server_args <- teal.transform::resolve_delayed(modules$server_args, datasets)
    215 - 29x + 29x +
        if (!is.null(modules$datanames) && is_module_specific) {
    @@ -17995,35 +18595,40 @@

    teal coverage - 73.28%

    223 - 29x + 29x +
        trigger_data <- reactiveVal(1L)
    224 - 29x + 29x +
        trigger_module <- reactiveVal(NULL)
    225 - 29x + 29x +
        output$data_reactive <- renderUI({
    226 - 18x + 18x +
          lapply(datasets$datanames(), function(x) {
    227 - 22x + 22x +
            datasets$get_data(x, filtered = TRUE)
    @@ -18037,14 +18642,16 @@

    teal coverage - 73.28%

    229 - 18x + 18x +
          isolate(trigger_data(trigger_data() + 1))
    230 - 18x + 18x +
          isolate(trigger_module(TRUE))
    @@ -18058,7 +18665,8 @@

    teal coverage - 73.28%

    232 - 18x + 18x +
          NULL
    @@ -18086,14 +18694,16 @@

    teal coverage - 73.28%

    236 - 29x + 29x +
        args <- c(list(id = "module"), modules$server_args)
    237 - 29x + 29x +
        if (is_arg_used(modules$server, "reporter")) {
    @@ -18121,14 +18731,16 @@

    teal coverage - 73.28%

    241 - 29x + 29x +
        if (is_arg_used(modules$server, "datasets")) {
    242 - 2x + 2x +
          args <- c(args, datasets = datasets)
    @@ -18149,21 +18761,24 @@

    teal coverage - 73.28%

    245 - 29x + 29x +
        if (is_arg_used(modules$server, "data")) {
    246 - 8x + 8x +
          data <- .datasets_to_data(modules, datasets, trigger_data)
    247 - 8x + 8x +
          args <- c(args, data = list(data))
    @@ -18184,21 +18799,24 @@

    teal coverage - 73.28%

    250 - 29x + 29x +
        if (is_arg_used(modules$server, "filter_panel_api")) {
    251 - 2x + 2x +
          filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
    252 - 2x + 2x +
          args <- c(args, filter_panel_api = filter_panel_api)
    @@ -18219,28 +18837,32 @@

    teal coverage - 73.28%

    255 - 29x + 29x +
        if (is_arg_used(modules$server, "datasets") && is_arg_used(modules$server, "data")) {
    256 - 1x + 1x +
          warning(
    257 - 1x + 1x +
            "Module '", modules$label, "' has `data` and `datasets` arguments in the formals.",
    258 - 1x + 1x +
            "\nIt's recommended to use `data` to work with filtered objects."
    @@ -18275,49 +18897,56 @@

    teal coverage - 73.28%

    263 - 29x + 29x +
        observeEvent(
    264 - 29x + 29x +
          ignoreNULL = TRUE,
    265 - 29x + 29x +
          once = TRUE,
    266 - 29x + 29x +
          eventExpr = trigger_module(),
    267 - 29x + 29x +
          handlerExpr = {
    268 - 18x + 18x +
            module_output <- if (is_arg_used(modules$server, "id")) {
    269 - 18x + 18x +
              do.call(modules$server, args)
    @@ -18366,7 +18995,8 @@

    teal coverage - 73.28%

    276 - 29x + 29x +
        reactive(modules)
    @@ -18506,21 +19136,24 @@

    teal coverage - 73.28%

    296 - 13x + 13x +
      checkmate::assert_class(module, "teal_module")
    297 - 13x + 13x +
      checkmate::assert_class(datasets, "FilteredData")
    298 - 13x + 13x +
      checkmate::assert_class(trigger_data, "reactiveVal")
    @@ -18534,7 +19167,8 @@

    teal coverage - 73.28%

    300 - 12x + 12x +
      datanames <- if (is.null(module$datanames)) datasets$datanames() else module$datanames
    @@ -18555,28 +19189,32 @@

    teal coverage - 73.28%

    303 - 12x + 12x +
      data <- sapply(
    304 - 12x + 12x +
        datanames,
    305 - 12x + 12x +
        function(x) eventReactive(trigger_data(), datasets$get_data(x, filtered = TRUE)),
    306 - 12x + 12x +
        simplify = FALSE
    @@ -18597,21 +19235,24 @@

    teal coverage - 73.28%

    309 - 12x + 12x +
      hashes <- calculate_hashes(datanames, datasets)
    310 - 12x + 12x +
      metadata <- lapply(datanames, datasets$get_metadata)
    311 - 12x + 12x +
      names(metadata) <- datanames
    @@ -18625,63 +19266,72 @@

    teal coverage - 73.28%

    313 - 12x + 12x +
      new_tdata(
    314 - 12x + 12x +
        data,
    315 - 12x + 12x +
        eventReactive(
    316 - 12x + 12x +
          trigger_data(),
    317 - 12x + 12x +
          c(
    318 - 12x + 12x +
            get_rcode_str_install(),
    319 - 12x + 12x +
            get_rcode_libraries(),
    320 - 12x + 12x +
            get_datasets_code(datanames, datasets, hashes),
    321 - 12x + 12x +
            teal.slice::get_filter_expr(datasets, datanames)
    @@ -18702,14 +19352,16 @@

    teal coverage - 73.28%

    324 - 12x + 12x +
        datasets$get_join_keys(),
    325 - 12x + 12x +
        metadata
    @@ -18800,7 +19452,8 @@

    teal coverage - 73.28%

    338 - 16x + 16x +
      sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
    @@ -18988,56 +19641,64 @@

    teal coverage - 73.28%

    25 - 4x + 4x +
          checkmate::assert_character(src, min.len = 0, max.len = 1)
    26 - 4x + 4x +
          params <- list(...)
    27 - 4x + 4x +
          params$eval <- FALSE
    28 - 4x + 4x +
          rblock <- RcodeBlock$new(src)
    29 - 4x + 4x +
          rblock$set_params(params)
    30 - 4x + 4x +
          self$append_content(rblock)
    31 - 4x + 4x +
          self$append_metadata("SRC", src)
    32 - 4x + 4x +
          invisible(self)
    @@ -19107,28 +19768,32 @@

    teal coverage - 73.28%

    42 - 4x + 4x +
          checkmate::assert_class(fs, "teal_slices")
    43 - 3x + 3x +
          self$append_text("Filter State", "header3")
    44 - 3x + 3x +
          self$append_content(TealSlicesBlock$new(fs))
    45 - 3x + 3x +
          invisible(self)
    @@ -19205,56 +19870,64 @@

    teal coverage - 73.28%

    56 - 4x + 4x +
          checkmate::assert_list(encodings)
    57 - 4x + 4x +
          self$append_text("Selected Options", "header3")
    58 - 4x + 4x +
          if (requireNamespace("yaml", quietly = TRUE)) {
    59 - 4x + 4x +
            self$append_text(yaml::as.yaml(encodings, handlers = list(
    60 - 4x + 4x +
              POSIXct = function(x) format(x, "%Y-%m-%d"),
    61 - 4x + 4x +
              POSIXlt = function(x) format(x, "%Y-%m-%d"),
    62 - 4x + 4x +
              Date = function(x) format(x, "%Y-%m-%d")
    63 - 4x + 4x +
            )), "verbatim")
    @@ -19282,14 +19955,16 @@

    teal coverage - 73.28%

    67 - 4x + 4x +
          self$append_metadata("Encodings", encodings)
    68 - 4x + 4x +
          invisible(self)
    @@ -19457,21 +20132,24 @@

    teal coverage - 73.28%

    92 - 9x + 9x +
          self$set_content(content)
    93 - 8x + 8x +
          self$set_style(style)
    94 - 8x + 8x +
          invisible(self)
    @@ -19562,56 +20240,64 @@

    teal coverage - 73.28%

    107 - 10x + 10x +
          checkmate::assert_class(content, "teal_slices")
    108 - 9x + 9x +
          if (length(content) != 0) {
    109 - 7x + 7x +
            states_list <- lapply(content, function(x) {
    110 - 7x + 7x +
              x_list <- shiny::isolate(as.list(x))
    111 - 7x + 7x +
              if (
    112 - 7x + 7x +
                inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
    113 - 7x + 7x +
                  length(x_list$choices) == 2 &&
    114 - 7x + 7x +
                  length(x_list$selected) == 2
    @@ -19646,7 +20332,8 @@

    teal coverage - 73.28%

    119 - 7x + 7x +
              if (!is.null(x_list$arg)) {
    @@ -19674,14 +20361,16 @@

    teal coverage - 73.28%

    123 - 7x + 7x +
              x_list <- x_list[
    124 - 7x + 7x +
                c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
    @@ -19695,21 +20384,24 @@

    teal coverage - 73.28%

    126 - 7x + 7x +
              names(x_list) <- c(
    127 - 7x + 7x +
                "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
    128 - 7x + 7x +
                "Selected Values", "Selected range", "Include NA values", "Include Inf values"
    @@ -19730,7 +20422,8 @@

    teal coverage - 73.28%

    131 - 7x + 7x +
              Filter(Negate(is.null), x_list)
    @@ -19751,14 +20444,16 @@

    teal coverage - 73.28%

    134 - 7x + 7x +
            if (requireNamespace("yaml", quietly = TRUE)) {
    135 - 7x + 7x +
              super$set_content(yaml::as.yaml(states_list))
    @@ -19793,14 +20488,16 @@

    teal coverage - 73.28%

    140 - 9x + 9x +
          private$teal_slices <- content
    141 - 9x + 9x +
          invisible(self)
    @@ -19849,28 +20546,32 @@

    teal coverage - 73.28%

    148 - 1x + 1x +
          checkmate::assert_list(x)
    149 - 1x + 1x +
          checkmate::assert_names(names(x), must.include = c("teal_slices"))
    150 - 1x + 1x +
          self$set_content(x$teal_slices)
    151 - 1x + 1x +
          invisible(self)
    @@ -19912,7 +20613,8 @@

    teal coverage - 73.28%

    157 - 2x + 2x +
          list(teal_slices = private$teal_slices)
    @@ -20610,14 +21312,16 @@

    teal coverage - 73.28%

    46 - 17x + 17x +
      stopifnot(
    47 - 17x + 17x +
        "Please provide a character vector in msg argument of validate_has_data." = is.character(msg) || is.null(msg)
    @@ -20631,49 +21335,56 @@

    teal coverage - 73.28%

    49 - 15x + 15x +
      validate(need(!is.null(x) && is.data.frame(x), "No data left."))
    50 - 15x + 15x +
      if (!is.null(min_nrow)) {
    51 - 15x + 15x +
        if (complete) {
    52 - 5x + 5x +
          complete_index <- stats::complete.cases(x)
    53 - 5x + 5x +
          validate(need(
    54 - 5x + 5x +
            sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
    55 - 5x + 5x +
            paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
    @@ -20694,35 +21405,40 @@

    teal coverage - 73.28%

    58 - 10x + 10x +
          validate(need(
    59 - 10x + 10x +
            nrow(x) >= min_nrow,
    60 - 10x + 10x +
            paste(
    61 - 10x + 10x +
              c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
    62 - 10x + 10x +
              collapse = "\n"
    @@ -20757,28 +21473,32 @@

    teal coverage - 73.28%

    67 - 10x + 10x +
        if (!allow_inf) {
    68 - 6x + 6x +
          validate(need(
    69 - 6x + 6x +
            all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
    70 - 6x + 6x +
            "Dataframe contains Inf values which is not allowed."
    @@ -23045,14 +23765,16 @@

    teal coverage - 73.28%

    18 - 2x + 2x +
      packageStartupMessage(
    19 - 2x + 2x +
        "\nYou are using teal version ",
    @@ -23073,7 +23795,8 @@

    teal coverage - 73.28%

    22 - 2x + 2x +
        read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
    @@ -23205,28 +23928,32 @@

    teal coverage - 73.28%

    8 - 14x + 14x +
      vapply(
    9 - 14x + 14x +
        utils::sessionInfo()$otherPkgs,
    10 - 14x + 14x +
        function(x) {
    11 - 238x + 238x +
          paste0("library(", x$Package, ")")
    @@ -23240,7 +23967,8 @@

    teal coverage - 73.28%

    13 - 14x + 14x +
        character(1)
    @@ -23261,21 +23989,24 @@

    teal coverage - 73.28%

    16 - 14x + 14x +
        rev() %>%
    17 - 14x + 14x +
        paste0(sep = "\n") %>%
    18 - 14x + 14x +
        paste0(collapse = "")
    @@ -23317,7 +24048,8 @@

    teal coverage - 73.28%

    24 - 18x + 18x +
      code_string <- getOption("teal.load_nest_code")
    @@ -23331,14 +24063,16 @@

    teal coverage - 73.28%

    26 - 18x + 18x +
      if (!is.null(code_string) && is.character(code_string)) {
    27 - 2x + 2x +
        return(code_string)
    @@ -23359,7 +24093,8 @@

    teal coverage - 73.28%

    30 - 16x + 16x +
      return("# Add any code to install/load your NEST environment here\n")
    @@ -23478,14 +24213,16 @@

    teal coverage - 73.28%

    47 - 14x + 14x +
      str_code <- datasets$get_code(datanames)
    48 - 14x + 14x +
      if (length(str_code) == 0 || (length(str_code) == 1 && str_code == "")) {
    @@ -23499,14 +24236,16 @@

    teal coverage - 73.28%

    50 - 14x + 14x +
      } else if (length(str_code) > 0) {
    51 - 14x + 14x +
        str_code <- paste0(str_code, "\n\n")
    @@ -23527,35 +24266,40 @@

    teal coverage - 73.28%

    54 - 14x + 14x +
      if (!datasets$get_check()) {
    55 - 10x + 10x +
        check_note_string <- paste0(
    56 - 10x + 10x +
          c(
    57 - 10x + 10x +
            "message(paste(\"Reproducibility of data import and preprocessing was not explicitly checked\",",
    58 - 10x + 10x +
            "   \" ('check = FALSE' is set). Contact app developer if this is an issue.\n\"))"
    @@ -23569,7 +24313,8 @@

    teal coverage - 73.28%

    60 - 10x + 10x +
          collapse = "\n"
    @@ -23583,7 +24328,8 @@

    teal coverage - 73.28%

    62 - 10x + 10x +
        str_code <- paste0(str_code, "\n\n", check_note_string)
    @@ -23604,63 +24350,72 @@

    teal coverage - 73.28%

    65 - 14x + 14x +
      str_hash <- paste(
    66 - 14x + 14x +
        paste0(
    67 - 14x + 14x +
          vapply(
    68 - 14x + 14x +
            datanames,
    69 - 14x + 14x +
            function(dataname) {
    70 - 17x + 17x +
              sprintf(
    71 - 17x + 17x +
                "stopifnot(%s == %s)",
    72 - 17x + 17x +
                deparse1(bquote(rlang::hash(.(as.name(dataname))))),
    73 - 17x + 17x +
                deparse1(hashes[[dataname]])
    @@ -23681,7 +24436,8 @@

    teal coverage - 73.28%

    76 - 14x + 14x +
            character(1)
    @@ -23695,7 +24451,8 @@

    teal coverage - 73.28%

    78 - 14x + 14x +
          collapse = "\n"
    @@ -23709,7 +24466,8 @@

    teal coverage - 73.28%

    80 - 14x + 14x +
        "\n\n"
    @@ -23730,7 +24488,8 @@

    teal coverage - 73.28%

    83 - 14x + 14x +
      c(str_code, str_hash)
    @@ -23869,21 +24628,24 @@

    teal coverage - 73.28%

    18 - 4x + 4x +
      checkmate::assert_string(label)
    19 - 2x + 2x +
      checkmate::assert_list(server_args, names = "named")
    20 - 2x + 2x +
      checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
    @@ -23897,7 +24659,8 @@

    teal coverage - 73.28%

    22 - 2x + 2x +
      srv <- function(id, reporter, ...) {
    @@ -23925,7 +24688,8 @@

    teal coverage - 73.28%

    26 - 2x + 2x +
      ui <- function(id, ...) {
    @@ -23953,28 +24717,32 @@

    teal coverage - 73.28%

    30 - 2x + 2x +
      module <- module(
    31 - 2x + 2x +
        label = label,
    32 - 2x + 2x +
        server = srv, ui = ui,
    33 - 2x + 2x +
        server_args = server_args, ui_args = list(), datanames = NULL
    @@ -23988,14 +24756,16 @@

    teal coverage - 73.28%

    35 - 2x + 2x +
      class(module) <- c("teal_module_previewer", class(module))
    36 - 2x + 2x +
      module
    @@ -24428,28 +25198,32 @@

    teal coverage - 73.28%

    60 - 91x + 91x +
      shiny::isolate({
    61 - 91x + 91x +
        checkmate::assert_flag(allow_add)
    62 - 91x + 91x +
        checkmate::assert_flag(module_specific)
    63 - 45x + 45x +
        if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
    @@ -24463,14 +25237,16 @@

    teal coverage - 73.28%

    65 - 88x + 88x +
        slices <- list(...)
    66 - 88x + 88x +
        all_slice_id <- vapply(slices, `[[`, character(1L), "id")
    @@ -24484,14 +25260,16 @@

    teal coverage - 73.28%

    68 - 88x + 88x +
        if (missing(mapping)) {
    69 - 46x + 46x +
          mapping <- list(global_filters = all_slice_id)
    @@ -24505,14 +25283,16 @@

    teal coverage - 73.28%

    71 - 88x + 88x +
        if (!module_specific) {
    72 - 84x + 84x +
          mapping[setdiff(names(mapping), "global_filters")] <- NULL
    @@ -24533,42 +25313,48 @@

    teal coverage - 73.28%

    75 - 88x + 88x +
        failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
    76 - 88x + 88x +
        if (length(failed_slice_id)) {
    77 - 1x + 1x +
          stop(sprintf(
    78 - 1x + 1x +
            "Filters in mapping don't match any available filter.\n %s not in %s",
    79 - 1x + 1x +
            toString(failed_slice_id),
    80 - 1x + 1x +
            toString(all_slice_id)
    @@ -24596,7 +25382,8 @@

    teal coverage - 73.28%

    84 - 87x + 87x +
        tss <- teal.slice::teal_slices(
    @@ -24610,28 +25397,32 @@

    teal coverage - 73.28%

    86 - 87x + 87x +
          exclude_varnames = exclude_varnames,
    87 - 87x + 87x +
          include_varnames = include_varnames,
    88 - 87x + 87x +
          count_type = count_type,
    89 - 87x + 87x +
          allow_add = allow_add
    @@ -24645,28 +25436,32 @@

    teal coverage - 73.28%

    91 - 87x + 87x +
        attr(tss, "mapping") <- mapping
    92 - 87x + 87x +
        attr(tss, "module_specific") <- module_specific
    93 - 87x + 87x +
        class(tss) <- c("modules_teal_slices", class(tss))
    94 - 87x + 87x +
        tss
    @@ -24736,14 +25531,16 @@

    teal coverage - 73.28%

    104 - 33x + 33x +
      checkmate::assert_list(x)
    105 - 33x + 33x +
      lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
    @@ -24757,21 +25554,24 @@

    teal coverage - 73.28%

    107 - 33x + 33x +
      attrs <- attributes(unclass(x))
    108 - 33x + 33x +
      ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
    109 - 33x + 33x +
      do.call(teal_slices, c(ans, attrs))
    @@ -24869,28 +25669,32 @@

    teal coverage - 73.28%

    123 - 1x + 1x +
      checkmate::assert_class(filter, "teal_slices")
    124 - 1x + 1x +
      shiny::isolate({
    125 - 1x + 1x +
        filter_copy <- lapply(filter, function(slice) {
    126 - 2x + 2x +
          teal.slice::as.teal_slice(as.list(slice))
    @@ -24904,14 +25708,16 @@

    teal coverage - 73.28%

    128 - 1x + 1x +
        attributes(filter_copy) <- attributes(filter)
    129 - 1x + 1x +
        filter_copy
    diff --git a/v0.14.0/index.html b/v0.14.0/index.html index b30c14b561..f169b6b81b 100644 --- a/v0.14.0/index.html +++ b/v0.14.0/index.html @@ -1,5 +1,4 @@ - - + @@ -65,23 +64,7 @@ - - + - + + diff --git a/v0.14.0/news/index.html b/v0.14.0/news/index.html index 230a445860..b67e07d7fe 100644 --- a/v0.14.0/news/index.html +++ b/v0.14.0/news/index.html @@ -1,8 +1,22 @@ - -Changelog • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -86,98 +106,143 @@
    -

    teal 0.14.0

    +

    teal 0.14.0 +

    -

    New features

    -
    • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
    • +

      New features +

      +
        +
      • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
      • Enabled capturing and resetting application filter state with snapshots. See ?snapshot.
      • Enabled reporter_previewer_module to customize default values through srv_args.
      • Enabled passing own reporter_previewer_module in a list of modules to override default one.
      • -
    + +
    -

    Breaking changes

    -
    • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
    • +

      Breaking changes +

      +
        +
      • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
      • Soft deprecated filters argument in module and replaced it with datanames. Details in documentation of teal::module
      • -
    + +
    -

    Miscellaneous

    -
    • Removed scda package dependency from examples.
    • -
    +

    Miscellaneous +

    +
      +
    • Removed scda package dependency from examples.
    • +
    +
    -

    teal 0.13.0

    +

    teal 0.13.0 +

    -

    Breaking changes

    -
    • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
    • +

      Breaking changes +

      +
        +
      • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
      • Due to deprecation of chunks in teal.code, the teal framework now uses their replacement (qenv) instead. The documentation in teal has been updated to reflect this and custom modules written with chunks should be updated to use qenv.
      • Due to deprecation of chunks in teal.code, get_rcode, get_rcode_srv, and get_rcode_ui have been removed.
      • -
    + +
    -

    New features

    -
    • Added the validate_inputs function that transfers input validation messages to app output.
    • +

      New features +

      +
        +
      • Added the validate_inputs function that transfers input validation messages to app output.
      • modules argument of init accepts teal_module type of object. There is no need to wrap up a single module in modules() or list().
      • Updated module_nested_tabs so that only active modules are calculated in a teal app.
      • -
    + +
    -

    Miscellaneous

    -
    • Updated examples to use scda.2022.
    • +

      Miscellaneous +

      +
        +
      • Updated examples to use scda.2022.
      • Added R session information into a link in the footer of teal applications.
      • Added data hashing step using rlang instead of digest package to calculate the hash (which has been moved from teal.data and teal.slice). There is now an explicit hashing check in the reproducible code output.
      • Removed deprecated functions: root_modules, default_filter, bookmarkableShinyApp, as well as deprecated logging mechanism, including the functions log_app_usage and .log.
      • Updated the “Teal and Bootstrap Themes” vignette to provide more details customizing a teal app with bslib::run_with_themer.
      • Removed outdated diagram from srv_nested_tabs documentation.
      • Changed default values of header and footer arguments in init to empty text.
      • -
    + +
    -

    teal 0.12.0

    -
    -

    New features

    -
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • -
    +

    teal 0.12.0 +

    +
    +

    New features +

    +
      +
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • +
    +
    -

    Enhancements

    -
    • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
    • +

      Enhancements +

      +
        +
      • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
      • Updated teal_module to have data argument which receives a list of reactive filter data with "code" and "join_keys" attributes.
      • Updated teal_module to have filter_panel_api argument which receives a FilterPanelAPI object.
      • Updated the internals of module_teal to reflect changes in teal.slice.
      • -
    + +
    -

    Breaking changes

    -
    • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
    • +

      Breaking changes +

      +
        +
      • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
      • Deprecated merge_expression argument in get_rcode_srv function and removed it in get_rcode function.
      • Deprecated session argument in get_rcode function.
      • -
    + +
    -

    Miscellaneous

    -
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • -
    +

    Miscellaneous +

    +
      +
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • +
    +
    -

    teal 0.11.1

    +

    teal 0.11.1 +

    -

    Enhancements

    -
    • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
    • +

      Enhancements +

      +
        +
      • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
      • Updated teal to support modules which include reporting. If any module which supports reporting is included then a reporter_previewer_module is included.
      • Added default arguments to module() and the server argument is now a function where the second argument can be ... or datasets.
      • -
    + +
    -

    Breaking changes

    -
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • -
    +

    Breaking changes +

    +
      +
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • +
    +
    -

    Miscellaneous

    -
    • Added a template to the pkgdown configuration.
    • +

      Miscellaneous +

      +
        +
      • Added a template to the pkgdown configuration.
      • Removed unneeded shinytest app tests.
      • Updated package authors.
      • Added package vignettes.
      • -
    + +
    -

    teal 0.11.0

    -
    +

    The teal package contains the code to create apps (teal::init), to create a module (teal::module) and to group modules in the app (teal::modules). teal depends on teal.transform and teal.data which contain the functions that teal app creators are likely to need. The other package teal only imports from and therefore teal module creators should either fully specify functions from these packages when required or import them into custom packages as library(teal) will not load them.

    +
    +

    New features +

    +
      +
    • A simple new teal module named example_module has been included in the package.
    • +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • teal package has been split into multiple smaller packages, see above.
      • Deprecated root_modules function, users should use modules directly inside init.
      • Due to deprecation of root_modules any label argument to modules must be explicitly named. For example modules("lab", mod1, mod2) should be replaced with modules(label = "lab", mod1, mod2).
      • -
    + +
    -

    Miscellaneous

    -
    • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
    • +

      Miscellaneous +

      +
        +
      • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
      • MultiAssayExperiment is now suggested packages, not required. Objects dependent on MultiAssayExperiment are changed to lazy-load this now suggested package.
      • -
    + +
    -

    Bug fixes

    -
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • -
    +

    Bug fixes +

    +
      +
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • +
    +
    -

    teal 0.10.1

    +

    teal 0.10.1 +

    -

    Breaking changes

    -
    • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
    • +

      Breaking changes +

      +
        +
      • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
      • Deprecated all functions related to connectors that have been moved to their own separate packages.
      • Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational.
      • Removed rcd_connection and rcd_data; scda_dataset_connectors can be passed into cdisc_data and teal_data directly.
      • Replaced rcd_dataset_connector and rcd_cdisc_dataset_connector with scda_dataset_connector and scda_cdisc_dataset_connector respectively.
      • Renamed teal_show_js_log option into teal.show_js_log to match options naming convention.
      • Removed %is_in% and stop_shiny internal utility functions.
      • -
    + +
    -

    New features

    +

    New features +

    -
    Logging
    -
    • Added support for logging using the logger package.
    • +
      Logging +
      +
        +
      • Added support for logging using the logger package.
      • Added a new function register_logger, which registers a logger in a given namespace.
      • Added trace and info levels log messages to the teal framework.
      • Added pid and shiny session token into footnote so app developers can identify logs for apps.
      • -
    + +
    -
    Other
    -
    • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

    • +
      Other +
      +
        +
      • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

      • Added public facing constructor functions for CDISCDataConnector, RelationalDataConnector, and DataConnection classes.

      • Modified data_extract_spec to allow both the filter and select parameters to be NULL, which results in the data_extract_ui acting as if a filter_spec with all variables as possible choices had been supplied as the filter argument and a select_spec with the multiple parameter set to TRUE had been supplied as the select argument.

      • Added support of the full screen for a module when the filters argument is equal NULL.

      • @@ -244,11 +332,14 @@
        Other -

        Bug fixes

        -
    + +
    -

    teal 0.10.0

    +

    teal 0.10.0 +

    -

    New features

    -
    • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
    • +

      New features +

      +
        +
      • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
      • Refactored filter panel to use MultiAssayExperiment objects. Filters can be set on a subject level (colData of MAE object) and on a experiment level (colData and rowData of an assay).
      • Added cdse_dataset_connector to create delayed data objects from CDSE.
      • Added datasetdb_dataset_connector to create delayed data objects from DataSetDB.
      • Added ricepass_connection to create delayed data objects from entimICE via ricepass.
      • Refactor of the filter panel: -
        • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
        • +
            +
          • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
          • Dataset type determines an appearance and a functionality of related filters and filters summary.
          • Datasets are passed (by reference) from DDL to FilteredData skipping extracting data and their attributes.
          • Redesigned variable filter labels in “Active Filter Variables” panel.
          • Fully testable server functions.
          • -
          -
    + + + +
    -

    Bug fixes

    -
    • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
    • +

      Bug fixes +

      +
        +
      • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
      • Fixed a bug that caused the output of get_code function to not reproduce its raw data set.
      • Changed filter_spec to allow no variable selection upon app initialization, where the first possible value was previously selected.
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal 0.9.5

    +

    teal 0.9.5 +

    -

    Enhancements

    -
    • Added informational stop message when using mutate_data with RelationalDataConnector.
    • +

      Enhancements +

      +
        +
      • Added informational stop message when using mutate_data with RelationalDataConnector.
      • Modified as_cdisc to behave similarly to cdisc_dataset when called on a Dataset object.
      • Changed the displayed format of the data name and the column name in data_extract_spec UI elements. Both are now compressed to <data name>.<column name> if they don’t change during runtime of the app.
      • Added ADSAFTTE to the list of recognized ADaM dataset names.
      • Added another example to data_extract_spec’s doc string showcasing app users can choose a variable used for filtering in the encoding panel.
      • Added CSS styling to tool tips in teal modules.
      • -
    + +
    -

    Bug fixes

    -
    • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
    • +

      Bug fixes +

      +
        +
      • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
      • Fixed a bug that crashes app whenever a Date or datetime column is selected from a filter_spec.
      • -
    + +
    -

    teal 0.9.4

    +

    teal 0.9.4 +

    -

    Enhancements

    -
    • Released snowflake connection and connectors.
    • +

      Enhancements +

      +
        +
      • Released snowflake connection and connectors.
      • Changed ordering of datasets to be more intuitive (topologically first for CDISC datasets only and then according to input datasets order).
      • When closing a teal app (ending a user shiny session), all DataConnections will now try to close their connections.
      • Added ADHY keys to configuration file.
      • Extended the filter_spec function: the parameter choices is no longer mandatory (the function will take all possible choices by default) and the vars parameter additionally accepts the choices_selected and allows to change the variables for filtering using the UI elements in the encoding panel.
      • -
    + +
    -

    Bug fixes

    -
    • Cleaned up imports in the package.
    • -
    • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
    • +

      Bug fixes +

      +
        +
      • Cleaned up imports in the package.
      • +
      • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
        +
      • Fixed issue with cloning Callable class.
      • -
    + +
    -

    teal 0.9.3

    +

    teal 0.9.3 +

    -

    New Features

    -
    • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
    • +

      New Features +

      +
        +
      • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
      • New JoinKeys class (with join_keys() constructors and join_key() constructor for its elements) to store joining key columns between datasets.
      • Refactored the most basic dataset() constructor, added cdisc_dataset() constructor and as_cdisc() conversion function.
      • Soft-deprecate removed class constructors and obsolete functions (e.g. keys()).
      • Added get_keys() and set_keys() functions to extract and manipulate datasets primary keys respectively.
      • Unexported filtered_data_new, filtered_data_set and filtered_data_set_filters.
      • -
    + +
    -

    Bug fixes

    -
    • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
    • +

      Bug fixes +

      +
        +
      • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
      • Added ability to press “Enter” key without having to set focus to the Submit button for delayed data loading.
      • Allow variable_choices to use datasets with missing labels.
      • Fixed bug that ignores input of NULL to selected argument of select_spec function.
      • -
    + +
    -

    Enhancements

    -
    • Added button to remove all active filters from the Filter Panel.
    • -
    +

    Enhancements +

    +
      +
    • Added button to remove all active filters from the Filter Panel.
    • +
    +
    -

    teal 0.9.2

    +

    teal 0.9.2 +

    -

    New Features

    -
    • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
    • +

      New Features +

      +
        +
      • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
      • NOTE: python_dataset_connector is not yet ready to be deployed on RSConnect because it does not contain numpy and pandas, which are Python libraries used in python_dataset_connector.
      • Added support for filtering on Date and Datetime variables in the Filter Panel.
      • Added buttons for date and datetime filter widgets to reset the value to the original.
      • Added new function check_key_duplicates, which creates a short summary about rows with duplicated primary key (row numbers and the number of duplicates)
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    • Removed include_factors option in get_class_colnames in RawDataset.
    • -
    +

    Miscellaneous +

    +
      +
    • Removed include_factors option in get_class_colnames in RawDataset.
    • +
    +
    -

    teal 0.9.1

    -
    • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
    • +

      teal 0.9.1 +

      +
        +
      • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
      • Nested tabs module now has better alignment with the filter panel on the page.
      • Allow width argument in optionalSelectInput.
      • Added lifecycle badges to all exported functions.
      • @@ -425,10 +572,13 @@

        teal 0.9.1 -

        teal 0.9.0

        -
        • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

        • +

          teal 0.9.0 +

          +
            +
          • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

          • A new teal_data function to include datasets and connectors into teal application.

          • cdisc_data function to include datasets and connectors into teal application where a check argument still could be used and other consistency tests are performed.

          • get_raw_data can be used to derive raw data from R6 objects e.g. (RelationalDataset).

          • @@ -449,91 +599,133 @@

            teal 0.9.0 -

            Refactor of FilteredData (for developers)

            -
            • +
            +
            +

            Refactor of FilteredData (for developers) +

            +
              +
            • FilteredData is now fully reactive. Now filtered data is lazy evaluated as per need. This further opens the door to bookmarking teal apps (bookmarking currently works for the right filtering panel, but we will make this feature more sophisticated in a future release, each module must be reviewed and adapted if it contains reactiveValues).
            • Datasets and materialized connectors are provided to FilteredData by set_datasets_data function located in init_datasets.R file.
            • Renamed get_dataset() method to get_data().
            • Renamed get_filter_call() method to get_filter_expr(); returns an expression rather than a list.
            • Removed argument isolate from get_data() method and similar methods. You must isolate it yourself as needed. If you want to temporarily deactivate Shiny errors due to missing errors, you can set options(shiny.suppressMissingContextError = TRUE). In general, avoid isolate as this breaks reactivity.
            • We added a development module to add several filters at once, e.g. safety filters. This is to be evaluated before it is converted into a proper module and made available to end-users.
            • -
            +

          +

    -

    teal 0.8.5

    -
    • UI bug fix to hide filter elements for not used datasets.
    • -
    +

    teal 0.8.5 +

    +
      +
    • UI bug fix to hide filter elements for not used datasets.
    • +
    +
    -

    teal 0.8.4

    -
    • Progress bar for UI creation in delayed loading module.
    • +

      teal 0.8.4 +

      +
        +
      • Progress bar for UI creation in delayed loading module.
      • Change output of keys function to keys object.
      • Delayed version of choices_selected.
      • Fix an error in choices_selected when selected is not in choices.
      • Fix pickerInput not to display column name as label if it’s missing.
      • -
    + +
    -

    teal 0.8.3

    -
    • Enable teal app to initialize without data. The data are then loaded from within the teal app.
    • +

      teal 0.8.3 +

      +
        +
      • Enable teal app to initialize without data. The data are then loaded from within the teal app.
      • New classes (DatasetConnector, DataConnector) to connect to various data sources, including: * connector to rice API - rice_data and rice_dataset_connector * connector to RDS files - rds_data and rds_dataset_connector
      • Message appears at bottom right of Shiny app when Shiny is busy to update the views.
      • Remove labels argument of cdisc_data function. Labels should now already be present in the data passed to the cdisc_data function. This can be achieved using the var_relabel function.
      • -
    + +
    -

    teal 0.8.2

    -
    • Fixed several BUGS in optionalSelectInput and improved inputs look.
    • +

      teal 0.8.2 +

      +
        +
      • Fixed several BUGS in optionalSelectInput and improved inputs look.
      • Added get_data_labels function to FilteredData class.
      • Improved sep passing within data_extract_spec.
      • -
    + +
    -

    teal 0.8.1

    -
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • -
    +

    teal 0.8.1 +

    +
      +
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • +
    +
    -

    teal 0.8.0

    -
    • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
    • +

      teal 0.8.0 +

      +
        +
      • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
      • Possibility to load custom .css and .js files.
      • Renamed columns_spec to select_spec.
      • Show number of observations on filter panel.
      • Add labeling functions variable_choices and value_choices.
      • -
    + +
    -

    teal 0.7.0

    -
    • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
    • +

      teal 0.7.0 +

      +
        +
      • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
      • Moved teal.utils functions to teal: log_app_usage, stop_shiny.
      • Added *_spec functions.
      • Improvements on usage of PickerInput and SelectInput.
      • -
    + +
    -

    teal 0.6.0

    -
    • Removed deprecated functions tab*.
    • +

      teal 0.6.0 +

      +
        +
      • Removed deprecated functions tab*.
      • Removed data generation functions including generate_sample_data.
      • Incorporate shinyjs package.
      • Added “Copy R code to clipboard” button.
      • -
    + +
    -

    teal 0.0.5

    -
    • Added limit to data_table with scrolling, preventing overlap of UI elements.
    • +

      teal 0.0.5 +

      +
        +
      • Added limit to data_table with scrolling, preventing overlap of UI elements.
      • Boolean filtering.
      • -
    + +
    -

    teal 0.0.4

    -
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • -
    +

    teal 0.0.4 +

    +
      +
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • +
    +
    -

    teal 0.0.3

    -
    • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
    • -
    -
    New features
    -
    • +

      teal 0.0.3 +

      +
        +
      • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
      • +
      +
      +
      New features +
      +
        +
      • tm_scatterplot module.
      • tm_table module.
      • -
      +
    +
    -
    Changes
    -
    • All tabs arguments were renamed to modules.
    • +
      Changes +
      +
        +
      • All tabs arguments were renamed to modules.
      • tab_item function is now called module.
      • @@ -546,30 +738,39 @@
        Changes -

        teal 0.0.2

        -
        • New ‘01_getting_started’ vignette.
        • +

          teal 0.0.2 +

          +
            +
          • New ‘01_getting_started’ vignette.
          • Datanames in FilteredData are now case sensitive.
          • -
    + +
    -

    teal 0.0.1

    -
    • March 28, 2016 - Initial Release.
    • -
    +

    teal 0.0.1 +

    +
      +
    • March 28, 2016 - Initial Release.
    • +
    + + + + + - - + + diff --git a/v0.14.0/pull_request_template.html b/v0.14.0/pull_request_template.html index d122c89fe2..e9e8bc537a 100644 --- a/v0.14.0/pull_request_template.html +++ b/v0.14.0/pull_request_template.html @@ -1,8 +1,22 @@ - -Pull Request • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -91,17 +111,19 @@

    Fixes #nnn

    - + + + + - - + + diff --git a/v0.14.0/reference/TealReportCard.html b/v0.14.0/reference/TealReportCard.html index a3c7f4526a..907072b44c 100644 --- a/v0.14.0/reference/TealReportCard.html +++ b/v0.14.0/reference/TealReportCard.html @@ -1,16 +1,32 @@ - - + + + + + +TealReportCard — TealReportCard • teal +TealReportCard — TealReportCard • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -104,20 +126,27 @@
    -

    Super class

    +

    Super class +

    teal.reporter::ReportCard -> TealReportCard

    +

    Inherited methods


    -

    Method append_src()

    -

    Appends the source code to the content meta data of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_src(src, ...)

    +

    +
    +
    +

    Method append_src() +

    +

    Appends the source code to the content meta data of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_src(src, ...)
    +

    +
    -

    Arguments

    -

    src
    +

    Arguments +

    +

    +
    +
    +
    src

    (character(1)) code as text.

    @@ -149,85 +191,148 @@

    Arguments -

    Returns

    +

    Returns +

    invisibly self

    -

    Examples

    -

    card <- TealReportCard$new()$append_src(
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_src(
       "plot(iris)"
     )
    -card$get_content()[[1]]$get_content()

    +card$get_content()[[1]]$get_content()
    +

    +
    -


    -

    Method append_fs()

    +
    +

    +
    +
    +

    Method append_fs() +

    Appends the filter state list to the content and metadata of this TealReportCard. If the filter state list has an attribute named formatted, it appends it to the card otherwise it uses the default yaml::as.yaml to format the list. -If the filter state list is empty, nothing is appended to the content.

    -

    Usage

    -

    TealReportCard$append_fs(fs)

    +If the filter state list is empty, nothing is appended to the content.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_fs(fs)
    +

    +
    -

    Arguments

    -

    fs
    +

    Arguments +

    +

    +
    +
    +
    fs

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    invisibly self

    -


    -

    Method append_encodings()

    -

    Appends the encodings list to the content and metadata of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_encodings(encodings)

    +
    +

    +
    +
    +

    Method append_encodings() +

    +

    Appends the encodings list to the content and metadata of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_encodings(encodings)
    +

    +
    -

    Arguments

    -

    encodings
    +

    Arguments +

    +

    +
    +
    +
    encodings

    (list) list of encodings selections of the teal app.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    invisibly self

    -

    Examples

    -

    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
     card$get_content()[[1]]$get_content()
    -

    +
    +

    +
    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealReportCard$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -235,7 +340,8 @@

    Arguments -

    Examples

    +

    Examples +

    
     ## ------------------------------------------------
     ## Method `TealReportCard$append_src`
    @@ -258,17 +364,19 @@ 

    Examples

    + +
    + +
    - - + + diff --git a/v0.14.0/reference/TealSlicesBlock.html b/v0.14.0/reference/TealSlicesBlock.html index f845f97d95..e461c62c9d 100644 --- a/v0.14.0/reference/TealSlicesBlock.html +++ b/v0.14.0/reference/TealSlicesBlock.html @@ -1,10 +1,26 @@ - -RcodeBlock — TealSlicesBlock • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -95,34 +117,54 @@
    -

    Super classes

    +

    Super classes +

    teal.reporter::ContentBlock -> teal.reporter::TextBlock -> TealSlicesBlock

    +

    Inherited methods


    -

    Method new()

    -

    Returns a TealSlicesBlock object.

    -

    Usage

    -

    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")

    +

    +
    +
    +

    Method new() +

    +

    Returns a TealSlicesBlock object.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    @@ -130,95 +172,165 @@

    Arguments -

    Details

    +

    Details +

    Returns a TealSlicesBlock object with no content and no parameters.

    -

    Returns

    +

    Returns +

    TealSlicesBlock

    -

    Examples

    -

    block <- teal:::TealSlicesBlock$new()
    -

    +

    Examples +

    +

    +
    +
    block <- teal:::TealSlicesBlock$new()
    +
    +

    +
    -


    -

    Method set_content()

    +
    +

    +
    +
    +

    Method set_content() +

    Sets content of this TealSlicesBlock. Sets content as YAML text which represents a list generated from teal_slices. The list displays limited number of fields from teal_slice objects, but this list is sufficient to conclude which filters were applied. -When selected field in teal_slice object is a range, then it is displayed as a "min"

    -

    Usage

    -

    TealSlicesBlock$set_content(content)

    +When selected field in teal_slice object is a range, then it is displayed as a "min"

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$set_content(content)
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    invisibly self

    -


    -

    Method from_list()

    -

    Create the RcodeBlock from a list.

    -

    Usage

    -

    TealSlicesBlock$from_list(x)

    +
    +

    +
    +
    +

    Method from_list() +

    +

    Create the RcodeBlock from a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$from_list(x)
    +

    +
    -

    Arguments

    -

    x
    +

    Arguments +

    +

    +
    +
    +
    x

    named list with two fields c("text", "params"). Use the get_available_params method to get all possible parameters.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    invisibly self

    -


    -

    Method to_list()

    -

    Convert the RcodeBlock to a list.

    -

    Usage

    -

    TealSlicesBlock$to_list()

    +
    +

    +
    +
    +

    Method to_list() +

    +

    Convert the RcodeBlock to a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$to_list()
    +

    +
    -

    Returns

    +

    Returns +

    named list with a text and params.

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealSlicesBlock$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -226,7 +338,8 @@

    Arguments -

    Examples

    +

    Examples +

    
     ## ------------------------------------------------
     ## Method `TealSlicesBlock$new`
    @@ -237,17 +350,19 @@ 

    Examples

    + +
    + +
    - - + + diff --git a/v0.14.0/reference/append_module.html b/v0.14.0/reference/append_module.html index bfb4ee39ed..8599450b2e 100644 --- a/v0.14.0/reference/append_module.html +++ b/v0.14.0/reference/append_module.html @@ -1,8 +1,24 @@ - -Function which appends a teal_module onto the children of a teal_modules object — append_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -91,39 +113,46 @@
    -

    Usage

    +

    Usage +

    append_module(modules, module)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    teal_modules

    module

    teal_module object to be appended onto the children of modules

    -
    + +
    -

    Value

    +

    Value +

    teal_modules object with module appended

    + +
    + + - - + + diff --git a/v0.14.0/reference/calculate_hashes.html b/v0.14.0/reference/calculate_hashes.html index 5154714465..318eb26ca6 100644 --- a/v0.14.0/reference/calculate_hashes.html +++ b/v0.14.0/reference/calculate_hashes.html @@ -1,8 +1,24 @@ - -Get the hash of a dataset — calculate_hashes • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,39 +113,46 @@
    -

    Usage

    +

    Usage +

    calculate_hashes(datanames, datasets)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets

    datasets

    (FilteredData) object holding the data

    -
    + +
    -

    Value

    +

    Value +

    A list of hashes per dataset

    + + + + - - + + diff --git a/v0.14.0/reference/deep_copy_filter.html b/v0.14.0/reference/deep_copy_filter.html index ece6ade0a2..dc1ca0e4fc 100644 --- a/v0.14.0/reference/deep_copy_filter.html +++ b/v0.14.0/reference/deep_copy_filter.html @@ -1,14 +1,30 @@ - - + + + + + +Deep copy teal_slices — deep_copy_filter • teal +Deep copy teal_slices — deep_copy_filter • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + +
    @@ -100,18 +123,23 @@
    -

    Usage

    +

    Usage +

    deep_copy_filter(filter)
    -

    Arguments

    -
    filter
    +

    Arguments +

    +
    +
    filter

    (teal_slices)

    -
    + +
    -

    Value

    +

    Value +

    teal_slices

    @@ -120,17 +148,19 @@

    Value

    + + + + - - + + diff --git a/v0.14.0/reference/dot-datasets_to_data.html b/v0.14.0/reference/dot-datasets_to_data.html index 5f62f01973..28903a0af7 100644 --- a/v0.14.0/reference/dot-datasets_to_data.html +++ b/v0.14.0/reference/dot-datasets_to_data.html @@ -1,12 +1,28 @@ - - + + + + + +Convert FilteredData to reactive list of datasets of the tdata type. — .datasets_to_data • teal +Convert FilteredData to reactive list of datasets of the tdata type. — .datasets_to_data • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -97,13 +119,16 @@
    -

    Usage

    +

    Usage +

    .datasets_to_data(module, datasets, trigger_data = reactiveVal(1L))
    -

    Arguments

    -
    module
    +

    Arguments +

    +
    +
    module

    (teal_module) module where needed filters are taken from

    @@ -114,28 +139,35 @@

    Arguments -

    Value

    +

    Value +

    -

    list of reactive datasets with following attributes:

    • code (character) containing datasets reproducible code.

    • +

      list of reactive datasets with following attributes:

      +
        +
      • code (character) containing datasets reproducible code.

      • join_keys (JoinKeys) containing relationships between datasets.

      • metadata (list) containing metadata of datasets.

      • -
    + + + + + + - - + + diff --git a/v0.14.0/reference/example_cdisc_data.html b/v0.14.0/reference/example_cdisc_data.html index 7cabe0ea36..f5937cadf8 100644 --- a/v0.14.0/reference/example_cdisc_data.html +++ b/v0.14.0/reference/example_cdisc_data.html @@ -1,10 +1,26 @@ - -Get dummy CDISC data — example_cdisc_data • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -94,12 +116,14 @@
    -

    Usage

    +

    Usage +

    example_cdisc_data()
    -

    Value

    +

    Value +

    cdisc_data

    @@ -108,17 +132,19 @@

    Value

    + + + + - - + + diff --git a/v0.14.0/reference/example_datasets.html b/v0.14.0/reference/example_datasets.html index 8d50427283..3f82e363fd 100644 --- a/v0.14.0/reference/example_datasets.html +++ b/v0.14.0/reference/example_datasets.html @@ -1,10 +1,26 @@ - -Get datasets to go with example modules. — example_datasets • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -94,29 +116,33 @@
    -

    Usage

    +

    Usage +

    example_datasets()
    -

    Value

    +

    Value +

    named list of FilteredData objects, each with ADSL set.

    + + + + - - + + diff --git a/v0.14.0/reference/example_module.html b/v0.14.0/reference/example_module.html index 6c0f926219..75363e126b 100644 --- a/v0.14.0/reference/example_module.html +++ b/v0.14.0/reference/example_module.html @@ -1,8 +1,24 @@ - -An example teal module — example_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,13 +113,16 @@
    -

    Usage

    +

    Usage +

    example_module(label = "example teal module", datanames = "all")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module. Any label possible except "global_filters" - read more in mapping argument of teal_slices.

    @@ -109,16 +134,19 @@

    Arguments -

    Value

    +

    Value +

    A teal module which can be included in the modules argument to init().

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(
         dataset("IRIS", iris),
    @@ -132,17 +160,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/example_modules.html b/v0.14.0/reference/example_modules.html index 25cbfca234..beaf192c8b 100644 --- a/v0.14.0/reference/example_modules.html +++ b/v0.14.0/reference/example_modules.html @@ -1,8 +1,24 @@ - -Get example modules. — example_modules • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,19 +113,24 @@
    -

    Usage

    +

    Usage +

    example_modules(datanames = c("ADSL", "ADTTE"))
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character)
    names of the datasets to be used in the example modules. Possible choices are ADSL, ADTTE.

    -
    + +
    -

    Value

    +

    Value +

    teal_modules

    @@ -112,17 +139,19 @@

    Value

    + + + + - - + + diff --git a/v0.14.0/reference/filter_calls_module.html b/v0.14.0/reference/filter_calls_module.html index a8d063e05c..a4b24cc7d2 100644 --- a/v0.14.0/reference/filter_calls_module.html +++ b/v0.14.0/reference/filter_calls_module.html @@ -1,12 +1,28 @@ - - + + + + + +Dummy module to show the filter calls generated by the right encoding panel — filter_calls_module • teal +Dummy module to show the filter calls generated by the right encoding panel — filter_calls_module • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -97,19 +119,24 @@
    -

    Usage

    +

    Usage +

    filter_calls_module(label = "Filter Calls Module")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    character label of module

    -
    + +
    -

    Examples

    +

    Examples +

    app <- init(
       data = list(iris = iris, mtcars = mtcars),
       modules = teal:::filter_calls_module(),
    @@ -121,17 +148,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/filter_manager_module_srv.html b/v0.14.0/reference/filter_manager_module_srv.html index 8cf38f690e..8816bb41de 100644 --- a/v0.14.0/reference/filter_manager_module_srv.html +++ b/v0.14.0/reference/filter_manager_module_srv.html @@ -1,8 +1,24 @@ - -Module specific filter manager — filter_manager_module_srv • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,13 +113,16 @@
    -

    Usage

    +

    Usage +

    filter_manager_module_srv(id, module_fd, slices_global)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    shiny module id.

    @@ -107,21 +132,28 @@

    Arguments -

    Value

    +

    Value +

    A reactive expression containing the slices active in this module.

    -

    Details

    +

    Details +

    This module tracks the state of a single FilteredData object and global teal_slices and updates both objects as necessary. Filter states added in different modules Filter states added any individual module are added to global teal_slices @@ -130,17 +162,19 @@

    Details

    + + + + - - + + diff --git a/v0.14.0/reference/get_client_timezone.html b/v0.14.0/reference/get_client_timezone.html index 76574bab02..b074e835cf 100644 --- a/v0.14.0/reference/get_client_timezone.html +++ b/v0.14.0/reference/get_client_timezone.html @@ -1,12 +1,28 @@ - - + + + + + +Get Client Timezone — get_client_timezone • teal +Get Client Timezone — get_client_timezone • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -97,20 +119,25 @@
    -

    Usage

    +

    Usage +

    get_client_timezone(ns)
    -

    Arguments

    -
    ns
    +

    Arguments +

    +
    +
    ns

    (function) namespace function passed from the session object in the Shiny server. For Shiny modules this will allow for proper name spacing of the registered input.

    -
    + +
    -

    Value

    +

    Value +

    (Shiny) input variable accessible with input$tz which is a (character) @@ -118,17 +145,19 @@

    Value

    + + + + - - + + diff --git a/v0.14.0/reference/get_code_tdata.html b/v0.14.0/reference/get_code_tdata.html index fe5760ce2a..8d7de79ebc 100644 --- a/v0.14.0/reference/get_code_tdata.html +++ b/v0.14.0/reference/get_code_tdata.html @@ -1,12 +1,28 @@ - -Wrapper for get_code.tdata -This wrapper is to be used by downstream packages to extract the code of a tdata object — get_code_tdata • teal + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -97,35 +119,42 @@
    -

    Usage

    +

    Usage +

    get_code_tdata(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    (character) code used in the tdata object.

    + + + + - - + + diff --git a/v0.14.0/reference/get_datasets_code.html b/v0.14.0/reference/get_datasets_code.html index c847a83698..fe2099643a 100644 --- a/v0.14.0/reference/get_datasets_code.html +++ b/v0.14.0/reference/get_datasets_code.html @@ -1,8 +1,24 @@ - -Get datasets code — get_datasets_code • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,13 +113,16 @@
    -

    Usage

    +

    Usage +

    get_datasets_code(datanames, datasets, hashes)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets to extract code from

    @@ -108,27 +133,34 @@

    Arguments -

    Value

    +

    Value +

    -

    character(3) containing following elements:

    • code from CodeClass (data loading code)

    • +

      character(3) containing following elements:

      +
        +
      • code from CodeClass (data loading code)

      • hash check of loaded objects

      • -
    + + + + + + - - + + diff --git a/v0.14.0/reference/get_join_keys.html b/v0.14.0/reference/get_join_keys.html index c50cc7d9c2..1d169cd788 100644 --- a/v0.14.0/reference/get_join_keys.html +++ b/v0.14.0/reference/get_join_keys.html @@ -1,8 +1,24 @@ - -Function to get join keys from a tdata object — get_join_keys • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,7 +113,8 @@
    -

    Usage

    +

    Usage +

    get_join_keys(data)
     
     # S3 method for tdata
    @@ -102,30 +125,36 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    tdata - object to extract the join keys

    -
    + +
    -

    Value

    +

    Value +

    Either JoinKeys object or NULL if no join keys

    + + + + - - + + diff --git a/v0.14.0/reference/get_metadata.html b/v0.14.0/reference/get_metadata.html index 07a0dfeaba..6f011ec987 100644 --- a/v0.14.0/reference/get_metadata.html +++ b/v0.14.0/reference/get_metadata.html @@ -1,8 +1,24 @@ - -Function to get metadata from a tdata object — get_metadata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,7 +113,8 @@
    -

    Usage

    +

    Usage +

    get_metadata(data, dataname)
     
     # S3 method for tdata
    @@ -102,34 +125,40 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    tdata - object to extract the data from

    dataname

    character(1) the dataset name whose metadata is requested

    -
    + +
    -

    Value

    +

    Value +

    Either list of metadata or NULL if no metadata

    + + + + - - + + diff --git a/v0.14.0/reference/get_rcode_libraries.html b/v0.14.0/reference/get_rcode_libraries.html index 265d47a654..c50d891e63 100644 --- a/v0.14.0/reference/get_rcode_libraries.html +++ b/v0.14.0/reference/get_rcode_libraries.html @@ -1,8 +1,24 @@ - -Generates library calls from current session info — get_rcode_libraries • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,29 +113,33 @@
    -

    Usage

    +

    Usage +

    get_rcode_libraries()
    -

    Value

    +

    Value +

    Character object contain code

    + + + + - - + + diff --git a/v0.14.0/reference/get_teal_bs_theme.html b/v0.14.0/reference/get_teal_bs_theme.html index b03fc34517..ee11e86ea9 100644 --- a/v0.14.0/reference/get_teal_bs_theme.html +++ b/v0.14.0/reference/get_teal_bs_theme.html @@ -1,8 +1,24 @@ - -Resolve the expected bootstrap theme — get_teal_bs_theme • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,22 +113,25 @@
    -

    Usage

    +

    Usage +

    get_teal_bs_theme()
    - + + + + - - + + diff --git a/v0.14.0/reference/include_css_files.html b/v0.14.0/reference/include_css_files.html index 053368207a..a15f1f5c6a 100644 --- a/v0.14.0/reference/include_css_files.html +++ b/v0.14.0/reference/include_css_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -97,35 +119,42 @@
    -

    Usage

    +

    Usage +

    include_css_files(pattern = "*")
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes CSS files

    + + + + - - + + diff --git a/v0.14.0/reference/include_js_files.html b/v0.14.0/reference/include_js_files.html index f7a1529e0d..ce586ff305 100644 --- a/v0.14.0/reference/include_js_files.html +++ b/v0.14.0/reference/include_js_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include JS files from /inst/js/ package directory to application header — include_js_files • teal +Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -97,39 +119,46 @@
    -

    Usage

    +

    Usage +

    include_js_files(pattern = NULL, except = NULL)
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included, passed to system.file

    except

    (character) vector of basename filenames to be excluded

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes JS files

    + + + + - - + + diff --git a/v0.14.0/reference/include_teal_css_js.html b/v0.14.0/reference/include_teal_css_js.html index ebe41d7b80..2ddffe4dcf 100644 --- a/v0.14.0/reference/include_teal_css_js.html +++ b/v0.14.0/reference/include_teal_css_js.html @@ -1,16 +1,32 @@ - - + + + + + +Code to include teal CSS and JavaScript files — include_teal_css_js • teal +Code to include teal CSS and JavaScript files — include_teal_css_js • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -103,19 +125,22 @@
    -

    Usage

    +

    Usage +

    include_teal_css_js()
    -

    Value

    +

    Value +

    HTML code to include

    -

    Examples

    +

    Examples +

    shiny_ui <- tagList(
       teal:::include_teal_css_js(),
       p("Hello")
    @@ -123,17 +148,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/index.html b/v0.14.0/reference/index.html index 44c3b95a09..e3a3e4b983 100644 --- a/v0.14.0/reference/index.html +++ b/v0.14.0/reference/index.html @@ -1,8 +1,22 @@ - -Function reference • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -85,191 +105,256 @@
    -

    teal Core Functions

    +

    teal Core Functions +

    -

    These are the main functions needed to build a teal app.

    +

    +

    These are the main functions needed to build a teal app.

    -
    +
    +
    -
    +
    +
    init()
    Create the Server and UI Function For the Shiny App
    -
    +
    +
    +
    module() toString(<teal_module>) print(<teal_module>)
    Creates a teal_module object.
    -
    +
    +
    +
    modules() toString(<teal_modules>) print(<teal_modules>)
    Creates a teal_modules object.
    -
    +
    +
    +
    srv_teal_with_splash()
    Server function that loads the data through reactive loading and then delegates to srv_teal().
    -
    +
    +
    +
    ui_teal_with_splash()
    -
    UI to show a splash screen in the beginning, then delegate to srv_teal()
    -
    +
    UI to show a splash screen in the beginning, then delegate to srv_teal() +
    +
    +
    +
    teal_slices() as.teal_slices()
    Filter settings for teal applications
    -
    -

    Example module

    + +
    +
    +

    Example module +

    -

    A simple example teal module

    +

    +

    A simple example teal module

    -
    +
    +
    -
    +
    +
    example_module()
    An example teal module
    -
    -

    Creating reports

    + +
    +
    +

    Creating reports +

    -
    +
    +
    -
    +
    +
    reporter_previewer_module()
    Create a teal module for previewing a report
    -
    +
    +
    +
    TealReportCard
    TealReportCard
    -
    -

    Functions for module developers

    + +
    +
    +

    Functions for module developers +

    -
    +
    +
    -
    +
    +
    new_tdata() get_code(<tdata>)
    Create a tdata Object
    -
    +
    +
    +
    get_code_tdata()
    Wrapper for get_code.tdata This wrapper is to be used by downstream packages to extract the code of a tdata object
    -
    +
    +
    +
    get_join_keys()
    Function to get join keys from a tdata object
    -
    +
    +
    +
    get_metadata()
    Function to get metadata from a tdata object
    -
    +
    +
    +
    tdata2env()
    Function to convert a tdata object to an environment Any reactives inside tdata are first evaluated
    -
    +
    +
    +
    show_rcode_modal()
    Show R Code Modal
    -
    -

    Validation functions

    + +
    +
    +

    Validation functions +

    -
    +
    +
    -
    +
    +
    validate_has_data()
    Validate that dataset has a minimum number of observations
    -
    +
    +
    +
    validate_has_elements()
    Validates that vector has length greater than 0
    -
    +
    +
    +
    validate_has_variable()
    Validates that dataset contains specific variable
    -
    +
    +
    +
    validate_in()
    Validates that vector includes all expected values
    -
    +
    +
    +
    validate_inputs()
    Send input validation messages to output.
    -
    +
    +
    +
    validate_n_levels()
    Validate that variables has expected number of levels
    -
    +
    +
    +
    validate_no_intersection()
    Validates no intersection between two vectors
    -
    +
    +
    +
    validate_one_row_per_id()
    Validate that dataset has unique rows for key variables
    -
    + + + + + + - - + + diff --git a/v0.14.0/reference/init.html b/v0.14.0/reference/init.html index 38081aa5f3..367a845df9 100644 --- a/v0.14.0/reference/init.html +++ b/v0.14.0/reference/init.html @@ -1,18 +1,34 @@ - - + + + + + +Create the Server and UI Function For the Shiny App — init • teal +Create the Server and UI Function For the Shiny App — init • teal + + + + + + + + + + Skip to contents @@ -28,7 +44,8 @@ + + @@ -106,7 +128,8 @@
    -

    Usage

    +

    Usage +

    init(
       data,
       modules,
    @@ -119,8 +142,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (TealData or TealDataset or TealDatasetConnector or list or data.frame or MultiAssayExperiment)
    R6 object as returned by teal.data::cdisc_data(), teal.data::teal_data(), teal.data::cdisc_dataset(), teal.data::dataset(), teal.data::dataset_connector() or @@ -170,16 +195,19 @@

    Argumentsui_teal_with_splash() is then preferred to this function.

    -
    + +
    -

    Value

    +

    Value +

    named list with server and ui function

    -

    Examples

    +

    Examples +

    new_iris <- transform(iris, id = seq_len(nrow(iris)))
     new_mtcars <- transform(mtcars, id = seq_len(nrow(mtcars)))
     
    @@ -236,17 +264,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/is_arg_used.html b/v0.14.0/reference/is_arg_used.html index 7ecfaa0d81..5657089af8 100644 --- a/v0.14.0/reference/is_arg_used.html +++ b/v0.14.0/reference/is_arg_used.html @@ -1,8 +1,24 @@ - -Does the object make use of the arg — is_arg_used • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -91,22 +114,27 @@
    -

    Usage

    +

    Usage +

    is_arg_used(modules, arg)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_module or teal_modules) object

    arg

    (character(1)) names of the arguments to be checked against formals of teal modules.

    -
    + +
    -

    Value

    +

    Value +

    logical whether the object makes use of arg

    @@ -115,17 +143,19 @@

    Value

    + + + + - - + + diff --git a/v0.14.0/reference/matrix_to_mapping.html b/v0.14.0/reference/matrix_to_mapping.html index d198186fe4..025e7e5505 100644 --- a/v0.14.0/reference/matrix_to_mapping.html +++ b/v0.14.0/reference/matrix_to_mapping.html @@ -1,14 +1,30 @@ - - + + + + + +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -100,36 +122,43 @@
    -

    Usage

    +

    Usage +

    matrix_to_mapping(mapping_matrix)
    -

    Arguments

    -
    mapping_matrix
    +

    Arguments +

    +
    +
    mapping_matrix

    (data.frame) of logical vectors where columns represent modules and row represent teal_slices

    -
    + +
    -

    Value

    +

    Value +

    named list like that in the mapping attribute of a teal_slices object.

    + + + + - - + + diff --git a/v0.14.0/reference/module.html b/v0.14.0/reference/module.html index 4d2fc3e96a..9315491b1f 100644 --- a/v0.14.0/reference/module.html +++ b/v0.14.0/reference/module.html @@ -1,10 +1,26 @@ - -Creates a teal_module object. — module • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -94,7 +116,8 @@
    -

    Usage

    +

    Usage +

    module(
       label = "module",
       server = function(id, ...) {
    @@ -120,29 +143,39 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module. Any label possible except "global_filters" - read more in mapping argument of teal_slices.

    server
    -

    (function) shiny module with following arguments:

    • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

    • +
      +

      (function) shiny module with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

      • input, output, session - (not recommended) then shiny::callModule() will be used to call a module.

      • data (optional) module will receive a tdata object, a list of reactive (filtered) data specified in the filters argument.

      • datasets (optional) module will receive FilteredData. (See [teal.slice::FilteredData]).

      • reporter (optional) module will receive Reporter. (See teal.reporter::Reporter).

      • ... (optional) server_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    ui
    -

    (function) Shiny ui module function with following arguments:

    • id - teal will set proper shiny namespace for this module.

    • +
      +

      (function) Shiny ui module function with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module.

      • data (optional) module will receive list of reactive (filtered) data specified in the filters argument.

      • datasets (optional) module will receive FilteredData. (See [teal.slice::FilteredData]).

      • ... (optional) ui_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    filters
    @@ -179,16 +212,19 @@

    Arguments -

    Value

    +

    Value +

    object of class teal_module.

    -

    Examples

    +

    Examples +

    library(shiny)
     
     app <- init(
    @@ -217,17 +253,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/module_filter_manager.html b/v0.14.0/reference/module_filter_manager.html index 88baf4d0a9..daeaabca3c 100644 --- a/v0.14.0/reference/module_filter_manager.html +++ b/v0.14.0/reference/module_filter_manager.html @@ -1,8 +1,24 @@ - -Manage multiple FilteredData objects — filter_manager_ui • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,15 +113,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_ui(id)
     
     filter_manager_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    shiny module id.

    @@ -117,15 +142,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    A list of reactives, each holding a teal_slices, as returned by filter_manager_module_srv.

    -

    Details

    +

    Details +

    This module observes the changes of the filters in each FilteredData object and keeps track of all filters used. A mapping of filters to modules is kept in the mapping_matrix object (which is actually a data.frame) @@ -133,17 +161,19 @@

    Details

    + + + + - - + + diff --git a/v0.14.0/reference/module_filter_manager_modal.html b/v0.14.0/reference/module_filter_manager_modal.html index 6e7856408a..a996a7e9ea 100644 --- a/v0.14.0/reference/module_filter_manager_modal.html +++ b/v0.14.0/reference/module_filter_manager_modal.html @@ -1,8 +1,24 @@ - -Filter manager modal — module_filter_manager_modal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,15 +113,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_modal_ui(id)
     
     filter_manager_modal_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    shiny module id.

    @@ -117,10 +142,12 @@

    Argumentsteal_slices().

    -

    + +
    -

    Examples

    +

    Examples +

    fd1 <- teal.slice::init_filtered_data(list(iris = list(dataset = iris)))
     fd2 <- teal.slice::init_filtered_data(
       list(iris = list(dataset = iris), mtcars = list(dataset = mtcars))
    @@ -159,17 +186,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/module_nested_tabs.html b/v0.14.0/reference/module_nested_tabs.html index dd291e69d0..1ab1efcc19 100644 --- a/v0.14.0/reference/module_nested_tabs.html +++ b/v0.14.0/reference/module_nested_tabs.html @@ -1,8 +1,24 @@ - -Create a UI of nested tabs of teal_modules — module_nested_tabs • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -91,7 +114,8 @@
    -

    Usage

    +

    Usage +

    ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)
     
     # S3 method for default
    @@ -140,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    module id

    @@ -168,17 +194,24 @@

    Arguments -

    Value

    +

    Value +

    -

    depending on class of modules, ui_nested_tabs returns:

    • teal_module: instantiated UI of the module

    • +

      depending on class of modules, ui_nested_tabs returns:

      +
        +
      • teal_module: instantiated UI of the module

      • teal_modules: tabsetPanel with each tab corresponding to recursively calling this function on it.
        srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

      • -
    + +
    -

    ui_nested_tabs

    +

    +ui_nested_tabs +

    Each teal_modules is translated to a tabsetPanel and each @@ -188,16 +221,22 @@

    ui_nested_tabs

    -

    srv_nested_tabs

    +

    +srv_nested_tabs +

    This module calls recursively all elements of the modules returns one which -is currently active.

    • teal_module returns self as a active module.

    • +is currently active.

      +
        +
      • teal_module returns self as a active module.

      • teal_modules also returns module active within self which is determined by the input$active_tab.

      • -
    + +
    -

    Examples

    +

    Examples +

    mods <- teal:::example_modules()
     datasets <- teal:::example_datasets()
     app <- shinyApp(
    @@ -227,17 +266,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/module_tabs_with_filters.html b/v0.14.0/reference/module_tabs_with_filters.html index f4c4ae9afd..9d22255d8f 100644 --- a/v0.14.0/reference/module_tabs_with_filters.html +++ b/v0.14.0/reference/module_tabs_with_filters.html @@ -1,12 +1,28 @@ - - + + + + + +Add right filter panel into each of the top-level teal_modules UIs. — module_tabs_with_filters • teal +Add right filter panel into each of the top-level teal_modules UIs. — module_tabs_with_filters • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -97,7 +119,8 @@
    -

    Usage

    +

    Usage +

    ui_tabs_with_filters(id, modules, datasets, filter = teal_slices())
     
     srv_tabs_with_filters(
    @@ -110,8 +133,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    module id

    @@ -127,16 +152,19 @@

    Arguments -

    Value

    +

    Value +

    A tagList of The main menu, place holders for filters and place holders for the teal modules

    -

    Details

    +

    Details +

    The right filter panel's filter choices affect the datasets object. Therefore, all modules using the same datasets share the same filters.

    This works with nested modules of depth greater than 2, though the filter @@ -144,7 +172,8 @@

    Details
    -

    Examples

    +

    Examples +

    
     mods <- teal:::example_modules()
     datasets <- teal:::example_datasets()
    @@ -173,17 +202,19 @@ 

    Examples

    + +

    + +
    - - + + diff --git a/v0.14.0/reference/module_teal.html b/v0.14.0/reference/module_teal.html index eb20e8ac49..93a5bc3572 100644 --- a/v0.14.0/reference/module_teal.html +++ b/v0.14.0/reference/module_teal.html @@ -1,8 +1,24 @@ - -teal main app module — module_teal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,7 +113,8 @@
    -

    Usage

    +

    Usage +

    ui_teal(
       id,
       splash_ui = tags$h2("Starting the Teal App"),
    @@ -104,8 +127,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    module id

    @@ -137,16 +162,19 @@

    Arguments -

    Value

    +

    Value +

    ui_teal returns HTML for Shiny module UI. srv_teal returns reactive which returns the currently active module.

    -

    Details

    +

    Details +

    It displays the splash UI which is used to fetch the data, possibly prompting for a password input to fetch the data. Once the data is ready, the splash screen is replaced by the actual teal UI that is tabsetted and @@ -167,7 +195,8 @@

    Details
    -

    Examples

    +

    Examples +

    mods <- teal:::example_modules()
     raw_data <- reactive(teal:::example_cdisc_data())
     app <- shinyApp(
    @@ -184,17 +213,19 @@ 

    Examples

    + +

    + +
    - - + + diff --git a/v0.14.0/reference/modules.html b/v0.14.0/reference/modules.html index 4c699a7853..630c3d5abc 100644 --- a/v0.14.0/reference/modules.html +++ b/v0.14.0/reference/modules.html @@ -1,16 +1,32 @@ - - + + + + + +Creates a teal_modules object. — modules • teal +Creates a teal_modules object. — modules • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -103,7 +125,8 @@
    -

    Usage

    +

    Usage +

    modules(..., label = "root")
     
     # S3 method for teal_modules
    @@ -114,8 +137,10 @@ 

    Usage

    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    parameters passed to toString

    @@ -133,19 +158,25 @@

    Arguments -

    Value

    +

    Value +

    -

    object of class teal_modules. Object contains following fields

    • label: taken from the label argument

    • +

      object of class teal_modules. Object contains following fields

      +
        +
      • label: taken from the label argument

      • children: a list containing objects passed in .... List elements are named after their label attribute converted to a valid shiny id.

      • -

      (character)

      +
    +

    (character)

    -

    Examples

    +

    Examples +

    library(shiny)
     
     app <- init(
    @@ -196,17 +227,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/modules_depth.html b/v0.14.0/reference/modules_depth.html index e44a7f74f2..5a5baaf70f 100644 --- a/v0.14.0/reference/modules_depth.html +++ b/v0.14.0/reference/modules_depth.html @@ -1,10 +1,26 @@ - -Get module depth — modules_depth • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -94,13 +116,16 @@
    -

    Usage

    +

    Usage +

    modules_depth(modules, depth = 0L)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (list, teal_modules or teal_module)
    nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -111,16 +136,19 @@

    Arguments -

    Value

    +

    Value +

    depth level for given module

    -

    Examples

    +

    Examples +

    mods <- modules(
       label = "d1",
       modules(
    @@ -153,17 +181,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/reexports.html b/v0.14.0/reference/reexports.html index ad6d63326a..5c8e7e4957 100644 --- a/v0.14.0/reference/reexports.html +++ b/v0.14.0/reference/reexports.html @@ -1,5 +1,10 @@ - - + + + + + +Objects exported from other packages — reexports • teal +Objects exported from other packages — reexports • teal + + + + + + + + + + Skip to contents @@ -40,7 +56,8 @@ + + @@ -111,7 +133,8 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    lifecycle
    +
    +
    lifecycle

    deprecate_soft

    @@ -119,21 +142,24 @@

    %>%

    -
    + + - + + + + - - + + diff --git a/v0.14.0/reference/reporter_previewer_module.html b/v0.14.0/reference/reporter_previewer_module.html index db4e9ac302..2d76a7e795 100644 --- a/v0.14.0/reference/reporter_previewer_module.html +++ b/v0.14.0/reference/reporter_previewer_module.html @@ -1,20 +1,36 @@ - - + + + + + +Create a teal module for previewing a report — reporter_previewer_module • teal +Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + @@ -109,13 +131,16 @@
    -

    Usage

    +

    Usage +

    reporter_previewer_module(label = "Report previewer", server_args = list())
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module. Any label possible except "global_filters" - read more in mapping argument of teal_slices.

    @@ -124,26 +149,30 @@

    Argumentsteal.reporter::reporter_previewer_srv().

    -

    + +
    -

    Value

    +

    Value +

    teal_module containing the teal.reporter previewer functionality

    + + + + - - + + diff --git a/v0.14.0/reference/run_js_files.html b/v0.14.0/reference/run_js_files.html index 7c59ab877f..b3f05db3bb 100644 --- a/v0.14.0/reference/run_js_files.html +++ b/v0.14.0/reference/run_js_files.html @@ -1,14 +1,30 @@ - - + + + + + +Run JS file from /inst/js/ package directory — run_js_files • teal +Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -100,35 +122,42 @@
    -

    Usage

    +

    Usage +

    run_js_files(files)
    -

    Arguments

    -
    files
    +

    Arguments +

    +
    +
    files

    (character) vector of filenames

    -
    + +
    -

    Details

    +

    Details +

    system.file should not be used to access files in other packages, it does not work with devtools. Therefore, we redefine this method in each package as needed. Thus, we do not export this method

    + + + + - - + + diff --git a/v0.14.0/reference/show_rcode_modal.html b/v0.14.0/reference/show_rcode_modal.html index 946a7fcd59..6b3b6a61eb 100644 --- a/v0.14.0/reference/show_rcode_modal.html +++ b/v0.14.0/reference/show_rcode_modal.html @@ -1,10 +1,26 @@ - -Show R Code Modal — show_rcode_modal • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -94,13 +116,16 @@
    -

    Usage

    +

    Usage +

    show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())
    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1))
    Title of the modal, displayed in the first comment of the R-code.

    @@ -113,24 +138,28 @@

    Argumentsshiny::getDefaultReactiveDomain() is used.

    -

    + +
    -

    References

    +

    References +

    shiny::showModal()

    + + + + - - + + diff --git a/v0.14.0/reference/snapshot_manager_module.html b/v0.14.0/reference/snapshot_manager_module.html index 610e1ce361..703e0bf566 100644 --- a/v0.14.0/reference/snapshot_manager_module.html +++ b/v0.14.0/reference/snapshot_manager_module.html @@ -1,8 +1,24 @@ - -Filter state snapshot management. — snapshot_manager_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,15 +113,18 @@
    -

    Usage

    +

    Usage +

    snapshot_manager_ui(id)
     
     snapshot_manager_srv(id, slices_global, mapping_matrix, filtered_data_list)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id

    @@ -117,15 +142,18 @@

    Arguments -

    Value

    +

    Value +

    Nothing is returned.

    -

    Details

    +

    Details +

    This module introduces snapshots: stored descriptions of the filter state of the entire application. Snapshots allow the user to save the current filter state of the application for later use in the session, as well as to save it to file in order to share it with an app developer or other users.

    @@ -135,7 +163,8 @@

    Details

    -

    Server logic

    +

    Server logic +

    Snapshots are basically teal_slices objects, however, since each module is served by a separate instance @@ -150,7 +179,8 @@

    Server logic -

    Snapshot mechanics

    +

    Snapshot mechanics +

    When a snapshot is captured, the user is prompted to name it. @@ -174,22 +204,25 @@

    Snapshot mechanicsteal.slice::slices_store.

    -

    Author

    +

    Author +

    Aleksander Chlebowski

    + + + + - - + + diff --git a/v0.14.0/reference/srv_teal_with_splash.html b/v0.14.0/reference/srv_teal_with_splash.html index a4d7a4f121..7916e1f74a 100644 --- a/v0.14.0/reference/srv_teal_with_splash.html +++ b/v0.14.0/reference/srv_teal_with_splash.html @@ -1,12 +1,28 @@ - -Server function that loads the data through reactive loading and then delegates -to srv_teal(). — srv_teal_with_splash • teal + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -97,13 +119,16 @@
    -

    Usage

    +

    Usage +

    srv_teal_with_splash(id, data, modules, filter = teal_slices())
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character)
    module id to embed it, if provided, the server function must be called with shiny::moduleServer(); @@ -134,9 +159,11 @@

    Argumentsteal_slices().

    -
    + +
    -

    Value

    +

    Value +

    reactive, return value of srv_teal()

    @@ -145,17 +172,19 @@

    Value

    + + + + - - + + diff --git a/v0.14.0/reference/tdata.html b/v0.14.0/reference/tdata.html index 6a82af7e21..1689ed9061 100644 --- a/v0.14.0/reference/tdata.html +++ b/v0.14.0/reference/tdata.html @@ -1,20 +1,36 @@ - - + + + + + +Create a tdata Object — tdata • teal +Create a tdata Object — tdata • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + @@ -100,13 +122,17 @@

    Create a new object called tdata which contains data, a reactive list of data.frames -(or MultiAssayExperiment), with attributes:

    • code (reactive) containing code used to generate the data

    • +(or MultiAssayExperiment), with attributes:

      +
        +
      • code (reactive) containing code used to generate the data

      • join_keys (JoinKeys) containing the relationships between the data

      • metadata (named list) containing any metadata associated with the data frames

      • -
    + +
    -

    Usage

    +

    Usage +

    new_tdata(data, code = "", join_keys = NULL, metadata = NULL)
     
     # S3 method for tdata
    @@ -114,8 +140,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    A named list of data.frames (or MultiAssayExperiment) which optionally can be reactive. Inside this object all of these items will be made reactive.

    @@ -145,16 +173,19 @@

    Arguments -

    Value

    +

    Value +

    A tdata object

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars), dd = data.frame(x = 1:10)),
    @@ -331,17 +362,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/tdata2env.html b/v0.14.0/reference/tdata2env.html index 5bcc2471b0..2cbc90166b 100644 --- a/v0.14.0/reference/tdata2env.html +++ b/v0.14.0/reference/tdata2env.html @@ -1,12 +1,28 @@ - -Function to convert a tdata object to an environment -Any reactives inside tdata are first evaluated — tdata2env • teal + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -97,18 +119,23 @@
    -

    Usage

    +

    Usage +

    tdata2env(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    a tdata object

    -
    + +
    -

    Value

    +

    Value +

    an environment

    @@ -117,7 +144,8 @@

    Value

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars)),
    @@ -130,17 +158,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/teal-package.html b/v0.14.0/reference/teal-package.html index 73502c4d2e..a261abd139 100644 --- a/v0.14.0/reference/teal-package.html +++ b/v0.14.0/reference/teal-package.html @@ -1,10 +1,26 @@ - -teal: Interactive Exploration of Clinical Trials Data — teal-package • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -95,14 +117,18 @@
    -

    Details

    +

    Details +

    To learn mode about the package either read the project website at Project Website or read the init manual pages.

    -

    Author

    +

    Author +

    Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com

    -

    Authors:

    + + + + + + - - + + diff --git a/v0.14.0/reference/teal_slices.html b/v0.14.0/reference/teal_slices.html index 7c1a21324f..4b76807408 100644 --- a/v0.14.0/reference/teal_slices.html +++ b/v0.14.0/reference/teal_slices.html @@ -1,8 +1,24 @@ - -Filter settings for teal applications — teal_slices • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,7 +113,8 @@
    -

    Usage

    +

    Usage +

    teal_slices(
       ...,
       exclude_varnames = NULL,
    @@ -106,8 +129,10 @@ 

    Usage

    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    any number of teal_slice objects. For print and format, additional arguments passed to other functions.

    @@ -119,13 +144,17 @@

    Arguments[Experimental] This is a new feature. Do kindly share your opinions.
    +
    +

    [Experimental] This is a new feature. Do kindly share your opinions.
    (character(1)) string specifying how observations are tallied by these filter states. -Possible options:

    • "none" (default) to have counts of single FilterState to show unfiltered number only.

    • +Possible options:

      +
        +
      • "none" (default) to have counts of single FilterState to show unfiltered number only.

      • "all" to have counts of single FilterState to show number of observation in filtered and unfiltered dataset. Note, that issues were reported when using this option with MultiAssayExperiment. Please make sure that adding new filters doesn't fail on target platform before deploying for production.

      • -
    + +
    allow_add
    @@ -133,11 +162,15 @@

    ArgumentsArguments -

    Examples

    +

    Examples +

    filter <- teal_slices(
       teal.slice::teal_slice(dataname = "iris", varname = "Species", id = "species"),
       teal.slice::teal_slice(dataname = "iris", varname = "Sepal.Length", id = "sepal_length"),
    @@ -191,17 +226,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/ui_teal_with_splash.html b/v0.14.0/reference/ui_teal_with_splash.html index c9a2312fe9..baedd6deef 100644 --- a/v0.14.0/reference/ui_teal_with_splash.html +++ b/v0.14.0/reference/ui_teal_with_splash.html @@ -1,22 +1,38 @@ - - + + + + + +UI to show a splash screen in the beginning, then delegate to srv_teal() — ui_teal_with_splash • teal +UI to show a splash screen in the beginning, then delegate to srv_teal() — ui_teal_with_splash • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + +
    @@ -112,7 +135,8 @@
    -

    Usage

    +

    Usage +

    ui_teal_with_splash(
       id,
       data,
    @@ -123,8 +147,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1))
    module id

    @@ -156,20 +182,23 @@

    Arguments

    + +
    + + - - + + diff --git a/v0.14.0/reference/unfold_mapping.html b/v0.14.0/reference/unfold_mapping.html index 3842e8f1a2..f579831860 100644 --- a/v0.14.0/reference/unfold_mapping.html +++ b/v0.14.0/reference/unfold_mapping.html @@ -1,8 +1,24 @@ - -Explicitly enumerate global filters. — unfold_mapping • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,39 +113,46 @@
    -

    Usage

    +

    Usage +

    unfold_mapping(mapping, module_names)
    -

    Arguments

    -
    mapping
    +

    Arguments +

    +
    +
    mapping

    (named list) as stored in mapping parameter of teal_slices

    module_names

    (character) vector containing names of all modules in the app

    -
    + +
    -

    Value

    +

    Value +

    A named_list with one element per module, each element containing all filters applied to that module.

    + + + + - - + + diff --git a/v0.14.0/reference/validate_has_data.html b/v0.14.0/reference/validate_has_data.html index 300adb42fb..1d8a1221b5 100644 --- a/v0.14.0/reference/validate_has_data.html +++ b/v0.14.0/reference/validate_has_data.html @@ -1,8 +1,24 @@ - -Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,7 +113,8 @@
    -

    Usage

    +

    Usage +

    validate_has_data(
       x,
       min_nrow = NULL,
    @@ -102,8 +125,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    a data.frame

    @@ -123,14 +148,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(teal)
     ui <- fluidPage(
       sliderInput("len", "Max Length of Sepal",
    @@ -159,17 +187,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/validate_has_elements.html b/v0.14.0/reference/validate_has_elements.html index fe34c1743e..ba8e02658d 100644 --- a/v0.14.0/reference/validate_has_elements.html +++ b/v0.14.0/reference/validate_has_elements.html @@ -1,8 +1,24 @@ - -Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,27 +113,33 @@
    -

    Usage

    +

    Usage +

    validate_has_elements(x, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    msg

    message to display

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B"), each = 15)
    @@ -146,17 +174,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/validate_has_variable.html b/v0.14.0/reference/validate_has_variable.html index 693ca77d3d..9917d76b34 100644 --- a/v0.14.0/reference/validate_has_variable.html +++ b/v0.14.0/reference/validate_has_variable.html @@ -1,8 +1,24 @@ - -Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,13 +113,16 @@
    -

    Usage

    +

    Usage +

    validate_has_variable(data, varname, msg)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    a data.frame

    @@ -108,14 +133,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20)
    @@ -142,17 +170,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/validate_in.html b/v0.14.0/reference/validate_in.html index a15bbd8320..131c07e00e 100644 --- a/v0.14.0/reference/validate_in.html +++ b/v0.14.0/reference/validate_in.html @@ -1,8 +1,24 @@ - -Validates that vector includes all expected values — validate_in • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,13 +113,16 @@
    -

    Usage

    +

    Usage +

    validate_in(x, choices, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    values to test. All must be in choices

    @@ -108,14 +133,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    ui <- fluidPage(
       selectInput(
         "species",
    @@ -140,17 +168,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/validate_inputs.html b/v0.14.0/reference/validate_inputs.html index 6131223c12..93d14590c0 100644 --- a/v0.14.0/reference/validate_inputs.html +++ b/v0.14.0/reference/validate_inputs.html @@ -1,10 +1,26 @@ - -Send input validation messages to output. — validate_inputs • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -94,13 +116,16 @@
    -

    Usage

    +

    Usage +

    validate_inputs(..., header = "Some inputs require attention")
    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    either any number of InputValidator objects or an optionally named, possibly nested list of InputValidator objects, see Details

    @@ -109,15 +134,18 @@

    Arguments -

    Value

    +

    Value +

    Returns NULL if the final validation call passes and a shiny.silent.error if it fails.

    -

    Details

    +

    Details +

    shiny::validate is used to withhold rendering of an output element until certain conditions are met and to print a validation message in place of the output element. @@ -136,12 +164,14 @@

    Detailsheader.

    -

    Examples

    +

    Examples +

    library(shiny)
     library(shinyvalidate)
     
    @@ -211,17 +241,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/validate_n_levels.html b/v0.14.0/reference/validate_n_levels.html index e069319a30..116d18879f 100644 --- a/v0.14.0/reference/validate_n_levels.html +++ b/v0.14.0/reference/validate_n_levels.html @@ -1,8 +1,24 @@ - -Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,13 +113,16 @@
    -

    Usage

    +

    Usage +

    validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    variable name. If x is not a factor, the unique values are treated as levels.

    @@ -114,16 +139,19 @@

    Arguments -

    Details

    +

    Details +

    If the number of levels of x is less than min_levels or greater than max_levels the validation will fail. This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20),
    @@ -158,17 +186,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/validate_no_intersection.html b/v0.14.0/reference/validate_no_intersection.html index 156726ccc0..b6270b73b8 100644 --- a/v0.14.0/reference/validate_no_intersection.html +++ b/v0.14.0/reference/validate_no_intersection.html @@ -1,8 +1,24 @@ - -Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,13 +113,16 @@
    -

    Usage

    +

    Usage +

    validate_no_intersection(x, y, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    @@ -108,14 +133,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B", "C"), each = 10)
    @@ -155,17 +183,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.14.0/reference/validate_one_row_per_id.html b/v0.14.0/reference/validate_one_row_per_id.html index cf809bc08b..ff24fce30d 100644 --- a/v0.14.0/reference/validate_one_row_per_id.html +++ b/v0.14.0/reference/validate_one_row_per_id.html @@ -1,8 +1,24 @@ - -Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -91,27 +113,33 @@
    -

    Usage

    +

    Usage +

    validate_one_row_per_id(x, key = c("USUBJID", "STUDYID"))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    a data.frame

    key

    a vector of ID variables from x that identify unique records

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    iris$id <- rep(1:50, times = 3)
     ui <- fluidPage(
       selectInput(
    @@ -138,17 +166,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/404.html b/v0.15.0-rc1/404.html index da306ab3b6..6a391f5a46 100644 --- a/v0.15.0-rc1/404.html +++ b/v0.15.0-rc1/404.html @@ -1,5 +1,4 @@ - - + @@ -80,23 +79,7 @@ - - + - + + diff --git a/v0.15.0-rc1/CODE_OF_CONDUCT.html b/v0.15.0-rc1/CODE_OF_CONDUCT.html index 3dd34d1c92..ab92434ac9 100644 --- a/v0.15.0-rc1/CODE_OF_CONDUCT.html +++ b/v0.15.0-rc1/CODE_OF_CONDUCT.html @@ -1,8 +1,22 @@ - -Contributor Covenant Code of Conduct • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,65 +131,80 @@
    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    • Demonstrating empathy and kindness toward other people
    • +
        +
      • Demonstrating empathy and kindness toward other people
      • Being respectful of differing opinions, viewpoints, and experiences
      • Giving and gracefully accepting constructive feedback
      • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
      • Focusing on what is best not just for us as individuals, but for the overall community
      • -

      Examples of unacceptable behavior include:

      -
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • +
      +

      Examples of unacceptable behavior include:

      +
        +
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • Trolling, insulting or derogatory comments, and personal or political attacks
      • Public or private harassment
      • Publishing others’ private information, such as a physical or email address, without their explicit permission
      • Other conduct which could reasonably be considered inappropriate in a professional setting
      • -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -177,17 +212,19 @@

    Attribution

    + + + + - - + + diff --git a/v0.15.0-rc1/CONTRIBUTING.html b/v0.15.0-rc1/CONTRIBUTING.html index 63d6a044be..b4bdadba0b 100644 --- a/v0.15.0-rc1/CONTRIBUTING.html +++ b/v0.15.0-rc1/CONTRIBUTING.html @@ -1,8 +1,22 @@ - -Contribution Guidelines • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -113,7 +133,8 @@

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -124,38 +145,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    GitHub Flow

    +

    GitHub Flow +

    This repository uses the GitHub Flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes

        Make sure your code

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR)

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -169,76 +199,93 @@

        GitHub Flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    -

    Coding guidelines

    +

    Coding guidelines +

    This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Dependency management

    +

    Dependency management +

    Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

    -

    Dependency version management

    +

    Dependency version management +

    If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    -
    • Minimum 5% of lines of code authored* (determined by git blame query) OR
    • +
        +
      • Minimum 5% of lines of code authored* (determined by git blame query) OR
      • Being at the top 5 contributors in terms of number of commits OR lines added OR lines removed*
      • -

      *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

      +
    +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + + + - - + + diff --git a/v0.15.0-rc1/LICENSE-text.html b/v0.15.0-rc1/LICENSE-text.html index 83e571b4f7..bc2215f85a 100644 --- a/v0.15.0-rc1/LICENSE-text.html +++ b/v0.15.0-rc1/LICENSE-text.html @@ -1,8 +1,22 @@ - -License • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -123,17 +143,19 @@ limitations under the License. - + + + + - - + + diff --git a/v0.15.0-rc1/SECURITY.html b/v0.15.0-rc1/SECURITY.html index 5987daefd1..b929c9542c 100644 --- a/v0.15.0-rc1/SECURITY.html +++ b/v0.15.0-rc1/SECURITY.html @@ -1,8 +1,22 @@ - -Security Policy • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,38 +131,44 @@
    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    -
    • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
    • +
        +
      • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
      • Full paths of source file(s) related to the manifestation of the issue
      • The location of the affected source code (tag/branch/commit or direct URL)
      • Any special configuration required to reproduce the issue
      • Step-by-step instructions to reproduce the issue
      • Proof-of-concept or exploit code (if possible)
      • Impact of the issue, including how an attacker might exploit the issue
      • -

      This information will help us triage your report more quickly.

      +
    +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + + + - - + + diff --git a/v0.15.0-rc1/articles/adding-support-for-reporting.html b/v0.15.0-rc1/articles/adding-support-for-reporting.html index 77dacda92d..c58cbc5882 100644 --- a/v0.15.0-rc1/articles/adding-support-for-reporting.html +++ b/v0.15.0-rc1/articles/adding-support-for-reporting.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/blueprint/actors.html b/v0.15.0-rc1/articles/blueprint/actors.html index 7286951aed..16b9e3454e 100644 --- a/v0.15.0-rc1/articles/blueprint/actors.html +++ b/v0.15.0-rc1/articles/blueprint/actors.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/blueprint/dataflow.html b/v0.15.0-rc1/articles/blueprint/dataflow.html index 92ed70cbe6..ff998b204a 100644 --- a/v0.15.0-rc1/articles/blueprint/dataflow.html +++ b/v0.15.0-rc1/articles/blueprint/dataflow.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/blueprint/filter_panel.html b/v0.15.0-rc1/articles/blueprint/filter_panel.html index 2d7728eb6a..3226cd3dac 100644 --- a/v0.15.0-rc1/articles/blueprint/filter_panel.html +++ b/v0.15.0-rc1/articles/blueprint/filter_panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/blueprint/in_app_data.html b/v0.15.0-rc1/articles/blueprint/in_app_data.html index 6b929dba21..e9ae3e6c9a 100644 --- a/v0.15.0-rc1/articles/blueprint/in_app_data.html +++ b/v0.15.0-rc1/articles/blueprint/in_app_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/blueprint/index.html b/v0.15.0-rc1/articles/blueprint/index.html index 1240bcff0d..77efa419e1 100644 --- a/v0.15.0-rc1/articles/blueprint/index.html +++ b/v0.15.0-rc1/articles/blueprint/index.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/blueprint/input_data.html b/v0.15.0-rc1/articles/blueprint/input_data.html index dec2aa998d..3a2baa7549 100644 --- a/v0.15.0-rc1/articles/blueprint/input_data.html +++ b/v0.15.0-rc1/articles/blueprint/input_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/blueprint/intro.html b/v0.15.0-rc1/articles/blueprint/intro.html index a335742e7a..ce59a13bd6 100644 --- a/v0.15.0-rc1/articles/blueprint/intro.html +++ b/v0.15.0-rc1/articles/blueprint/intro.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/blueprint/module_encapsulation.html b/v0.15.0-rc1/articles/blueprint/module_encapsulation.html index e01ff871e0..63714a14a0 100644 --- a/v0.15.0-rc1/articles/blueprint/module_encapsulation.html +++ b/v0.15.0-rc1/articles/blueprint/module_encapsulation.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/blueprint/product_map.html b/v0.15.0-rc1/articles/blueprint/product_map.html index 656e1ccce4..acf4d046d4 100644 --- a/v0.15.0-rc1/articles/blueprint/product_map.html +++ b/v0.15.0-rc1/articles/blueprint/product_map.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/bootstrap-themes-in-teal.html b/v0.15.0-rc1/articles/bootstrap-themes-in-teal.html index de6fc7c5b1..07fe86ca39 100644 --- a/v0.15.0-rc1/articles/bootstrap-themes-in-teal.html +++ b/v0.15.0-rc1/articles/bootstrap-themes-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/creating-custom-modules.html b/v0.15.0-rc1/articles/creating-custom-modules.html index 9432604723..2c8e9c5017 100644 --- a/v0.15.0-rc1/articles/creating-custom-modules.html +++ b/v0.15.0-rc1/articles/creating-custom-modules.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/data-as-shiny-module.html b/v0.15.0-rc1/articles/data-as-shiny-module.html index 06fdf3e10d..763753b705 100644 --- a/v0.15.0-rc1/articles/data-as-shiny-module.html +++ b/v0.15.0-rc1/articles/data-as-shiny-module.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/filter-panel.html b/v0.15.0-rc1/articles/filter-panel.html index 866d1ca941..52b42dc8ba 100644 --- a/v0.15.0-rc1/articles/filter-panel.html +++ b/v0.15.0-rc1/articles/filter-panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/getting-started-with-teal.html b/v0.15.0-rc1/articles/getting-started-with-teal.html index 2f77af7fad..2670b3d927 100644 --- a/v0.15.0-rc1/articles/getting-started-with-teal.html +++ b/v0.15.0-rc1/articles/getting-started-with-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/including-data-in-teal-applications.html b/v0.15.0-rc1/articles/including-data-in-teal-applications.html index daca279ff7..14218df6ee 100644 --- a/v0.15.0-rc1/articles/including-data-in-teal-applications.html +++ b/v0.15.0-rc1/articles/including-data-in-teal-applications.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/articles/index.html b/v0.15.0-rc1/articles/index.html index d4a1ba5648..868e26ed85 100644 --- a/v0.15.0-rc1/articles/index.html +++ b/v0.15.0-rc1/articles/index.html @@ -1,8 +1,22 @@ - -Articles • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,78 +131,113 @@

    Get started

    -
    Getting Started with teal
    +
    +
    Getting Started with teal
    -
    + +
    + + + + + + + + + +

    📃 Technical blueprint

    -

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    +

    +

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    -
    About Technical Blueprint
    +
    +
    About Technical Blueprint
    -
    Introduction
    + +
    Introduction
    -
    Actors
    + +
    Actors
    -
    Data Flow
    + +
    Data Flow
    -
    Product Map
    + +
    Product Map
    -
    + + + + + + + + + + - - + + diff --git a/v0.15.0-rc1/articles/teal-options.html b/v0.15.0-rc1/articles/teal-options.html index 83e85ad5f7..246c63ecbd 100644 --- a/v0.15.0-rc1/articles/teal-options.html +++ b/v0.15.0-rc1/articles/teal-options.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0-rc1/authors.html b/v0.15.0-rc1/authors.html index 4984ffaad2..986f8eecfa 100644 --- a/v0.15.0-rc1/authors.html +++ b/v0.15.0-rc1/authors.html @@ -1,8 +1,22 @@ - -Authors and Citation • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -110,7 +130,8 @@

    Authors

    -
    • +
        +
      • Dawid Kaledkowski. Author, maintainer.

      • @@ -178,7 +199,8 @@

        Authors

        Maximilian Mordig. Contributor.

        -
    + +

    Citation

    @@ -199,17 +221,19 @@

    Citation

    }
    + + + + - - + + diff --git a/v0.15.0-rc1/coverage-report/index.html b/v0.15.0-rc1/coverage-report/index.html index b98d342c2f..7b5f3a7d7a 100644 --- a/v0.15.0-rc1/coverage-report/index.html +++ b/v0.15.0-rc1/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -431,56 +430,64 @@

    teal coverage - 68.02%

    46 - 17x + 17x +
      checkmate::assert_string(msg, null.ok = TRUE)
    47 - 15x + 15x +
      checkmate::assert_data_frame(x)
    48 - 15x + 15x +
      if (!is.null(min_nrow)) {
    49 - 15x + 15x +
        if (complete) {
    50 - 5x + 5x +
          complete_index <- stats::complete.cases(x)
    51 - 5x + 5x +
          validate(need(
    52 - 5x + 5x +
            sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
    53 - 5x + 5x +
            paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
    @@ -501,35 +508,40 @@

    teal coverage - 68.02%

    56 - 10x + 10x +
          validate(need(
    57 - 10x + 10x +
            nrow(x) >= min_nrow,
    58 - 10x + 10x +
            paste(
    59 - 10x + 10x +
              c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
    60 - 10x + 10x +
              collapse = "\n"
    @@ -564,28 +576,32 @@

    teal coverage - 68.02%

    65 - 10x + 10x +
        if (!allow_inf) {
    66 - 6x + 6x +
          validate(need(
    67 - 6x + 6x +
            all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
    68 - 6x + 6x +
            "Dataframe contains Inf values which is not allowed."
    @@ -3510,42 +3526,48 @@

    teal coverage - 68.02%

    106 - 6x + 6x +
      checkmate::assert_character(id)
    107 - 6x + 6x +
      checkmate::assert_true(is.reactive(slices_global))
    108 - 6x + 6x +
      checkmate::assert_class(isolate(slices_global()), "teal_slices")
    109 - 6x + 6x +
      checkmate::assert_true(is.reactive(mapping_matrix))
    110 - 6x + 6x +
      checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
    111 - 6x + 6x +
      checkmate::assert_list(filtered_data_list, types = "FilteredData", any.missing = FALSE, names = "named")
    @@ -3559,14 +3581,16 @@

    teal coverage - 68.02%

    113 - 6x + 6x +
      moduleServer(id, function(input, output, session) {
    114 - 6x + 6x +
        ns <- session$ns
    @@ -3587,28 +3611,32 @@

    teal coverage - 68.02%

    117 - 6x + 6x +
        filter <- isolate(slices_global())
    118 - 6x + 6x +
        snapshot_history <- reactiveVal({
    119 - 6x + 6x +
          list(
    120 - 6x + 6x +
            "Initial application state" = as.list(filter, recursive = TRUE)
    @@ -3650,7 +3678,8 @@

    teal coverage - 68.02%

    126 - 6x + 6x +
        observeEvent(input$snapshot_add, {
    @@ -3741,7 +3770,8 @@

    teal coverage - 68.02%

    139 - 6x + 6x +
        observeEvent(input$snapshot_name_accept, {
    @@ -3937,7 +3967,8 @@

    teal coverage - 68.02%

    167 - 6x + 6x +
        observeEvent(input$snapshot_load, {
    @@ -4063,7 +4094,8 @@

    teal coverage - 68.02%

    185 - 6x + 6x +
        observeEvent(input$snaphot_file_accept, {
    @@ -4413,7 +4445,8 @@

    teal coverage - 68.02%

    235 - 6x + 6x +
        observeEvent(input$snapshot_reset, {
    @@ -4581,21 +4614,24 @@

    teal coverage - 68.02%

    259 - 6x + 6x +
        observers <- reactiveValues()
    260 - 6x + 6x +
        handlers <- reactiveValues()
    261 - 6x + 6x +
        divs <- reactiveValues()
    @@ -4609,14 +4645,16 @@

    teal coverage - 68.02%

    263 - 6x + 6x +
        observeEvent(snapshot_history(), {
    264 - 2x + 2x +
          lapply(names(snapshot_history())[-1L], function(s) {
    @@ -4987,42 +5025,48 @@

    teal coverage - 68.02%

    317 - 6x + 6x +
        output$snapshot_list <- renderUI({
    318 - 2x + 2x +
          rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
    319 - 2x + 2x +
          if (length(rows) == 0L) {
    320 - 2x + 2x +
            div(
    321 - 2x + 2x +
              class = "snapshot_manager_placeholder",
    322 - 2x + 2x +
              "Snapshots will appear here."
    @@ -5518,56 +5562,64 @@

    teal coverage - 68.02%

    25 - 4x + 4x +
          checkmate::assert_character(src, min.len = 0, max.len = 1)
    26 - 4x + 4x +
          params <- list(...)
    27 - 4x + 4x +
          params$eval <- FALSE
    28 - 4x + 4x +
          rblock <- RcodeBlock$new(src)
    29 - 4x + 4x +
          rblock$set_params(params)
    30 - 4x + 4x +
          self$append_content(rblock)
    31 - 4x + 4x +
          self$append_metadata("SRC", src)
    32 - 4x + 4x +
          invisible(self)
    @@ -5637,28 +5689,32 @@

    teal coverage - 68.02%

    42 - 5x + 5x +
          checkmate::assert_class(fs, "teal_slices")
    43 - 4x + 4x +
          self$append_text("Filter State", "header3")
    44 - 4x + 4x +
          self$append_content(TealSlicesBlock$new(fs))
    45 - 4x + 4x +
          invisible(self)
    @@ -5735,56 +5791,64 @@

    teal coverage - 68.02%

    56 - 4x + 4x +
          checkmate::assert_list(encodings)
    57 - 4x + 4x +
          self$append_text("Selected Options", "header3")
    58 - 4x + 4x +
          if (requireNamespace("yaml", quietly = TRUE)) {
    59 - 4x + 4x +
            self$append_text(yaml::as.yaml(encodings, handlers = list(
    60 - 4x + 4x +
              POSIXct = function(x) format(x, "%Y-%m-%d"),
    61 - 4x + 4x +
              POSIXlt = function(x) format(x, "%Y-%m-%d"),
    62 - 4x + 4x +
              Date = function(x) format(x, "%Y-%m-%d")
    63 - 4x + 4x +
            )), "verbatim")
    @@ -5812,14 +5876,16 @@

    teal coverage - 68.02%

    67 - 4x + 4x +
          self$append_metadata("Encodings", encodings)
    68 - 4x + 4x +
          invisible(self)
    @@ -5973,21 +6039,24 @@

    teal coverage - 68.02%

    90 - 10x + 10x +
          self$set_content(content)
    91 - 9x + 9x +
          self$set_style(style)
    92 - 9x + 9x +
          invisible(self)
    @@ -6078,56 +6147,64 @@

    teal coverage - 68.02%

    105 - 11x + 11x +
          checkmate::assert_class(content, "teal_slices")
    106 - 10x + 10x +
          if (length(content) != 0) {
    107 - 7x + 7x +
            states_list <- lapply(content, function(x) {
    108 - 7x + 7x +
              x_list <- shiny::isolate(as.list(x))
    109 - 7x + 7x +
              if (
    110 - 7x + 7x +
                inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
    111 - 7x + 7x +
                  length(x_list$choices) == 2 &&
    112 - 7x + 7x +
                  length(x_list$selected) == 2
    @@ -6162,7 +6239,8 @@

    teal coverage - 68.02%

    117 - 7x + 7x +
              if (!is.null(x_list$arg)) {
    @@ -6190,14 +6268,16 @@

    teal coverage - 68.02%

    121 - 7x + 7x +
              x_list <- x_list[
    122 - 7x + 7x +
                c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
    @@ -6211,21 +6291,24 @@

    teal coverage - 68.02%

    124 - 7x + 7x +
              names(x_list) <- c(
    125 - 7x + 7x +
                "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
    126 - 7x + 7x +
                "Selected Values", "Selected range", "Include NA values", "Include Inf values"
    @@ -6246,7 +6329,8 @@

    teal coverage - 68.02%

    129 - 7x + 7x +
              Filter(Negate(is.null), x_list)
    @@ -6267,14 +6351,16 @@

    teal coverage - 68.02%

    132 - 7x + 7x +
            if (requireNamespace("yaml", quietly = TRUE)) {
    133 - 7x + 7x +
              super$set_content(yaml::as.yaml(states_list))
    @@ -6309,14 +6395,16 @@

    teal coverage - 68.02%

    138 - 10x + 10x +
          private$teal_slices <- content
    139 - 10x + 10x +
          invisible(self)
    @@ -6365,28 +6453,32 @@

    teal coverage - 68.02%

    146 - 1x + 1x +
          checkmate::assert_list(x)
    147 - 1x + 1x +
          checkmate::assert_names(names(x), must.include = c("teal_slices"))
    148 - 1x + 1x +
          self$set_content(x$teal_slices)
    149 - 1x + 1x +
          invisible(self)
    @@ -6428,7 +6520,8 @@

    teal coverage - 68.02%

    155 - 2x + 2x +
          list(teal_slices = private$teal_slices)
    @@ -7029,28 +7122,32 @@

    teal coverage - 68.02%

    78 - 5x + 5x +
      checkmate::assert_class(modules, "teal_modules")
    79 - 5x + 5x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    80 - 5x + 5x +
      checkmate::assert_class(reporter, "Reporter")
    81 - 3x + 3x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -7064,14 +7161,16 @@

    teal coverage - 68.02%

    83 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    84 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initializing the module.")
    @@ -7085,14 +7184,16 @@

    teal coverage - 68.02%

    86 - 3x + 3x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    87 - 3x + 3x +
        manager_out <- filter_manager_modal_srv("filter_manager", filtered_data_list = datasets, filter = filter)
    @@ -7106,42 +7207,48 @@

    teal coverage - 68.02%

    89 - 3x + 3x +
        active_module <- srv_nested_tabs(
    90 - 3x + 3x +
          id = "root",
    91 - 3x + 3x +
          datasets = datasets,
    92 - 3x + 3x +
          modules = modules,
    93 - 3x + 3x +
          reporter = reporter,
    94 - 3x + 3x +
          is_module_specific = is_module_specific
    @@ -7162,21 +7269,24 @@

    teal coverage - 68.02%

    97 - 3x + 3x +
        if (!is_module_specific) {
    98 - 3x + 3x +
          active_datanames <- reactive({
    99 - 6x + 6x +
            if (identical(active_module()$datanames, "all")) {
    @@ -7197,21 +7307,24 @@

    teal coverage - 68.02%

    102 - 5x + 5x +
              include_parent_datanames(
    103 - 5x + 5x +
                active_module()$datanames,
    104 - 5x + 5x +
                singleton$get_join_keys()
    @@ -7239,14 +7352,16 @@

    teal coverage - 68.02%

    108 - 3x + 3x +
          singleton <- unlist(datasets)[[1]]
    109 - 3x + 3x +
          singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
    @@ -7260,28 +7375,32 @@

    teal coverage - 68.02%

    111 - 3x + 3x +
          observeEvent(
    112 - 3x + 3x +
            eventExpr = active_datanames(),
    113 - 3x + 3x +
            handlerExpr = {
    114 - 4x + 4x +
              script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
    @@ -7316,7 +7435,8 @@

    teal coverage - 68.02%

    119 - 4x + 4x +
                "handleActiveDatasetsPresent();"
    @@ -7330,7 +7450,8 @@

    teal coverage - 68.02%

    121 - 4x + 4x +
              shinyjs::runjs(script)
    @@ -7344,7 +7465,8 @@

    teal coverage - 68.02%

    123 - 3x + 3x +
            ignoreNULL = FALSE
    @@ -7372,14 +7494,16 @@

    teal coverage - 68.02%

    127 - 3x + 3x +
        showNotification("Data loaded - App fully started up")
    128 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initialized the module")
    @@ -7393,7 +7517,8 @@

    teal coverage - 68.02%

    130 - 3x + 3x +
        active_module
    @@ -7518,21 +7643,24 @@

    teal coverage - 68.02%

    15 - 18x + 18x +
      script <- sprintf(
    16 - 18x + 18x +
        "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
    17 - 18x + 18x +
        ns("timezone")
    @@ -7546,14 +7674,16 @@

    teal coverage - 68.02%

    19 - 18x + 18x +
      shinyjs::runjs(script) # function does not return anything
    20 - 18x + 18x +
      invisible(NULL)
    @@ -7602,42 +7732,48 @@

    teal coverage - 68.02%

    27 - 11x + 11x +
      bs_theme <- getOption("teal.bs_theme")
    28 - 11x + 11x +
      if (is.null(bs_theme)) {
    29 - 8x + 8x +
        NULL
    30 - 3x + 3x +
      } else if (!inherits(bs_theme, "bs_theme")) {
    31 - 2x + 2x +
        warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
    32 - 2x + 2x +
        NULL
    @@ -7651,7 +7787,8 @@

    teal coverage - 68.02%

    34 - 1x + 1x +
        bs_theme
    @@ -7707,42 +7844,48 @@

    teal coverage - 68.02%

    42 - 11x + 11x +
      parents <- character(0)
    43 - 11x + 11x +
      for (i in dataname) {
    44 - 16x + 16x +
        while (length(i) > 0) {
    45 - 18x + 18x +
          parent_i <- teal.data::parent(join_keys, i)
    46 - 18x + 18x +
          parents <- c(parent_i, parents)
    47 - 18x + 18x +
          i <- parent_i
    @@ -7770,7 +7913,8 @@

    teal coverage - 68.02%

    51 - 11x + 11x +
      unique(c(parents, dataname))
    @@ -7854,14 +7998,16 @@

    teal coverage - 68.02%

    63 - 13x + 13x +
      checkmate::assert_class(x, "teal_data")
    64 - 13x + 13x +
      checkmate::assert_character(datanames, min.chars = 1L, any.missing = FALSE)
    @@ -7875,21 +8021,24 @@

    teal coverage - 68.02%

    66 - 13x + 13x +
      ans <- teal.slice::init_filtered_data(
    67 - 13x + 13x +
        x = sapply(datanames, function(dn) x[[dn]], simplify = FALSE),
    68 - 13x + 13x +
        join_keys = teal.data::join_keys(x)
    @@ -7910,21 +8059,24 @@

    teal coverage - 68.02%

    71 - 13x + 13x +
      attr(ans, "preprocessing_code") <- teal.code::get_code(x)
    72 - 13x + 13x +
      attr(ans, "verification_status") <- x@verified
    73 - 13x + 13x +
      ans
    @@ -8057,35 +8209,40 @@

    teal coverage - 68.02%

    92 - 2x + 2x +
      checkmate::assert_string(title)
    93 - 2x + 2x +
      checkmate::assert_string(label)
    94 - 2x + 2x +
      checkmate::assert_string(description, null.ok = TRUE)
    95 - 2x + 2x +
      checkmate::assert_flag(with_filter)
    96 - 2x + 2x +
      checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
    @@ -8099,49 +8256,56 @@

    teal coverage - 68.02%

    98 - 2x + 2x +
      card <- teal::TealReportCard$new()
    99 - 2x + 2x +
      title <- if (label == "") title else label
    100 - 2x + 2x +
      card$set_name(title)
    101 - 2x + 2x +
      card$append_text(title, "header2")
    102 - 1x + 1x +
      if (!is.null(description)) card$append_text(description, "header3")
    103 - 1x + 1x +
      if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
    104 - 2x + 2x +
      card
    @@ -8526,14 +8690,16 @@

    teal coverage - 68.02%

    159 - 12x + 12x +
      checkmate::assert_class(modules, "teal_modules")
    160 - 12x + 12x +
      checkmate::assert_character(datanames)
    @@ -8547,7 +8713,8 @@

    teal coverage - 68.02%

    162 - 12x + 12x +
      recursive_check_datanames <- function(modules, datanames) {
    @@ -8561,14 +8728,16 @@

    teal coverage - 68.02%

    164 - 26x + 26x +
        if (inherits(modules, "teal_modules")) {
    165 - 12x + 12x +
          sapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
    @@ -8582,49 +8751,56 @@

    teal coverage - 68.02%

    167 - 14x + 14x +
          extra_datanames <- setdiff(modules$datanames, c("all", datanames))
    168 - 14x + 14x +
          if (length(extra_datanames)) {
    169 - 2x + 2x +
            sprintf(
    170 - 2x + 2x +
              "- Module '%s' uses datanames not available in 'data': (%s) not in (%s)",
    171 - 2x + 2x +
              modules$label,
    172 - 2x + 2x +
              toString(dQuote(extra_datanames, q = FALSE)),
    173 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -8659,21 +8835,24 @@

    teal coverage - 68.02%

    178 - 12x + 12x +
      check_datanames <- unlist(recursive_check_datanames(modules, datanames))
    179 - 12x + 12x +
      if (length(check_datanames)) {
    180 - 2x + 2x +
        paste(check_datanames, collapse = "\n")
    @@ -8687,7 +8866,8 @@

    teal coverage - 68.02%

    182 - 10x + 10x +
        TRUE
    @@ -8792,14 +8972,16 @@

    teal coverage - 68.02%

    197 - 10x + 10x +
      checkmate::assert_class(filters, "teal_slices")
    198 - 10x + 10x +
      checkmate::assert_character(datanames)
    @@ -8820,63 +9002,72 @@

    teal coverage - 68.02%

    201 - 10x + 10x +
      out <- unlist(sapply(
    202 - 10x + 10x +
        filters, function(filter) {
    203 - 3x + 3x +
          dataname <- shiny::isolate(filter$dataname)
    204 - 3x + 3x +
          if (!dataname %in% datanames) {
    205 - 2x + 2x +
            sprintf(
    206 - 2x + 2x +
              "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
    207 - 2x + 2x +
              shiny::isolate(filter$id),
    208 - 2x + 2x +
              dQuote(dataname, q = FALSE),
    209 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -8925,14 +9116,16 @@

    teal coverage - 68.02%

    216 - 10x + 10x +
      if (length(out)) {
    217 - 2x + 2x +
        paste(out, collapse = "\n")
    @@ -8946,7 +9139,8 @@

    teal coverage - 68.02%

    219 - 8x + 8x +
        TRUE
    @@ -9030,21 +9224,24 @@

    teal coverage - 68.02%

    231 - 51x + 51x +
      checkmate::assert_class(data, "teal_data")
    232 - 51x + 51x +
      if (length(teal.data::datanames(data))) {
    233 - 47x + 47x +
        teal.data::datanames(data)
    @@ -9058,7 +9255,8 @@

    teal coverage - 68.02%

    235 - 4x + 4x +
        ls(teal.code::get_env(data), all.names = TRUE)
    @@ -9128,70 +9326,80 @@

    teal coverage - 68.02%

    245 - 14x + 14x +
      checkmate::assert_class(shiny_tag, "shiny.tag")
    246 - 14x + 14x +
      checkmate::assert_true(shiny_tag$name == "head")
    247 - 13x + 13x +
      child_names <- vapply(shiny_tag$children, `[[`, character(1L), "name")
    248 - 13x + 13x +
      checkmate::assert_subset(c("title", "link"), child_names, .var.name = "child tags")
    249 - 11x + 11x +
      rel_attr <- shiny_tag$children[[which(child_names == "link")]]$attribs$rel
    250 - 11x + 11x +
      checkmate::assert_subset(
    251 - 11x + 11x +
        rel_attr,
    252 - 11x + 11x +
        c("icon", "shortcut icon"),
    253 - 11x + 11x +
        .var.name = "Link tag's rel attribute",
    254 - 11x + 11x +
        empty.ok = FALSE
    @@ -9310,56 +9518,64 @@

    teal coverage - 68.02%

    271 - 11x + 11x +
      checkmate::assert_string(title, null.ok = TRUE)
    272 - 11x + 11x +
      checkmate::assert_string(favicon, null.ok = TRUE)
    273 - 11x + 11x +
      tags$head(
    274 - 11x + 11x +
        tags$title(title),
    275 - 11x + 11x +
        tags$link(
    276 - 11x + 11x +
          rel = "icon",
    277 - 11x + 11x +
          href = favicon,
    278 - 11x + 11x +
          sizes = "any"
    @@ -9499,14 +9715,16 @@

    teal coverage - 68.02%

    298 - 19x + 19x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    299 - 18x + 18x +
      checkmate::assert_class(modules, "teal_modules")
    @@ -9520,28 +9738,32 @@

    teal coverage - 68.02%

    301 - 17x + 17x +
      data <- if (inherits(data, "teal_data")) {
    302 - 15x + 15x +
        as.list(data@env)
    303 - 17x + 17x +
      } else if (inherits(data, "teal_data_module")) {
    304 - 2x + 2x +
        deparse1(body(data$server))
    @@ -9555,7 +9777,8 @@

    teal coverage - 68.02%

    306 - 17x + 17x +
      modules <- lapply(modules, defunction)
    @@ -9569,7 +9792,8 @@

    teal coverage - 68.02%

    308 - 17x + 17x +
      rlang::hash(list(data = data, modules = modules))
    @@ -9618,28 +9842,32 @@

    teal coverage - 68.02%

    315 - 186x + 186x +
      if (is.list(x)) {
    316 - 40x + 40x +
        lapply(x, defunction)
    317 - 146x + 146x +
      } else if (is.function(x)) {
    318 - 44x + 44x +
        deparse1(body(x))
    @@ -9653,7 +9881,8 @@

    teal coverage - 68.02%

    320 - 102x + 102x +
        x
    @@ -10093,42 +10322,48 @@

    teal coverage - 68.02%

    60 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    61 - 7x + 7x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "title",
    64 - 7x + 7x +
        checkmate::check_string(title),
    65 - 7x + 7x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -10142,28 +10377,32 @@

    teal coverage - 68.02%

    67 - 7x + 7x +
      checkmate::assert(
    68 - 7x + 7x +
        .var.name = "header",
    69 - 7x + 7x +
        checkmate::check_string(header),
    70 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -10177,28 +10416,32 @@

    teal coverage - 68.02%

    72 - 7x + 7x +
      checkmate::assert(
    73 - 7x + 7x +
        .var.name = "footer",
    74 - 7x + 7x +
        checkmate::check_string(footer),
    75 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -10219,7 +10462,8 @@

    teal coverage - 68.02%

    78 - 7x + 7x +
      ns <- NS(id)
    @@ -10261,28 +10505,32 @@

    teal coverage - 68.02%

    84 - 7x + 7x +
      splash_ui <- if (inherits(data, "teal_data_module")) {
    85 - 1x + 1x +
        data$ui(ns("teal_data_module"))
    86 - 7x + 7x +
      } else if (inherits(data, "teal_data")) {
    87 - 6x + 6x +
        div()
    @@ -10296,42 +10544,48 @@

    teal coverage - 68.02%

    89 - 7x + 7x +
      ui_teal(
    90 - 7x + 7x +
        id = ns("teal"),
    91 - 7x + 7x +
        splash_ui = div(splash_ui, uiOutput(ns("error"))),
    92 - 7x + 7x +
        title = title,
    93 - 7x + 7x +
        header = header,
    94 - 7x + 7x +
        footer = footer
    @@ -10380,28 +10634,32 @@

    teal coverage - 68.02%

    101 - 15x + 15x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    102 - 15x + 15x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    103 - 15x + 15x +
      checkmate::assert_class(modules, "teal_modules")
    104 - 15x + 15x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -10415,14 +10673,16 @@

    teal coverage - 68.02%

    106 - 15x + 15x +
      moduleServer(id, function(input, output, session) {
    107 - 15x + 15x +
        logger::log_trace("srv_teal_with_splash initializing module with data.")
    @@ -10436,7 +10696,8 @@

    teal coverage - 68.02%

    109 - 15x + 15x +
        if (getOption("teal.show_js_log", default = FALSE)) {
    @@ -10478,28 +10739,32 @@

    teal coverage - 68.02%

    115 - 15x + 15x +
        teal_data_rv <- if (inherits(data, "teal_data_module")) {
    116 - 10x + 10x +
          data <- data$server(id = "teal_data_module")
    117 - 10x + 10x +
          if (!is.reactive(data)) {
    118 - 1x + 1x +
            stop("The `teal_data_module` passed to `data` must return a reactive expression.", call. = FALSE)
    @@ -10513,21 +10778,24 @@

    teal coverage - 68.02%

    120 - 9x + 9x +
          data
    121 - 15x + 15x +
        } else if (inherits(data, "teal_data")) {
    122 - 5x + 5x +
          reactiveVal(data)
    @@ -10548,7 +10816,8 @@

    teal coverage - 68.02%

    125 - 14x + 14x +
        teal_data_rv_validate <- reactive({
    @@ -10562,7 +10831,8 @@

    teal coverage - 68.02%

    127 - 11x + 11x +
          data <- tryCatch(teal_data_rv(), error = function(e) e)
    @@ -10583,7 +10853,8 @@

    teal coverage - 68.02%

    130 - 11x + 11x +
          if (inherits(data, "shiny.silent.error") && identical(data$message, "")) {
    @@ -10618,56 +10889,64 @@

    teal coverage - 68.02%

    135 - 11x + 11x +
          if (inherits(data, "qenv.error")) {
    136 - 2x + 2x +
            validate(
    137 - 2x + 2x +
              need(
    138 - 2x + 2x +
                FALSE,
    139 - 2x + 2x +
                paste(
    140 - 2x + 2x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    141 - 2x + 2x +
                  paste(data$message, collapse = "\n"),
    142 - 2x + 2x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -10716,56 +10995,64 @@

    teal coverage - 68.02%

    149 - 9x + 9x +
          if (inherits(data, "error")) {
    150 - 1x + 1x +
            validate(
    151 - 1x + 1x +
              need(
    152 - 1x + 1x +
                FALSE,
    153 - 1x + 1x +
                paste(
    154 - 1x + 1x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    155 - 1x + 1x +
                  paste(data$message, collpase = "\n"),
    156 - 1x + 1x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -10807,56 +11094,64 @@

    teal coverage - 68.02%

    162 - 8x + 8x +
          validate(
    163 - 8x + 8x +
            need(
    164 - 8x + 8x +
              inherits(data, "teal_data"),
    165 - 8x + 8x +
              paste(
    166 - 8x + 8x +
                "Error: `teal_data_module` passed to `data` failed to return `teal_data` object, returned",
    167 - 8x + 8x +
                toString(sQuote(class(data))),
    168 - 8x + 8x +
                "instead.",
    169 - 8x + 8x +
                "\n Check your inputs or contact app developer if error persists."
    @@ -10891,14 +11186,16 @@

    teal coverage - 68.02%

    174 - 5x + 5x +
          if (!length(teal.data::datanames(data))) {
    175 - 1x + 1x +
            warning("`data` object has no datanames. Default datanames are set using `teal_data`'s environment.")
    @@ -10919,21 +11216,24 @@

    teal coverage - 68.02%

    178 - 5x + 5x +
          is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    179 - 5x + 5x +
          if (!isTRUE(is_modules_ok)) {
    180 - 1x + 1x +
            validate(need(isTRUE(is_modules_ok), sprintf("%s. Contact app developer.", is_modules_ok)))
    @@ -10954,42 +11254,48 @@

    teal coverage - 68.02%

    183 - 4x + 4x +
          is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    184 - 4x + 4x +
          if (!isTRUE(is_filter_ok)) {
    185 - 1x + 1x +
            showNotification(
    186 - 1x + 1x +
              "Some filters were not applied because of incompatibility with data. Contact app developer.",
    187 - 1x + 1x +
              type = "warning",
    188 - 1x + 1x +
              duration = 10
    @@ -11003,7 +11309,8 @@

    teal coverage - 68.02%

    190 - 1x + 1x +
            warning(is_filter_ok)
    @@ -11024,7 +11331,8 @@

    teal coverage - 68.02%

    193 - 4x + 4x +
          teal_data_rv()
    @@ -11045,7 +11353,8 @@

    teal coverage - 68.02%

    196 - 14x + 14x +
        output$error <- renderUI({
    @@ -11087,14 +11396,16 @@

    teal coverage - 68.02%

    202 - 14x + 14x +
        res <- srv_teal(id = "teal", modules = modules, teal_data_rv = teal_data_rv_validate, filter = filter)
    203 - 14x + 14x +
        logger::log_trace("srv_teal_with_splash initialized module with data.")
    @@ -11108,7 +11419,8 @@

    teal coverage - 68.02%

    205 - 14x + 14x +
        res
    @@ -11184,28 +11496,32 @@

    teal coverage - 68.02%

    8 - 6x + 6x +
      vapply(
    9 - 6x + 6x +
        utils::sessionInfo()$otherPkgs,
    10 - 6x + 6x +
        function(x) {
    11 - 36x + 36x +
          paste0("library(", x$Package, ")")
    @@ -11219,7 +11535,8 @@

    teal coverage - 68.02%

    13 - 6x + 6x +
        character(1)
    @@ -11240,21 +11557,24 @@

    teal coverage - 68.02%

    16 - 6x + 6x +
        rev() %>%
    17 - 6x + 6x +
        paste0(sep = "\n") %>%
    18 - 6x + 6x +
        paste0(collapse = "")
    @@ -11296,21 +11616,24 @@

    teal coverage - 68.02%

    24 - 10x + 10x +
      code_string <- getOption("teal.load_nest_code")
    25 - 10x + 10x +
      if (is.character(code_string)) {
    26 - 2x + 2x +
        code_string
    @@ -11324,7 +11647,8 @@

    teal coverage - 68.02%

    28 - 8x + 8x +
        "# Add any code to install/load your NEST environment here\n"
    @@ -11464,21 +11788,24 @@

    teal coverage - 68.02%

    48 - 4x + 4x +
      str_prepro <-
    49 - 4x + 4x +
        teal.data:::get_code_dependency(attr(datasets, "preprocessing_code"), names = datanames, check_names = FALSE)
    50 - 4x + 4x +
      if (length(str_prepro) == 0) {
    @@ -11499,7 +11826,8 @@

    teal coverage - 68.02%

    53 - 4x + 4x +
        str_prepro <- paste(str_prepro, collapse = "\n")
    @@ -11527,35 +11855,40 @@

    teal coverage - 68.02%

    57 - 4x + 4x +
      str_hash <- vapply(datanames, function(dataname) {
    58 - 6x + 6x +
        sprintf(
    59 - 6x + 6x +
          "stopifnot(%s == %s)",
    60 - 6x + 6x +
          deparse1(bquote(rlang::hash(.(as.name(dataname))))),
    61 - 6x + 6x +
          deparse1(hashes[[dataname]])
    @@ -11569,14 +11902,16 @@

    teal coverage - 68.02%

    63 - 4x + 4x +
      }, character(1))
    64 - 4x + 4x +
      str_hash <- paste(str_hash, collapse = "\n")
    @@ -11597,21 +11932,24 @@

    teal coverage - 68.02%

    67 - 4x + 4x +
      str_filter <- teal.slice::get_filter_expr(datasets, datanames)
    68 - 4x + 4x +
      if (str_filter == "") {
    69 - 2x + 2x +
        str_filter <- character(0)
    @@ -11639,14 +11977,16 @@

    teal coverage - 68.02%

    73 - 4x + 4x +
      str_code <- paste(c(str_prepro, str_hash, str_filter), collapse = "\n\n")
    74 - 4x + 4x +
      sprintf("%s\n", str_code)
    @@ -12576,42 +12916,48 @@

    teal coverage - 68.02%

    131 - 143x + 143x +
      checkmate::assert_string(label)
    132 - 140x + 140x +
      if (label == "global_filters") {
    133 - 1x + 1x +
        stop(
    134 - 1x + 1x +
          sprintf("module(label = \"%s\", ...\n  ", label),
    135 - 1x + 1x +
          "Label 'global_filters' is reserved in teal. Please change to something else.",
    136 - 1x + 1x +
          call. = FALSE
    @@ -12632,7 +12978,8 @@

    teal coverage - 68.02%

    139 - 139x + 139x +
      if (label == "Report previewer") {
    @@ -12695,35 +13042,40 @@

    teal coverage - 68.02%

    148 - 139x + 139x +
      checkmate::assert_function(server)
    149 - 139x + 139x +
      server_formals <- names(formals(server))
    150 - 139x + 139x +
      if (!(
    151 - 139x + 139x +
        "id" %in% server_formals ||
    152 - 139x + 139x +
          all(c("input", "output", "session") %in% server_formals)
    @@ -12737,70 +13089,80 @@

    teal coverage - 68.02%

    154 - 2x + 2x +
        stop(
    155 - 2x + 2x +
          "\nmodule() `server` argument requires a function with following arguments:",
    156 - 2x + 2x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    157 - 2x + 2x +
          "\n - input, output, session (not recommended) - then `shiny::callModule` will be used to call a module.",
    158 - 2x + 2x +
          "\n\nFollowing arguments can be used optionaly:",
    159 - 2x + 2x +
          "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
    160 - 2x + 2x +
          "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
    161 - 2x + 2x +
          "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
    162 - 2x + 2x +
          "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
    163 - 2x + 2x +
          "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
    @@ -12821,42 +13183,48 @@

    teal coverage - 68.02%

    166 - 137x + 137x +
      if ("datasets" %in% server_formals) {
    167 - 2x + 2x +
        warning(
    168 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    169 - 2x + 2x +
          "`datasets` argument in the server is deprecated and will be removed in the next release. ",
    170 - 2x + 2x +
          "Please use `data` instead.",
    171 - 2x + 2x +
          call. = FALSE
    @@ -12898,56 +13266,64 @@

    teal coverage - 68.02%

    177 - 137x + 137x +
      checkmate::assert_function(ui)
    178 - 137x + 137x +
      ui_formals <- names(formals(ui))
    179 - 137x + 137x +
      if (!"id" %in% ui_formals) {
    180 - 1x + 1x +
        stop(
    181 - 1x + 1x +
          "\nmodule() `ui` argument requires a function with following arguments:",
    182 - 1x + 1x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    183 - 1x + 1x +
          "\n\nFollowing arguments can be used optionally:",
    184 - 1x + 1x +
          "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
    @@ -12968,42 +13344,48 @@

    teal coverage - 68.02%

    187 - 136x + 136x +
      if (any(c("data", "datasets") %in% ui_formals)) {
    188 - 2x + 2x +
        stop(
    189 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    190 - 2x + 2x +
          "UI with `data` or `datasets` argument is no longer accepted.\n  ",
    191 - 2x + 2x +
          "If some UI inputs depend on data, please move the logic to your server instead.\n  ",
    192 - 2x + 2x +
          "Possible solutions are renderUI() or updateXyzInput() functions."
    @@ -13045,7 +13427,8 @@

    teal coverage - 68.02%

    198 - 134x + 134x +
      if (!missing(filters)) {
    @@ -13115,21 +13498,24 @@

    teal coverage - 68.02%

    208 - 134x + 134x +
      if (!is.element("data", server_formals) && !is.null(datanames)) {
    209 - 50x + 50x +
        message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
    210 - 50x + 50x +
        datanames <- NULL
    @@ -13143,7 +13529,8 @@

    teal coverage - 68.02%

    212 - 134x + 134x +
      checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
    @@ -13164,49 +13551,56 @@

    teal coverage - 68.02%

    215 - 133x + 133x +
      checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
    216 - 131x + 131x +
      srv_extra_args <- setdiff(names(server_args), server_formals)
    217 - 131x + 131x +
      if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
    218 - 1x + 1x +
        stop(
    219 - 1x + 1x +
          "\nFollowing `server_args` elements have no equivalent in the formals of the server:\n",
    220 - 1x + 1x +
          paste(paste(" -", srv_extra_args), collapse = "\n"),
    221 - 1x + 1x +
          "\n\nUpdate the server arguments by including above or add `...`"
    @@ -13241,49 +13635,56 @@

    teal coverage - 68.02%

    226 - 130x + 130x +
      checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
    227 - 128x + 128x +
      ui_extra_args <- setdiff(names(ui_args), ui_formals)
    228 - 128x + 128x +
      if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
    229 - 1x + 1x +
        stop(
    230 - 1x + 1x +
          "\nFollowing `ui_args` elements have no equivalent in the formals of UI:\n",
    231 - 1x + 1x +
          paste(paste(" -", ui_extra_args), collapse = "\n"),
    232 - 1x + 1x +
          "\n\nUpdate the UI arguments by including above or add `...`"
    @@ -13311,35 +13712,40 @@

    teal coverage - 68.02%

    236 - 127x + 127x +
      structure(
    237 - 127x + 127x +
        list(
    238 - 127x + 127x +
          label = label,
    239 - 127x + 127x +
          server = server, ui = ui, datanames = unique(datanames),
    240 - 127x + 127x +
          server_args = server_args, ui_args = ui_args
    @@ -13353,7 +13759,8 @@

    teal coverage - 68.02%

    242 - 127x + 127x +
        class = "teal_module"
    @@ -13409,42 +13816,48 @@

    teal coverage - 68.02%

    250 - 99x + 99x +
      checkmate::assert_string(label)
    251 - 97x + 97x +
      submodules <- list(...)
    252 - 97x + 97x +
      if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
    253 - 2x + 2x +
        stop(
    254 - 2x + 2x +
          "The only character argument to modules() must be 'label' and it must be named, ",
    255 - 2x + 2x +
          "change modules('lab', ...) to modules(label = 'lab', ...)"
    @@ -13472,7 +13885,8 @@

    teal coverage - 68.02%

    259 - 95x + 95x +
      checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -13493,42 +13907,48 @@

    teal coverage - 68.02%

    262 - 92x + 92x +
      labels <- vapply(submodules, function(submodule) submodule$label, character(1))
    263 - 92x + 92x +
      names(submodules) <- make.unique(gsub("[^[:alnum:]]+", "_", labels), sep = "_")
    264 - 92x + 92x +
      structure(
    265 - 92x + 92x +
        list(
    266 - 92x + 92x +
          label = label,
    267 - 92x + 92x +
          children = submodules
    @@ -13542,7 +13962,8 @@

    teal coverage - 68.02%

    269 - 92x + 92x +
        class = "teal_modules"
    @@ -13605,7 +14026,8 @@

    teal coverage - 68.02%

    278 - 3x + 3x +
      paste0(paste(rep(" ", indent), collapse = ""), "+ ", x$label, "\n", collapse = "")
    @@ -13710,28 +14132,32 @@

    teal coverage - 68.02%

    293 - 1x + 1x +
      paste(
    294 - 1x + 1x +
        c(
    295 - 1x + 1x +
          paste0(rep(" ", indent), "+ ", x$label, "\n"),
    296 - 1x + 1x +
          unlist(lapply(x$children, format, indent = indent + 1, ...))
    @@ -13745,7 +14171,8 @@

    teal coverage - 68.02%

    298 - 1x + 1x +
        collapse = ""
    @@ -13878,42 +14305,48 @@

    teal coverage - 68.02%

    317 - 8x + 8x +
      checkmate::assert_class(modules, "teal_modules")
    318 - 6x + 6x +
      checkmate::assert_class(module, "teal_module")
    319 - 4x + 4x +
      modules$children <- c(modules$children, list(module))
    320 - 4x + 4x +
      labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
    321 - 4x + 4x +
      names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
    322 - 4x + 4x +
      modules
    @@ -14018,7 +14451,8 @@

    teal coverage - 68.02%

    337 - 20x + 20x +
      if (inherits(modules, class)) {
    @@ -14032,28 +14466,32 @@

    teal coverage - 68.02%

    339 - 20x + 20x +
      } else if (inherits(modules, "teal_module")) {
    340 - 11x + 11x +
        NULL
    341 - 9x + 9x +
      } else if (inherits(modules, "teal_modules")) {
    342 - 9x + 9x +
        Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
    @@ -14263,49 +14701,56 @@

    teal coverage - 68.02%

    372 - 286x + 286x +
      checkmate::assert_string(arg)
    373 - 283x + 283x +
      if (inherits(modules, "teal_modules")) {
    374 - 29x + 29x +
        any(unlist(lapply(modules$children, is_arg_used, arg)))
    375 - 254x + 254x +
      } else if (inherits(modules, "teal_module")) {
    376 - 43x + 43x +
        is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
    377 - 211x + 211x +
      } else if (is.function(modules)) {
    378 - 209x + 209x +
        isTRUE(arg %in% names(formals(modules)))
    @@ -14319,7 +14764,8 @@

    teal coverage - 68.02%

    380 - 2x + 2x +
        stop("is_arg_used function not implemented for this object")
    @@ -14431,28 +14877,32 @@

    teal coverage - 68.02%

    396 - 12x + 12x +
      checkmate::assert_multi_class(modules, c("teal_module", "teal_modules"))
    397 - 12x + 12x +
      checkmate::assert_int(depth, lower = 0)
    398 - 11x + 11x +
      if (inherits(modules, "teal_modules")) {
    399 - 4x + 4x +
        max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
    @@ -14466,7 +14916,8 @@

    teal coverage - 68.02%

    401 - 7x + 7x +
        depth
    @@ -15417,21 +15868,24 @@

    teal coverage - 68.02%

    119 - 50x + 50x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    120 - 50x + 50x +
      checkmate::assert_class(reporter, "Reporter")
    121 - 49x + 49x +
      UseMethod("srv_nested_tabs", modules)
    @@ -15529,7 +15983,8 @@

    teal coverage - 68.02%

    135 - 22x + 22x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    @@ -15543,14 +15998,16 @@

    teal coverage - 68.02%

    137 - 22x + 22x +
      moduleServer(id = id, module = function(input, output, session) {
    138 - 22x + 22x +
        logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
    @@ -15564,70 +16021,80 @@

    teal coverage - 68.02%

    140 - 22x + 22x +
        labels <- vapply(modules$children, `[[`, character(1), "label")
    141 - 22x + 22x +
        modules_reactive <- sapply(
    142 - 22x + 22x +
          names(modules$children),
    143 - 22x + 22x +
          function(module_id) {
    144 - 33x + 33x +
            srv_nested_tabs(
    145 - 33x + 33x +
              id = module_id,
    146 - 33x + 33x +
              datasets = datasets[[labels[module_id]]],
    147 - 33x + 33x +
              modules = modules$children[[module_id]],
    148 - 33x + 33x +
              is_module_specific = is_module_specific,
    149 - 33x + 33x +
              reporter = reporter
    @@ -15648,7 +16115,8 @@

    teal coverage - 68.02%

    152 - 22x + 22x +
          simplify = FALSE
    @@ -15676,21 +16144,24 @@

    teal coverage - 68.02%

    156 - 22x + 22x +
        input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
    157 - 22x + 22x +
        get_active_module <- reactive({
    158 - 12x + 12x +
          if (length(modules$children) == 1L) {
    @@ -15704,7 +16175,8 @@

    teal coverage - 68.02%

    160 - 1x + 1x +
            modules_reactive[[1]]()
    @@ -15725,7 +16197,8 @@

    teal coverage - 68.02%

    163 - 11x + 11x +
            modules_reactive[[input_validated()]]()
    @@ -15753,7 +16226,8 @@

    teal coverage - 68.02%

    167 - 22x + 22x +
        get_active_module
    @@ -15809,14 +16283,16 @@

    teal coverage - 68.02%

    175 - 27x + 27x +
      checkmate::assert_class(datasets, "FilteredData")
    176 - 27x + 27x +
      logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
    @@ -15830,14 +16306,16 @@

    teal coverage - 68.02%

    178 - 27x + 27x +
      moduleServer(id = id, module = function(input, output, session) {
    179 - 27x + 27x +
        if (!is.null(modules$datanames) && is_module_specific) {
    @@ -15893,35 +16371,40 @@

    teal coverage - 68.02%

    187 - 27x + 27x +
        trigger_data <- reactiveVal(1L)
    188 - 27x + 27x +
        trigger_module <- reactiveVal(NULL)
    189 - 27x + 27x +
        output$data_reactive <- renderUI({
    190 - 17x + 17x +
          lapply(datasets$datanames(), function(x) {
    191 - 21x + 21x +
            datasets$get_data(x, filtered = TRUE)
    @@ -15935,14 +16418,16 @@

    teal coverage - 68.02%

    193 - 17x + 17x +
          isolate(trigger_data(trigger_data() + 1))
    194 - 17x + 17x +
          isolate(trigger_module(TRUE))
    @@ -15956,7 +16441,8 @@

    teal coverage - 68.02%

    196 - 17x + 17x +
          NULL
    @@ -15984,14 +16470,16 @@

    teal coverage - 68.02%

    200 - 27x + 27x +
        args <- c(list(id = "module"), modules$server_args)
    201 - 27x + 27x +
        if (is_arg_used(modules$server, "reporter")) {
    @@ -16019,14 +16507,16 @@

    teal coverage - 68.02%

    205 - 27x + 27x +
        if (is_arg_used(modules$server, "datasets")) {
    206 - 1x + 1x +
          args <- c(args, datasets = datasets)
    @@ -16047,21 +16537,24 @@

    teal coverage - 68.02%

    209 - 27x + 27x +
        if (is_arg_used(modules$server, "data")) {
    210 - 7x + 7x +
          data <- eventReactive(trigger_data(), .datasets_to_data(modules, datasets))
    211 - 7x + 7x +
          args <- c(args, data = list(data))
    @@ -16082,21 +16575,24 @@

    teal coverage - 68.02%

    214 - 27x + 27x +
        if (is_arg_used(modules$server, "filter_panel_api")) {
    215 - 2x + 2x +
          filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
    216 - 2x + 2x +
          args <- c(args, filter_panel_api = filter_panel_api)
    @@ -16124,49 +16620,56 @@

    teal coverage - 68.02%

    220 - 27x + 27x +
        observeEvent(
    221 - 27x + 27x +
          ignoreNULL = TRUE,
    222 - 27x + 27x +
          once = TRUE,
    223 - 27x + 27x +
          eventExpr = trigger_module(),
    224 - 27x + 27x +
          handlerExpr = {
    225 - 17x + 17x +
            module_output <- if (is_arg_used(modules$server, "id")) {
    226 - 17x + 17x +
              do.call(modules$server, args)
    @@ -16215,7 +16718,8 @@

    teal coverage - 68.02%

    233 - 27x + 27x +
        reactive(modules)
    @@ -16334,14 +16838,16 @@

    teal coverage - 68.02%

    250 - 4x + 4x +
      checkmate::assert_class(module, "teal_module")
    251 - 4x + 4x +
      checkmate::assert_class(datasets, "FilteredData")
    @@ -16355,14 +16861,16 @@

    teal coverage - 68.02%

    253 - 4x + 4x +
      datanames <- if (is.null(module$datanames) || identical(module$datanames, "all")) {
    254 - 1x + 1x +
        datasets$datanames()
    @@ -16376,21 +16884,24 @@

    teal coverage - 68.02%

    256 - 3x + 3x +
        include_parent_datanames(
    257 - 3x + 3x +
          module$datanames,
    258 - 3x + 3x +
          datasets$get_join_keys()
    @@ -16425,7 +16936,8 @@

    teal coverage - 68.02%

    263 - 4x + 4x +
      data <- sapply(datanames, function(x) datasets$get_data(x, filtered = TRUE), simplify = FALSE)
    @@ -16439,7 +16951,8 @@

    teal coverage - 68.02%

    265 - 4x + 4x +
      hashes <- calculate_hashes(datanames, datasets)
    @@ -16453,28 +16966,32 @@

    teal coverage - 68.02%

    267 - 4x + 4x +
      code <- c(
    268 - 4x + 4x +
        get_rcode_str_install(),
    269 - 4x + 4x +
        get_rcode_libraries(),
    270 - 4x + 4x +
        get_datasets_code(datanames, datasets, hashes)
    @@ -16502,21 +17019,24 @@

    teal coverage - 68.02%

    274 - 4x + 4x +
      data <- do.call(
    275 - 4x + 4x +
        teal.data::teal_data,
    276 - 4x + 4x +
        args = c(data, code = list(code), join_keys = list(datasets$get_join_keys()[datanames]))
    @@ -16537,14 +17057,16 @@

    teal coverage - 68.02%

    279 - 4x + 4x +
      data@verified <- attr(datasets, "verification_status")
    280 - 4x + 4x +
      data
    @@ -16628,7 +17150,8 @@

    teal coverage - 68.02%

    292 - 7x + 7x +
      sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
    @@ -17369,14 +17892,16 @@

    teal coverage - 68.02%

    104 - 36x + 36x +
      dots <- list(...)
    105 - 2x + 2x +
      if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
    @@ -17390,21 +17915,24 @@

    teal coverage - 68.02%

    107 - 34x + 34x +
      messages <- extract_validator(dots, header)
    108 - 34x + 34x +
      failings <- if (!any_names(dots)) {
    109 - 29x + 29x +
        add_header(messages, header)
    @@ -17418,7 +17946,8 @@

    teal coverage - 68.02%

    111 - 5x + 5x +
        unlist(messages)
    @@ -17439,7 +17968,8 @@

    teal coverage - 68.02%

    114 - 34x + 34x +
      shiny::validate(shiny::need(is.null(failings), failings))
    @@ -17509,7 +18039,8 @@

    teal coverage - 68.02%

    124 - 118x + 118x +
      all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
    @@ -17572,7 +18103,8 @@

    teal coverage - 68.02%

    133 - 49x + 49x +
      x$.__enclos_env__$private$enabled
    @@ -17628,14 +18160,16 @@

    teal coverage - 68.02%

    141 - 113x + 113x +
      if (inherits(iv, "InputValidator")) {
    142 - 49x + 49x +
        add_header(gather_messages(iv), header)
    @@ -17649,14 +18183,16 @@

    teal coverage - 68.02%

    144 - 58x + 58x +
        if (is.null(names(iv))) names(iv) <- rep("", length(iv))
    145 - 64x + 64x +
        mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
    @@ -17719,28 +18255,32 @@

    teal coverage - 68.02%

    154 - 49x + 49x +
      if (validator_enabled(iv)) {
    155 - 46x + 46x +
        status <- iv$validate()
    156 - 46x + 46x +
        failing_inputs <- Filter(Negate(is.null), status)
    157 - 46x + 46x +
        unique(lapply(failing_inputs, function(x) x[["message"]]))
    @@ -17754,14 +18294,16 @@

    teal coverage - 68.02%

    159 - 3x + 3x +
        warning("Validator is disabled and will be omitted.")
    160 - 3x + 3x +
        list()
    @@ -17817,21 +18359,24 @@

    teal coverage - 68.02%

    168 - 78x + 78x +
      ans <- unlist(messages)
    169 - 78x + 78x +
      if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
    170 - 31x + 31x +
        ans <- c(paste0(header, "\n"), ans, "\n")
    @@ -17845,7 +18390,8 @@

    teal coverage - 68.02%

    172 - 78x + 78x +
      ans
    @@ -17894,21 +18440,24 @@

    teal coverage - 68.02%

    179 - 103x + 103x +
      any(
    180 - 103x + 103x +
        if (is.list(x)) {
    181 - 58x + 58x +
          if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
    @@ -17922,7 +18471,8 @@

    teal coverage - 68.02%

    183 - 40x + 40x +
          FALSE
    @@ -18313,7 +18863,8 @@

    teal coverage - 68.02%

    52 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -18327,7 +18878,8 @@

    teal coverage - 68.02%

    54 - 7x + 7x +
      checkmate::assert_multi_class(splash_ui, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18341,7 +18893,8 @@

    teal coverage - 68.02%

    56 - 7x + 7x +
      if (is.character(title)) {
    @@ -18362,7 +18915,8 @@

    teal coverage - 68.02%

    59 - 7x + 7x +
        validate_app_title_tag(title)
    @@ -18383,28 +18937,32 @@

    teal coverage - 68.02%

    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "header",
    64 - 7x + 7x +
        checkmate::check_string(header),
    65 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18418,7 +18976,8 @@

    teal coverage - 68.02%

    67 - 7x + 7x +
      if (checkmate::test_string(header)) {
    @@ -18446,28 +19005,32 @@

    teal coverage - 68.02%

    71 - 7x + 7x +
      checkmate::assert(
    72 - 7x + 7x +
        .var.name = "footer",
    73 - 7x + 7x +
        checkmate::check_string(footer),
    74 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18481,7 +19044,8 @@

    teal coverage - 68.02%

    76 - 7x + 7x +
      if (checkmate::test_string(footer)) {
    @@ -18509,7 +19073,8 @@

    teal coverage - 68.02%

    80 - 7x + 7x +
      ns <- NS(id)
    @@ -18530,7 +19095,8 @@

    teal coverage - 68.02%

    83 - 7x + 7x +
      splash_ui <- div(
    @@ -18544,7 +19110,8 @@

    teal coverage - 68.02%

    85 - 7x + 7x +
        id = ns("main_ui_container"),
    @@ -18565,7 +19132,8 @@

    teal coverage - 68.02%

    88 - 7x + 7x +
        div(splash_ui)
    @@ -18600,35 +19168,40 @@

    teal coverage - 68.02%

    93 - 7x + 7x +
      shiny_busy_message_panel <- conditionalPanel(
    94 - 7x + 7x +
        condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint
    95 - 7x + 7x +
        div(
    96 - 7x + 7x +
          icon("arrows-rotate", "spin fa-spin"),
    97 - 7x + 7x +
          "Computing ...",
    @@ -18642,7 +19215,8 @@

    teal coverage - 68.02%

    99 - 7x + 7x +
          class = "shinybusymessage"
    @@ -18670,98 +19244,112 @@

    teal coverage - 68.02%

    103 - 7x + 7x +
      fluidPage(
    104 - 7x + 7x +
        title = title,
    105 - 7x + 7x +
        theme = get_teal_bs_theme(),
    106 - 7x + 7x +
        include_teal_css_js(),
    107 - 7x + 7x +
        tags$header(header),
    108 - 7x + 7x +
        tags$hr(class = "my-2"),
    109 - 7x + 7x +
        shiny_busy_message_panel,
    110 - 7x + 7x +
        splash_ui,
    111 - 7x + 7x +
        tags$hr(),
    112 - 7x + 7x +
        tags$footer(
    113 - 7x + 7x +
          div(
    114 - 7x + 7x +
            footer,
    115 - 7x + 7x +
            teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
    116 - 7x + 7x +
            textOutput(ns("identifier"))
    @@ -18824,21 +19412,24 @@

    teal coverage - 68.02%

    125 - 19x + 19x +
      stopifnot(is.reactive(teal_data_rv))
    126 - 18x + 18x +
      moduleServer(id, function(input, output, session) {
    127 - 18x + 18x +
        logger::log_trace("srv_teal initializing the module.")
    @@ -18852,14 +19443,16 @@

    teal coverage - 68.02%

    129 - 18x + 18x +
        output$identifier <- renderText(
    130 - 18x + 18x +
          paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
    @@ -18880,28 +19473,32 @@

    teal coverage - 68.02%

    133 - 18x + 18x +
        teal.widgets::verbatim_popup_srv(
    134 - 18x + 18x +
          "sessionInfo",
    135 - 18x + 18x +
          verbatim_content = utils::capture.output(utils::sessionInfo()),
    136 - 18x + 18x +
          title = "SessionInfo"
    @@ -18929,7 +19526,8 @@

    teal coverage - 68.02%

    140 - 18x + 18x +
        run_js_files(files = "init.js")
    @@ -18964,35 +19562,40 @@

    teal coverage - 68.02%

    145 - 18x + 18x +
        get_client_timezone(session$ns)
    146 - 18x + 18x +
        observeEvent(
    147 - 18x + 18x +
          eventExpr = input$timezone,
    148 - 18x + 18x +
          once = TRUE,
    149 - 18x + 18x +
          handlerExpr = {
    @@ -19034,14 +19637,16 @@

    teal coverage - 68.02%

    155 - 18x + 18x +
        reporter <- teal.reporter::Reporter$new()
    156 - 18x + 18x +
        if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
    @@ -19069,28 +19674,32 @@

    teal coverage - 68.02%

    160 - 18x + 18x +
        env <- environment()
    161 - 18x + 18x +
        datasets_reactive <- eventReactive(teal_data_rv(), {
    162 - 4x + 4x +
          env$progress <- shiny::Progress$new(session)
    163 - 4x + 4x +
          env$progress$set(0.25, message = "Setting data")
    @@ -19118,7 +19727,8 @@

    teal coverage - 68.02%

    167 - 4x + 4x +
          datasets_singleton <- teal_data_to_filtered_data(teal_data_rv())
    @@ -19139,14 +19749,16 @@

    teal coverage - 68.02%

    170 - 4x + 4x +
          filter_global <- Filter(function(x) x$id %in% attr(filter, "mapping")$global_filters, filter)
    171 - 4x + 4x +
          datasets_singleton$set_filter_state(filter_global)
    @@ -19160,49 +19772,56 @@

    teal coverage - 68.02%

    173 - 4x + 4x +
          module_datasets <- function(modules) {
    174 - 18x + 18x +
            if (inherits(modules, "teal_modules")) {
    175 - 7x + 7x +
              datasets <- lapply(modules$children, module_datasets)
    176 - 7x + 7x +
              labels <- vapply(modules$children, `[[`, character(1), "label")
    177 - 7x + 7x +
              names(datasets) <- labels
    178 - 7x + 7x +
              datasets
    179 - 11x + 11x +
            } else if (isTRUE(attr(filter, "module_specific"))) {
    @@ -19223,28 +19842,32 @@

    teal coverage - 68.02%

    182 - 3x + 3x +
              datanames <- if (is.null(modules$datanames) || modules$datanames == "all") {
    183 - 3x + 3x +
                include_parent_datanames(
    184 - 3x + 3x +
                  teal_data_datanames(teal_data_rv()),
    185 - 3x + 3x +
                  teal.data::join_keys(teal_data_rv())
    @@ -19286,7 +19909,8 @@

    teal coverage - 68.02%

    191 - 3x + 3x +
              datasets_module <- teal_data_to_filtered_data(teal_data_rv(), datanames = datanames)
    @@ -19314,7 +19938,8 @@

    teal coverage - 68.02%

    195 - 3x + 3x +
              slices <- Filter(x = filter, f = function(x) {
    @@ -19342,42 +19967,48 @@

    teal coverage - 68.02%

    199 - 3x + 3x +
              include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
    200 - 3x + 3x +
              exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
    201 - 3x + 3x +
              slices$include_varnames <- include_varnames
    202 - 3x + 3x +
              slices$exclude_varnames <- exclude_varnames
    203 - 3x + 3x +
              datasets_module$set_filter_state(slices)
    204 - 3x + 3x +
              datasets_module
    @@ -19391,7 +20022,8 @@

    teal coverage - 68.02%

    206 - 8x + 8x +
              datasets_singleton
    @@ -19412,7 +20044,8 @@

    teal coverage - 68.02%

    209 - 4x + 4x +
          module_datasets(modules)
    @@ -19475,7 +20108,8 @@

    teal coverage - 68.02%

    218 - 18x + 18x +
        observeEvent(datasets_reactive(), once = TRUE, {
    @@ -20265,35 +20899,40 @@

    teal coverage - 68.02%

    77 - 78x + 78x +
      shiny::isolate({
    78 - 78x + 78x +
        checkmate::assert_flag(allow_add)
    79 - 78x + 78x +
        checkmate::assert_flag(module_specific)
    80 - 32x + 32x +
        if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
    81 - 75x + 75x +
        checkmate::assert_string(app_id, null.ok = TRUE)
    @@ -20307,14 +20946,16 @@

    teal coverage - 68.02%

    83 - 75x + 75x +
        slices <- list(...)
    84 - 75x + 75x +
        all_slice_id <- vapply(slices, `[[`, character(1L), "id")
    @@ -20328,14 +20969,16 @@

    teal coverage - 68.02%

    86 - 75x + 75x +
        if (missing(mapping)) {
    87 - 46x + 46x +
          mapping <- list(global_filters = all_slice_id)
    @@ -20349,14 +20992,16 @@

    teal coverage - 68.02%

    89 - 75x + 75x +
        if (!module_specific) {
    90 - 71x + 71x +
          mapping[setdiff(names(mapping), "global_filters")] <- NULL
    @@ -20377,42 +21022,48 @@

    teal coverage - 68.02%

    93 - 75x + 75x +
        failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
    94 - 75x + 75x +
        if (length(failed_slice_id)) {
    95 - 1x + 1x +
          stop(sprintf(
    96 - 1x + 1x +
            "Filters in mapping don't match any available filter.\n %s not in %s",
    97 - 1x + 1x +
            toString(failed_slice_id),
    98 - 1x + 1x +
            toString(all_slice_id)
    @@ -20440,7 +21091,8 @@

    teal coverage - 68.02%

    102 - 74x + 74x +
        tss <- teal.slice::teal_slices(
    @@ -20454,28 +21106,32 @@

    teal coverage - 68.02%

    104 - 74x + 74x +
          exclude_varnames = exclude_varnames,
    105 - 74x + 74x +
          include_varnames = include_varnames,
    106 - 74x + 74x +
          count_type = count_type,
    107 - 74x + 74x +
          allow_add = allow_add
    @@ -20489,35 +21145,40 @@

    teal coverage - 68.02%

    109 - 74x + 74x +
        attr(tss, "mapping") <- mapping
    110 - 74x + 74x +
        attr(tss, "module_specific") <- module_specific
    111 - 74x + 74x +
        attr(tss, "app_id") <- app_id
    112 - 74x + 74x +
        class(tss) <- c("modules_teal_slices", class(tss))
    113 - 74x + 74x +
        tss
    @@ -20587,14 +21248,16 @@

    teal coverage - 68.02%

    123 - 10x + 10x +
      checkmate::assert_list(x)
    124 - 10x + 10x +
      lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
    @@ -20608,21 +21271,24 @@

    teal coverage - 68.02%

    126 - 10x + 10x +
      attrs <- attributes(unclass(x))
    127 - 10x + 10x +
      ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
    128 - 10x + 10x +
      do.call(teal_slices, c(ans, attrs))
    @@ -20874,28 +21540,32 @@

    teal coverage - 68.02%

    164 - 1x + 1x +
      checkmate::assert_class(filter, "teal_slices")
    165 - 1x + 1x +
      shiny::isolate({
    166 - 1x + 1x +
        filter_copy <- lapply(filter, function(slice) {
    167 - 2x + 2x +
          teal.slice::as.teal_slice(as.list(slice))
    @@ -20909,14 +21579,16 @@

    teal coverage - 68.02%

    169 - 1x + 1x +
        attributes(filter_copy) <- attributes(filter)
    170 - 1x + 1x +
        filter_copy
    @@ -21132,14 +21804,16 @@

    teal coverage - 68.02%

    28 - 9x + 9x +
      checkmate::assert_class(tss, "teal_slices")
    29 - 9x + 9x +
      checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
    @@ -21153,7 +21827,8 @@

    teal coverage - 68.02%

    31 - 9x + 9x +
      cat(format(tss, trim_lines = FALSE), "\n", file = file)
    @@ -21202,7 +21877,8 @@

    teal coverage - 68.02%

    38 - 9x + 9x +
      checkmate::assert_file_exists(file, access = "r", extension = "json")
    @@ -21216,56 +21892,64 @@

    teal coverage - 68.02%

    40 - 9x + 9x +
      tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
    41 - 9x + 9x +
      tss_json$slices <-
    42 - 9x + 9x +
        lapply(tss_json$slices, function(slice) {
    43 - 9x + 9x +
          for (field in c("selected", "choices")) {
    44 - 18x + 18x +
            if (!is.null(slice[[field]])) {
    45 - 12x + 12x +
              if (length(slice[[field]]) > 0) {
    46 - 9x + 9x +
                date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
    47 - 9x + 9x +
                time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
    @@ -21279,35 +21963,40 @@

    teal coverage - 68.02%

    49 - 9x + 9x +
                slice[[field]] <-
    50 - 9x + 9x +
                  if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
    51 - 3x + 3x +
                    as.Date(slice[[field]])
    52 - 9x + 9x +
                  } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
    53 - 3x + 3x +
                    as.POSIXct(slice[[field]], tz = "UTC")
    @@ -21321,7 +22010,8 @@

    teal coverage - 68.02%

    55 - 3x + 3x +
                    slice[[field]]
    @@ -21342,7 +22032,8 @@

    teal coverage - 68.02%

    58 - 3x + 3x +
                slice[[field]] <- character(0)
    @@ -21370,7 +22061,8 @@

    teal coverage - 68.02%

    62 - 9x + 9x +
          slice
    @@ -21391,7 +22083,8 @@

    teal coverage - 68.02%

    65 - 9x + 9x +
      tss_elements <- lapply(tss_json$slices, as.teal_slice)
    @@ -21405,7 +22098,8 @@

    teal coverage - 68.02%

    67 - 9x + 9x +
      do.call(teal_slices, c(tss_elements, tss_json$attributes))
    @@ -21754,42 +22448,48 @@

    teal coverage - 68.02%

    48 - 34x + 34x +
      lifecycle::deprecate_soft(
    49 - 34x + 34x +
        when = "0.15.0",
    50 - 34x + 34x +
        what = "tdata()",
    51 - 34x + 34x +
        details = paste(
    52 - 34x + 34x +
          "tdata is deprecated and will be removed in the next release. Use `teal_data` instead.\n",
    53 - 34x + 34x +
          "Please follow migration instructions https://github.com/insightsengineering/teal/discussions/987."
    @@ -21810,28 +22510,32 @@

    teal coverage - 68.02%

    56 - 34x + 34x +
      checkmate::assert_list(
    57 - 34x + 34x +
        data,
    58 - 34x + 34x +
        any.missing = FALSE, names = "unique",
    59 - 34x + 34x +
        types = c("data.frame", "reactive", "MultiAssayExperiment")
    @@ -21845,14 +22549,16 @@

    teal coverage - 68.02%

    61 - 30x + 30x +
      checkmate::assert_class(join_keys, "join_keys", null.ok = TRUE)
    62 - 29x + 29x +
      checkmate::assert_multi_class(code, c("character", "reactive"))
    @@ -21866,14 +22572,16 @@

    teal coverage - 68.02%

    64 - 28x + 28x +
      checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
    65 - 26x + 26x +
      checkmate::assert_subset(names(metadata), names(data))
    @@ -21887,14 +22595,16 @@

    teal coverage - 68.02%

    67 - 25x + 25x +
      if (is.reactive(code)) {
    68 - 9x + 9x +
        isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
    @@ -21922,21 +22632,24 @@

    teal coverage - 68.02%

    72 - 24x + 24x +
      for (x in names(data)) {
    73 - 47x + 47x +
        if (!is.reactive(data[[x]])) {
    74 - 31x + 31x +
          data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
    @@ -21971,21 +22684,24 @@

    teal coverage - 68.02%

    79 - 24x + 24x +
      attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
    80 - 24x + 24x +
      attr(data, "join_keys") <- join_keys
    81 - 24x + 24x +
      attr(data, "metadata") <- metadata
    @@ -22006,14 +22722,16 @@

    teal coverage - 68.02%

    84 - 24x + 24x +
      class(data) <- c("tdata", class(data))
    85 - 24x + 24x +
      data
    @@ -22153,14 +22871,16 @@

    teal coverage - 68.02%

    105 - 2x + 2x +
      checkmate::assert_class(data, "tdata")
    106 - 1x + 1x +
      list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
    @@ -22251,14 +22971,16 @@

    teal coverage - 68.02%

    119 - 7x + 7x +
      checkmate::assert_class(data, "tdata")
    120 - 5x + 5x +
      attr(data, "code")()
    @@ -22314,7 +23036,8 @@

    teal coverage - 68.02%

    128 - 2x + 2x +
      attr(data, "join_keys")
    @@ -22377,14 +23100,16 @@

    teal coverage - 68.02%

    137 - 4x + 4x +
      checkmate::assert_string(dataname)
    138 - 4x + 4x +
      UseMethod("get_metadata", data)
    @@ -22426,21 +23151,24 @@

    teal coverage - 68.02%

    144 - 4x + 4x +
      metadata <- attr(data, "metadata")
    145 - 4x + 4x +
      if (is.null(metadata)) {
    146 - 1x + 1x +
        return(NULL)
    @@ -22454,7 +23182,8 @@

    teal coverage - 68.02%

    148 - 3x + 3x +
      metadata[[dataname]]
    @@ -22699,14 +23428,16 @@

    teal coverage - 68.02%

    183 - 8x + 8x +
      if (inherits(x, "tdata")) {
    184 - 2x + 2x +
        return(x)
    @@ -22720,77 +23451,88 @@

    teal coverage - 68.02%

    186 - 6x + 6x +
      if (is.reactive(x)) {
    187 - 1x + 1x +
        checkmate::assert_class(isolate(x()), "teal_data")
    188 - 1x + 1x +
        datanames <- isolate(teal_data_datanames(x()))
    189 - 1x + 1x +
        datasets <- sapply(datanames, function(dataname) reactive(x()[[dataname]]), simplify = FALSE)
    190 - 1x + 1x +
        code <- reactive(teal.code::get_code(x()))
    191 - 1x + 1x +
        join_keys <- isolate(teal.data::join_keys(x()))
    192 - 5x + 5x +
      } else if (inherits(x, "teal_data")) {
    193 - 5x + 5x +
        datanames <- teal_data_datanames(x)
    194 - 5x + 5x +
        datasets <- sapply(datanames, function(dataname) reactive(x[[dataname]]), simplify = FALSE)
    195 - 5x + 5x +
        code <- reactive(teal.code::get_code(x))
    196 - 5x + 5x +
        join_keys <- isolate(teal.data::join_keys(x))
    @@ -22811,7 +23553,8 @@

    teal coverage - 68.02%

    199 - 6x + 6x +
      new_tdata(data = datasets, code = code, join_keys = join_keys)
    @@ -23160,14 +23903,16 @@

    teal coverage - 68.02%

    48 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    49 - 3x + 3x +
        observeEvent(input$show, {
    @@ -23251,7 +23996,8 @@

    teal coverage - 68.02%

    61 - 3x + 3x +
        filter_manager_srv("filter_manager", filtered_data_list, filter)
    @@ -23363,14 +24109,16 @@

    teal coverage - 68.02%

    77 - 5x + 5x +
      moduleServer(id, function(input, output, session) {
    78 - 5x + 5x +
        logger::log_trace("filter_manager_srv initializing for: { paste(names(filtered_data_list), collapse = ', ')}.")
    @@ -23384,7 +24132,8 @@

    teal coverage - 68.02%

    80 - 5x + 5x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    @@ -23426,7 +24175,8 @@

    teal coverage - 68.02%

    86 - 5x + 5x +
        slices_global <- reactiveVal(filter)
    @@ -23440,14 +24190,16 @@

    teal coverage - 68.02%

    88 - 5x + 5x +
        filtered_data_list <-
    89 - 5x + 5x +
          if (!is_module_specific) {
    @@ -23468,7 +24220,8 @@

    teal coverage - 68.02%

    92 - 4x + 4x +
            list(global_filters = unlist(filtered_data_list)[[1]])
    @@ -23496,21 +24249,24 @@

    teal coverage - 68.02%

    96 - 1x + 1x +
            flatten_nested <- function(x, name = NULL) {
    97 - 5x + 5x +
              if (inherits(x, "FilteredData")) {
    98 - 3x + 3x +
                setNames(list(x), name)
    @@ -23524,7 +24280,8 @@

    teal coverage - 68.02%

    100 - 2x + 2x +
                unlist(lapply(names(x), function(name) flatten_nested(x[[name]], name)))
    @@ -23545,7 +24302,8 @@

    teal coverage - 68.02%

    103 - 1x + 1x +
            flatten_nested(filtered_data_list)
    @@ -23580,49 +24338,56 @@

    teal coverage - 68.02%

    108 - 5x + 5x +
        mapping_matrix <- reactive({
    109 - 5x + 5x +
          state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
    110 - 5x + 5x +
          mapping_smooth <- lapply(filtered_data_list, function(x) {
    111 - 7x + 7x +
            state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
    112 - 7x + 7x +
            state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
    113 - 7x + 7x +
            states_active <- state_ids_global %in% state_ids_local
    114 - 7x + 7x +
            ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
    @@ -23643,7 +24408,8 @@

    teal coverage - 68.02%

    117 - 5x + 5x +
          as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
    @@ -23664,14 +24430,16 @@

    teal coverage - 68.02%

    120 - 5x + 5x +
        output$slices_table <- renderTable(
    121 - 5x + 5x +
          expr = {
    @@ -23685,28 +24453,32 @@

    teal coverage - 68.02%

    123 - 2x + 2x +
            mm <- mapping_matrix()
    124 - 2x + 2x +
            mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
    125 - 2x + 2x +
            mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
    126 - 2x + 2x +
            if (!is_module_specific) colnames(mm) <- "Global Filters"
    @@ -23727,21 +24499,24 @@

    teal coverage - 68.02%

    129 - 2x + 2x +
            if (nrow(mm) == 0L) {
    130 - 2x + 2x +
              mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
    131 - 2x + 2x +
              rownames(mm) <- ""
    @@ -23769,7 +24544,8 @@

    teal coverage - 68.02%

    135 - 2x + 2x +
            mm[names(mm) != "Report previewer"]
    @@ -23783,14 +24559,16 @@

    teal coverage - 68.02%

    137 - 5x + 5x +
          align = paste(c("l", rep("c", sum(names(filtered_data_list) != "Report previewer"))), collapse = ""),
    138 - 5x + 5x +
          rownames = TRUE
    @@ -23818,35 +24596,40 @@

    teal coverage - 68.02%

    142 - 5x + 5x +
        modules_out <- lapply(names(filtered_data_list), function(module_name) {
    143 - 7x + 7x +
          filter_manager_module_srv(
    144 - 7x + 7x +
            id = module_name,
    145 - 7x + 7x +
            module_fd = filtered_data_list[[module_name]],
    146 - 7x + 7x +
            slices_global = slices_global
    @@ -23881,7 +24664,8 @@

    teal coverage - 68.02%

    151 - 5x + 5x +
        snapshot_manager_srv("snapshot_manager", slices_global, mapping_matrix, filtered_data_list)
    @@ -23895,7 +24679,8 @@

    teal coverage - 68.02%

    153 - 5x + 5x +
        modules_out # returned for testing purpose
    @@ -24084,7 +24869,8 @@

    teal coverage - 68.02%

    180 - 7x + 7x +
      moduleServer(id, function(input, output, session) {
    @@ -24098,7 +24884,8 @@

    teal coverage - 68.02%

    182 - 7x + 7x +
        module_fd$set_available_teal_slices(reactive(slices_global()))
    @@ -24119,7 +24906,8 @@

    teal coverage - 68.02%

    185 - 7x + 7x +
        slices_module <- reactive(module_fd$get_filter_state())
    @@ -24140,14 +24928,16 @@

    teal coverage - 68.02%

    188 - 7x + 7x +
        previous_slices <- reactiveVal(isolate(slices_module()))
    189 - 7x + 7x +
        slices_added <- reactiveVal(NULL)
    @@ -24168,21 +24958,24 @@

    teal coverage - 68.02%

    192 - 7x + 7x +
        observeEvent(slices_module(), ignoreNULL = FALSE, {
    193 - 2x + 2x +
          logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
    194 - 2x + 2x +
          added <- setdiff_teal_slices(slices_module(), slices_global())
    @@ -24196,7 +24989,8 @@

    teal coverage - 68.02%

    196 - 2x + 2x +
          previous_slices(slices_module())
    @@ -24217,7 +25011,8 @@

    teal coverage - 68.02%

    199 - 7x + 7x +
        observeEvent(slices_added(), ignoreNULL = TRUE, {
    @@ -24336,7 +25131,8 @@

    teal coverage - 68.02%

    216 - 7x + 7x +
        slices_module # returned for testing purpose
    @@ -24755,35 +25551,40 @@

    teal coverage - 68.02%

    57 - 36x + 36x +
      checkmate::assert_function(ui, args = "id", nargs = 1)
    58 - 35x + 35x +
      checkmate::assert_function(server, args = "id", nargs = 1)
    59 - 34x + 34x +
      structure(
    60 - 34x + 34x +
        list(ui = ui, server = server),
    61 - 34x + 34x +
        class = "teal_data_module"
    @@ -25517,7 +26318,8 @@

    teal coverage - 68.02%

    102 - 10x + 10x +
      logger::log_trace("init initializing teal app with: data ('{ class(data) }').")
    @@ -25545,7 +26347,8 @@

    teal coverage - 68.02%

    106 - 10x + 10x +
      if (inherits(data, "TealData")) {
    @@ -25615,7 +26418,8 @@

    teal coverage - 68.02%

    116 - 10x + 10x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    @@ -25636,28 +26440,32 @@

    teal coverage - 68.02%

    119 - 10x + 10x +
      checkmate::assert(
    120 - 10x + 10x +
        .var.name = "modules",
    121 - 10x + 10x +
        checkmate::check_multi_class(modules, c("teal_modules", "teal_module")),
    122 - 10x + 10x +
        checkmate::check_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -25671,14 +26479,16 @@

    teal coverage - 68.02%

    124 - 10x + 10x +
      if (inherits(modules, "teal_module")) {
    125 - 1x + 1x +
        modules <- list(modules)
    @@ -25692,14 +26502,16 @@

    teal coverage - 68.02%

    127 - 10x + 10x +
      if (checkmate::test_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))) {
    128 - 4x + 4x +
        modules <- do.call(teal::modules, modules)
    @@ -25727,7 +26539,8 @@

    teal coverage - 68.02%

    132 - 10x + 10x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -25748,28 +26561,32 @@

    teal coverage - 68.02%

    135 - 9x + 9x +
      checkmate::assert(
    136 - 9x + 9x +
        .var.name = "title",
    137 - 9x + 9x +
        checkmate::check_string(title),
    138 - 9x + 9x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25783,28 +26600,32 @@

    teal coverage - 68.02%

    140 - 9x + 9x +
      checkmate::assert(
    141 - 9x + 9x +
        .var.name = "header",
    142 - 9x + 9x +
        checkmate::check_string(header),
    143 - 9x + 9x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25818,28 +26639,32 @@

    teal coverage - 68.02%

    145 - 9x + 9x +
      checkmate::assert(
    146 - 9x + 9x +
        .var.name = "footer",
    147 - 9x + 9x +
        checkmate::check_string(footer),
    148 - 9x + 9x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25853,7 +26678,8 @@

    teal coverage - 68.02%

    150 - 9x + 9x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -25874,7 +26700,8 @@

    teal coverage - 68.02%

    153 - 9x + 9x +
      teal.logger::log_system_info()
    @@ -25902,21 +26729,24 @@

    teal coverage - 68.02%

    157 - 9x + 9x +
      landing <- extract_module(modules, "teal_module_landing")
    158 - 9x + 9x +
      landing_module <- NULL
    159 - 9x + 9x +
      if (length(landing) == 1L) {
    @@ -25937,7 +26767,8 @@

    teal coverage - 68.02%

    162 - 9x + 9x +
      } else if (length(landing) > 1L) {
    @@ -25972,7 +26803,8 @@

    teal coverage - 68.02%

    167 - 9x + 9x +
      attr(filter, "app_id") <- create_app_id(data, modules)
    @@ -25993,7 +26825,8 @@

    teal coverage - 68.02%

    170 - 9x + 9x +
      filter <- as.teal_slices(as.list(filter))
    @@ -26021,7 +26854,8 @@

    teal coverage - 68.02%

    174 - 9x + 9x +
      if (isTRUE(attr(filter, "module_specific"))) {
    @@ -26210,21 +27044,24 @@

    teal coverage - 68.02%

    201 - 9x + 9x +
      if (inherits(data, "teal_data")) {
    202 - 8x + 8x +
        if (length(teal_data_datanames(data)) == 0) {
    203 - 1x + 1x +
          stop("The environment of `data` is empty.")
    @@ -26245,28 +27082,32 @@

    teal coverage - 68.02%

    206 - 7x + 7x +
        is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    207 - 7x + 7x +
        if (!isTRUE(is_modules_ok)) {
    208 - 1x + 1x +
          logger::log_error(is_modules_ok)
    209 - 1x + 1x +
          checkmate::assert(is_modules_ok, .var.name = "modules")
    @@ -26287,21 +27128,24 @@

    teal coverage - 68.02%

    212 - 6x + 6x +
        is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    213 - 6x + 6x +
        if (!isTRUE(is_filter_ok)) {
    214 - 1x + 1x +
          warning(is_filter_ok)
    @@ -26364,21 +27208,24 @@

    teal coverage - 68.02%

    223 - 7x + 7x +
      res <- list(
    224 - 7x + 7x +
        ui = ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
    225 - 7x + 7x +
        server = function(input, output, session) {
    @@ -26434,7 +27281,8 @@

    teal coverage - 68.02%

    233 - 7x + 7x +
      logger::log_trace("init teal app has been initialized.")
    @@ -26448,7 +27296,8 @@

    teal coverage - 68.02%

    235 - 7x + 7x +
      res
    @@ -27432,21 +28281,24 @@

    teal coverage - 68.02%

    12 - 7x + 7x +
      css_files <- list.files(
    13 - 7x + 7x +
        system.file("css", package = "teal", mustWork = TRUE),
    14 - 7x + 7x +
        pattern = pattern, full.names = TRUE
    @@ -27467,14 +28319,16 @@

    teal coverage - 68.02%

    17 - 7x + 7x +
      singleton(
    18 - 7x + 7x +
        tags$head(lapply(css_files, includeCSS))
    @@ -27586,21 +28440,24 @@

    teal coverage - 68.02%

    34 - 7x + 7x +
      checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
    35 - 7x + 7x +
      js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
    36 - 7x + 7x +
      js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
    @@ -27614,7 +28471,8 @@

    teal coverage - 68.02%

    38 - 7x + 7x +
      singleton(lapply(js_files, includeScript))
    @@ -27747,21 +28605,24 @@

    teal coverage - 68.02%

    57 - 18x + 18x +
      checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
    58 - 18x + 18x +
      lapply(files, function(file) {
    59 - 18x + 18x +
        shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
    @@ -27775,7 +28636,8 @@

    teal coverage - 68.02%

    61 - 18x + 18x +
      invisible(NULL)
    @@ -27880,21 +28742,24 @@

    teal coverage - 68.02%

    76 - 7x + 7x +
      tagList(
    77 - 7x + 7x +
        shinyjs::useShinyjs(),
    78 - 7x + 7x +
        include_css_files(),
    @@ -27908,14 +28773,16 @@

    teal coverage - 68.02%

    80 - 7x + 7x +
        include_js_files(except = "init.js"),
    81 - 7x + 7x +
        shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
    @@ -28138,28 +29005,32 @@

    teal coverage - 68.02%

    29 - 13x + 13x +
      teal_data_module(
    30 - 13x + 13x +
        ui = function(id) {
    31 - 1x + 1x +
          ns <- NS(id)
    32 - 1x + 1x +
          object$ui(ns("mutate_inner"))
    @@ -28173,21 +29044,24 @@

    teal coverage - 68.02%

    34 - 13x + 13x +
        server = function(id) {
    35 - 11x + 11x +
          moduleServer(id, function(input, output, session) {
    36 - 11x + 11x +
            teal_data_rv <- object$server("mutate_inner")
    @@ -28201,14 +29075,16 @@

    teal coverage - 68.02%

    38 - 11x + 11x +
            if (!is.reactive(teal_data_rv)) {
    39 - 1x + 1x +
              stop("The `teal_data_module` must return a reactive expression.", call. = FALSE)
    @@ -28229,7 +29105,8 @@

    teal coverage - 68.02%

    42 - 10x + 10x +
            td <- eventReactive(teal_data_rv(),
    @@ -28243,14 +29120,16 @@

    teal coverage - 68.02%

    44 - 10x + 10x +
                if (inherits(teal_data_rv(), c("teal_data", "qenv.error"))) {
    45 - 6x + 6x +
                  eval_code(teal_data_rv(), code)
    @@ -28264,7 +29143,8 @@

    teal coverage - 68.02%

    47 - 4x + 4x +
                  teal_data_rv()
    @@ -28285,7 +29165,8 @@

    teal coverage - 68.02%

    50 - 10x + 10x +
              ignoreNULL = FALSE
    @@ -28299,7 +29180,8 @@

    teal coverage - 68.02%

    52 - 10x + 10x +
            td
    @@ -28348,7 +29230,8 @@

    teal coverage - 68.02%

    59 - 1x + 1x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -28376,7 +29259,8 @@

    teal coverage - 68.02%

    63 - 6x + 6x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -28585,14 +29469,16 @@

    teal coverage - 68.02%

    28 - 6x + 6x +
      expr <- substitute(expr)
    29 - 6x + 6x +
      extras <- list(...)
    @@ -28613,14 +29499,16 @@

    teal coverage - 68.02%

    32 - 6x + 6x +
      if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
    33 - 6x + 6x +
        expr <- call("{", expr)
    @@ -28641,7 +29529,8 @@

    teal coverage - 68.02%

    36 - 6x + 6x +
      calls <- as.list(expr)[-1]
    @@ -28662,7 +29551,8 @@

    teal coverage - 68.02%

    39 - 6x + 6x +
      calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
    @@ -28676,7 +29566,8 @@

    teal coverage - 68.02%

    41 - 6x + 6x +
      eval_code(object = data, code = as.expression(calls))
    @@ -28815,14 +29706,16 @@

    teal coverage - 68.02%

    18 - 2x + 2x +
      packageStartupMessage(
    19 - 2x + 2x +
        "\nYou are using teal version ",
    @@ -28843,7 +29736,8 @@

    teal coverage - 68.02%

    22 - 2x + 2x +
        read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
    @@ -29059,28 +29953,32 @@

    teal coverage - 68.02%

    17 - 49x + 49x +
      checkmate::assert_string(label)
    18 - 49x + 49x +
      module(
    19 - 49x + 49x +
        label,
    20 - 49x + 49x +
        server = function(id, data) {
    @@ -29185,7 +30083,8 @@

    teal coverage - 68.02%

    35 - 49x + 49x +
        ui = function(id) {
    @@ -29255,7 +30154,8 @@

    teal coverage - 68.02%

    45 - 49x + 49x +
        datanames = datanames
    @@ -29436,21 +30336,24 @@

    teal coverage - 68.02%

    23 - 4x + 4x +
      checkmate::assert_string(label)
    24 - 2x + 2x +
      checkmate::assert_list(server_args, names = "named")
    25 - 2x + 2x +
      checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
    @@ -29464,7 +30367,8 @@

    teal coverage - 68.02%

    27 - 2x + 2x +
      logger::log_info("Initializing reporter_previewer_module")
    @@ -29478,7 +30382,8 @@

    teal coverage - 68.02%

    29 - 2x + 2x +
      srv <- function(id, reporter, ...) {
    @@ -29506,7 +30411,8 @@

    teal coverage - 68.02%

    33 - 2x + 2x +
      ui <- function(id, ...) {
    @@ -29534,28 +30440,32 @@

    teal coverage - 68.02%

    37 - 2x + 2x +
      module <- module(
    38 - 2x + 2x +
        label = "temporary label",
    39 - 2x + 2x +
        server = srv, ui = ui,
    40 - 2x + 2x +
        server_args = server_args, ui_args = list(), datanames = NULL
    @@ -29583,21 +30493,24 @@

    teal coverage - 68.02%

    44 - 2x + 2x +
      class(module) <- c("teal_module_previewer", class(module))
    45 - 2x + 2x +
      module$label <- label
    46 - 2x + 2x +
      module
    diff --git a/v0.15.0-rc1/index.html b/v0.15.0-rc1/index.html index 65d653602f..6d2552e6ae 100644 --- a/v0.15.0-rc1/index.html +++ b/v0.15.0-rc1/index.html @@ -1,5 +1,4 @@ - - + @@ -88,23 +87,7 @@ - - + - + + diff --git a/v0.15.0-rc1/news/index.html b/v0.15.0-rc1/news/index.html index d3998540b5..7354b834a0 100644 --- a/v0.15.0-rc1/news/index.html +++ b/v0.15.0-rc1/news/index.html @@ -1,8 +1,22 @@ - -Changelog • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -109,17 +129,23 @@
    -

    teal 0.15.0

    +

    teal 0.15.0 +

    -

    New features

    -
    • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
    • +

      New features +

      +
        +
      • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
      • Filter state snapshots can now be uploaded from file. See ?snapshot.
      • Added as_tdata function to facilitate migration of modules to the new teal_data class.
      • Added build_app_title function to facilitate adding favicons to app title.
      • -
    + +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • data argument in init now accepts only teal_data and teal_data_module.
      • tdata has been deprecated and replaced with teal_data. Support for tdata passed to the data argument in module(server) will be removed in the next release.
      • @@ -128,114 +154,166 @@

        Breaking changes -

        Miscellaneous

        -
        • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
        • +

          Miscellaneous +

          +
            +
          • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
          • Added argument to teal_slices and made modifications to init to enable tagging teal_slices with an app id to safely upload snapshots from disk.
          • FilteredData no longer stores pre-processing code in specific slots. Code is now attached as attribute. Adjusted appropriately.
          • -

    + +
    -

    Bug fixes

    -
    • Removed Report previewer module from mapping matrix display in filter manager.
    • +

      Bug fixes +

      +
        +
      • Removed Report previewer module from mapping matrix display in filter manager.
      • Specified minimal version of package dependencies.
      • -
    + +
    -

    teal 0.14.0

    +

    teal 0.14.0 +

    -

    New features

    -
    • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
    • +

      New features +

      +
        +
      • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
      • Enabled capturing and resetting application filter state with snapshots. See ?snapshot.
      • Enabled reporter_previewer_module to customize default values through srv_args.
      • Enabled passing own reporter_previewer_module in a list of modules to override default one.
      • -
    + +
    -

    Breaking changes

    -
    • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
    • +

      Breaking changes +

      +
        +
      • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
      • Soft deprecated filters argument in module and replaced it with datanames. Details in documentation of teal::module
      • -
    + +
    -

    Miscellaneous

    -
    • Removed scda package dependency from examples.
    • +

      Miscellaneous +

      +
        +
      • Removed scda package dependency from examples.
      • Updated the header tag style to enhance element containment.
      • -
    + +
    -

    teal 0.13.0

    +

    teal 0.13.0 +

    -

    Breaking changes

    -
    • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
    • +

      Breaking changes +

      +
        +
      • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
      • Due to deprecation of chunks in teal.code, the teal framework now uses their replacement (qenv) instead. The documentation in teal has been updated to reflect this and custom modules written with chunks should be updated to use qenv.
      • Due to deprecation of chunks in teal.code, get_rcode, get_rcode_srv, and get_rcode_ui have been removed.
      • -
    + +
    -

    New features

    -
    • Added the validate_inputs function that transfers input validation messages to app output.
    • +

      New features +

      +
        +
      • Added the validate_inputs function that transfers input validation messages to app output.
      • modules argument of init accepts teal_module type of object. There is no need to wrap up a single module in modules() or list().
      • Updated module_nested_tabs so that only active modules are calculated in a teal app.
      • -
    + +
    -

    Miscellaneous

    -
    • Updated examples to use scda.2022.
    • +

      Miscellaneous +

      +
        +
      • Updated examples to use scda.2022.
      • Added R session information into a link in the footer of teal applications.
      • Added data hashing step using rlang instead of digest package to calculate the hash (which has been moved from teal.data and teal.slice). There is now an explicit hashing check in the reproducible code output.
      • Removed deprecated functions: root_modules, default_filter, bookmarkableShinyApp, as well as deprecated logging mechanism, including the functions log_app_usage and .log.
      • Updated the “Teal and Bootstrap Themes” vignette to provide more details customizing a teal app with bslib::run_with_themer.
      • Removed outdated diagram from srv_nested_tabs documentation.
      • Changed default values of header and footer arguments in init to empty text.
      • -
    + +
    -

    teal 0.12.0

    -
    -

    New features

    -
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • -
    +

    teal 0.12.0 +

    +
    +

    New features +

    +
      +
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • +
    +
    -

    Enhancements

    -
    • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
    • +

      Enhancements +

      +
        +
      • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
      • Updated teal_module to have data argument which receives a list of reactive filter data with "code" and "join_keys" attributes.
      • Updated teal_module to have filter_panel_api argument which receives a FilterPanelAPI object.
      • Updated the internals of module_teal to reflect changes in teal.slice.
      • -
    + +
    -

    Breaking changes

    -
    • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
    • +

      Breaking changes +

      +
        +
      • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
      • Deprecated merge_expression argument in get_rcode_srv function and removed it in get_rcode function.
      • Deprecated session argument in get_rcode function.
      • -
    + +
    -

    Miscellaneous

    -
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • -
    +

    Miscellaneous +

    +
      +
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • +
    +
    -

    teal 0.11.1

    +

    teal 0.11.1 +

    -

    Enhancements

    -
    • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
    • +

      Enhancements +

      +
        +
      • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
      • Updated teal to support modules which include reporting. If any module which supports reporting is included then a reporter_previewer_module is included.
      • Added default arguments to module() and the server argument is now a function where the second argument can be ... or datasets.
      • -
    + +
    -

    Breaking changes

    -
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • -
    +

    Breaking changes +

    +
      +
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • +
    +
    -

    Miscellaneous

    -
    • Added a template to the pkgdown configuration.
    • +

      Miscellaneous +

      +
        +
      • Added a template to the pkgdown configuration.
      • Removed unneeded shinytest app tests.
      • Updated package authors.
      • Added package vignettes.
      • -
    + +
    -

    teal 0.11.0

    -
    +

    The teal package contains the code to create apps (teal::init), to create a module (teal::module) and to group modules in the app (teal::modules). teal depends on teal.transform and teal.data which contain the functions that teal app creators are likely to need. The other package teal only imports from and therefore teal module creators should either fully specify functions from these packages when required or import them into custom packages as library(teal) will not load them.

    +
    +

    New features +

    +
      +
    • A simple new teal module named example_module has been included in the package.
    • +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • teal package has been split into multiple smaller packages, see above.
      • Deprecated root_modules function, users should use modules directly inside init.
      • Due to deprecation of root_modules any label argument to modules must be explicitly named. For example modules("lab", mod1, mod2) should be replaced with modules(label = "lab", mod1, mod2).
      • -
    + +
    -

    Miscellaneous

    -
    • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
    • +

      Miscellaneous +

      +
        +
      • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
      • MultiAssayExperiment is now suggested packages, not required. Objects dependent on MultiAssayExperiment are changed to lazy-load this now suggested package.
      • -
    + +
    -

    Bug fixes

    -
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • -
    +

    Bug fixes +

    +
      +
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • +
    +
    -

    teal 0.10.1

    +

    teal 0.10.1 +

    -

    Breaking changes

    -
    • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
    • +

      Breaking changes +

      +
        +
      • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
      • Deprecated all functions related to connectors that have been moved to their own separate packages.
      • Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational.
      • Removed rcd_connection and rcd_data; scda_dataset_connectors can be passed into cdisc_data and teal_data directly.
      • Replaced rcd_dataset_connector and rcd_cdisc_dataset_connector with scda_dataset_connector and scda_cdisc_dataset_connector respectively.
      • Renamed teal_show_js_log option into teal.show_js_log to match options naming convention.
      • Removed %is_in% and stop_shiny internal utility functions.
      • -
    + +
    -

    New features

    +

    New features +

    -
    Logging
    -
    • Added support for logging using the logger package.
    • +
      Logging +
      +
        +
      • Added support for logging using the logger package.
      • Added a new function register_logger, which registers a logger in a given namespace.
      • Added trace and info levels log messages to the teal framework.
      • Added pid and shiny session token into footnote so app developers can identify logs for apps.
      • -
    + +
    -
    Other
    -
    • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

    • +
      Other +
      +
        +
      • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

      • Added public facing constructor functions for CDISCDataConnector, RelationalDataConnector, and DataConnection classes.

      • Modified data_extract_spec to allow both the filter and select parameters to be NULL, which results in the data_extract_ui acting as if a filter_spec with all variables as possible choices had been supplied as the filter argument and a select_spec with the multiple parameter set to TRUE had been supplied as the select argument.

      • Added support of the full screen for a module when the filters argument is equal NULL.

      • @@ -302,11 +403,14 @@
        Other -

        Bug fixes

        -
    + +
    -

    teal 0.10.0

    +

    teal 0.10.0 +

    -

    New features

    -
    • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
    • +

      New features +

      +
        +
      • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
      • Refactored filter panel to use MultiAssayExperiment objects. Filters can be set on a subject level (colData of MAE object) and on a experiment level (colData and rowData of an assay).
      • Added cdse_dataset_connector to create delayed data objects from CDSE.
      • Added datasetdb_dataset_connector to create delayed data objects from DataSetDB.
      • Added ricepass_connection to create delayed data objects from entimICE via ricepass.
      • Refactor of the filter panel: -
        • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
        • +
            +
          • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
          • Dataset type determines an appearance and a functionality of related filters and filters summary.
          • Datasets are passed (by reference) from DDL to FilteredData skipping extracting data and their attributes.
          • Redesigned variable filter labels in “Active Filter Variables” panel.
          • Fully testable server functions.
          • -
          -
    + + + +
    -

    Bug fixes

    -
    • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
    • +

      Bug fixes +

      +
        +
      • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
      • Fixed a bug that caused the output of get_code function to not reproduce its raw data set.
      • Changed filter_spec to allow no variable selection upon app initialization, where the first possible value was previously selected.
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal 0.9.5

    +

    teal 0.9.5 +

    -

    Enhancements

    -
    • Added informational stop message when using mutate_data with RelationalDataConnector.
    • +

      Enhancements +

      +
        +
      • Added informational stop message when using mutate_data with RelationalDataConnector.
      • Modified as_cdisc to behave similarly to cdisc_dataset when called on a Dataset object.
      • Changed the displayed format of the data name and the column name in data_extract_spec UI elements. Both are now compressed to <data name>.<column name> if they don’t change during runtime of the app.
      • Added ADSAFTTE to the list of recognized ADaM dataset names.
      • Added another example to data_extract_spec’s doc string showcasing app users can choose a variable used for filtering in the encoding panel.
      • Added CSS styling to tool tips in teal modules.
      • -
    + +
    -

    Bug fixes

    -
    • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
    • +

      Bug fixes +

      +
        +
      • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
      • Fixed a bug that crashes app whenever a Date or datetime column is selected from a filter_spec.
      • -
    + +
    -

    teal 0.9.4

    +

    teal 0.9.4 +

    -

    Enhancements

    -
    • Released snowflake connection and connectors.
    • +

      Enhancements +

      +
        +
      • Released snowflake connection and connectors.
      • Changed ordering of datasets to be more intuitive (topologically first for CDISC datasets only and then according to input datasets order).
      • When closing a teal app (ending a user shiny session), all DataConnections will now try to close their connections.
      • Added ADHY keys to configuration file.
      • Extended the filter_spec function: the parameter choices is no longer mandatory (the function will take all possible choices by default) and the vars parameter additionally accepts the choices_selected and allows to change the variables for filtering using the UI elements in the encoding panel.
      • -
    + +
    -

    Bug fixes

    -
    • Cleaned up imports in the package.
    • -
    • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
    • +

      Bug fixes +

      +
        +
      • Cleaned up imports in the package.
      • +
      • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
        +
      • Fixed issue with cloning Callable class.
      • -
    + +
    -

    teal 0.9.3

    +

    teal 0.9.3 +

    -

    New Features

    -
    • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
    • +

      New Features +

      +
        +
      • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
      • New JoinKeys class (with join_keys() constructors and join_key() constructor for its elements) to store joining key columns between datasets.
      • Refactored the most basic dataset() constructor, added cdisc_dataset() constructor and as_cdisc() conversion function.
      • Soft-deprecate removed class constructors and obsolete functions (e.g. keys()).
      • Added get_keys() and set_keys() functions to extract and manipulate datasets primary keys respectively.
      • Unexported filtered_data_new, filtered_data_set and filtered_data_set_filters.
      • -
    + +
    -

    Bug fixes

    -
    • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
    • +

      Bug fixes +

      +
        +
      • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
      • Added ability to press “Enter” key without having to set focus to the Submit button for delayed data loading.
      • Allow variable_choices to use datasets with missing labels.
      • Fixed bug that ignores input of NULL to selected argument of select_spec function.
      • -
    + +
    -

    Enhancements

    -
    • Added button to remove all active filters from the Filter Panel.
    • -
    +

    Enhancements +

    +
      +
    • Added button to remove all active filters from the Filter Panel.
    • +
    +
    -

    teal 0.9.2

    +

    teal 0.9.2 +

    -

    New Features

    -
    • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
    • +

      New Features +

      +
        +
      • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
      • NOTE: python_dataset_connector is not yet ready to be deployed on RSConnect because it does not contain numpy and pandas, which are Python libraries used in python_dataset_connector.
      • Added support for filtering on Date and Datetime variables in the Filter Panel.
      • Added buttons for date and datetime filter widgets to reset the value to the original.
      • Added new function check_key_duplicates, which creates a short summary about rows with duplicated primary key (row numbers and the number of duplicates)
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    • Removed include_factors option in get_class_colnames in RawDataset.
    • -
    +

    Miscellaneous +

    +
      +
    • Removed include_factors option in get_class_colnames in RawDataset.
    • +
    +
    -

    teal 0.9.1

    -
    • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
    • +

      teal 0.9.1 +

      +
        +
      • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
      • Nested tabs module now has better alignment with the filter panel on the page.
      • Allow width argument in optionalSelectInput.
      • Added lifecycle badges to all exported functions.
      • @@ -483,10 +643,13 @@

        teal 0.9.1 -

        teal 0.9.0

        -
        • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

        • +

          teal 0.9.0 +

          +
            +
          • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

          • A new teal_data function to include datasets and connectors into teal application.

          • cdisc_data function to include datasets and connectors into teal application where a check argument still could be used and other consistency tests are performed.

          • get_raw_data can be used to derive raw data from R6 objects e.g. (RelationalDataset).

          • @@ -507,91 +670,133 @@

            teal 0.9.0 -

            Refactor of FilteredData (for developers)

            -
            • +
            +
            +

            Refactor of FilteredData (for developers) +

            +
              +
            • FilteredData is now fully reactive. Now filtered data is lazy evaluated as per need. This further opens the door to bookmarking teal apps (bookmarking currently works for the right filtering panel, but we will make this feature more sophisticated in a future release, each module must be reviewed and adapted if it contains reactiveValues).
            • Datasets and materialized connectors are provided to FilteredData by set_datasets_data function located in init_datasets.R file.
            • Renamed get_dataset() method to get_data().
            • Renamed get_filter_call() method to get_filter_expr(); returns an expression rather than a list.
            • Removed argument isolate from get_data() method and similar methods. You must isolate it yourself as needed. If you want to temporarily deactivate shiny errors due to missing errors, you can set options(shiny.suppressMissingContextError = TRUE). In general, avoid isolate as this breaks reactivity.
            • We added a development module to add several filters at once, e.g. safety filters. This is to be evaluated before it is converted into a proper module and made available to end-users.
            • -
            +

          +

    -

    teal 0.8.5

    -
    • UI bug fix to hide filter elements for not used datasets.
    • -
    +

    teal 0.8.5 +

    +
      +
    • UI bug fix to hide filter elements for not used datasets.
    • +
    +
    -

    teal 0.8.4

    -
    • Progress bar for UI creation in delayed loading module.
    • +

      teal 0.8.4 +

      +
        +
      • Progress bar for UI creation in delayed loading module.
      • Change output of keys function to keys object.
      • Delayed version of choices_selected.
      • Fix an error in choices_selected when selected is not in choices.
      • Fix pickerInput not to display column name as label if it’s missing.
      • -
    + +
    -

    teal 0.8.3

    -
    • Enable teal app to initialize without data. The data are then loaded from within the teal app.
    • +

      teal 0.8.3 +

      +
        +
      • Enable teal app to initialize without data. The data are then loaded from within the teal app.
      • New classes (DatasetConnector, DataConnector) to connect to various data sources, including: * connector to rice API - rice_data and rice_dataset_connector * connector to RDS files - rds_data and rds_dataset_connector
      • Message appears at bottom right of shiny app when shiny is busy to update the views.
      • Remove labels argument of cdisc_data function. Labels should now already be present in the data passed to the cdisc_data function. This can be achieved using the var_relabel function.
      • -
    + +
    -

    teal 0.8.2

    -
    • Fixed several BUGS in optionalSelectInput and improved inputs look.
    • +

      teal 0.8.2 +

      +
        +
      • Fixed several BUGS in optionalSelectInput and improved inputs look.
      • Added get_data_labels function to FilteredData class.
      • Improved sep passing within data_extract_spec.
      • -
    + +
    -

    teal 0.8.1

    -
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • -
    +

    teal 0.8.1 +

    +
      +
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • +
    +
    -

    teal 0.8.0

    -
    • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
    • +

      teal 0.8.0 +

      +
        +
      • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
      • Possibility to load custom .css and .js files.
      • Renamed columns_spec to select_spec.
      • Show number of observations on filter panel.
      • Add labeling functions variable_choices and value_choices.
      • -
    + +
    -

    teal 0.7.0

    -
    • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
    • +

      teal 0.7.0 +

      +
        +
      • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
      • Moved teal.utils functions to teal: log_app_usage, stop_shiny.
      • Added *_spec functions.
      • Improvements on usage of PickerInput and SelectInput.
      • -
    + +
    -

    teal 0.6.0

    -
    • Removed deprecated functions tab*.
    • +

      teal 0.6.0 +

      +
        +
      • Removed deprecated functions tab*.
      • Removed data generation functions including generate_sample_data.
      • Incorporate shinyjs package.
      • Added “Copy R code to clipboard” button.
      • -
    + +
    -

    teal 0.0.5

    -
    • Added limit to data_table with scrolling, preventing overlap of UI elements.
    • +

      teal 0.0.5 +

      +
        +
      • Added limit to data_table with scrolling, preventing overlap of UI elements.
      • Boolean filtering.
      • -
    + +
    -

    teal 0.0.4

    -
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • -
    +

    teal 0.0.4 +

    +
      +
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • +
    +
    -

    teal 0.0.3

    -
    • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
    • -
    -
    New features
    -
    • +

      teal 0.0.3 +

      +
        +
      • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
      • +
      +
      +
      New features +
      +
        +
      • tm_scatterplot module.
      • tm_table module.
      • -
      +
    +
    -
    Changes
    -
    • All tabs arguments were renamed to modules.
    • +
      Changes +
      +
        +
      • All tabs arguments were renamed to modules.
      • tab_item function is now called module.
      • @@ -604,30 +809,39 @@
        Changes -

        teal 0.0.2

        -
        • New ‘01_getting_started’ vignette.
        • +

          teal 0.0.2 +

          +
            +
          • New ‘01_getting_started’ vignette.
          • Datanames in FilteredData are now case sensitive.
          • -
    + +
    -

    teal 0.0.1

    -
    • March 28, 2016 - Initial Release.
    • -
    +

    teal 0.0.1 +

    +
      +
    • March 28, 2016 - Initial Release.
    • +
    + + + + + - - + + diff --git a/v0.15.0-rc1/pull_request_template.html b/v0.15.0-rc1/pull_request_template.html index 8568b3108f..1613b70b48 100644 --- a/v0.15.0-rc1/pull_request_template.html +++ b/v0.15.0-rc1/pull_request_template.html @@ -1,8 +1,22 @@ - -Pull Request • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -114,17 +134,19 @@

    Fixes #nnn

    - + + + + - - + + diff --git a/v0.15.0-rc1/reference/TealReportCard.html b/v0.15.0-rc1/reference/TealReportCard.html index aaca5c74c0..af2585e303 100644 --- a/v0.15.0-rc1/reference/TealReportCard.html +++ b/v0.15.0-rc1/reference/TealReportCard.html @@ -1,16 +1,32 @@ - - + + + + + +TealReportCard — TealReportCard • teal +TealReportCard — TealReportCard • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -127,20 +149,27 @@
    -

    Super class

    +

    Super class +

    teal.reporter::ReportCard -> TealReportCard

    +

    Inherited methods


    -

    Method append_src()

    -

    Appends the source code to the content meta data of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_src(src, ...)

    +

    +
    +
    +

    Method append_src() +

    +

    Appends the source code to the content meta data of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_src(src, ...)
    +

    +
    -

    Arguments

    -

    src
    +

    Arguments +

    +

    +
    +
    +
    src

    (character(1)) code as text.

    @@ -172,85 +214,148 @@

    Arguments -

    Returns

    +

    Returns +

    Object of class TealReportCard, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_src(
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_src(
       "plot(iris)"
     )
    -card$get_content()[[1]]$get_content()

    +card$get_content()[[1]]$get_content()
    +

    +
    -


    -

    Method append_fs()

    +
    +

    +
    +
    +

    Method append_fs() +

    Appends the filter state list to the content and metadata of this TealReportCard. If the filter state list has an attribute named formatted, it appends it to the card otherwise it uses the default yaml::as.yaml to format the list. -If the filter state list is empty, nothing is appended to the content.

    -

    Usage

    -

    TealReportCard$append_fs(fs)

    +If the filter state list is empty, nothing is appended to the content.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_fs(fs)
    +

    +
    -

    Arguments

    -

    fs
    +

    Arguments +

    +

    +
    +
    +
    fs

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method append_encodings()

    -

    Appends the encodings list to the content and metadata of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_encodings(encodings)

    +
    +

    +
    +
    +

    Method append_encodings() +

    +

    Appends the encodings list to the content and metadata of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_encodings(encodings)
    +

    +
    -

    Arguments

    -

    encodings
    +

    Arguments +

    +

    +
    +
    +
    encodings

    (list) list of encodings selections of the teal app.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
     card$get_content()[[1]]$get_content()
    -

    +
    +

    +
    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealReportCard$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -258,7 +363,8 @@

    Arguments -

    Examples

    +

    Examples +

    
     ## ------------------------------------------------
     ## Method `TealReportCard$append_src`
    @@ -281,17 +387,19 @@ 

    Examples

    + +
    + +
    - - + + diff --git a/v0.15.0-rc1/reference/TealSlicesBlock.html b/v0.15.0-rc1/reference/TealSlicesBlock.html index 2ce1be9d02..64492dba4c 100644 --- a/v0.15.0-rc1/reference/TealSlicesBlock.html +++ b/v0.15.0-rc1/reference/TealSlicesBlock.html @@ -1,10 +1,26 @@ - -RcodeBlock — TealSlicesBlock • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,34 +140,54 @@
    -

    Super classes

    +

    Super classes +

    teal.reporter::ContentBlock -> teal.reporter::TextBlock -> TealSlicesBlock

    +

    Inherited methods


    -

    Method new()

    -

    Returns a TealSlicesBlock object.

    -

    Usage

    -

    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")

    +

    +
    +
    +

    Method new() +

    +

    Returns a TealSlicesBlock object.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    @@ -153,89 +195,154 @@

    Arguments -

    Details

    +

    Details +

    Returns a TealSlicesBlock object with no content and no parameters.

    -

    Returns

    +

    Returns +

    Object of class TealSlicesBlock, invisibly.

    -


    -

    Method set_content()

    +
    +

    +
    +
    +

    Method set_content() +

    Sets content of this TealSlicesBlock. Sets content as YAML text which represents a list generated from teal_slices. The list displays limited number of fields from teal_slice objects, but this list is sufficient to conclude which filters were applied. -When selected field in teal_slice object is a range, then it is displayed as a "min"

    -

    Usage

    -

    TealSlicesBlock$set_content(content)

    +When selected field in teal_slice object is a range, then it is displayed as a "min"

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$set_content(content)
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method from_list()

    -

    Create the RcodeBlock from a list.

    -

    Usage

    -

    TealSlicesBlock$from_list(x)

    +
    +

    +
    +
    +

    Method from_list() +

    +

    Create the RcodeBlock from a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$from_list(x)
    +

    +
    -

    Arguments

    -

    x
    +

    Arguments +

    +

    +
    +
    +
    x

    (named list) with two fields c("text", "params"). Use the get_available_params method to get all possible parameters.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method to_list()

    -

    Convert the RcodeBlock to a list.

    -

    Usage

    -

    TealSlicesBlock$to_list()

    +
    +

    +
    +
    +

    Method to_list() +

    +

    Convert the RcodeBlock to a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$to_list()
    +

    +
    -

    Returns

    +

    Returns +

    named list with a text and params.

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealSlicesBlock$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -243,17 +350,19 @@

    Arguments

    + +
    + +
    - - + + diff --git a/v0.15.0-rc1/reference/append_module.html b/v0.15.0-rc1/reference/append_module.html index bb7884d58d..27f75ec673 100644 --- a/v0.15.0-rc1/reference/append_module.html +++ b/v0.15.0-rc1/reference/append_module.html @@ -1,8 +1,24 @@ - -Append a teal_module to children of a teal_modules object — append_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    append_module(modules, module)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    module

    (teal_module) object to be appended onto the children of modules

    -
    + +
    -

    Value

    +

    Value +

    A teal_modules object with module appended.

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/build_app_title.html b/v0.15.0-rc1/reference/build_app_title.html index 9029cb6a27..f683336d0b 100644 --- a/v0.15.0-rc1/reference/build_app_title.html +++ b/v0.15.0-rc1/reference/build_app_title.html @@ -1,8 +1,24 @@ - -Build app title with favicon — build_app_title • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    build_app_title(
       title = "teal app",
       favicon =
    @@ -123,8 +146,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character) The browser title for the teal app.

    @@ -132,26 +157,30 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag containing the element that adds the title and logo to the shiny app.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/calculate_hashes.html b/v0.15.0-rc1/reference/calculate_hashes.html index fbf0a4a43b..f7b74d1b04 100644 --- a/v0.15.0-rc1/reference/calculate_hashes.html +++ b/v0.15.0-rc1/reference/calculate_hashes.html @@ -1,8 +1,24 @@ - -Get the hash of a dataset — calculate_hashes • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    calculate_hashes(datanames, datasets)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets

    datasets

    (FilteredData) object holding the data

    -
    + +
    -

    Value

    +

    Value +

    A list of hashes per dataset.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/check_filter_datanames.html b/v0.15.0-rc1/reference/check_filter_datanames.html index 5992cf8b8a..e09686ea84 100644 --- a/v0.15.0-rc1/reference/check_filter_datanames.html +++ b/v0.15.0-rc1/reference/check_filter_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in filters — check_filter_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_filter_datanames(filters, datanames)
    -

    Arguments

    -
    filters
    +

    Arguments +

    +
    +
    filters

    (teal_slices) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/check_modules_datanames.html b/v0.15.0-rc1/reference/check_modules_datanames.html index 1a6452ae5c..22ecf2130b 100644 --- a/v0.15.0-rc1/reference/check_modules_datanames.html +++ b/v0.15.0-rc1/reference/check_modules_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in modules — check_modules_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_modules_datanames(modules, datanames)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/create_app_id.html b/v0.15.0-rc1/reference/create_app_id.html index 9e27aa11cf..d1c59f0afd 100644 --- a/v0.15.0-rc1/reference/create_app_id.html +++ b/v0.15.0-rc1/reference/create_app_id.html @@ -1,8 +1,24 @@ - -Application ID — create_app_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,53 @@
    -

    Usage

    +

    Usage +

    create_app_id(data, modules)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) as accepted by init

    modules

    (teal_modules) object as accepted by init

    -
    + +
    -

    Value

    +

    Value +

    A single character string.

    -

    Details

    +

    Details +

    Calculate app ID that will be used to stamp filter state snapshots. App ID is a hash of the app's data and modules. See "transferring snapshots" section in ?snapshot.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/deep_copy_filter.html b/v0.15.0-rc1/reference/deep_copy_filter.html index 4c8ae8260c..daa2d6d954 100644 --- a/v0.15.0-rc1/reference/deep_copy_filter.html +++ b/v0.15.0-rc1/reference/deep_copy_filter.html @@ -1,14 +1,30 @@ - - + + + + + +Deep copy teal_slices — deep_copy_filter • teal +Deep copy teal_slices — deep_copy_filter • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + +
    @@ -123,18 +146,23 @@
    -

    Usage

    +

    Usage +

    deep_copy_filter(filter)
    -

    Arguments

    -
    filter
    +

    Arguments +

    +
    +
    filter

    (teal_slices)

    -
    + +
    -

    Value

    +

    Value +

    teal_slices

    @@ -143,17 +171,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/dot-datasets_to_data.html b/v0.15.0-rc1/reference/dot-datasets_to_data.html index d7732a2c48..f313d30c42 100644 --- a/v0.15.0-rc1/reference/dot-datasets_to_data.html +++ b/v0.15.0-rc1/reference/dot-datasets_to_data.html @@ -1,12 +1,28 @@ - - + + + + + +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    .datasets_to_data(module, datasets)
    -

    Arguments

    -
    module
    +

    Arguments +

    +
    +
    module

    (teal_module) module where needed filters are taken from

    datasets

    (FilteredData) object where needed data are taken from

    -
    + +
    -

    Value

    +

    Value +

    A teal_data object.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/example_module.html b/v0.15.0-rc1/reference/example_module.html index 24c0aa3385..f0ac151f66 100644 --- a/v0.15.0-rc1/reference/example_module.html +++ b/v0.15.0-rc1/reference/example_module.html @@ -1,8 +1,24 @@ - -An example teal module — example_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    example_module(label = "example teal module", datanames = "all")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -132,16 +157,19 @@

    Arguments will show filters of all datasets. datanames also determines a subset of datasets which are appended to the data argument in server function.

    -

    + +
    -

    Value

    +

    Value +

    A teal module which can be included in the modules argument to init().

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(IRIS = iris, MTCARS = mtcars),
       modules = example_module()
    @@ -152,17 +180,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/filter_manager_module_srv.html b/v0.15.0-rc1/reference/filter_manager_module_srv.html index b5ebd5ecd6..4f34bf77c3 100644 --- a/v0.15.0-rc1/reference/filter_manager_module_srv.html +++ b/v0.15.0-rc1/reference/filter_manager_module_srv.html @@ -1,8 +1,24 @@ - -Module specific filter manager — filter_manager_module_srv • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    filter_manager_module_srv(id, module_fd, slices_global)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -131,21 +156,28 @@

    Arguments -

    Value

    +

    Value +

    A reactive expression containing the slices active in this module.

    -

    Details

    +

    Details +

    This module tracks the state of a single FilteredData object and global teal_slices and updates both objects as necessary. Filter states added in different modules Filter states added any individual module are added to global teal_slices @@ -154,17 +186,19 @@

    Details

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/get_client_timezone.html b/v0.15.0-rc1/reference/get_client_timezone.html index 8bf1dc3519..4e2e2b2dfb 100644 --- a/v0.15.0-rc1/reference/get_client_timezone.html +++ b/v0.15.0-rc1/reference/get_client_timezone.html @@ -1,10 +1,26 @@ - -Get client timezone — get_client_timezone • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,19 +139,24 @@
    -

    Usage

    +

    Usage +

    get_client_timezone(ns)
    -

    Arguments

    -
    ns
    +

    Arguments +

    +
    +
    ns

    (function) namespace function passed from the session object in the shiny server. For shiny modules this will allow for proper name spacing of the registered input.

    -
    + +
    -

    Value

    +

    Value +

    (shiny) input variable accessible with input$tz which is a (character) @@ -137,17 +164,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/get_code_tdata.html b/v0.15.0-rc1/reference/get_code_tdata.html index 58f1d920d9..2d1debabbe 100644 --- a/v0.15.0-rc1/reference/get_code_tdata.html +++ b/v0.15.0-rc1/reference/get_code_tdata.html @@ -1,8 +1,24 @@ - -Wrapper for get_code.tdata — get_code_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,35 +137,42 @@
    -

    Usage

    +

    Usage +

    get_code_tdata(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    (character) code used in the tdata object.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/get_datasets_code.html b/v0.15.0-rc1/reference/get_datasets_code.html index c662cb2787..c79ab1d964 100644 --- a/v0.15.0-rc1/reference/get_datasets_code.html +++ b/v0.15.0-rc1/reference/get_datasets_code.html @@ -1,8 +1,24 @@ - -Get datasets code — get_datasets_code • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    get_datasets_code(datanames, datasets, hashes)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets to extract code from

    @@ -131,28 +156,35 @@

    Arguments -

    Value

    +

    Value +

    -

    Character string concatenated from the following elements:

    • data pre-processing code (from data argument in init)

    • +

      Character string concatenated from the following elements:

      +
        +
      • data pre-processing code (from data argument in init)

      • hash check of loaded objects

      • filter code (if any)

      • -
    + + + + + + - - + + diff --git a/v0.15.0-rc1/reference/get_metadata.html b/v0.15.0-rc1/reference/get_metadata.html index e9836e5a2a..4caf9141a7 100644 --- a/v0.15.0-rc1/reference/get_metadata.html +++ b/v0.15.0-rc1/reference/get_metadata.html @@ -1,8 +1,24 @@ - -Function to get metadata from a tdata object — get_metadata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    get_metadata(data, dataname)
     
     # S3 method for tdata
    @@ -125,34 +148,40 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata - object) to extract the data from

    dataname

    (character(1)) the dataset name whose metadata is requested

    -
    + +
    -

    Value

    +

    Value +

    Either list of metadata or NULL if no metadata.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/get_rcode_libraries.html b/v0.15.0-rc1/reference/get_rcode_libraries.html index 2977f3f891..c9347a2d55 100644 --- a/v0.15.0-rc1/reference/get_rcode_libraries.html +++ b/v0.15.0-rc1/reference/get_rcode_libraries.html @@ -1,8 +1,24 @@ - -Generates library calls from current session info — get_rcode_libraries • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,29 +136,33 @@
    -

    Usage

    +

    Usage +

    get_rcode_libraries()
    -

    Value

    +

    Value +

    Character vector of library(<package>) calls.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/include_css_files.html b/v0.15.0-rc1/reference/include_css_files.html index fcea90638c..52b1cbd3d4 100644 --- a/v0.15.0-rc1/reference/include_css_files.html +++ b/v0.15.0-rc1/reference/include_css_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,35 +142,42 @@
    -

    Usage

    +

    Usage +

    include_css_files(pattern = "*")
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes CSS files.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/include_js_files.html b/v0.15.0-rc1/reference/include_js_files.html index f4f02474d7..c201901488 100644 --- a/v0.15.0-rc1/reference/include_js_files.html +++ b/v0.15.0-rc1/reference/include_js_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include JS files from /inst/js/ package directory to application header — include_js_files • teal +Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    include_js_files(pattern = NULL, except = NULL)
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included, passed to system.file

    except

    (character) vector of basename filenames to be excluded

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes JS files.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/include_teal_css_js.html b/v0.15.0-rc1/reference/include_teal_css_js.html index 907a9a70b5..f08411d95b 100644 --- a/v0.15.0-rc1/reference/include_teal_css_js.html +++ b/v0.15.0-rc1/reference/include_teal_css_js.html @@ -1,16 +1,32 @@ - - + + + + + +Code to include teal CSS and JavaScript files — include_teal_css_js • teal +Code to include teal CSS and JavaScript files — include_teal_css_js • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -126,33 +148,38 @@
    -

    Usage

    +

    Usage +

    include_teal_css_js()
    -

    Value

    +

    Value +

    A shiny.tag.list.

    -

    Details

    +

    Details +

    Simply add include_teal_css_js() as one of the UI elements.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/index.html b/v0.15.0-rc1/reference/index.html index 88a4c42b44..5501cb8122 100644 --- a/v0.15.0-rc1/reference/index.html +++ b/v0.15.0-rc1/reference/index.html @@ -1,8 +1,22 @@ - -Function reference • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -108,230 +128,312 @@
    -

    Core teal functions

    +

    Core teal functions +

    -

    Main functions needed to build a teal app

    +

    +

    Main functions needed to build a teal app

    -
    +
    +
    -
    +
    +
    init()
    Create the server and UI function for the shiny app
    -
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    module() modules() format(<teal_module>) print(<teal_module>) format(<teal_modules>) print(<teal_modules>)
    Create teal_module and teal_modules objects.
    -
    +
    +
    +
    ui_teal_with_splash() srv_teal_with_splash()
    Add splash screen to teal application.
    -
    +
    +
    +
    teal_slices() as.teal_slices() c(<teal_slices>)
    Filter settings for teal applications
    -
    -

    Helper Functions

    + +
    +
    +

    Helper Functions +

    -

    Helper functions for teal

    +

    +

    Helper functions for teal

    -
    +
    +
    -
    +
    +
    build_app_title()
    Build app title with favicon
    -
    -

    Example module

    + +
    +
    +

    Example module +

    -

    A simple teal module

    +

    +

    A simple teal module

    -
    +
    +
    -
    +
    +
    example_module()
    An example teal module
    -
    -

    Creating reports

    + +
    +
    +

    Creating reports +

    -
    +
    +
    -
    +
    +
    reporter_previewer_module()
    Create a teal module for previewing a report
    -
    +
    +
    +
    TealReportCard
    TealReportCard
    -
    +
    +
    +
    report_card_template()
    Template function for TealReportCard creation and customization
    -
    -

    Landing popup

    + +
    +
    +

    Landing popup +

    -
    +
    +
    -
    +
    +
    landing_popup_module()
    Landing popup module
    -
    -

    Functions for module developers

    + +
    +
    +

    Functions for module developers +

    -
    +
    +
    -
    +
    +
    as_tdata()
    Downgrade teal_data objects in modules for compatibility
    -
    +
    +
    +
    new_tdata()
    Create a tdata object
    -
    +
    +
    +
    get_code_tdata()
    -
    Wrapper for get_code.tdata
    -
    +
    Wrapper for get_code.tdata +
    +
    +
    +
    get_metadata()
    Function to get metadata from a tdata object
    -
    +
    +
    +
    tdata2env()
    -
    Function to convert a tdata object to an environment
    -
    +
    Function to convert a tdata object to an environment +
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    show_rcode_modal()
    Show R code modal
    -
    +
    +
    +
    join_keys(<tdata>)
    -
    Extract join_keys from tdata
    -
    -

    Validation functions

    +
    Extract join_keys from tdata +
    + +
    +
    +

    Validation functions +

    -
    +
    +
    -
    +
    +
    validate_has_data()
    Validate that dataset has a minimum number of observations
    -
    +
    +
    +
    validate_has_elements()
    Validates that vector has length greater than 0
    -
    +
    +
    +
    validate_has_variable()
    Validates that dataset contains specific variable
    -
    +
    +
    +
    validate_in()
    Validates that vector includes all expected values
    -
    +
    +
    +
    validate_inputs()
    Send input validation messages to output.
    -
    +
    +
    +
    validate_n_levels()
    Validate that variables has expected number of levels
    -
    +
    +
    +
    validate_no_intersection()
    Validates no intersection between two vectors
    -
    +
    +
    +
    validate_one_row_per_id()
    Validate that dataset has unique rows for key variables
    -
    + + + + + + - - + + diff --git a/v0.15.0-rc1/reference/init.html b/v0.15.0-rc1/reference/init.html index 986de01606..e51857df83 100644 --- a/v0.15.0-rc1/reference/init.html +++ b/v0.15.0-rc1/reference/init.html @@ -1,12 +1,28 @@ - - + + + + + +Create the server and UI function for the shiny app — init • teal +Create the server and UI function for the shiny app — init • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    init(
       data,
       modules,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) For constructing the data object, refer to teal_data() and teal_data_module().

    @@ -174,21 +199,25 @@

    Arguments -

    Value

    +

    Value +

    Named list with server and UI functions.

    -

    Details

    +

    Details +

    When initializing the teal app, if datanames are not set for the teal_data object, defaults from the teal_data environment will be used.

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(
         new_iris = transform(iris, id = seq_len(nrow(iris))),
    @@ -242,17 +271,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/is_arg_used.html b/v0.15.0-rc1/reference/is_arg_used.html index a0b0ccddea..ae2bece2fd 100644 --- a/v0.15.0-rc1/reference/is_arg_used.html +++ b/v0.15.0-rc1/reference/is_arg_used.html @@ -1,8 +1,24 @@ - -Does the object make use of the arg — is_arg_used • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    is_arg_used(modules, arg)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_module or teal_modules) object

    arg

    (character(1)) names of the arguments to be checked against formals of teal modules.

    -
    + +
    -

    Value

    +

    Value +

    logical whether the object makes use of arg.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/join_keys.tdata.html b/v0.15.0-rc1/reference/join_keys.tdata.html index f5fd899cab..2dcf922901 100644 --- a/v0.15.0-rc1/reference/join_keys.tdata.html +++ b/v0.15.0-rc1/reference/join_keys.tdata.html @@ -1,8 +1,24 @@ - -Extract join_keys from tdata — join_keys.tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,34 +137,40 @@
    -

    Usage

    +

    Usage +

    # S3 method for tdata
     join_keys(data, ...)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    ...

    Additional arguments (not used)

    -
    + +
    + + + + - - + + diff --git a/v0.15.0-rc1/reference/landing_popup_module.html b/v0.15.0-rc1/reference/landing_popup_module.html index 7d8b86bdf5..4dc47ea27c 100644 --- a/v0.15.0-rc1/reference/landing_popup_module.html +++ b/v0.15.0-rc1/reference/landing_popup_module.html @@ -1,12 +1,28 @@ - - + + + + + +Landing popup module — landing_popup_module • teal +Landing popup module — landing_popup_module • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    landing_popup_module(
       label = "Landing Popup",
       title = NULL,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label of the module.

    @@ -147,16 +172,19 @@

    Arguments -

    Value

    +

    Value +

    A teal_module (extended with teal_landing_module class) to be used in teal applications.

    -

    Examples

    +

    Examples +

    app1 <- init(
       data = teal_data(iris = iris),
       modules = modules(
    @@ -203,17 +231,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/matrix_to_mapping.html b/v0.15.0-rc1/reference/matrix_to_mapping.html index a376ed5822..4c0fce454a 100644 --- a/v0.15.0-rc1/reference/matrix_to_mapping.html +++ b/v0.15.0-rc1/reference/matrix_to_mapping.html @@ -1,14 +1,30 @@ - - + + + + + +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,36 +145,43 @@
    -

    Usage

    +

    Usage +

    matrix_to_mapping(mapping_matrix)
    -

    Arguments

    -
    mapping_matrix
    +

    Arguments +

    +
    +
    mapping_matrix

    (data.frame) of logical vectors where columns represent modules and row represent teal_slices

    -
    + +
    -

    Value

    +

    Value +

    Named list like that in the mapping attribute of a teal_slices object.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/module_filter_manager.html b/v0.15.0-rc1/reference/module_filter_manager.html index 1171f77f60..5ce9a74049 100644 --- a/v0.15.0-rc1/reference/module_filter_manager.html +++ b/v0.15.0-rc1/reference/module_filter_manager.html @@ -1,8 +1,24 @@ - -Manage multiple FilteredData objects — module_filter_manager • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_ui(id)
     
     filter_manager_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,15 +164,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    A list of reactives, each holding a teal_slices, as returned by filter_manager_module_srv.

    -

    Details

    +

    Details +

    This module observes changes in the filters of each FilteredData object and keeps track of all filters used. A mapping of filters to modules is kept in the mapping_matrix object (which is actually a data.frame) @@ -155,17 +183,19 @@

    Details

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/module_filter_manager_modal.html b/v0.15.0-rc1/reference/module_filter_manager_modal.html index dcc2eb5288..a262337cba 100644 --- a/v0.15.0-rc1/reference/module_filter_manager_modal.html +++ b/v0.15.0-rc1/reference/module_filter_manager_modal.html @@ -1,8 +1,24 @@ - -Filter manager modal — module_filter_manager_modal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_modal_ui(id)
     
     filter_manager_modal_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,20 +164,23 @@

    Argumentsteal_slices().

    -

    + + + + + + - - + + diff --git a/v0.15.0-rc1/reference/module_labels.html b/v0.15.0-rc1/reference/module_labels.html index e01f5b48e5..02079adcdc 100644 --- a/v0.15.0-rc1/reference/module_labels.html +++ b/v0.15.0-rc1/reference/module_labels.html @@ -1,8 +1,24 @@ - -Retrieve labels from teal_modules — module_labels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,18 +137,23 @@
    -

    Usage

    +

    Usage +

    module_labels(modules)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    -
    + +
    -

    Value

    +

    Value +

    A list containing the labels of the modules. If the modules are nested, @@ -133,17 +161,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/module_management.html b/v0.15.0-rc1/reference/module_management.html index 1a45bb2cdc..bf8040ada4 100644 --- a/v0.15.0-rc1/reference/module_management.html +++ b/v0.15.0-rc1/reference/module_management.html @@ -1,8 +1,24 @@ - -Extract/Remove module(s) of specific class — extract_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,54 @@
    -

    Usage

    +

    Usage +

    extract_module(modules, class)
     
     drop_module(modules, class)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    class

    The class name of teal_module to be extracted or dropped.

    -
    + +
    -

    Value

    +

    Value +

    -
    • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

    • +
        +
      • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

      • For drop_module, the opposite, which is all teal_modules of class other than class.

      • -

      teal_modules

      +
    +

    teal_modules

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/module_nested_tabs.html b/v0.15.0-rc1/reference/module_nested_tabs.html index 0dfe1bf7ca..f699744348 100644 --- a/v0.15.0-rc1/reference/module_nested_tabs.html +++ b/v0.15.0-rc1/reference/module_nested_tabs.html @@ -1,8 +1,24 @@ - -Create a UI of nested tabs of teal_modules — module_nested_tabs • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)
     
     # S3 method for default
    @@ -163,8 +187,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -197,18 +223,25 @@

    Arguments -

    Value

    +

    Value +

    -

    Depending on the class of modules, ui_nested_tabs returns:

    • teal_module: instantiated UI of the module.

    • +

      Depending on the class of modules, ui_nested_tabs returns:

      +
        +
      • teal_module: instantiated UI of the module.

      • teal_modules: tabsetPanel with each tab corresponding to recursively calling this function on it.

      • -

      srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

      +
    +

    srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

    -

    ui_nested_tabs

    +

    +ui_nested_tabs +

    Each teal_modules is translated to a tabsetPanel and each @@ -218,25 +251,32 @@

    ui_nested_tabs

    -

    srv_nested_tabs

    +

    +srv_nested_tabs +

    -

    This module recursively calls all elements of modules and returns currently active one.

    • teal_module returns self as a active module.

    • +

      This module recursively calls all elements of modules and returns currently active one.

      +
        +
      • teal_module returns self as a active module.

      • teal_modules also returns module active within self which is determined by the input$active_tab.

      • -
    + +
    + + + + - - + + diff --git a/v0.15.0-rc1/reference/module_tabs_with_filters.html b/v0.15.0-rc1/reference/module_tabs_with_filters.html index 01a2ed11b4..d0bb531648 100644 --- a/v0.15.0-rc1/reference/module_tabs_with_filters.html +++ b/v0.15.0-rc1/reference/module_tabs_with_filters.html @@ -1,12 +1,28 @@ - - + + + + + +Add right filter panel into each of the top-level teal_modules UIs. — module_tabs_with_filters • teal +Add right filter panel into each of the top-level teal_modules UIs. — module_tabs_with_filters • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    ui_tabs_with_filters(id, modules, datasets, filter = teal_slices())
     
     srv_tabs_with_filters(
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -161,15 +186,18 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag.list containing the main menu, placeholders for filters and placeholders for the teal modules.

    -

    Details

    +

    Details +

    The right filter panel's filter choices affect the datasets object. Therefore, all modules using the same datasets share the same filters.

    This works with nested modules of depth greater than 2, though the filter @@ -177,17 +205,19 @@

    Details

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/module_teal.html b/v0.15.0-rc1/reference/module_teal.html index fb3cc44828..736373e346 100644 --- a/v0.15.0-rc1/reference/module_teal.html +++ b/v0.15.0-rc1/reference/module_teal.html @@ -1,8 +1,24 @@ - -teal main app module — module_teal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_teal(
       id,
       splash_ui = tags$h2("Starting the Teal App"),
    @@ -127,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -171,15 +197,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression which returns the currently active module.

    -

    Details

    +

    Details +

    It displays the splash UI which is used to fetch the data, possibly prompting for a password input to fetch the data. Once the data is ready, the splash screen is replaced by the actual teal UI that is tabsetted and @@ -200,17 +229,19 @@

    Details

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/module_teal_with_splash.html b/v0.15.0-rc1/reference/module_teal_with_splash.html index 9a6685f784..fcb9b90c35 100644 --- a/v0.15.0-rc1/reference/module_teal_with_splash.html +++ b/v0.15.0-rc1/reference/module_teal_with_splash.html @@ -1,10 +1,26 @@ - -Add splash screen to teal application. — module_teal_with_splash • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    ui_teal_with_splash(
       id,
       data,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -168,15 +193,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression containing a teal_data object when data is loaded or NULL when it is not.

    -

    Details

    +

    Details +

    This module pauses app initialization pending delayed data loading. This is necessary because the filter panel and modules depend on the data to initialize.

    teal_with_splash follows the shiny module convention. @@ -186,12 +214,14 @@

    Detailsinit to create a standalone application.

    -

    See also

    +

    See also +

    -

    Examples

    +

    Examples +

    teal_modules <- modules(example_module())
     # Shiny app with modular integration of teal
     ui <- fluidPage(
    @@ -213,17 +243,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/modules_depth.html b/v0.15.0-rc1/reference/modules_depth.html index e21717035d..755c51dc5a 100644 --- a/v0.15.0-rc1/reference/modules_depth.html +++ b/v0.15.0-rc1/reference/modules_depth.html @@ -1,10 +1,26 @@ - -Get module depth — modules_depth • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    modules_depth(modules, depth = 0L)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (list or teal_modules or teal_module) nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -134,26 +159,30 @@

    Arguments -

    Value

    +

    Value +

    Depth level for given module.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/reexports.html b/v0.15.0-rc1/reference/reexports.html index 560b46f655..b3dbcb6e01 100644 --- a/v0.15.0-rc1/reference/reexports.html +++ b/v0.15.0-rc1/reference/reexports.html @@ -1,5 +1,10 @@ - - + + + + + +Objects exported from other packages — reexports • teal +Objects exported from other packages — reexports • teal + + + + + + + + + + Skip to contents @@ -40,7 +56,8 @@ + + @@ -134,7 +156,8 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    lifecycle
    +
    +
    lifecycle

    badge

    @@ -142,21 +165,24 @@

    %>%

    -
    + + - + + + + - - + + diff --git a/v0.15.0-rc1/reference/report_card_template.html b/v0.15.0-rc1/reference/report_card_template.html index 7d850abaea..c6f1d7db53 100644 --- a/v0.15.0-rc1/reference/report_card_template.html +++ b/v0.15.0-rc1/reference/report_card_template.html @@ -1,10 +1,26 @@ - -Template function for TealReportCard creation and customization — report_card_template • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    report_card_template(
       title,
       label,
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) title of the card (unless overwritten by label)

    @@ -149,26 +174,30 @@

    Arguments -

    Value

    +

    Value +

    (TealReportCard) populated with a title, description and filter state.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/reporter_previewer_module.html b/v0.15.0-rc1/reference/reporter_previewer_module.html index 01e36ad8c2..9dfb233c3c 100644 --- a/v0.15.0-rc1/reference/reporter_previewer_module.html +++ b/v0.15.0-rc1/reference/reporter_previewer_module.html @@ -1,20 +1,36 @@ - - + + + + + +Create a teal module for previewing a report — reporter_previewer_module • teal +Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + @@ -132,13 +154,16 @@
    -

    Usage

    +

    Usage +

    reporter_previewer_module(label = "Report previewer", server_args = list())
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -147,26 +172,30 @@

    Argumentsteal.reporter::reporter_previewer_srv().

    -

    + +
    -

    Value

    +

    Value +

    teal_module (extended with teal_module_previewer class) containing the teal.reporter previewer functionality.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/resolve_modules_datanames.html b/v0.15.0-rc1/reference/resolve_modules_datanames.html index de9b604882..7896ec8651 100644 --- a/v0.15.0-rc1/reference/resolve_modules_datanames.html +++ b/v0.15.0-rc1/reference/resolve_modules_datanames.html @@ -1,10 +1,26 @@ - -Resolve datanames for the modules — resolve_modules_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    resolve_modules_datanames(modules, datanames, join_keys)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules) object

    @@ -134,26 +159,30 @@

    Arguments -

    Value

    +

    Value +

    teal_modules with resolved datanames.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/run_js_files.html b/v0.15.0-rc1/reference/run_js_files.html index c7554443cf..c2cf6e714d 100644 --- a/v0.15.0-rc1/reference/run_js_files.html +++ b/v0.15.0-rc1/reference/run_js_files.html @@ -1,14 +1,30 @@ - - + + + + + +Run JS file from /inst/js/ package directory — run_js_files • teal +Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,41 +145,49 @@
    -

    Usage

    +

    Usage +

    run_js_files(files)
    -

    Arguments

    -
    files
    +

    Arguments +

    +
    +
    files

    (character) vector of filenames.

    -
    + +
    -

    Value

    +

    Value +

    returns NULL, invisibly.

    -

    Details

    +

    Details +

    system.file should not be used to access files in other packages, it does not work with devtools. Therefore, we redefine this method in each package as needed. Thus, we do not export this method.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/show_rcode_modal.html b/v0.15.0-rc1/reference/show_rcode_modal.html index 5fd80252a2..43e2b9322f 100644 --- a/v0.15.0-rc1/reference/show_rcode_modal.html +++ b/v0.15.0-rc1/reference/show_rcode_modal.html @@ -1,10 +1,26 @@ - -Show R code modal — show_rcode_modal • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())
    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) Title of the modal, displayed in the first comment of the R code.

    @@ -137,24 +162,28 @@

    Argumentsshiny::getDefaultReactiveDomain() is used.

    -

    + +
    -

    References

    +

    References +

    shiny::showModal()

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/slices_store.html b/v0.15.0-rc1/reference/slices_store.html index 6f01db59fd..3dea9bf984 100644 --- a/v0.15.0-rc1/reference/slices_store.html +++ b/v0.15.0-rc1/reference/slices_store.html @@ -1,10 +1,26 @@ - -Store and restore teal_slices object — slices_store • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,15 +139,18 @@
    -

    Usage

    +

    Usage +

    slices_store(tss, file)
     
     slices_restore(file)
    -

    Arguments

    -
    tss
    +

    Arguments +

    +
    +
    tss

    (teal_slices) object to be stored.

    @@ -133,9 +158,11 @@

    Arguments.

    -

    + +
    -

    Value

    +

    Value +

    slices_store returns NULL, invisibly.

    @@ -144,32 +171,39 @@

    Value

    slices_restore returns a teal_slices object restored from the file.

    -

    Details

    -

    Date and date time objects are stored in the following formats:

    • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

    • +

      Details +

      +

      Date and date time objects are stored in the following formats:

      +
        +
      • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

      • POSIX*t classes are converted to character by using format.POSIX*t(usetz = TRUE, tz = "UTC") (YYYY-MM-DD HH:MM:SS UTC, where UTC is the Coordinated Universal Time timezone short-code).

      • -

      This format is assumed during slices_restore. All POSIX*t objects in +

    +

    This format is assumed during slices_restore. All POSIX*t objects in selected or choices fields of teal_slice objects are always printed in UTC timezone as well.

    -

    See also

    +

    See also +

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/snapshot_manager_module.html b/v0.15.0-rc1/reference/snapshot_manager_module.html index 4d84afc103..fe1f412439 100644 --- a/v0.15.0-rc1/reference/snapshot_manager_module.html +++ b/v0.15.0-rc1/reference/snapshot_manager_module.html @@ -1,8 +1,24 @@ - -Filter state snapshot management. — snapshot_manager_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    snapshot_manager_ui(id)
     
     snapshot_manager_srv(id, slices_global, mapping_matrix, filtered_data_list)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id

    @@ -140,15 +165,18 @@

    Arguments -

    Value

    +

    Value +

    Nothing is returned.

    -

    Details

    +

    Details +

    This module introduces snapshots: stored descriptions of the filter state of the entire application. Snapshots allow the user to save the current filter state of the application for later use in the session, as well as to save it to file in order to share it with an app developer or other users, @@ -160,7 +188,8 @@

    Details

    -

    Server logic

    +

    Server logic +

    Snapshots are basically teal_slices objects, however, since each module is served by a separate instance @@ -175,7 +204,8 @@

    Server logic -

    Snapshot mechanics

    +

    Snapshot mechanics +

    When a snapshot is captured, the user is prompted to name it. @@ -205,7 +235,8 @@

    Snapshot mechanics -

    Transferring snapshots

    +

    Transferring snapshots +

    Snapshots uploaded from disk should only be used in the same application they come from, @@ -215,22 +246,25 @@

    Transferring snapshots

    -

    Author

    +

    Author +

    Aleksander Chlebowski

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/tdata.html b/v0.15.0-rc1/reference/tdata.html index bd929e6ef5..dc800ec0ef 100644 --- a/v0.15.0-rc1/reference/tdata.html +++ b/v0.15.0-rc1/reference/tdata.html @@ -1,22 +1,38 @@ - - + + + + + +Create a tdata object — tdata • teal +Create a tdata object — tdata • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + + @@ -126,19 +148,25 @@

    [Deprecated]

    Create a new object called tdata which contains data, a reactive list of data.frames -(or MultiAssayExperiment), with attributes:

    • code (reactive) containing code used to generate the data

    • +(or MultiAssayExperiment), with attributes:

      +
        +
      • code (reactive) containing code used to generate the data

      • join_keys (join_keys) containing the relationships between the data

      • metadata (named list) containing any metadata associated with the data frames

      • -
    + +
    -

    Usage

    +

    Usage +

    new_tdata(data, code = "", join_keys = NULL, metadata = NULL)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (named list) A list of data.frame or MultiAssayExperiment objects, which optionally can be reactive. Inside this object all of these items will be made reactive.

    @@ -160,20 +188,24 @@

    Arguments -

    Value

    +

    Value +

    A tdata object.

    -

    See also

    +

    See also +

    as_tdata

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars), dd = data.frame(x = 1:10)),
    @@ -354,17 +386,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/tdata2env.html b/v0.15.0-rc1/reference/tdata2env.html index fc2cb4371d..80f527da77 100644 --- a/v0.15.0-rc1/reference/tdata2env.html +++ b/v0.15.0-rc1/reference/tdata2env.html @@ -1,8 +1,24 @@ - -Function to convert a tdata object to an environment — tdata2env • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,25 +137,31 @@
    -

    Usage

    +

    Usage +

    tdata2env(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    An environment.

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars)),
    @@ -145,17 +174,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/tdata_deprecation.html b/v0.15.0-rc1/reference/tdata_deprecation.html index a3868d31b5..8172c46568 100644 --- a/v0.15.0-rc1/reference/tdata_deprecation.html +++ b/v0.15.0-rc1/reference/tdata_deprecation.html @@ -1,8 +1,24 @@ - -Downgrade teal_data objects in modules for compatibility — as_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,24 +136,30 @@
    -

    Usage

    +

    Usage +

    as_tdata(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    data object, either tdata or teal_data, the latter possibly in a reactive expression

    -
    + +
    -

    Value

    +

    Value +

    Object of class tdata.

    -

    Details

    +

    Details +

    Recent changes in teal cause modules to fail because modules expect a tdata object to be passed to the data argument but instead they receive a teal_data object, which is additionally wrapped in a reactive expression in the server functions. @@ -140,7 +168,8 @@

    Details
    -

    Examples

    +

    Examples +

    td <- teal_data()
     td <- within(td, iris <- iris) %>% within(mtcars <- mtcars)
     td
    @@ -192,17 +221,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.15.0-rc1/reference/teal-package.html b/v0.15.0-rc1/reference/teal-package.html index e603a0de4c..5e44b12b98 100644 --- a/v0.15.0-rc1/reference/teal-package.html +++ b/v0.15.0-rc1/reference/teal-package.html @@ -1,10 +1,26 @@ - -teal: Interactive exploration of clinical trials data — teal-package • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,21 +141,30 @@
    -

    Details

    +

    Details +

    To learn mode about the package, visit the project website or read the init() manual page.

    -

    Author

    +

    Author +

    Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID)

    -

    Authors:

    + +
    + + + + - - + + diff --git a/v0.15.0-rc1/reference/teal_data_datanames.html b/v0.15.0-rc1/reference/teal_data_datanames.html index 2901de199d..c6b027e604 100644 --- a/v0.15.0-rc1/reference/teal_data_datanames.html +++ b/v0.15.0-rc1/reference/teal_data_datanames.html @@ -1,10 +1,26 @@ - -Wrapper on teal.data::datanames — teal_data_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -117,18 +140,23 @@
    -

    Usage

    +

    Usage +

    teal_data_datanames(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data)

    -
    + +
    -

    Value

    +

    Value +

    character

    @@ -137,17 +165,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/teal_data_module.html b/v0.15.0-rc1/reference/teal_data_module.html index d7ce8c9d03..f512af93fe 100644 --- a/v0.15.0-rc1/reference/teal_data_module.html +++ b/v0.15.0-rc1/reference/teal_data_module.html @@ -1,10 +1,26 @@ - -Data module for teal applications — teal_data_module • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    teal_data_module(ui, server)
     
     # S4 method for teal_data_module,character
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    ui
    +

    Arguments +

    +
    +
    ui

    (function(id)) shiny module UI function; must only take id argument

    @@ -159,9 +184,11 @@

    Arguments -

    Value

    +

    Value +

    teal_data_module returns an object of class teal_data_module.

    @@ -173,7 +200,8 @@

    Value

    within returns a teal_data_module object with a delayed evaluation of expr when the module is run.

    -

    Details

    +

    Details +

    teal_data_module creates a shiny module to supply or modify data in a teal application. The module allows for running data pre-processing code (creation and some modification) after the app starts. The body of the server function will be run in the app rather than in the global environment. @@ -188,12 +216,14 @@

    Details... argument: as name:value pairs are passed to ..., name in expr will be replaced with value.

    -

    Examples

    +

    Examples +

    tdm <- teal_data_module(
       ui = function(id) {
         ns <- NS(id)
    @@ -326,17 +356,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/teal_data_to_filtered_data.html b/v0.15.0-rc1/reference/teal_data_to_filtered_data.html index f9e827988b..da4321eab4 100644 --- a/v0.15.0-rc1/reference/teal_data_to_filtered_data.html +++ b/v0.15.0-rc1/reference/teal_data_to_filtered_data.html @@ -1,8 +1,24 @@ - -Create a FilteredData — teal_data_to_filtered_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    teal_data_to_filtered_data(x, datanames = teal_data_datanames(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (teal_data) object

    datanames

    (character) vector of data set names to include; must be subset of datanames(x)

    -
    + +
    -

    Value

    +

    Value +

    A FilteredData object.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/teal_modules.html b/v0.15.0-rc1/reference/teal_modules.html index 0045dc4651..581495110a 100644 --- a/v0.15.0-rc1/reference/teal_modules.html +++ b/v0.15.0-rc1/reference/teal_modules.html @@ -1,10 +1,26 @@ - -Create teal_module and teal_modules objects. — teal_modules • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    module(
       label = "module",
       server = function(id, ...) {
    @@ -151,14 +174,19 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    server
    -

    (function) shiny module with following arguments:

    • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

    • +
      +

      (function) shiny module with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

      • input, output, session - (not recommended) then shiny::callModule() will be used to call a module.

      • data (optional) module will receive a teal_data object, a list of reactive (filtered) data specified in the filters argument.

      • @@ -166,13 +194,18 @@

        Argumentsteal.reporter::Reporter).

      • filter_panel_api (optional) module will receive FilterPanelAPI. (See teal.slice::FilterPanelAPI).

      • ... (optional) server_args elements will be passed to the module named argument or to the ....

      • -

      +
    +
    ui
    -

    (function) shiny UI module function with following arguments:

    • id - teal will set proper shiny namespace for this module.

    • +
      +

      (function) shiny UI module function with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module.

      • ... (optional) ui_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    filters
    @@ -196,7 +229,8 @@

    Argumentsformat() and print(): Arguments passed to other methods.

    @@ -208,20 +242,26 @@

    Arguments -

    Value

    +

    Value +

    module() returns an object of class teal_module.

    -

    modules() returns a teal_modules object which contains following fields:

    • label: taken from the label argument.

    • +

      modules() returns a teal_modules object which contains following fields:

      +
        +
      • label: taken from the label argument.

      • children: a list containing objects passed in .... List elements are named after their label attribute converted to a valid shiny id.

      • -
    + +
    -

    Details

    +

    Details +

    module() creates an instance of a teal_module that can be placed in a teal application. modules() shapes the structure of a the application by organizing teal_module within the navigation panel. It wraps teal_module and teal_modules objects in a teal_modules object, @@ -234,7 +274,8 @@

    Details
    -

    Examples

    +

    Examples +

    library(shiny)
     
     module_1 <- module(
    @@ -291,17 +332,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.15.0-rc1/reference/teal_slices.html b/v0.15.0-rc1/reference/teal_slices.html index 49b834b90f..a605fbfb76 100644 --- a/v0.15.0-rc1/reference/teal_slices.html +++ b/v0.15.0-rc1/reference/teal_slices.html @@ -1,8 +1,24 @@ - -Filter settings for teal applications — teal_slices • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    teal_slices(
       ...,
       exclude_varnames = NULL,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    any number of teal_slice objects. For print and format, additional arguments passed to other functions.

    @@ -146,15 +171,19 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal.slice's GitHub repository.

    (character(1)) string specifying how observations are tallied by these filter states. -Possible options:

    • "none" (default) to have counts of single FilterState to show unfiltered number only.

    • +Possible options:

      +
        +
      • "none" (default) to have counts of single FilterState to show unfiltered number only.

      • "all" to have counts of single FilterState to show number of observation in filtered and unfiltered dataset. Note, that issues were reported when using this option with MultiAssayExperiment. Please make sure that adding new filters doesn't fail on target platform before deploying for production.

      • -
    + +
    allow_add
    @@ -162,24 +191,32 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal's GitHub repository.

    (named list) specifies which filters will be active in which modules on app start. Elements should contain character vector of teal_slice ids (see teal.slice::teal_slice). -Names of the list should correspond to teal_module label set in module() function.

    • ids listed under "global_filters will be active in all modules.

    • +Names of the list should correspond to teal_module label set in module() function.

      +
        +
      • ids listed under "global_filters will be active in all modules.

      • If missing, all filters will be applied to all modules.

      • If empty list, all filters will be available to all modules but will start inactive.

      • If module_specific is FALSE, only global_filters will be active on start.

      • -
    + +
    app_id
    @@ -192,27 +229,32 @@

    Arguments -

    Value

    +

    Value +

    A teal_slices object.

    -

    Details

    +

    Details +

    Produces a teal_slices object. The teal_slice components will specify filter states that will be active when the app starts. Attributes (created with the named arguments) will configure the way the app applies filters. See argument descriptions for details.

    -

    Examples

    +

    Examples +

    filter <- teal_slices(
       teal_slice(dataname = "iris", varname = "Species", id = "species"),
       teal_slice(dataname = "iris", varname = "Sepal.Length", id = "sepal_length"),
    @@ -245,17 +287,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/unfold_mapping.html b/v0.15.0-rc1/reference/unfold_mapping.html index 82f3ee9651..37e8f16893 100644 --- a/v0.15.0-rc1/reference/unfold_mapping.html +++ b/v0.15.0-rc1/reference/unfold_mapping.html @@ -1,8 +1,24 @@ - -Explicitly enumerate global filters. — unfold_mapping • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    unfold_mapping(mapping, module_names)
    -

    Arguments

    -
    mapping
    +

    Arguments +

    +
    +
    mapping

    (named list) as stored in mapping parameter of teal_slices

    module_names

    (character) vector containing names of all modules in the app

    -
    + +
    -

    Value

    +

    Value +

    A named_list with one element per module, each element containing all filters applied to that module.

    + + + + - - + + diff --git a/v0.15.0-rc1/reference/validate_app_title_tag.html b/v0.15.0-rc1/reference/validate_app_title_tag.html index 8fee84c2ba..5ff10c34b7 100644 --- a/v0.15.0-rc1/reference/validate_app_title_tag.html +++ b/v0.15.0-rc1/reference/validate_app_title_tag.html @@ -1,8 +1,24 @@ - -Function for validating the title parameter of teal::init — validate_app_title_tag • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,29 +137,35 @@
    -

    Usage

    +

    Usage +

    validate_app_title_tag(shiny_tag)
    -

    Arguments

    -
    shiny_tag
    +

    Arguments +

    +
    +
    shiny_tag

    (shiny.tag) Object to validate for a valid title.

    -
    + +
    + + + + - - + + diff --git a/v0.15.0-rc1/reference/validate_has_data.html b/v0.15.0-rc1/reference/validate_has_data.html index 09ab1d01de..c605e65e32 100644 --- a/v0.15.0-rc1/reference/validate_has_data.html +++ b/v0.15.0-rc1/reference/validate_has_data.html @@ -1,8 +1,24 @@ - -Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    validate_has_data(
       x,
       min_nrow = NULL,
    @@ -125,8 +148,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    @@ -145,14 +170,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(teal)
     ui <- fluidPage(
       sliderInput("len", "Max Length of Sepal",
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/validate_has_elements.html b/v0.15.0-rc1/reference/validate_has_elements.html index 152ec667c4..20d5ced576 100644 --- a/v0.15.0-rc1/reference/validate_has_elements.html +++ b/v0.15.0-rc1/reference/validate_has_elements.html @@ -1,8 +1,24 @@ - -Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_has_elements(x, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    msg

    message to display

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B"), each = 15)
    @@ -169,17 +197,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/validate_has_variable.html b/v0.15.0-rc1/reference/validate_has_variable.html index 5d0084a657..d81ea66411 100644 --- a/v0.15.0-rc1/reference/validate_has_variable.html +++ b/v0.15.0-rc1/reference/validate_has_variable.html @@ -1,8 +1,24 @@ - -Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_has_variable(data, varname, msg)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20)
    @@ -165,17 +193,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/validate_in.html b/v0.15.0-rc1/reference/validate_in.html index 7b943fa3a4..69db5aa2a2 100644 --- a/v0.15.0-rc1/reference/validate_in.html +++ b/v0.15.0-rc1/reference/validate_in.html @@ -1,8 +1,24 @@ - -Validates that vector includes all expected values — validate_in • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_in(x, choices, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Vector of values to test.

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    ui <- fluidPage(
       selectInput(
         "species",
    @@ -163,17 +191,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/validate_inputs.html b/v0.15.0-rc1/reference/validate_inputs.html index a945a79ebf..1aa474c5cc 100644 --- a/v0.15.0-rc1/reference/validate_inputs.html +++ b/v0.15.0-rc1/reference/validate_inputs.html @@ -1,10 +1,26 @@ - -Send input validation messages to output. — validate_inputs • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    validate_inputs(..., header = "Some inputs require attention")
    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    either any number of InputValidator objects or an optionally named, possibly nested list of InputValidator objects, see Details

    @@ -132,15 +157,18 @@

    Arguments -

    Value

    +

    Value +

    Returns NULL if the final validation call passes and a shiny.silent.error if it fails.

    -

    Details

    +

    Details +

    shiny::validate is used to withhold rendering of an output element until certain conditions are met and to print a validation message in place of the output element. @@ -159,12 +187,14 @@

    Detailsheader.

    -

    Examples

    +

    Examples +

    library(shiny)
     library(shinyvalidate)
     
    @@ -234,17 +264,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/validate_n_levels.html b/v0.15.0-rc1/reference/validate_n_levels.html index 43de48a433..a8cc1c6aca 100644 --- a/v0.15.0-rc1/reference/validate_n_levels.html +++ b/v0.15.0-rc1/reference/validate_n_levels.html @@ -1,8 +1,24 @@ - -Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    variable name. If x is not a factor, the unique values are treated as levels.

    @@ -137,16 +162,19 @@

    Arguments -

    Details

    +

    Details +

    If the number of levels of x is less than min_levels or greater than max_levels the validation will fail. This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20),
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/validate_no_intersection.html b/v0.15.0-rc1/reference/validate_no_intersection.html index dbfefab59b..0aa280b876 100644 --- a/v0.15.0-rc1/reference/validate_no_intersection.html +++ b/v0.15.0-rc1/reference/validate_no_intersection.html @@ -1,8 +1,24 @@ - -Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_no_intersection(x, y, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B", "C"), each = 10)
    @@ -178,17 +206,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0-rc1/reference/validate_one_row_per_id.html b/v0.15.0-rc1/reference/validate_one_row_per_id.html index 29519d3c95..04d3086e23 100644 --- a/v0.15.0-rc1/reference/validate_one_row_per_id.html +++ b/v0.15.0-rc1/reference/validate_one_row_per_id.html @@ -1,8 +1,24 @@ - -Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_one_row_per_id(x, key = c("USUBJID", "STUDYID"))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    key

    (character) Vector of ID variables from x that identify unique records.

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    iris$id <- rep(1:50, times = 3)
     ui <- fluidPage(
       selectInput(
    @@ -161,17 +189,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/404.html b/v0.15.0/404.html index da306ab3b6..6a391f5a46 100644 --- a/v0.15.0/404.html +++ b/v0.15.0/404.html @@ -1,5 +1,4 @@ - - + @@ -80,23 +79,7 @@ - - + - + + diff --git a/v0.15.0/CODE_OF_CONDUCT.html b/v0.15.0/CODE_OF_CONDUCT.html index 3dd34d1c92..ab92434ac9 100644 --- a/v0.15.0/CODE_OF_CONDUCT.html +++ b/v0.15.0/CODE_OF_CONDUCT.html @@ -1,8 +1,22 @@ - -Contributor Covenant Code of Conduct • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,65 +131,80 @@
    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    • Demonstrating empathy and kindness toward other people
    • +
        +
      • Demonstrating empathy and kindness toward other people
      • Being respectful of differing opinions, viewpoints, and experiences
      • Giving and gracefully accepting constructive feedback
      • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
      • Focusing on what is best not just for us as individuals, but for the overall community
      • -

      Examples of unacceptable behavior include:

      -
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • +
      +

      Examples of unacceptable behavior include:

      +
        +
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • Trolling, insulting or derogatory comments, and personal or political attacks
      • Public or private harassment
      • Publishing others’ private information, such as a physical or email address, without their explicit permission
      • Other conduct which could reasonably be considered inappropriate in a professional setting
      • -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -177,17 +212,19 @@

    Attribution

    + + + + - - + + diff --git a/v0.15.0/CONTRIBUTING.html b/v0.15.0/CONTRIBUTING.html index 63d6a044be..b4bdadba0b 100644 --- a/v0.15.0/CONTRIBUTING.html +++ b/v0.15.0/CONTRIBUTING.html @@ -1,8 +1,22 @@ - -Contribution Guidelines • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -113,7 +133,8 @@

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -124,38 +145,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    GitHub Flow

    +

    GitHub Flow +

    This repository uses the GitHub Flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes

        Make sure your code

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR)

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -169,76 +199,93 @@

        GitHub Flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    -

    Coding guidelines

    +

    Coding guidelines +

    This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Dependency management

    +

    Dependency management +

    Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

    -

    Dependency version management

    +

    Dependency version management +

    If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    -
    • Minimum 5% of lines of code authored* (determined by git blame query) OR
    • +
        +
      • Minimum 5% of lines of code authored* (determined by git blame query) OR
      • Being at the top 5 contributors in terms of number of commits OR lines added OR lines removed*
      • -

      *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

      +
    +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + + + - - + + diff --git a/v0.15.0/LICENSE-text.html b/v0.15.0/LICENSE-text.html index 83e571b4f7..bc2215f85a 100644 --- a/v0.15.0/LICENSE-text.html +++ b/v0.15.0/LICENSE-text.html @@ -1,8 +1,22 @@ - -License • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -123,17 +143,19 @@ limitations under the License. - + + + + - - + + diff --git a/v0.15.0/SECURITY.html b/v0.15.0/SECURITY.html index 5987daefd1..b929c9542c 100644 --- a/v0.15.0/SECURITY.html +++ b/v0.15.0/SECURITY.html @@ -1,8 +1,22 @@ - -Security Policy • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,38 +131,44 @@
    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    -
    • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
    • +
        +
      • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
      • Full paths of source file(s) related to the manifestation of the issue
      • The location of the affected source code (tag/branch/commit or direct URL)
      • Any special configuration required to reproduce the issue
      • Step-by-step instructions to reproduce the issue
      • Proof-of-concept or exploit code (if possible)
      • Impact of the issue, including how an attacker might exploit the issue
      • -

      This information will help us triage your report more quickly.

      +
    +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + + + - - + + diff --git a/v0.15.0/articles/adding-support-for-reporting.html b/v0.15.0/articles/adding-support-for-reporting.html index 77dacda92d..c58cbc5882 100644 --- a/v0.15.0/articles/adding-support-for-reporting.html +++ b/v0.15.0/articles/adding-support-for-reporting.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/blueprint/actors.html b/v0.15.0/articles/blueprint/actors.html index 7286951aed..16b9e3454e 100644 --- a/v0.15.0/articles/blueprint/actors.html +++ b/v0.15.0/articles/blueprint/actors.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/blueprint/dataflow.html b/v0.15.0/articles/blueprint/dataflow.html index 92ed70cbe6..ff998b204a 100644 --- a/v0.15.0/articles/blueprint/dataflow.html +++ b/v0.15.0/articles/blueprint/dataflow.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/blueprint/filter_panel.html b/v0.15.0/articles/blueprint/filter_panel.html index 2d7728eb6a..3226cd3dac 100644 --- a/v0.15.0/articles/blueprint/filter_panel.html +++ b/v0.15.0/articles/blueprint/filter_panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/blueprint/in_app_data.html b/v0.15.0/articles/blueprint/in_app_data.html index 6b929dba21..e9ae3e6c9a 100644 --- a/v0.15.0/articles/blueprint/in_app_data.html +++ b/v0.15.0/articles/blueprint/in_app_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/blueprint/index.html b/v0.15.0/articles/blueprint/index.html index 1240bcff0d..77efa419e1 100644 --- a/v0.15.0/articles/blueprint/index.html +++ b/v0.15.0/articles/blueprint/index.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/blueprint/input_data.html b/v0.15.0/articles/blueprint/input_data.html index dec2aa998d..3a2baa7549 100644 --- a/v0.15.0/articles/blueprint/input_data.html +++ b/v0.15.0/articles/blueprint/input_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/blueprint/intro.html b/v0.15.0/articles/blueprint/intro.html index a335742e7a..ce59a13bd6 100644 --- a/v0.15.0/articles/blueprint/intro.html +++ b/v0.15.0/articles/blueprint/intro.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/blueprint/module_encapsulation.html b/v0.15.0/articles/blueprint/module_encapsulation.html index e01ff871e0..63714a14a0 100644 --- a/v0.15.0/articles/blueprint/module_encapsulation.html +++ b/v0.15.0/articles/blueprint/module_encapsulation.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/blueprint/product_map.html b/v0.15.0/articles/blueprint/product_map.html index 656e1ccce4..acf4d046d4 100644 --- a/v0.15.0/articles/blueprint/product_map.html +++ b/v0.15.0/articles/blueprint/product_map.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/bootstrap-themes-in-teal.html b/v0.15.0/articles/bootstrap-themes-in-teal.html index de6fc7c5b1..07fe86ca39 100644 --- a/v0.15.0/articles/bootstrap-themes-in-teal.html +++ b/v0.15.0/articles/bootstrap-themes-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/creating-custom-modules.html b/v0.15.0/articles/creating-custom-modules.html index 9432604723..2c8e9c5017 100644 --- a/v0.15.0/articles/creating-custom-modules.html +++ b/v0.15.0/articles/creating-custom-modules.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/data-as-shiny-module.html b/v0.15.0/articles/data-as-shiny-module.html index 06fdf3e10d..763753b705 100644 --- a/v0.15.0/articles/data-as-shiny-module.html +++ b/v0.15.0/articles/data-as-shiny-module.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/filter-panel.html b/v0.15.0/articles/filter-panel.html index 866d1ca941..52b42dc8ba 100644 --- a/v0.15.0/articles/filter-panel.html +++ b/v0.15.0/articles/filter-panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/getting-started-with-teal.html b/v0.15.0/articles/getting-started-with-teal.html index 2f77af7fad..2670b3d927 100644 --- a/v0.15.0/articles/getting-started-with-teal.html +++ b/v0.15.0/articles/getting-started-with-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/including-data-in-teal-applications.html b/v0.15.0/articles/including-data-in-teal-applications.html index b4702d1149..ecc1e26531 100644 --- a/v0.15.0/articles/including-data-in-teal-applications.html +++ b/v0.15.0/articles/including-data-in-teal-applications.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/articles/index.html b/v0.15.0/articles/index.html index d4a1ba5648..868e26ed85 100644 --- a/v0.15.0/articles/index.html +++ b/v0.15.0/articles/index.html @@ -1,8 +1,22 @@ - -Articles • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,78 +131,113 @@

    Get started

    -
    Getting Started with teal
    +
    +
    Getting Started with teal
    -
    + +
    + + + + + + + + + +

    📃 Technical blueprint

    -

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    +

    +

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    -
    About Technical Blueprint
    +
    +
    About Technical Blueprint
    -
    Introduction
    + +
    Introduction
    -
    Actors
    + +
    Actors
    -
    Data Flow
    + +
    Data Flow
    -
    Product Map
    + +
    Product Map
    -
    + + + + + + + + + + - - + + diff --git a/v0.15.0/articles/teal-options.html b/v0.15.0/articles/teal-options.html index 541529abf1..7510e21e32 100644 --- a/v0.15.0/articles/teal-options.html +++ b/v0.15.0/articles/teal-options.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.0/authors.html b/v0.15.0/authors.html index 4984ffaad2..986f8eecfa 100644 --- a/v0.15.0/authors.html +++ b/v0.15.0/authors.html @@ -1,8 +1,22 @@ - -Authors and Citation • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -110,7 +130,8 @@

    Authors

    -
    • +
        +
      • Dawid Kaledkowski. Author, maintainer.

      • @@ -178,7 +199,8 @@

        Authors

        Maximilian Mordig. Contributor.

        -
    + +

    Citation

    @@ -199,17 +221,19 @@

    Citation

    }
    + + + + - - + + diff --git a/v0.15.0/coverage-report/index.html b/v0.15.0/coverage-report/index.html index 8fb3a35713..37ae2388a8 100644 --- a/v0.15.0/coverage-report/index.html +++ b/v0.15.0/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -431,56 +430,64 @@

    teal coverage - 68.02%

    46 - 17x + 17x +
      checkmate::assert_string(msg, null.ok = TRUE)
    47 - 15x + 15x +
      checkmate::assert_data_frame(x)
    48 - 15x + 15x +
      if (!is.null(min_nrow)) {
    49 - 15x + 15x +
        if (complete) {
    50 - 5x + 5x +
          complete_index <- stats::complete.cases(x)
    51 - 5x + 5x +
          validate(need(
    52 - 5x + 5x +
            sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
    53 - 5x + 5x +
            paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
    @@ -501,35 +508,40 @@

    teal coverage - 68.02%

    56 - 10x + 10x +
          validate(need(
    57 - 10x + 10x +
            nrow(x) >= min_nrow,
    58 - 10x + 10x +
            paste(
    59 - 10x + 10x +
              c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
    60 - 10x + 10x +
              collapse = "\n"
    @@ -564,28 +576,32 @@

    teal coverage - 68.02%

    65 - 10x + 10x +
        if (!allow_inf) {
    66 - 6x + 6x +
          validate(need(
    67 - 6x + 6x +
            all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
    68 - 6x + 6x +
            "Dataframe contains Inf values which is not allowed."
    @@ -3510,42 +3526,48 @@

    teal coverage - 68.02%

    106 - 6x + 6x +
      checkmate::assert_character(id)
    107 - 6x + 6x +
      checkmate::assert_true(is.reactive(slices_global))
    108 - 6x + 6x +
      checkmate::assert_class(isolate(slices_global()), "teal_slices")
    109 - 6x + 6x +
      checkmate::assert_true(is.reactive(mapping_matrix))
    110 - 6x + 6x +
      checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
    111 - 6x + 6x +
      checkmate::assert_list(filtered_data_list, types = "FilteredData", any.missing = FALSE, names = "named")
    @@ -3559,14 +3581,16 @@

    teal coverage - 68.02%

    113 - 6x + 6x +
      moduleServer(id, function(input, output, session) {
    114 - 6x + 6x +
        ns <- session$ns
    @@ -3587,28 +3611,32 @@

    teal coverage - 68.02%

    117 - 6x + 6x +
        filter <- isolate(slices_global())
    118 - 6x + 6x +
        snapshot_history <- reactiveVal({
    119 - 6x + 6x +
          list(
    120 - 6x + 6x +
            "Initial application state" = as.list(filter, recursive = TRUE)
    @@ -3650,7 +3678,8 @@

    teal coverage - 68.02%

    126 - 6x + 6x +
        observeEvent(input$snapshot_add, {
    @@ -3741,7 +3770,8 @@

    teal coverage - 68.02%

    139 - 6x + 6x +
        observeEvent(input$snapshot_name_accept, {
    @@ -3937,7 +3967,8 @@

    teal coverage - 68.02%

    167 - 6x + 6x +
        observeEvent(input$snapshot_load, {
    @@ -4063,7 +4094,8 @@

    teal coverage - 68.02%

    185 - 6x + 6x +
        observeEvent(input$snaphot_file_accept, {
    @@ -4413,7 +4445,8 @@

    teal coverage - 68.02%

    235 - 6x + 6x +
        observeEvent(input$snapshot_reset, {
    @@ -4581,21 +4614,24 @@

    teal coverage - 68.02%

    259 - 6x + 6x +
        observers <- reactiveValues()
    260 - 6x + 6x +
        handlers <- reactiveValues()
    261 - 6x + 6x +
        divs <- reactiveValues()
    @@ -4609,14 +4645,16 @@

    teal coverage - 68.02%

    263 - 6x + 6x +
        observeEvent(snapshot_history(), {
    264 - 2x + 2x +
          lapply(names(snapshot_history())[-1L], function(s) {
    @@ -4987,42 +5025,48 @@

    teal coverage - 68.02%

    317 - 6x + 6x +
        output$snapshot_list <- renderUI({
    318 - 2x + 2x +
          rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
    319 - 2x + 2x +
          if (length(rows) == 0L) {
    320 - 2x + 2x +
            div(
    321 - 2x + 2x +
              class = "snapshot_manager_placeholder",
    322 - 2x + 2x +
              "Snapshots will appear here."
    @@ -5518,56 +5562,64 @@

    teal coverage - 68.02%

    25 - 4x + 4x +
          checkmate::assert_character(src, min.len = 0, max.len = 1)
    26 - 4x + 4x +
          params <- list(...)
    27 - 4x + 4x +
          params$eval <- FALSE
    28 - 4x + 4x +
          rblock <- RcodeBlock$new(src)
    29 - 4x + 4x +
          rblock$set_params(params)
    30 - 4x + 4x +
          self$append_content(rblock)
    31 - 4x + 4x +
          self$append_metadata("SRC", src)
    32 - 4x + 4x +
          invisible(self)
    @@ -5637,28 +5689,32 @@

    teal coverage - 68.02%

    42 - 5x + 5x +
          checkmate::assert_class(fs, "teal_slices")
    43 - 4x + 4x +
          self$append_text("Filter State", "header3")
    44 - 4x + 4x +
          self$append_content(TealSlicesBlock$new(fs))
    45 - 4x + 4x +
          invisible(self)
    @@ -5735,56 +5791,64 @@

    teal coverage - 68.02%

    56 - 4x + 4x +
          checkmate::assert_list(encodings)
    57 - 4x + 4x +
          self$append_text("Selected Options", "header3")
    58 - 4x + 4x +
          if (requireNamespace("yaml", quietly = TRUE)) {
    59 - 4x + 4x +
            self$append_text(yaml::as.yaml(encodings, handlers = list(
    60 - 4x + 4x +
              POSIXct = function(x) format(x, "%Y-%m-%d"),
    61 - 4x + 4x +
              POSIXlt = function(x) format(x, "%Y-%m-%d"),
    62 - 4x + 4x +
              Date = function(x) format(x, "%Y-%m-%d")
    63 - 4x + 4x +
            )), "verbatim")
    @@ -5812,14 +5876,16 @@

    teal coverage - 68.02%

    67 - 4x + 4x +
          self$append_metadata("Encodings", encodings)
    68 - 4x + 4x +
          invisible(self)
    @@ -5973,21 +6039,24 @@

    teal coverage - 68.02%

    90 - 10x + 10x +
          self$set_content(content)
    91 - 9x + 9x +
          self$set_style(style)
    92 - 9x + 9x +
          invisible(self)
    @@ -6078,56 +6147,64 @@

    teal coverage - 68.02%

    105 - 11x + 11x +
          checkmate::assert_class(content, "teal_slices")
    106 - 10x + 10x +
          if (length(content) != 0) {
    107 - 7x + 7x +
            states_list <- lapply(content, function(x) {
    108 - 7x + 7x +
              x_list <- shiny::isolate(as.list(x))
    109 - 7x + 7x +
              if (
    110 - 7x + 7x +
                inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
    111 - 7x + 7x +
                  length(x_list$choices) == 2 &&
    112 - 7x + 7x +
                  length(x_list$selected) == 2
    @@ -6162,7 +6239,8 @@

    teal coverage - 68.02%

    117 - 7x + 7x +
              if (!is.null(x_list$arg)) {
    @@ -6190,14 +6268,16 @@

    teal coverage - 68.02%

    121 - 7x + 7x +
              x_list <- x_list[
    122 - 7x + 7x +
                c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
    @@ -6211,21 +6291,24 @@

    teal coverage - 68.02%

    124 - 7x + 7x +
              names(x_list) <- c(
    125 - 7x + 7x +
                "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
    126 - 7x + 7x +
                "Selected Values", "Selected range", "Include NA values", "Include Inf values"
    @@ -6246,7 +6329,8 @@

    teal coverage - 68.02%

    129 - 7x + 7x +
              Filter(Negate(is.null), x_list)
    @@ -6267,14 +6351,16 @@

    teal coverage - 68.02%

    132 - 7x + 7x +
            if (requireNamespace("yaml", quietly = TRUE)) {
    133 - 7x + 7x +
              super$set_content(yaml::as.yaml(states_list))
    @@ -6309,14 +6395,16 @@

    teal coverage - 68.02%

    138 - 10x + 10x +
          private$teal_slices <- content
    139 - 10x + 10x +
          invisible(self)
    @@ -6365,28 +6453,32 @@

    teal coverage - 68.02%

    146 - 1x + 1x +
          checkmate::assert_list(x)
    147 - 1x + 1x +
          checkmate::assert_names(names(x), must.include = c("teal_slices"))
    148 - 1x + 1x +
          self$set_content(x$teal_slices)
    149 - 1x + 1x +
          invisible(self)
    @@ -6428,7 +6520,8 @@

    teal coverage - 68.02%

    155 - 2x + 2x +
          list(teal_slices = private$teal_slices)
    @@ -7029,28 +7122,32 @@

    teal coverage - 68.02%

    78 - 5x + 5x +
      checkmate::assert_class(modules, "teal_modules")
    79 - 5x + 5x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    80 - 5x + 5x +
      checkmate::assert_class(reporter, "Reporter")
    81 - 3x + 3x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -7064,14 +7161,16 @@

    teal coverage - 68.02%

    83 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    84 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initializing the module.")
    @@ -7085,14 +7184,16 @@

    teal coverage - 68.02%

    86 - 3x + 3x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    87 - 3x + 3x +
        manager_out <- filter_manager_modal_srv("filter_manager", filtered_data_list = datasets, filter = filter)
    @@ -7106,42 +7207,48 @@

    teal coverage - 68.02%

    89 - 3x + 3x +
        active_module <- srv_nested_tabs(
    90 - 3x + 3x +
          id = "root",
    91 - 3x + 3x +
          datasets = datasets,
    92 - 3x + 3x +
          modules = modules,
    93 - 3x + 3x +
          reporter = reporter,
    94 - 3x + 3x +
          is_module_specific = is_module_specific
    @@ -7162,21 +7269,24 @@

    teal coverage - 68.02%

    97 - 3x + 3x +
        if (!is_module_specific) {
    98 - 3x + 3x +
          active_datanames <- reactive({
    99 - 6x + 6x +
            if (identical(active_module()$datanames, "all")) {
    @@ -7197,21 +7307,24 @@

    teal coverage - 68.02%

    102 - 5x + 5x +
              include_parent_datanames(
    103 - 5x + 5x +
                active_module()$datanames,
    104 - 5x + 5x +
                singleton$get_join_keys()
    @@ -7239,14 +7352,16 @@

    teal coverage - 68.02%

    108 - 3x + 3x +
          singleton <- unlist(datasets)[[1]]
    109 - 3x + 3x +
          singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
    @@ -7260,28 +7375,32 @@

    teal coverage - 68.02%

    111 - 3x + 3x +
          observeEvent(
    112 - 3x + 3x +
            eventExpr = active_datanames(),
    113 - 3x + 3x +
            handlerExpr = {
    114 - 4x + 4x +
              script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
    @@ -7316,7 +7435,8 @@

    teal coverage - 68.02%

    119 - 4x + 4x +
                "handleActiveDatasetsPresent();"
    @@ -7330,7 +7450,8 @@

    teal coverage - 68.02%

    121 - 4x + 4x +
              shinyjs::runjs(script)
    @@ -7344,7 +7465,8 @@

    teal coverage - 68.02%

    123 - 3x + 3x +
            ignoreNULL = FALSE
    @@ -7372,14 +7494,16 @@

    teal coverage - 68.02%

    127 - 3x + 3x +
        showNotification("Data loaded - App fully started up")
    128 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initialized the module")
    @@ -7393,7 +7517,8 @@

    teal coverage - 68.02%

    130 - 3x + 3x +
        active_module
    @@ -7518,21 +7643,24 @@

    teal coverage - 68.02%

    15 - 18x + 18x +
      script <- sprintf(
    16 - 18x + 18x +
        "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
    17 - 18x + 18x +
        ns("timezone")
    @@ -7546,14 +7674,16 @@

    teal coverage - 68.02%

    19 - 18x + 18x +
      shinyjs::runjs(script) # function does not return anything
    20 - 18x + 18x +
      invisible(NULL)
    @@ -7602,42 +7732,48 @@

    teal coverage - 68.02%

    27 - 11x + 11x +
      bs_theme <- getOption("teal.bs_theme")
    28 - 11x + 11x +
      if (is.null(bs_theme)) {
    29 - 8x + 8x +
        NULL
    30 - 3x + 3x +
      } else if (!inherits(bs_theme, "bs_theme")) {
    31 - 2x + 2x +
        warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
    32 - 2x + 2x +
        NULL
    @@ -7651,7 +7787,8 @@

    teal coverage - 68.02%

    34 - 1x + 1x +
        bs_theme
    @@ -7707,42 +7844,48 @@

    teal coverage - 68.02%

    42 - 11x + 11x +
      parents <- character(0)
    43 - 11x + 11x +
      for (i in dataname) {
    44 - 16x + 16x +
        while (length(i) > 0) {
    45 - 18x + 18x +
          parent_i <- teal.data::parent(join_keys, i)
    46 - 18x + 18x +
          parents <- c(parent_i, parents)
    47 - 18x + 18x +
          i <- parent_i
    @@ -7770,7 +7913,8 @@

    teal coverage - 68.02%

    51 - 11x + 11x +
      unique(c(parents, dataname))
    @@ -7854,14 +7998,16 @@

    teal coverage - 68.02%

    63 - 13x + 13x +
      checkmate::assert_class(x, "teal_data")
    64 - 13x + 13x +
      checkmate::assert_character(datanames, min.chars = 1L, any.missing = FALSE)
    @@ -7875,21 +8021,24 @@

    teal coverage - 68.02%

    66 - 13x + 13x +
      ans <- teal.slice::init_filtered_data(
    67 - 13x + 13x +
        x = sapply(datanames, function(dn) x[[dn]], simplify = FALSE),
    68 - 13x + 13x +
        join_keys = teal.data::join_keys(x)
    @@ -7910,21 +8059,24 @@

    teal coverage - 68.02%

    71 - 13x + 13x +
      attr(ans, "preprocessing_code") <- teal.code::get_code(x)
    72 - 13x + 13x +
      attr(ans, "verification_status") <- x@verified
    73 - 13x + 13x +
      ans
    @@ -8057,35 +8209,40 @@

    teal coverage - 68.02%

    92 - 2x + 2x +
      checkmate::assert_string(title)
    93 - 2x + 2x +
      checkmate::assert_string(label)
    94 - 2x + 2x +
      checkmate::assert_string(description, null.ok = TRUE)
    95 - 2x + 2x +
      checkmate::assert_flag(with_filter)
    96 - 2x + 2x +
      checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
    @@ -8099,49 +8256,56 @@

    teal coverage - 68.02%

    98 - 2x + 2x +
      card <- teal::TealReportCard$new()
    99 - 2x + 2x +
      title <- if (label == "") title else label
    100 - 2x + 2x +
      card$set_name(title)
    101 - 2x + 2x +
      card$append_text(title, "header2")
    102 - 1x + 1x +
      if (!is.null(description)) card$append_text(description, "header3")
    103 - 1x + 1x +
      if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
    104 - 2x + 2x +
      card
    @@ -8526,14 +8690,16 @@

    teal coverage - 68.02%

    159 - 12x + 12x +
      checkmate::assert_class(modules, "teal_modules")
    160 - 12x + 12x +
      checkmate::assert_character(datanames)
    @@ -8547,7 +8713,8 @@

    teal coverage - 68.02%

    162 - 12x + 12x +
      recursive_check_datanames <- function(modules, datanames) {
    @@ -8561,14 +8728,16 @@

    teal coverage - 68.02%

    164 - 26x + 26x +
        if (inherits(modules, "teal_modules")) {
    165 - 12x + 12x +
          sapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
    @@ -8582,49 +8751,56 @@

    teal coverage - 68.02%

    167 - 14x + 14x +
          extra_datanames <- setdiff(modules$datanames, c("all", datanames))
    168 - 14x + 14x +
          if (length(extra_datanames)) {
    169 - 2x + 2x +
            sprintf(
    170 - 2x + 2x +
              "- Module '%s' uses datanames not available in 'data': (%s) not in (%s)",
    171 - 2x + 2x +
              modules$label,
    172 - 2x + 2x +
              toString(dQuote(extra_datanames, q = FALSE)),
    173 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -8659,21 +8835,24 @@

    teal coverage - 68.02%

    178 - 12x + 12x +
      check_datanames <- unlist(recursive_check_datanames(modules, datanames))
    179 - 12x + 12x +
      if (length(check_datanames)) {
    180 - 2x + 2x +
        paste(check_datanames, collapse = "\n")
    @@ -8687,7 +8866,8 @@

    teal coverage - 68.02%

    182 - 10x + 10x +
        TRUE
    @@ -8792,14 +8972,16 @@

    teal coverage - 68.02%

    197 - 10x + 10x +
      checkmate::assert_class(filters, "teal_slices")
    198 - 10x + 10x +
      checkmate::assert_character(datanames)
    @@ -8820,63 +9002,72 @@

    teal coverage - 68.02%

    201 - 10x + 10x +
      out <- unlist(sapply(
    202 - 10x + 10x +
        filters, function(filter) {
    203 - 3x + 3x +
          dataname <- shiny::isolate(filter$dataname)
    204 - 3x + 3x +
          if (!dataname %in% datanames) {
    205 - 2x + 2x +
            sprintf(
    206 - 2x + 2x +
              "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
    207 - 2x + 2x +
              shiny::isolate(filter$id),
    208 - 2x + 2x +
              dQuote(dataname, q = FALSE),
    209 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -8925,14 +9116,16 @@

    teal coverage - 68.02%

    216 - 10x + 10x +
      if (length(out)) {
    217 - 2x + 2x +
        paste(out, collapse = "\n")
    @@ -8946,7 +9139,8 @@

    teal coverage - 68.02%

    219 - 8x + 8x +
        TRUE
    @@ -9030,21 +9224,24 @@

    teal coverage - 68.02%

    231 - 51x + 51x +
      checkmate::assert_class(data, "teal_data")
    232 - 51x + 51x +
      if (length(teal.data::datanames(data))) {
    233 - 47x + 47x +
        teal.data::datanames(data)
    @@ -9058,7 +9255,8 @@

    teal coverage - 68.02%

    235 - 4x + 4x +
        ls(teal.code::get_env(data), all.names = TRUE)
    @@ -9128,70 +9326,80 @@

    teal coverage - 68.02%

    245 - 14x + 14x +
      checkmate::assert_class(shiny_tag, "shiny.tag")
    246 - 14x + 14x +
      checkmate::assert_true(shiny_tag$name == "head")
    247 - 13x + 13x +
      child_names <- vapply(shiny_tag$children, `[[`, character(1L), "name")
    248 - 13x + 13x +
      checkmate::assert_subset(c("title", "link"), child_names, .var.name = "child tags")
    249 - 11x + 11x +
      rel_attr <- shiny_tag$children[[which(child_names == "link")]]$attribs$rel
    250 - 11x + 11x +
      checkmate::assert_subset(
    251 - 11x + 11x +
        rel_attr,
    252 - 11x + 11x +
        c("icon", "shortcut icon"),
    253 - 11x + 11x +
        .var.name = "Link tag's rel attribute",
    254 - 11x + 11x +
        empty.ok = FALSE
    @@ -9310,56 +9518,64 @@

    teal coverage - 68.02%

    271 - 11x + 11x +
      checkmate::assert_string(title, null.ok = TRUE)
    272 - 11x + 11x +
      checkmate::assert_string(favicon, null.ok = TRUE)
    273 - 11x + 11x +
      tags$head(
    274 - 11x + 11x +
        tags$title(title),
    275 - 11x + 11x +
        tags$link(
    276 - 11x + 11x +
          rel = "icon",
    277 - 11x + 11x +
          href = favicon,
    278 - 11x + 11x +
          sizes = "any"
    @@ -9499,14 +9715,16 @@

    teal coverage - 68.02%

    298 - 19x + 19x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    299 - 18x + 18x +
      checkmate::assert_class(modules, "teal_modules")
    @@ -9520,28 +9738,32 @@

    teal coverage - 68.02%

    301 - 17x + 17x +
      data <- if (inherits(data, "teal_data")) {
    302 - 15x + 15x +
        as.list(data@env)
    303 - 17x + 17x +
      } else if (inherits(data, "teal_data_module")) {
    304 - 2x + 2x +
        deparse1(body(data$server))
    @@ -9555,7 +9777,8 @@

    teal coverage - 68.02%

    306 - 17x + 17x +
      modules <- lapply(modules, defunction)
    @@ -9569,7 +9792,8 @@

    teal coverage - 68.02%

    308 - 17x + 17x +
      rlang::hash(list(data = data, modules = modules))
    @@ -9618,28 +9842,32 @@

    teal coverage - 68.02%

    315 - 186x + 186x +
      if (is.list(x)) {
    316 - 40x + 40x +
        lapply(x, defunction)
    317 - 146x + 146x +
      } else if (is.function(x)) {
    318 - 44x + 44x +
        deparse1(body(x))
    @@ -9653,7 +9881,8 @@

    teal coverage - 68.02%

    320 - 102x + 102x +
        x
    @@ -10093,42 +10322,48 @@

    teal coverage - 68.02%

    60 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    61 - 7x + 7x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "title",
    64 - 7x + 7x +
        checkmate::check_string(title),
    65 - 7x + 7x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -10142,28 +10377,32 @@

    teal coverage - 68.02%

    67 - 7x + 7x +
      checkmate::assert(
    68 - 7x + 7x +
        .var.name = "header",
    69 - 7x + 7x +
        checkmate::check_string(header),
    70 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -10177,28 +10416,32 @@

    teal coverage - 68.02%

    72 - 7x + 7x +
      checkmate::assert(
    73 - 7x + 7x +
        .var.name = "footer",
    74 - 7x + 7x +
        checkmate::check_string(footer),
    75 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -10219,7 +10462,8 @@

    teal coverage - 68.02%

    78 - 7x + 7x +
      ns <- NS(id)
    @@ -10261,28 +10505,32 @@

    teal coverage - 68.02%

    84 - 7x + 7x +
      splash_ui <- if (inherits(data, "teal_data_module")) {
    85 - 1x + 1x +
        data$ui(ns("teal_data_module"))
    86 - 7x + 7x +
      } else if (inherits(data, "teal_data")) {
    87 - 6x + 6x +
        div()
    @@ -10296,42 +10544,48 @@

    teal coverage - 68.02%

    89 - 7x + 7x +
      ui_teal(
    90 - 7x + 7x +
        id = ns("teal"),
    91 - 7x + 7x +
        splash_ui = div(splash_ui, uiOutput(ns("error"))),
    92 - 7x + 7x +
        title = title,
    93 - 7x + 7x +
        header = header,
    94 - 7x + 7x +
        footer = footer
    @@ -10380,28 +10634,32 @@

    teal coverage - 68.02%

    101 - 15x + 15x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    102 - 15x + 15x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    103 - 15x + 15x +
      checkmate::assert_class(modules, "teal_modules")
    104 - 15x + 15x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -10415,14 +10673,16 @@

    teal coverage - 68.02%

    106 - 15x + 15x +
      moduleServer(id, function(input, output, session) {
    107 - 15x + 15x +
        logger::log_trace("srv_teal_with_splash initializing module with data.")
    @@ -10436,7 +10696,8 @@

    teal coverage - 68.02%

    109 - 15x + 15x +
        if (getOption("teal.show_js_log", default = FALSE)) {
    @@ -10478,28 +10739,32 @@

    teal coverage - 68.02%

    115 - 15x + 15x +
        teal_data_rv <- if (inherits(data, "teal_data_module")) {
    116 - 10x + 10x +
          data <- data$server(id = "teal_data_module")
    117 - 10x + 10x +
          if (!is.reactive(data)) {
    118 - 1x + 1x +
            stop("The `teal_data_module` passed to `data` must return a reactive expression.", call. = FALSE)
    @@ -10513,21 +10778,24 @@

    teal coverage - 68.02%

    120 - 9x + 9x +
          data
    121 - 15x + 15x +
        } else if (inherits(data, "teal_data")) {
    122 - 5x + 5x +
          reactiveVal(data)
    @@ -10548,7 +10816,8 @@

    teal coverage - 68.02%

    125 - 14x + 14x +
        teal_data_rv_validate <- reactive({
    @@ -10562,7 +10831,8 @@

    teal coverage - 68.02%

    127 - 11x + 11x +
          data <- tryCatch(teal_data_rv(), error = function(e) e)
    @@ -10583,7 +10853,8 @@

    teal coverage - 68.02%

    130 - 11x + 11x +
          if (inherits(data, "shiny.silent.error") && identical(data$message, "")) {
    @@ -10618,56 +10889,64 @@

    teal coverage - 68.02%

    135 - 11x + 11x +
          if (inherits(data, "qenv.error")) {
    136 - 2x + 2x +
            validate(
    137 - 2x + 2x +
              need(
    138 - 2x + 2x +
                FALSE,
    139 - 2x + 2x +
                paste(
    140 - 2x + 2x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    141 - 2x + 2x +
                  paste(data$message, collapse = "\n"),
    142 - 2x + 2x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -10716,56 +10995,64 @@

    teal coverage - 68.02%

    149 - 9x + 9x +
          if (inherits(data, "error")) {
    150 - 1x + 1x +
            validate(
    151 - 1x + 1x +
              need(
    152 - 1x + 1x +
                FALSE,
    153 - 1x + 1x +
                paste(
    154 - 1x + 1x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    155 - 1x + 1x +
                  paste(data$message, collpase = "\n"),
    156 - 1x + 1x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -10807,56 +11094,64 @@

    teal coverage - 68.02%

    162 - 8x + 8x +
          validate(
    163 - 8x + 8x +
            need(
    164 - 8x + 8x +
              inherits(data, "teal_data"),
    165 - 8x + 8x +
              paste(
    166 - 8x + 8x +
                "Error: `teal_data_module` passed to `data` failed to return `teal_data` object, returned",
    167 - 8x + 8x +
                toString(sQuote(class(data))),
    168 - 8x + 8x +
                "instead.",
    169 - 8x + 8x +
                "\n Check your inputs or contact app developer if error persists."
    @@ -10891,14 +11186,16 @@

    teal coverage - 68.02%

    174 - 5x + 5x +
          if (!length(teal.data::datanames(data))) {
    175 - 1x + 1x +
            warning("`data` object has no datanames. Default datanames are set using `teal_data`'s environment.")
    @@ -10919,21 +11216,24 @@

    teal coverage - 68.02%

    178 - 5x + 5x +
          is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    179 - 5x + 5x +
          if (!isTRUE(is_modules_ok)) {
    180 - 1x + 1x +
            validate(need(isTRUE(is_modules_ok), sprintf("%s. Contact app developer.", is_modules_ok)))
    @@ -10954,42 +11254,48 @@

    teal coverage - 68.02%

    183 - 4x + 4x +
          is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    184 - 4x + 4x +
          if (!isTRUE(is_filter_ok)) {
    185 - 1x + 1x +
            showNotification(
    186 - 1x + 1x +
              "Some filters were not applied because of incompatibility with data. Contact app developer.",
    187 - 1x + 1x +
              type = "warning",
    188 - 1x + 1x +
              duration = 10
    @@ -11003,7 +11309,8 @@

    teal coverage - 68.02%

    190 - 1x + 1x +
            warning(is_filter_ok)
    @@ -11024,7 +11331,8 @@

    teal coverage - 68.02%

    193 - 4x + 4x +
          teal_data_rv()
    @@ -11045,7 +11353,8 @@

    teal coverage - 68.02%

    196 - 14x + 14x +
        output$error <- renderUI({
    @@ -11087,14 +11396,16 @@

    teal coverage - 68.02%

    202 - 14x + 14x +
        res <- srv_teal(id = "teal", modules = modules, teal_data_rv = teal_data_rv_validate, filter = filter)
    203 - 14x + 14x +
        logger::log_trace("srv_teal_with_splash initialized module with data.")
    @@ -11108,7 +11419,8 @@

    teal coverage - 68.02%

    205 - 14x + 14x +
        res
    @@ -11184,28 +11496,32 @@

    teal coverage - 68.02%

    8 - 6x + 6x +
      vapply(
    9 - 6x + 6x +
        utils::sessionInfo()$otherPkgs,
    10 - 6x + 6x +
        function(x) {
    11 - 36x + 36x +
          paste0("library(", x$Package, ")")
    @@ -11219,7 +11535,8 @@

    teal coverage - 68.02%

    13 - 6x + 6x +
        character(1)
    @@ -11240,21 +11557,24 @@

    teal coverage - 68.02%

    16 - 6x + 6x +
        rev() %>%
    17 - 6x + 6x +
        paste0(sep = "\n") %>%
    18 - 6x + 6x +
        paste0(collapse = "")
    @@ -11296,21 +11616,24 @@

    teal coverage - 68.02%

    24 - 10x + 10x +
      code_string <- getOption("teal.load_nest_code")
    25 - 10x + 10x +
      if (is.character(code_string)) {
    26 - 2x + 2x +
        code_string
    @@ -11324,7 +11647,8 @@

    teal coverage - 68.02%

    28 - 8x + 8x +
        "# Add any code to install/load your NEST environment here\n"
    @@ -11464,21 +11788,24 @@

    teal coverage - 68.02%

    48 - 4x + 4x +
      str_prepro <-
    49 - 4x + 4x +
        teal.data:::get_code_dependency(attr(datasets, "preprocessing_code"), names = datanames, check_names = FALSE)
    50 - 4x + 4x +
      if (length(str_prepro) == 0) {
    @@ -11499,7 +11826,8 @@

    teal coverage - 68.02%

    53 - 4x + 4x +
        str_prepro <- paste(str_prepro, collapse = "\n")
    @@ -11527,35 +11855,40 @@

    teal coverage - 68.02%

    57 - 4x + 4x +
      str_hash <- vapply(datanames, function(dataname) {
    58 - 6x + 6x +
        sprintf(
    59 - 6x + 6x +
          "stopifnot(%s == %s)",
    60 - 6x + 6x +
          deparse1(bquote(rlang::hash(.(as.name(dataname))))),
    61 - 6x + 6x +
          deparse1(hashes[[dataname]])
    @@ -11569,14 +11902,16 @@

    teal coverage - 68.02%

    63 - 4x + 4x +
      }, character(1))
    64 - 4x + 4x +
      str_hash <- paste(str_hash, collapse = "\n")
    @@ -11597,21 +11932,24 @@

    teal coverage - 68.02%

    67 - 4x + 4x +
      str_filter <- teal.slice::get_filter_expr(datasets, datanames)
    68 - 4x + 4x +
      if (str_filter == "") {
    69 - 2x + 2x +
        str_filter <- character(0)
    @@ -11639,14 +11977,16 @@

    teal coverage - 68.02%

    73 - 4x + 4x +
      str_code <- paste(c(str_prepro, str_hash, str_filter), collapse = "\n\n")
    74 - 4x + 4x +
      sprintf("%s\n", str_code)
    @@ -12576,42 +12916,48 @@

    teal coverage - 68.02%

    131 - 143x + 143x +
      checkmate::assert_string(label)
    132 - 140x + 140x +
      if (label == "global_filters") {
    133 - 1x + 1x +
        stop(
    134 - 1x + 1x +
          sprintf("module(label = \"%s\", ...\n  ", label),
    135 - 1x + 1x +
          "Label 'global_filters' is reserved in teal. Please change to something else.",
    136 - 1x + 1x +
          call. = FALSE
    @@ -12632,7 +12978,8 @@

    teal coverage - 68.02%

    139 - 139x + 139x +
      if (label == "Report previewer") {
    @@ -12695,35 +13042,40 @@

    teal coverage - 68.02%

    148 - 139x + 139x +
      checkmate::assert_function(server)
    149 - 139x + 139x +
      server_formals <- names(formals(server))
    150 - 139x + 139x +
      if (!(
    151 - 139x + 139x +
        "id" %in% server_formals ||
    152 - 139x + 139x +
          all(c("input", "output", "session") %in% server_formals)
    @@ -12737,70 +13089,80 @@

    teal coverage - 68.02%

    154 - 2x + 2x +
        stop(
    155 - 2x + 2x +
          "\nmodule() `server` argument requires a function with following arguments:",
    156 - 2x + 2x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    157 - 2x + 2x +
          "\n - input, output, session (not recommended) - then `shiny::callModule` will be used to call a module.",
    158 - 2x + 2x +
          "\n\nFollowing arguments can be used optionaly:",
    159 - 2x + 2x +
          "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
    160 - 2x + 2x +
          "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
    161 - 2x + 2x +
          "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
    162 - 2x + 2x +
          "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
    163 - 2x + 2x +
          "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
    @@ -12821,42 +13183,48 @@

    teal coverage - 68.02%

    166 - 137x + 137x +
      if ("datasets" %in% server_formals) {
    167 - 2x + 2x +
        warning(
    168 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    169 - 2x + 2x +
          "`datasets` argument in the server is deprecated and will be removed in the next release. ",
    170 - 2x + 2x +
          "Please use `data` instead.",
    171 - 2x + 2x +
          call. = FALSE
    @@ -12898,56 +13266,64 @@

    teal coverage - 68.02%

    177 - 137x + 137x +
      checkmate::assert_function(ui)
    178 - 137x + 137x +
      ui_formals <- names(formals(ui))
    179 - 137x + 137x +
      if (!"id" %in% ui_formals) {
    180 - 1x + 1x +
        stop(
    181 - 1x + 1x +
          "\nmodule() `ui` argument requires a function with following arguments:",
    182 - 1x + 1x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    183 - 1x + 1x +
          "\n\nFollowing arguments can be used optionally:",
    184 - 1x + 1x +
          "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
    @@ -12968,42 +13344,48 @@

    teal coverage - 68.02%

    187 - 136x + 136x +
      if (any(c("data", "datasets") %in% ui_formals)) {
    188 - 2x + 2x +
        stop(
    189 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    190 - 2x + 2x +
          "UI with `data` or `datasets` argument is no longer accepted.\n  ",
    191 - 2x + 2x +
          "If some UI inputs depend on data, please move the logic to your server instead.\n  ",
    192 - 2x + 2x +
          "Possible solutions are renderUI() or updateXyzInput() functions."
    @@ -13045,7 +13427,8 @@

    teal coverage - 68.02%

    198 - 134x + 134x +
      if (!missing(filters)) {
    @@ -13115,21 +13498,24 @@

    teal coverage - 68.02%

    208 - 134x + 134x +
      if (!is.element("data", server_formals) && !is.null(datanames)) {
    209 - 50x + 50x +
        message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
    210 - 50x + 50x +
        datanames <- NULL
    @@ -13143,7 +13529,8 @@

    teal coverage - 68.02%

    212 - 134x + 134x +
      checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
    @@ -13164,49 +13551,56 @@

    teal coverage - 68.02%

    215 - 133x + 133x +
      checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
    216 - 131x + 131x +
      srv_extra_args <- setdiff(names(server_args), server_formals)
    217 - 131x + 131x +
      if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
    218 - 1x + 1x +
        stop(
    219 - 1x + 1x +
          "\nFollowing `server_args` elements have no equivalent in the formals of the server:\n",
    220 - 1x + 1x +
          paste(paste(" -", srv_extra_args), collapse = "\n"),
    221 - 1x + 1x +
          "\n\nUpdate the server arguments by including above or add `...`"
    @@ -13241,49 +13635,56 @@

    teal coverage - 68.02%

    226 - 130x + 130x +
      checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
    227 - 128x + 128x +
      ui_extra_args <- setdiff(names(ui_args), ui_formals)
    228 - 128x + 128x +
      if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
    229 - 1x + 1x +
        stop(
    230 - 1x + 1x +
          "\nFollowing `ui_args` elements have no equivalent in the formals of UI:\n",
    231 - 1x + 1x +
          paste(paste(" -", ui_extra_args), collapse = "\n"),
    232 - 1x + 1x +
          "\n\nUpdate the UI arguments by including above or add `...`"
    @@ -13311,35 +13712,40 @@

    teal coverage - 68.02%

    236 - 127x + 127x +
      structure(
    237 - 127x + 127x +
        list(
    238 - 127x + 127x +
          label = label,
    239 - 127x + 127x +
          server = server, ui = ui, datanames = unique(datanames),
    240 - 127x + 127x +
          server_args = server_args, ui_args = ui_args
    @@ -13353,7 +13759,8 @@

    teal coverage - 68.02%

    242 - 127x + 127x +
        class = "teal_module"
    @@ -13409,42 +13816,48 @@

    teal coverage - 68.02%

    250 - 99x + 99x +
      checkmate::assert_string(label)
    251 - 97x + 97x +
      submodules <- list(...)
    252 - 97x + 97x +
      if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
    253 - 2x + 2x +
        stop(
    254 - 2x + 2x +
          "The only character argument to modules() must be 'label' and it must be named, ",
    255 - 2x + 2x +
          "change modules('lab', ...) to modules(label = 'lab', ...)"
    @@ -13472,7 +13885,8 @@

    teal coverage - 68.02%

    259 - 95x + 95x +
      checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -13493,42 +13907,48 @@

    teal coverage - 68.02%

    262 - 92x + 92x +
      labels <- vapply(submodules, function(submodule) submodule$label, character(1))
    263 - 92x + 92x +
      names(submodules) <- make.unique(gsub("[^[:alnum:]]+", "_", labels), sep = "_")
    264 - 92x + 92x +
      structure(
    265 - 92x + 92x +
        list(
    266 - 92x + 92x +
          label = label,
    267 - 92x + 92x +
          children = submodules
    @@ -13542,7 +13962,8 @@

    teal coverage - 68.02%

    269 - 92x + 92x +
        class = "teal_modules"
    @@ -13605,7 +14026,8 @@

    teal coverage - 68.02%

    278 - 3x + 3x +
      paste0(paste(rep(" ", indent), collapse = ""), "+ ", x$label, "\n", collapse = "")
    @@ -13710,28 +14132,32 @@

    teal coverage - 68.02%

    293 - 1x + 1x +
      paste(
    294 - 1x + 1x +
        c(
    295 - 1x + 1x +
          paste0(rep(" ", indent), "+ ", x$label, "\n"),
    296 - 1x + 1x +
          unlist(lapply(x$children, format, indent = indent + 1, ...))
    @@ -13745,7 +14171,8 @@

    teal coverage - 68.02%

    298 - 1x + 1x +
        collapse = ""
    @@ -13878,42 +14305,48 @@

    teal coverage - 68.02%

    317 - 8x + 8x +
      checkmate::assert_class(modules, "teal_modules")
    318 - 6x + 6x +
      checkmate::assert_class(module, "teal_module")
    319 - 4x + 4x +
      modules$children <- c(modules$children, list(module))
    320 - 4x + 4x +
      labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
    321 - 4x + 4x +
      names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
    322 - 4x + 4x +
      modules
    @@ -14018,7 +14451,8 @@

    teal coverage - 68.02%

    337 - 20x + 20x +
      if (inherits(modules, class)) {
    @@ -14032,28 +14466,32 @@

    teal coverage - 68.02%

    339 - 20x + 20x +
      } else if (inherits(modules, "teal_module")) {
    340 - 11x + 11x +
        NULL
    341 - 9x + 9x +
      } else if (inherits(modules, "teal_modules")) {
    342 - 9x + 9x +
        Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
    @@ -14263,49 +14701,56 @@

    teal coverage - 68.02%

    372 - 286x + 286x +
      checkmate::assert_string(arg)
    373 - 283x + 283x +
      if (inherits(modules, "teal_modules")) {
    374 - 29x + 29x +
        any(unlist(lapply(modules$children, is_arg_used, arg)))
    375 - 254x + 254x +
      } else if (inherits(modules, "teal_module")) {
    376 - 43x + 43x +
        is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
    377 - 211x + 211x +
      } else if (is.function(modules)) {
    378 - 209x + 209x +
        isTRUE(arg %in% names(formals(modules)))
    @@ -14319,7 +14764,8 @@

    teal coverage - 68.02%

    380 - 2x + 2x +
        stop("is_arg_used function not implemented for this object")
    @@ -14431,28 +14877,32 @@

    teal coverage - 68.02%

    396 - 12x + 12x +
      checkmate::assert_multi_class(modules, c("teal_module", "teal_modules"))
    397 - 12x + 12x +
      checkmate::assert_int(depth, lower = 0)
    398 - 11x + 11x +
      if (inherits(modules, "teal_modules")) {
    399 - 4x + 4x +
        max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
    @@ -14466,7 +14916,8 @@

    teal coverage - 68.02%

    401 - 7x + 7x +
        depth
    @@ -15417,21 +15868,24 @@

    teal coverage - 68.02%

    119 - 50x + 50x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    120 - 50x + 50x +
      checkmate::assert_class(reporter, "Reporter")
    121 - 49x + 49x +
      UseMethod("srv_nested_tabs", modules)
    @@ -15529,7 +15983,8 @@

    teal coverage - 68.02%

    135 - 22x + 22x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    @@ -15543,14 +15998,16 @@

    teal coverage - 68.02%

    137 - 22x + 22x +
      moduleServer(id = id, module = function(input, output, session) {
    138 - 22x + 22x +
        logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
    @@ -15564,70 +16021,80 @@

    teal coverage - 68.02%

    140 - 22x + 22x +
        labels <- vapply(modules$children, `[[`, character(1), "label")
    141 - 22x + 22x +
        modules_reactive <- sapply(
    142 - 22x + 22x +
          names(modules$children),
    143 - 22x + 22x +
          function(module_id) {
    144 - 33x + 33x +
            srv_nested_tabs(
    145 - 33x + 33x +
              id = module_id,
    146 - 33x + 33x +
              datasets = datasets[[labels[module_id]]],
    147 - 33x + 33x +
              modules = modules$children[[module_id]],
    148 - 33x + 33x +
              is_module_specific = is_module_specific,
    149 - 33x + 33x +
              reporter = reporter
    @@ -15648,7 +16115,8 @@

    teal coverage - 68.02%

    152 - 22x + 22x +
          simplify = FALSE
    @@ -15676,21 +16144,24 @@

    teal coverage - 68.02%

    156 - 22x + 22x +
        input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
    157 - 22x + 22x +
        get_active_module <- reactive({
    158 - 12x + 12x +
          if (length(modules$children) == 1L) {
    @@ -15704,7 +16175,8 @@

    teal coverage - 68.02%

    160 - 1x + 1x +
            modules_reactive[[1]]()
    @@ -15725,7 +16197,8 @@

    teal coverage - 68.02%

    163 - 11x + 11x +
            modules_reactive[[input_validated()]]()
    @@ -15753,7 +16226,8 @@

    teal coverage - 68.02%

    167 - 22x + 22x +
        get_active_module
    @@ -15809,14 +16283,16 @@

    teal coverage - 68.02%

    175 - 27x + 27x +
      checkmate::assert_class(datasets, "FilteredData")
    176 - 27x + 27x +
      logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
    @@ -15830,14 +16306,16 @@

    teal coverage - 68.02%

    178 - 27x + 27x +
      moduleServer(id = id, module = function(input, output, session) {
    179 - 27x + 27x +
        if (!is.null(modules$datanames) && is_module_specific) {
    @@ -15893,35 +16371,40 @@

    teal coverage - 68.02%

    187 - 27x + 27x +
        trigger_data <- reactiveVal(1L)
    188 - 27x + 27x +
        trigger_module <- reactiveVal(NULL)
    189 - 27x + 27x +
        output$data_reactive <- renderUI({
    190 - 17x + 17x +
          lapply(datasets$datanames(), function(x) {
    191 - 21x + 21x +
            datasets$get_data(x, filtered = TRUE)
    @@ -15935,14 +16418,16 @@

    teal coverage - 68.02%

    193 - 17x + 17x +
          isolate(trigger_data(trigger_data() + 1))
    194 - 17x + 17x +
          isolate(trigger_module(TRUE))
    @@ -15956,7 +16441,8 @@

    teal coverage - 68.02%

    196 - 17x + 17x +
          NULL
    @@ -15984,14 +16470,16 @@

    teal coverage - 68.02%

    200 - 27x + 27x +
        args <- c(list(id = "module"), modules$server_args)
    201 - 27x + 27x +
        if (is_arg_used(modules$server, "reporter")) {
    @@ -16019,14 +16507,16 @@

    teal coverage - 68.02%

    205 - 27x + 27x +
        if (is_arg_used(modules$server, "datasets")) {
    206 - 1x + 1x +
          args <- c(args, datasets = datasets)
    @@ -16047,21 +16537,24 @@

    teal coverage - 68.02%

    209 - 27x + 27x +
        if (is_arg_used(modules$server, "data")) {
    210 - 7x + 7x +
          data <- eventReactive(trigger_data(), .datasets_to_data(modules, datasets))
    211 - 7x + 7x +
          args <- c(args, data = list(data))
    @@ -16082,21 +16575,24 @@

    teal coverage - 68.02%

    214 - 27x + 27x +
        if (is_arg_used(modules$server, "filter_panel_api")) {
    215 - 2x + 2x +
          filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
    216 - 2x + 2x +
          args <- c(args, filter_panel_api = filter_panel_api)
    @@ -16124,49 +16620,56 @@

    teal coverage - 68.02%

    220 - 27x + 27x +
        observeEvent(
    221 - 27x + 27x +
          ignoreNULL = TRUE,
    222 - 27x + 27x +
          once = TRUE,
    223 - 27x + 27x +
          eventExpr = trigger_module(),
    224 - 27x + 27x +
          handlerExpr = {
    225 - 17x + 17x +
            module_output <- if (is_arg_used(modules$server, "id")) {
    226 - 17x + 17x +
              do.call(modules$server, args)
    @@ -16215,7 +16718,8 @@

    teal coverage - 68.02%

    233 - 27x + 27x +
        reactive(modules)
    @@ -16334,14 +16838,16 @@

    teal coverage - 68.02%

    250 - 4x + 4x +
      checkmate::assert_class(module, "teal_module")
    251 - 4x + 4x +
      checkmate::assert_class(datasets, "FilteredData")
    @@ -16355,14 +16861,16 @@

    teal coverage - 68.02%

    253 - 4x + 4x +
      datanames <- if (is.null(module$datanames) || identical(module$datanames, "all")) {
    254 - 1x + 1x +
        datasets$datanames()
    @@ -16376,21 +16884,24 @@

    teal coverage - 68.02%

    256 - 3x + 3x +
        include_parent_datanames(
    257 - 3x + 3x +
          module$datanames,
    258 - 3x + 3x +
          datasets$get_join_keys()
    @@ -16425,7 +16936,8 @@

    teal coverage - 68.02%

    263 - 4x + 4x +
      data <- sapply(datanames, function(x) datasets$get_data(x, filtered = TRUE), simplify = FALSE)
    @@ -16439,7 +16951,8 @@

    teal coverage - 68.02%

    265 - 4x + 4x +
      hashes <- calculate_hashes(datanames, datasets)
    @@ -16453,28 +16966,32 @@

    teal coverage - 68.02%

    267 - 4x + 4x +
      code <- c(
    268 - 4x + 4x +
        get_rcode_str_install(),
    269 - 4x + 4x +
        get_rcode_libraries(),
    270 - 4x + 4x +
        get_datasets_code(datanames, datasets, hashes)
    @@ -16502,21 +17019,24 @@

    teal coverage - 68.02%

    274 - 4x + 4x +
      data <- do.call(
    275 - 4x + 4x +
        teal.data::teal_data,
    276 - 4x + 4x +
        args = c(data, code = list(code), join_keys = list(datasets$get_join_keys()[datanames]))
    @@ -16537,14 +17057,16 @@

    teal coverage - 68.02%

    279 - 4x + 4x +
      data@verified <- attr(datasets, "verification_status")
    280 - 4x + 4x +
      data
    @@ -16628,7 +17150,8 @@

    teal coverage - 68.02%

    292 - 7x + 7x +
      sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
    @@ -17369,14 +17892,16 @@

    teal coverage - 68.02%

    104 - 36x + 36x +
      dots <- list(...)
    105 - 2x + 2x +
      if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
    @@ -17390,21 +17915,24 @@

    teal coverage - 68.02%

    107 - 34x + 34x +
      messages <- extract_validator(dots, header)
    108 - 34x + 34x +
      failings <- if (!any_names(dots)) {
    109 - 29x + 29x +
        add_header(messages, header)
    @@ -17418,7 +17946,8 @@

    teal coverage - 68.02%

    111 - 5x + 5x +
        unlist(messages)
    @@ -17439,7 +17968,8 @@

    teal coverage - 68.02%

    114 - 34x + 34x +
      shiny::validate(shiny::need(is.null(failings), failings))
    @@ -17509,7 +18039,8 @@

    teal coverage - 68.02%

    124 - 118x + 118x +
      all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
    @@ -17572,7 +18103,8 @@

    teal coverage - 68.02%

    133 - 49x + 49x +
      x$.__enclos_env__$private$enabled
    @@ -17628,14 +18160,16 @@

    teal coverage - 68.02%

    141 - 113x + 113x +
      if (inherits(iv, "InputValidator")) {
    142 - 49x + 49x +
        add_header(gather_messages(iv), header)
    @@ -17649,14 +18183,16 @@

    teal coverage - 68.02%

    144 - 58x + 58x +
        if (is.null(names(iv))) names(iv) <- rep("", length(iv))
    145 - 64x + 64x +
        mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
    @@ -17719,28 +18255,32 @@

    teal coverage - 68.02%

    154 - 49x + 49x +
      if (validator_enabled(iv)) {
    155 - 46x + 46x +
        status <- iv$validate()
    156 - 46x + 46x +
        failing_inputs <- Filter(Negate(is.null), status)
    157 - 46x + 46x +
        unique(lapply(failing_inputs, function(x) x[["message"]]))
    @@ -17754,14 +18294,16 @@

    teal coverage - 68.02%

    159 - 3x + 3x +
        warning("Validator is disabled and will be omitted.")
    160 - 3x + 3x +
        list()
    @@ -17817,21 +18359,24 @@

    teal coverage - 68.02%

    168 - 78x + 78x +
      ans <- unlist(messages)
    169 - 78x + 78x +
      if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
    170 - 31x + 31x +
        ans <- c(paste0(header, "\n"), ans, "\n")
    @@ -17845,7 +18390,8 @@

    teal coverage - 68.02%

    172 - 78x + 78x +
      ans
    @@ -17894,21 +18440,24 @@

    teal coverage - 68.02%

    179 - 103x + 103x +
      any(
    180 - 103x + 103x +
        if (is.list(x)) {
    181 - 58x + 58x +
          if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
    @@ -17922,7 +18471,8 @@

    teal coverage - 68.02%

    183 - 40x + 40x +
          FALSE
    @@ -18313,7 +18863,8 @@

    teal coverage - 68.02%

    52 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -18327,7 +18878,8 @@

    teal coverage - 68.02%

    54 - 7x + 7x +
      checkmate::assert_multi_class(splash_ui, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18341,7 +18893,8 @@

    teal coverage - 68.02%

    56 - 7x + 7x +
      if (is.character(title)) {
    @@ -18362,7 +18915,8 @@

    teal coverage - 68.02%

    59 - 7x + 7x +
        validate_app_title_tag(title)
    @@ -18383,28 +18937,32 @@

    teal coverage - 68.02%

    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "header",
    64 - 7x + 7x +
        checkmate::check_string(header),
    65 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18418,7 +18976,8 @@

    teal coverage - 68.02%

    67 - 7x + 7x +
      if (checkmate::test_string(header)) {
    @@ -18446,28 +19005,32 @@

    teal coverage - 68.02%

    71 - 7x + 7x +
      checkmate::assert(
    72 - 7x + 7x +
        .var.name = "footer",
    73 - 7x + 7x +
        checkmate::check_string(footer),
    74 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18481,7 +19044,8 @@

    teal coverage - 68.02%

    76 - 7x + 7x +
      if (checkmate::test_string(footer)) {
    @@ -18509,7 +19073,8 @@

    teal coverage - 68.02%

    80 - 7x + 7x +
      ns <- NS(id)
    @@ -18530,7 +19095,8 @@

    teal coverage - 68.02%

    83 - 7x + 7x +
      splash_ui <- div(
    @@ -18544,7 +19110,8 @@

    teal coverage - 68.02%

    85 - 7x + 7x +
        id = ns("main_ui_container"),
    @@ -18565,7 +19132,8 @@

    teal coverage - 68.02%

    88 - 7x + 7x +
        div(splash_ui)
    @@ -18600,35 +19168,40 @@

    teal coverage - 68.02%

    93 - 7x + 7x +
      shiny_busy_message_panel <- conditionalPanel(
    94 - 7x + 7x +
        condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint
    95 - 7x + 7x +
        div(
    96 - 7x + 7x +
          icon("arrows-rotate", "spin fa-spin"),
    97 - 7x + 7x +
          "Computing ...",
    @@ -18642,7 +19215,8 @@

    teal coverage - 68.02%

    99 - 7x + 7x +
          class = "shinybusymessage"
    @@ -18670,98 +19244,112 @@

    teal coverage - 68.02%

    103 - 7x + 7x +
      fluidPage(
    104 - 7x + 7x +
        title = title,
    105 - 7x + 7x +
        theme = get_teal_bs_theme(),
    106 - 7x + 7x +
        include_teal_css_js(),
    107 - 7x + 7x +
        tags$header(header),
    108 - 7x + 7x +
        tags$hr(class = "my-2"),
    109 - 7x + 7x +
        shiny_busy_message_panel,
    110 - 7x + 7x +
        splash_ui,
    111 - 7x + 7x +
        tags$hr(),
    112 - 7x + 7x +
        tags$footer(
    113 - 7x + 7x +
          div(
    114 - 7x + 7x +
            footer,
    115 - 7x + 7x +
            teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
    116 - 7x + 7x +
            textOutput(ns("identifier"))
    @@ -18824,21 +19412,24 @@

    teal coverage - 68.02%

    125 - 19x + 19x +
      stopifnot(is.reactive(teal_data_rv))
    126 - 18x + 18x +
      moduleServer(id, function(input, output, session) {
    127 - 18x + 18x +
        logger::log_trace("srv_teal initializing the module.")
    @@ -18852,14 +19443,16 @@

    teal coverage - 68.02%

    129 - 18x + 18x +
        output$identifier <- renderText(
    130 - 18x + 18x +
          paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
    @@ -18880,28 +19473,32 @@

    teal coverage - 68.02%

    133 - 18x + 18x +
        teal.widgets::verbatim_popup_srv(
    134 - 18x + 18x +
          "sessionInfo",
    135 - 18x + 18x +
          verbatim_content = utils::capture.output(utils::sessionInfo()),
    136 - 18x + 18x +
          title = "SessionInfo"
    @@ -18929,7 +19526,8 @@

    teal coverage - 68.02%

    140 - 18x + 18x +
        run_js_files(files = "init.js")
    @@ -18964,35 +19562,40 @@

    teal coverage - 68.02%

    145 - 18x + 18x +
        get_client_timezone(session$ns)
    146 - 18x + 18x +
        observeEvent(
    147 - 18x + 18x +
          eventExpr = input$timezone,
    148 - 18x + 18x +
          once = TRUE,
    149 - 18x + 18x +
          handlerExpr = {
    @@ -19034,14 +19637,16 @@

    teal coverage - 68.02%

    155 - 18x + 18x +
        reporter <- teal.reporter::Reporter$new()
    156 - 18x + 18x +
        if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
    @@ -19069,28 +19674,32 @@

    teal coverage - 68.02%

    160 - 18x + 18x +
        env <- environment()
    161 - 18x + 18x +
        datasets_reactive <- eventReactive(teal_data_rv(), {
    162 - 4x + 4x +
          env$progress <- shiny::Progress$new(session)
    163 - 4x + 4x +
          env$progress$set(0.25, message = "Setting data")
    @@ -19118,7 +19727,8 @@

    teal coverage - 68.02%

    167 - 4x + 4x +
          datasets_singleton <- teal_data_to_filtered_data(teal_data_rv())
    @@ -19139,14 +19749,16 @@

    teal coverage - 68.02%

    170 - 4x + 4x +
          filter_global <- Filter(function(x) x$id %in% attr(filter, "mapping")$global_filters, filter)
    171 - 4x + 4x +
          datasets_singleton$set_filter_state(filter_global)
    @@ -19160,49 +19772,56 @@

    teal coverage - 68.02%

    173 - 4x + 4x +
          module_datasets <- function(modules) {
    174 - 18x + 18x +
            if (inherits(modules, "teal_modules")) {
    175 - 7x + 7x +
              datasets <- lapply(modules$children, module_datasets)
    176 - 7x + 7x +
              labels <- vapply(modules$children, `[[`, character(1), "label")
    177 - 7x + 7x +
              names(datasets) <- labels
    178 - 7x + 7x +
              datasets
    179 - 11x + 11x +
            } else if (isTRUE(attr(filter, "module_specific"))) {
    @@ -19223,28 +19842,32 @@

    teal coverage - 68.02%

    182 - 3x + 3x +
              datanames <- if (is.null(modules$datanames) || modules$datanames == "all") {
    183 - 3x + 3x +
                include_parent_datanames(
    184 - 3x + 3x +
                  teal_data_datanames(teal_data_rv()),
    185 - 3x + 3x +
                  teal.data::join_keys(teal_data_rv())
    @@ -19286,7 +19909,8 @@

    teal coverage - 68.02%

    191 - 3x + 3x +
              datasets_module <- teal_data_to_filtered_data(teal_data_rv(), datanames = datanames)
    @@ -19314,7 +19938,8 @@

    teal coverage - 68.02%

    195 - 3x + 3x +
              slices <- Filter(x = filter, f = function(x) {
    @@ -19342,42 +19967,48 @@

    teal coverage - 68.02%

    199 - 3x + 3x +
              include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
    200 - 3x + 3x +
              exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
    201 - 3x + 3x +
              slices$include_varnames <- include_varnames
    202 - 3x + 3x +
              slices$exclude_varnames <- exclude_varnames
    203 - 3x + 3x +
              datasets_module$set_filter_state(slices)
    204 - 3x + 3x +
              datasets_module
    @@ -19391,7 +20022,8 @@

    teal coverage - 68.02%

    206 - 8x + 8x +
              datasets_singleton
    @@ -19412,7 +20044,8 @@

    teal coverage - 68.02%

    209 - 4x + 4x +
          module_datasets(modules)
    @@ -19475,7 +20108,8 @@

    teal coverage - 68.02%

    218 - 18x + 18x +
        observeEvent(datasets_reactive(), once = TRUE, {
    @@ -20265,35 +20899,40 @@

    teal coverage - 68.02%

    77 - 78x + 78x +
      shiny::isolate({
    78 - 78x + 78x +
        checkmate::assert_flag(allow_add)
    79 - 78x + 78x +
        checkmate::assert_flag(module_specific)
    80 - 32x + 32x +
        if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
    81 - 75x + 75x +
        checkmate::assert_string(app_id, null.ok = TRUE)
    @@ -20307,14 +20946,16 @@

    teal coverage - 68.02%

    83 - 75x + 75x +
        slices <- list(...)
    84 - 75x + 75x +
        all_slice_id <- vapply(slices, `[[`, character(1L), "id")
    @@ -20328,14 +20969,16 @@

    teal coverage - 68.02%

    86 - 75x + 75x +
        if (missing(mapping)) {
    87 - 46x + 46x +
          mapping <- list(global_filters = all_slice_id)
    @@ -20349,14 +20992,16 @@

    teal coverage - 68.02%

    89 - 75x + 75x +
        if (!module_specific) {
    90 - 71x + 71x +
          mapping[setdiff(names(mapping), "global_filters")] <- NULL
    @@ -20377,42 +21022,48 @@

    teal coverage - 68.02%

    93 - 75x + 75x +
        failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
    94 - 75x + 75x +
        if (length(failed_slice_id)) {
    95 - 1x + 1x +
          stop(sprintf(
    96 - 1x + 1x +
            "Filters in mapping don't match any available filter.\n %s not in %s",
    97 - 1x + 1x +
            toString(failed_slice_id),
    98 - 1x + 1x +
            toString(all_slice_id)
    @@ -20440,7 +21091,8 @@

    teal coverage - 68.02%

    102 - 74x + 74x +
        tss <- teal.slice::teal_slices(
    @@ -20454,28 +21106,32 @@

    teal coverage - 68.02%

    104 - 74x + 74x +
          exclude_varnames = exclude_varnames,
    105 - 74x + 74x +
          include_varnames = include_varnames,
    106 - 74x + 74x +
          count_type = count_type,
    107 - 74x + 74x +
          allow_add = allow_add
    @@ -20489,35 +21145,40 @@

    teal coverage - 68.02%

    109 - 74x + 74x +
        attr(tss, "mapping") <- mapping
    110 - 74x + 74x +
        attr(tss, "module_specific") <- module_specific
    111 - 74x + 74x +
        attr(tss, "app_id") <- app_id
    112 - 74x + 74x +
        class(tss) <- c("modules_teal_slices", class(tss))
    113 - 74x + 74x +
        tss
    @@ -20587,14 +21248,16 @@

    teal coverage - 68.02%

    123 - 10x + 10x +
      checkmate::assert_list(x)
    124 - 10x + 10x +
      lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
    @@ -20608,21 +21271,24 @@

    teal coverage - 68.02%

    126 - 10x + 10x +
      attrs <- attributes(unclass(x))
    127 - 10x + 10x +
      ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
    128 - 10x + 10x +
      do.call(teal_slices, c(ans, attrs))
    @@ -20874,28 +21540,32 @@

    teal coverage - 68.02%

    164 - 1x + 1x +
      checkmate::assert_class(filter, "teal_slices")
    165 - 1x + 1x +
      shiny::isolate({
    166 - 1x + 1x +
        filter_copy <- lapply(filter, function(slice) {
    167 - 2x + 2x +
          teal.slice::as.teal_slice(as.list(slice))
    @@ -20909,14 +21579,16 @@

    teal coverage - 68.02%

    169 - 1x + 1x +
        attributes(filter_copy) <- attributes(filter)
    170 - 1x + 1x +
        filter_copy
    @@ -21132,14 +21804,16 @@

    teal coverage - 68.02%

    28 - 9x + 9x +
      checkmate::assert_class(tss, "teal_slices")
    29 - 9x + 9x +
      checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
    @@ -21153,7 +21827,8 @@

    teal coverage - 68.02%

    31 - 9x + 9x +
      cat(format(tss, trim_lines = FALSE), "\n", file = file)
    @@ -21202,7 +21877,8 @@

    teal coverage - 68.02%

    38 - 9x + 9x +
      checkmate::assert_file_exists(file, access = "r", extension = "json")
    @@ -21216,56 +21892,64 @@

    teal coverage - 68.02%

    40 - 9x + 9x +
      tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
    41 - 9x + 9x +
      tss_json$slices <-
    42 - 9x + 9x +
        lapply(tss_json$slices, function(slice) {
    43 - 9x + 9x +
          for (field in c("selected", "choices")) {
    44 - 18x + 18x +
            if (!is.null(slice[[field]])) {
    45 - 12x + 12x +
              if (length(slice[[field]]) > 0) {
    46 - 9x + 9x +
                date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
    47 - 9x + 9x +
                time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
    @@ -21279,35 +21963,40 @@

    teal coverage - 68.02%

    49 - 9x + 9x +
                slice[[field]] <-
    50 - 9x + 9x +
                  if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
    51 - 3x + 3x +
                    as.Date(slice[[field]])
    52 - 9x + 9x +
                  } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
    53 - 3x + 3x +
                    as.POSIXct(slice[[field]], tz = "UTC")
    @@ -21321,7 +22010,8 @@

    teal coverage - 68.02%

    55 - 3x + 3x +
                    slice[[field]]
    @@ -21342,7 +22032,8 @@

    teal coverage - 68.02%

    58 - 3x + 3x +
                slice[[field]] <- character(0)
    @@ -21370,7 +22061,8 @@

    teal coverage - 68.02%

    62 - 9x + 9x +
          slice
    @@ -21391,7 +22083,8 @@

    teal coverage - 68.02%

    65 - 9x + 9x +
      tss_elements <- lapply(tss_json$slices, as.teal_slice)
    @@ -21405,7 +22098,8 @@

    teal coverage - 68.02%

    67 - 9x + 9x +
      do.call(teal_slices, c(tss_elements, tss_json$attributes))
    @@ -21754,42 +22448,48 @@

    teal coverage - 68.02%

    48 - 34x + 34x +
      lifecycle::deprecate_soft(
    49 - 34x + 34x +
        when = "0.15.0",
    50 - 34x + 34x +
        what = "tdata()",
    51 - 34x + 34x +
        details = paste(
    52 - 34x + 34x +
          "tdata is deprecated and will be removed in the next release. Use `teal_data` instead.\n",
    53 - 34x + 34x +
          "Please follow migration instructions https://github.com/insightsengineering/teal/discussions/987."
    @@ -21810,28 +22510,32 @@

    teal coverage - 68.02%

    56 - 34x + 34x +
      checkmate::assert_list(
    57 - 34x + 34x +
        data,
    58 - 34x + 34x +
        any.missing = FALSE, names = "unique",
    59 - 34x + 34x +
        types = c("data.frame", "reactive", "MultiAssayExperiment")
    @@ -21845,14 +22549,16 @@

    teal coverage - 68.02%

    61 - 30x + 30x +
      checkmate::assert_class(join_keys, "join_keys", null.ok = TRUE)
    62 - 29x + 29x +
      checkmate::assert_multi_class(code, c("character", "reactive"))
    @@ -21866,14 +22572,16 @@

    teal coverage - 68.02%

    64 - 28x + 28x +
      checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
    65 - 26x + 26x +
      checkmate::assert_subset(names(metadata), names(data))
    @@ -21887,14 +22595,16 @@

    teal coverage - 68.02%

    67 - 25x + 25x +
      if (is.reactive(code)) {
    68 - 9x + 9x +
        isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
    @@ -21922,21 +22632,24 @@

    teal coverage - 68.02%

    72 - 24x + 24x +
      for (x in names(data)) {
    73 - 47x + 47x +
        if (!is.reactive(data[[x]])) {
    74 - 31x + 31x +
          data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
    @@ -21971,21 +22684,24 @@

    teal coverage - 68.02%

    79 - 24x + 24x +
      attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
    80 - 24x + 24x +
      attr(data, "join_keys") <- join_keys
    81 - 24x + 24x +
      attr(data, "metadata") <- metadata
    @@ -22006,14 +22722,16 @@

    teal coverage - 68.02%

    84 - 24x + 24x +
      class(data) <- c("tdata", class(data))
    85 - 24x + 24x +
      data
    @@ -22153,14 +22871,16 @@

    teal coverage - 68.02%

    105 - 2x + 2x +
      checkmate::assert_class(data, "tdata")
    106 - 1x + 1x +
      list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
    @@ -22251,14 +22971,16 @@

    teal coverage - 68.02%

    119 - 7x + 7x +
      checkmate::assert_class(data, "tdata")
    120 - 5x + 5x +
      attr(data, "code")()
    @@ -22314,7 +23036,8 @@

    teal coverage - 68.02%

    128 - 2x + 2x +
      attr(data, "join_keys")
    @@ -22377,14 +23100,16 @@

    teal coverage - 68.02%

    137 - 4x + 4x +
      checkmate::assert_string(dataname)
    138 - 4x + 4x +
      UseMethod("get_metadata", data)
    @@ -22426,21 +23151,24 @@

    teal coverage - 68.02%

    144 - 4x + 4x +
      metadata <- attr(data, "metadata")
    145 - 4x + 4x +
      if (is.null(metadata)) {
    146 - 1x + 1x +
        return(NULL)
    @@ -22454,7 +23182,8 @@

    teal coverage - 68.02%

    148 - 3x + 3x +
      metadata[[dataname]]
    @@ -22699,14 +23428,16 @@

    teal coverage - 68.02%

    183 - 8x + 8x +
      if (inherits(x, "tdata")) {
    184 - 2x + 2x +
        return(x)
    @@ -22720,77 +23451,88 @@

    teal coverage - 68.02%

    186 - 6x + 6x +
      if (is.reactive(x)) {
    187 - 1x + 1x +
        checkmate::assert_class(isolate(x()), "teal_data")
    188 - 1x + 1x +
        datanames <- isolate(teal_data_datanames(x()))
    189 - 1x + 1x +
        datasets <- sapply(datanames, function(dataname) reactive(x()[[dataname]]), simplify = FALSE)
    190 - 1x + 1x +
        code <- reactive(teal.code::get_code(x()))
    191 - 1x + 1x +
        join_keys <- isolate(teal.data::join_keys(x()))
    192 - 5x + 5x +
      } else if (inherits(x, "teal_data")) {
    193 - 5x + 5x +
        datanames <- teal_data_datanames(x)
    194 - 5x + 5x +
        datasets <- sapply(datanames, function(dataname) reactive(x[[dataname]]), simplify = FALSE)
    195 - 5x + 5x +
        code <- reactive(teal.code::get_code(x))
    196 - 5x + 5x +
        join_keys <- isolate(teal.data::join_keys(x))
    @@ -22811,7 +23553,8 @@

    teal coverage - 68.02%

    199 - 6x + 6x +
      new_tdata(data = datasets, code = code, join_keys = join_keys)
    @@ -23160,14 +23903,16 @@

    teal coverage - 68.02%

    48 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    49 - 3x + 3x +
        observeEvent(input$show, {
    @@ -23251,7 +23996,8 @@

    teal coverage - 68.02%

    61 - 3x + 3x +
        filter_manager_srv("filter_manager", filtered_data_list, filter)
    @@ -23363,14 +24109,16 @@

    teal coverage - 68.02%

    77 - 5x + 5x +
      moduleServer(id, function(input, output, session) {
    78 - 5x + 5x +
        logger::log_trace("filter_manager_srv initializing for: { paste(names(filtered_data_list), collapse = ', ')}.")
    @@ -23384,7 +24132,8 @@

    teal coverage - 68.02%

    80 - 5x + 5x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    @@ -23426,7 +24175,8 @@

    teal coverage - 68.02%

    86 - 5x + 5x +
        slices_global <- reactiveVal(filter)
    @@ -23440,14 +24190,16 @@

    teal coverage - 68.02%

    88 - 5x + 5x +
        filtered_data_list <-
    89 - 5x + 5x +
          if (!is_module_specific) {
    @@ -23468,7 +24220,8 @@

    teal coverage - 68.02%

    92 - 4x + 4x +
            list(global_filters = unlist(filtered_data_list)[[1]])
    @@ -23496,21 +24249,24 @@

    teal coverage - 68.02%

    96 - 1x + 1x +
            flatten_nested <- function(x, name = NULL) {
    97 - 5x + 5x +
              if (inherits(x, "FilteredData")) {
    98 - 3x + 3x +
                setNames(list(x), name)
    @@ -23524,7 +24280,8 @@

    teal coverage - 68.02%

    100 - 2x + 2x +
                unlist(lapply(names(x), function(name) flatten_nested(x[[name]], name)))
    @@ -23545,7 +24302,8 @@

    teal coverage - 68.02%

    103 - 1x + 1x +
            flatten_nested(filtered_data_list)
    @@ -23580,49 +24338,56 @@

    teal coverage - 68.02%

    108 - 5x + 5x +
        mapping_matrix <- reactive({
    109 - 5x + 5x +
          state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
    110 - 5x + 5x +
          mapping_smooth <- lapply(filtered_data_list, function(x) {
    111 - 7x + 7x +
            state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
    112 - 7x + 7x +
            state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
    113 - 7x + 7x +
            states_active <- state_ids_global %in% state_ids_local
    114 - 7x + 7x +
            ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
    @@ -23643,7 +24408,8 @@

    teal coverage - 68.02%

    117 - 5x + 5x +
          as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
    @@ -23664,14 +24430,16 @@

    teal coverage - 68.02%

    120 - 5x + 5x +
        output$slices_table <- renderTable(
    121 - 5x + 5x +
          expr = {
    @@ -23685,28 +24453,32 @@

    teal coverage - 68.02%

    123 - 2x + 2x +
            mm <- mapping_matrix()
    124 - 2x + 2x +
            mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
    125 - 2x + 2x +
            mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
    126 - 2x + 2x +
            if (!is_module_specific) colnames(mm) <- "Global Filters"
    @@ -23727,21 +24499,24 @@

    teal coverage - 68.02%

    129 - 2x + 2x +
            if (nrow(mm) == 0L) {
    130 - 2x + 2x +
              mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
    131 - 2x + 2x +
              rownames(mm) <- ""
    @@ -23769,7 +24544,8 @@

    teal coverage - 68.02%

    135 - 2x + 2x +
            mm[names(mm) != "Report previewer"]
    @@ -23783,14 +24559,16 @@

    teal coverage - 68.02%

    137 - 5x + 5x +
          align = paste(c("l", rep("c", sum(names(filtered_data_list) != "Report previewer"))), collapse = ""),
    138 - 5x + 5x +
          rownames = TRUE
    @@ -23818,35 +24596,40 @@

    teal coverage - 68.02%

    142 - 5x + 5x +
        modules_out <- lapply(names(filtered_data_list), function(module_name) {
    143 - 7x + 7x +
          filter_manager_module_srv(
    144 - 7x + 7x +
            id = module_name,
    145 - 7x + 7x +
            module_fd = filtered_data_list[[module_name]],
    146 - 7x + 7x +
            slices_global = slices_global
    @@ -23881,7 +24664,8 @@

    teal coverage - 68.02%

    151 - 5x + 5x +
        snapshot_manager_srv("snapshot_manager", slices_global, mapping_matrix, filtered_data_list)
    @@ -23895,7 +24679,8 @@

    teal coverage - 68.02%

    153 - 5x + 5x +
        modules_out # returned for testing purpose
    @@ -24084,7 +24869,8 @@

    teal coverage - 68.02%

    180 - 7x + 7x +
      moduleServer(id, function(input, output, session) {
    @@ -24098,7 +24884,8 @@

    teal coverage - 68.02%

    182 - 7x + 7x +
        module_fd$set_available_teal_slices(reactive(slices_global()))
    @@ -24119,7 +24906,8 @@

    teal coverage - 68.02%

    185 - 7x + 7x +
        slices_module <- reactive(module_fd$get_filter_state())
    @@ -24140,14 +24928,16 @@

    teal coverage - 68.02%

    188 - 7x + 7x +
        previous_slices <- reactiveVal(isolate(slices_module()))
    189 - 7x + 7x +
        slices_added <- reactiveVal(NULL)
    @@ -24168,21 +24958,24 @@

    teal coverage - 68.02%

    192 - 7x + 7x +
        observeEvent(slices_module(), ignoreNULL = FALSE, {
    193 - 2x + 2x +
          logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
    194 - 2x + 2x +
          added <- setdiff_teal_slices(slices_module(), slices_global())
    @@ -24196,7 +24989,8 @@

    teal coverage - 68.02%

    196 - 2x + 2x +
          previous_slices(slices_module())
    @@ -24217,7 +25011,8 @@

    teal coverage - 68.02%

    199 - 7x + 7x +
        observeEvent(slices_added(), ignoreNULL = TRUE, {
    @@ -24336,7 +25131,8 @@

    teal coverage - 68.02%

    216 - 7x + 7x +
        slices_module # returned for testing purpose
    @@ -24755,35 +25551,40 @@

    teal coverage - 68.02%

    57 - 36x + 36x +
      checkmate::assert_function(ui, args = "id", nargs = 1)
    58 - 35x + 35x +
      checkmate::assert_function(server, args = "id", nargs = 1)
    59 - 34x + 34x +
      structure(
    60 - 34x + 34x +
        list(ui = ui, server = server),
    61 - 34x + 34x +
        class = "teal_data_module"
    @@ -25517,7 +26318,8 @@

    teal coverage - 68.02%

    102 - 10x + 10x +
      logger::log_trace("init initializing teal app with: data ('{ class(data) }').")
    @@ -25545,7 +26347,8 @@

    teal coverage - 68.02%

    106 - 10x + 10x +
      if (inherits(data, "TealData")) {
    @@ -25615,7 +26418,8 @@

    teal coverage - 68.02%

    116 - 10x + 10x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    @@ -25636,28 +26440,32 @@

    teal coverage - 68.02%

    119 - 10x + 10x +
      checkmate::assert(
    120 - 10x + 10x +
        .var.name = "modules",
    121 - 10x + 10x +
        checkmate::check_multi_class(modules, c("teal_modules", "teal_module")),
    122 - 10x + 10x +
        checkmate::check_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -25671,14 +26479,16 @@

    teal coverage - 68.02%

    124 - 10x + 10x +
      if (inherits(modules, "teal_module")) {
    125 - 1x + 1x +
        modules <- list(modules)
    @@ -25692,14 +26502,16 @@

    teal coverage - 68.02%

    127 - 10x + 10x +
      if (checkmate::test_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))) {
    128 - 4x + 4x +
        modules <- do.call(teal::modules, modules)
    @@ -25727,7 +26539,8 @@

    teal coverage - 68.02%

    132 - 10x + 10x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -25748,28 +26561,32 @@

    teal coverage - 68.02%

    135 - 9x + 9x +
      checkmate::assert(
    136 - 9x + 9x +
        .var.name = "title",
    137 - 9x + 9x +
        checkmate::check_string(title),
    138 - 9x + 9x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25783,28 +26600,32 @@

    teal coverage - 68.02%

    140 - 9x + 9x +
      checkmate::assert(
    141 - 9x + 9x +
        .var.name = "header",
    142 - 9x + 9x +
        checkmate::check_string(header),
    143 - 9x + 9x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25818,28 +26639,32 @@

    teal coverage - 68.02%

    145 - 9x + 9x +
      checkmate::assert(
    146 - 9x + 9x +
        .var.name = "footer",
    147 - 9x + 9x +
        checkmate::check_string(footer),
    148 - 9x + 9x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25853,7 +26678,8 @@

    teal coverage - 68.02%

    150 - 9x + 9x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -25874,7 +26700,8 @@

    teal coverage - 68.02%

    153 - 9x + 9x +
      teal.logger::log_system_info()
    @@ -25902,21 +26729,24 @@

    teal coverage - 68.02%

    157 - 9x + 9x +
      landing <- extract_module(modules, "teal_module_landing")
    158 - 9x + 9x +
      landing_module <- NULL
    159 - 9x + 9x +
      if (length(landing) == 1L) {
    @@ -25937,7 +26767,8 @@

    teal coverage - 68.02%

    162 - 9x + 9x +
      } else if (length(landing) > 1L) {
    @@ -25972,7 +26803,8 @@

    teal coverage - 68.02%

    167 - 9x + 9x +
      attr(filter, "app_id") <- create_app_id(data, modules)
    @@ -25993,7 +26825,8 @@

    teal coverage - 68.02%

    170 - 9x + 9x +
      filter <- as.teal_slices(as.list(filter))
    @@ -26021,7 +26854,8 @@

    teal coverage - 68.02%

    174 - 9x + 9x +
      if (isTRUE(attr(filter, "module_specific"))) {
    @@ -26210,21 +27044,24 @@

    teal coverage - 68.02%

    201 - 9x + 9x +
      if (inherits(data, "teal_data")) {
    202 - 8x + 8x +
        if (length(teal_data_datanames(data)) == 0) {
    203 - 1x + 1x +
          stop("The environment of `data` is empty.")
    @@ -26245,28 +27082,32 @@

    teal coverage - 68.02%

    206 - 7x + 7x +
        is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    207 - 7x + 7x +
        if (!isTRUE(is_modules_ok)) {
    208 - 1x + 1x +
          logger::log_error(is_modules_ok)
    209 - 1x + 1x +
          checkmate::assert(is_modules_ok, .var.name = "modules")
    @@ -26287,21 +27128,24 @@

    teal coverage - 68.02%

    212 - 6x + 6x +
        is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    213 - 6x + 6x +
        if (!isTRUE(is_filter_ok)) {
    214 - 1x + 1x +
          warning(is_filter_ok)
    @@ -26364,21 +27208,24 @@

    teal coverage - 68.02%

    223 - 7x + 7x +
      res <- list(
    224 - 7x + 7x +
        ui = ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
    225 - 7x + 7x +
        server = function(input, output, session) {
    @@ -26434,7 +27281,8 @@

    teal coverage - 68.02%

    233 - 7x + 7x +
      logger::log_trace("init teal app has been initialized.")
    @@ -26448,7 +27296,8 @@

    teal coverage - 68.02%

    235 - 7x + 7x +
      res
    @@ -27432,21 +28281,24 @@

    teal coverage - 68.02%

    12 - 7x + 7x +
      css_files <- list.files(
    13 - 7x + 7x +
        system.file("css", package = "teal", mustWork = TRUE),
    14 - 7x + 7x +
        pattern = pattern, full.names = TRUE
    @@ -27467,14 +28319,16 @@

    teal coverage - 68.02%

    17 - 7x + 7x +
      singleton(
    18 - 7x + 7x +
        tags$head(lapply(css_files, includeCSS))
    @@ -27586,21 +28440,24 @@

    teal coverage - 68.02%

    34 - 7x + 7x +
      checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
    35 - 7x + 7x +
      js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
    36 - 7x + 7x +
      js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
    @@ -27614,7 +28471,8 @@

    teal coverage - 68.02%

    38 - 7x + 7x +
      singleton(lapply(js_files, includeScript))
    @@ -27747,21 +28605,24 @@

    teal coverage - 68.02%

    57 - 18x + 18x +
      checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
    58 - 18x + 18x +
      lapply(files, function(file) {
    59 - 18x + 18x +
        shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
    @@ -27775,7 +28636,8 @@

    teal coverage - 68.02%

    61 - 18x + 18x +
      invisible(NULL)
    @@ -27880,21 +28742,24 @@

    teal coverage - 68.02%

    76 - 7x + 7x +
      tagList(
    77 - 7x + 7x +
        shinyjs::useShinyjs(),
    78 - 7x + 7x +
        include_css_files(),
    @@ -27908,14 +28773,16 @@

    teal coverage - 68.02%

    80 - 7x + 7x +
        include_js_files(except = "init.js"),
    81 - 7x + 7x +
        shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
    @@ -28138,28 +29005,32 @@

    teal coverage - 68.02%

    29 - 13x + 13x +
      teal_data_module(
    30 - 13x + 13x +
        ui = function(id) {
    31 - 1x + 1x +
          ns <- NS(id)
    32 - 1x + 1x +
          object$ui(ns("mutate_inner"))
    @@ -28173,21 +29044,24 @@

    teal coverage - 68.02%

    34 - 13x + 13x +
        server = function(id) {
    35 - 11x + 11x +
          moduleServer(id, function(input, output, session) {
    36 - 11x + 11x +
            teal_data_rv <- object$server("mutate_inner")
    @@ -28201,14 +29075,16 @@

    teal coverage - 68.02%

    38 - 11x + 11x +
            if (!is.reactive(teal_data_rv)) {
    39 - 1x + 1x +
              stop("The `teal_data_module` must return a reactive expression.", call. = FALSE)
    @@ -28229,7 +29105,8 @@

    teal coverage - 68.02%

    42 - 10x + 10x +
            td <- eventReactive(teal_data_rv(),
    @@ -28243,14 +29120,16 @@

    teal coverage - 68.02%

    44 - 10x + 10x +
                if (inherits(teal_data_rv(), c("teal_data", "qenv.error"))) {
    45 - 6x + 6x +
                  eval_code(teal_data_rv(), code)
    @@ -28264,7 +29143,8 @@

    teal coverage - 68.02%

    47 - 4x + 4x +
                  teal_data_rv()
    @@ -28285,7 +29165,8 @@

    teal coverage - 68.02%

    50 - 10x + 10x +
              ignoreNULL = FALSE
    @@ -28299,7 +29180,8 @@

    teal coverage - 68.02%

    52 - 10x + 10x +
            td
    @@ -28348,7 +29230,8 @@

    teal coverage - 68.02%

    59 - 1x + 1x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -28376,7 +29259,8 @@

    teal coverage - 68.02%

    63 - 6x + 6x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -28585,14 +29469,16 @@

    teal coverage - 68.02%

    28 - 6x + 6x +
      expr <- substitute(expr)
    29 - 6x + 6x +
      extras <- list(...)
    @@ -28613,14 +29499,16 @@

    teal coverage - 68.02%

    32 - 6x + 6x +
      if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
    33 - 6x + 6x +
        expr <- call("{", expr)
    @@ -28641,7 +29529,8 @@

    teal coverage - 68.02%

    36 - 6x + 6x +
      calls <- as.list(expr)[-1]
    @@ -28662,7 +29551,8 @@

    teal coverage - 68.02%

    39 - 6x + 6x +
      calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
    @@ -28676,7 +29566,8 @@

    teal coverage - 68.02%

    41 - 6x + 6x +
      eval_code(object = data, code = as.expression(calls))
    @@ -28815,14 +29706,16 @@

    teal coverage - 68.02%

    18 - 2x + 2x +
      packageStartupMessage(
    19 - 2x + 2x +
        "\nYou are using teal version ",
    @@ -28843,7 +29736,8 @@

    teal coverage - 68.02%

    22 - 2x + 2x +
        read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
    @@ -29059,28 +29953,32 @@

    teal coverage - 68.02%

    17 - 49x + 49x +
      checkmate::assert_string(label)
    18 - 49x + 49x +
      module(
    19 - 49x + 49x +
        label,
    20 - 49x + 49x +
        server = function(id, data) {
    @@ -29185,7 +30083,8 @@

    teal coverage - 68.02%

    35 - 49x + 49x +
        ui = function(id) {
    @@ -29255,7 +30154,8 @@

    teal coverage - 68.02%

    45 - 49x + 49x +
        datanames = datanames
    @@ -29436,21 +30336,24 @@

    teal coverage - 68.02%

    23 - 4x + 4x +
      checkmate::assert_string(label)
    24 - 2x + 2x +
      checkmate::assert_list(server_args, names = "named")
    25 - 2x + 2x +
      checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
    @@ -29464,7 +30367,8 @@

    teal coverage - 68.02%

    27 - 2x + 2x +
      logger::log_info("Initializing reporter_previewer_module")
    @@ -29478,7 +30382,8 @@

    teal coverage - 68.02%

    29 - 2x + 2x +
      srv <- function(id, reporter, ...) {
    @@ -29506,7 +30411,8 @@

    teal coverage - 68.02%

    33 - 2x + 2x +
      ui <- function(id, ...) {
    @@ -29534,28 +30440,32 @@

    teal coverage - 68.02%

    37 - 2x + 2x +
      module <- module(
    38 - 2x + 2x +
        label = "temporary label",
    39 - 2x + 2x +
        server = srv, ui = ui,
    40 - 2x + 2x +
        server_args = server_args, ui_args = list(), datanames = NULL
    @@ -29583,21 +30493,24 @@

    teal coverage - 68.02%

    44 - 2x + 2x +
      class(module) <- c("teal_module_previewer", class(module))
    45 - 2x + 2x +
      module$label <- label
    46 - 2x + 2x +
      module
    diff --git a/v0.15.0/index.html b/v0.15.0/index.html index bdf25042de..e2f1cfa2d0 100644 --- a/v0.15.0/index.html +++ b/v0.15.0/index.html @@ -1,5 +1,4 @@ - - + @@ -88,23 +87,7 @@ - - + - + + diff --git a/v0.15.0/news/index.html b/v0.15.0/news/index.html index dd28204c4d..4d0ee7faba 100644 --- a/v0.15.0/news/index.html +++ b/v0.15.0/news/index.html @@ -1,8 +1,22 @@ - -Changelog • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -109,17 +129,24 @@
    -

    teal 0.15.0

    CRAN release: 2024-02-08

    -
    -

    New features

    -
    • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
    • +

      teal 0.15.0 +

      +

      CRAN release: 2024-02-08

      +
      +

      New features +

      +
        +
      • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
      • Filter state snapshots can now be uploaded from file. See ?snapshot.
      • Added as_tdata function to facilitate migration of modules to the new teal_data class.
      • Added build_app_title function to facilitate adding favicons to app title.
      • -
      +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • data argument in init now accepts only teal_data and teal_data_module.
      • tdata has been deprecated and replaced with teal_data. Support for tdata passed to the data argument in module(server) will be removed in the next release.
      • @@ -128,114 +155,166 @@

        Breaking changes -

        Miscellaneous

        -
        • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
        • +

          Miscellaneous +

          +
            +
          • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
          • Added argument to teal_slices and made modifications to init to enable tagging teal_slices with an app id to safely upload snapshots from disk.
          • FilteredData no longer stores pre-processing code in specific slots. Code is now attached as attribute. Adjusted appropriately.
          • -

    + +
    -

    Bug fixes

    -
    • Removed Report previewer module from mapping matrix display in filter manager.
    • +

      Bug fixes +

      +
        +
      • Removed Report previewer module from mapping matrix display in filter manager.
      • Specified minimal version of package dependencies.
      • -
    + +
    -

    teal 0.14.0

    +

    teal 0.14.0 +

    -

    New features

    -
    • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
    • +

      New features +

      +
        +
      • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
      • Enabled capturing and resetting application filter state with snapshots. See ?snapshot.
      • Enabled reporter_previewer_module to customize default values through srv_args.
      • Enabled passing own reporter_previewer_module in a list of modules to override default one.
      • -
    + +
    -

    Breaking changes

    -
    • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
    • +

      Breaking changes +

      +
        +
      • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
      • Soft deprecated filters argument in module and replaced it with datanames. Details in documentation of teal::module
      • -
    + +
    -

    Miscellaneous

    -
    • Removed scda package dependency from examples.
    • +

      Miscellaneous +

      +
        +
      • Removed scda package dependency from examples.
      • Updated the header tag style to enhance element containment.
      • -
    + +
    -

    teal 0.13.0

    +

    teal 0.13.0 +

    -

    Breaking changes

    -
    • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
    • +

      Breaking changes +

      +
        +
      • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
      • Due to deprecation of chunks in teal.code, the teal framework now uses their replacement (qenv) instead. The documentation in teal has been updated to reflect this and custom modules written with chunks should be updated to use qenv.
      • Due to deprecation of chunks in teal.code, get_rcode, get_rcode_srv, and get_rcode_ui have been removed.
      • -
    + +
    -

    New features

    -
    • Added the validate_inputs function that transfers input validation messages to app output.
    • +

      New features +

      +
        +
      • Added the validate_inputs function that transfers input validation messages to app output.
      • modules argument of init accepts teal_module type of object. There is no need to wrap up a single module in modules() or list().
      • Updated module_nested_tabs so that only active modules are calculated in a teal app.
      • -
    + +
    -

    Miscellaneous

    -
    • Updated examples to use scda.2022.
    • +

      Miscellaneous +

      +
        +
      • Updated examples to use scda.2022.
      • Added R session information into a link in the footer of teal applications.
      • Added data hashing step using rlang instead of digest package to calculate the hash (which has been moved from teal.data and teal.slice). There is now an explicit hashing check in the reproducible code output.
      • Removed deprecated functions: root_modules, default_filter, bookmarkableShinyApp, as well as deprecated logging mechanism, including the functions log_app_usage and .log.
      • Updated the “Teal and Bootstrap Themes” vignette to provide more details customizing a teal app with bslib::run_with_themer.
      • Removed outdated diagram from srv_nested_tabs documentation.
      • Changed default values of header and footer arguments in init to empty text.
      • -
    + +
    -

    teal 0.12.0

    -
    -

    New features

    -
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • -
    +

    teal 0.12.0 +

    +
    +

    New features +

    +
      +
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • +
    +
    -

    Enhancements

    -
    • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
    • +

      Enhancements +

      +
        +
      • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
      • Updated teal_module to have data argument which receives a list of reactive filter data with "code" and "join_keys" attributes.
      • Updated teal_module to have filter_panel_api argument which receives a FilterPanelAPI object.
      • Updated the internals of module_teal to reflect changes in teal.slice.
      • -
    + +
    -

    Breaking changes

    -
    • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
    • +

      Breaking changes +

      +
        +
      • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
      • Deprecated merge_expression argument in get_rcode_srv function and removed it in get_rcode function.
      • Deprecated session argument in get_rcode function.
      • -
    + +
    -

    Miscellaneous

    -
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • -
    +

    Miscellaneous +

    +
      +
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • +
    +
    -

    teal 0.11.1

    +

    teal 0.11.1 +

    -

    Enhancements

    -
    • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
    • +

      Enhancements +

      +
        +
      • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
      • Updated teal to support modules which include reporting. If any module which supports reporting is included then a reporter_previewer_module is included.
      • Added default arguments to module() and the server argument is now a function where the second argument can be ... or datasets.
      • -
    + +
    -

    Breaking changes

    -
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • -
    +

    Breaking changes +

    +
      +
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • +
    +
    -

    Miscellaneous

    -
    • Added a template to the pkgdown configuration.
    • +

      Miscellaneous +

      +
        +
      • Added a template to the pkgdown configuration.
      • Removed unneeded shinytest app tests.
      • Updated package authors.
      • Added package vignettes.
      • -
    + +
    -

    teal 0.11.0

    -
    +

    The teal package contains the code to create apps (teal::init), to create a module (teal::module) and to group modules in the app (teal::modules). teal depends on teal.transform and teal.data which contain the functions that teal app creators are likely to need. The other package teal only imports from and therefore teal module creators should either fully specify functions from these packages when required or import them into custom packages as library(teal) will not load them.

    +
    +

    New features +

    +
      +
    • A simple new teal module named example_module has been included in the package.
    • +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • teal package has been split into multiple smaller packages, see above.
      • Deprecated root_modules function, users should use modules directly inside init.
      • Due to deprecation of root_modules any label argument to modules must be explicitly named. For example modules("lab", mod1, mod2) should be replaced with modules(label = "lab", mod1, mod2).
      • -
    + +
    -

    Miscellaneous

    -
    • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
    • +

      Miscellaneous +

      +
        +
      • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
      • MultiAssayExperiment is now suggested packages, not required. Objects dependent on MultiAssayExperiment are changed to lazy-load this now suggested package.
      • -
    + +
    -

    Bug fixes

    -
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • -
    +

    Bug fixes +

    +
      +
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • +
    +
    -

    teal 0.10.1

    +

    teal 0.10.1 +

    -

    Breaking changes

    -
    • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
    • +

      Breaking changes +

      +
        +
      • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
      • Deprecated all functions related to connectors that have been moved to their own separate packages.
      • Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational.
      • Removed rcd_connection and rcd_data; scda_dataset_connectors can be passed into cdisc_data and teal_data directly.
      • Replaced rcd_dataset_connector and rcd_cdisc_dataset_connector with scda_dataset_connector and scda_cdisc_dataset_connector respectively.
      • Renamed teal_show_js_log option into teal.show_js_log to match options naming convention.
      • Removed %is_in% and stop_shiny internal utility functions.
      • -
    + +
    -

    New features

    +

    New features +

    -
    Logging
    -
    • Added support for logging using the logger package.
    • +
      Logging +
      +
        +
      • Added support for logging using the logger package.
      • Added a new function register_logger, which registers a logger in a given namespace.
      • Added trace and info levels log messages to the teal framework.
      • Added pid and shiny session token into footnote so app developers can identify logs for apps.
      • -
    + +
    -
    Other
    -
    • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

    • +
      Other +
      +
        +
      • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

      • Added public facing constructor functions for CDISCDataConnector, RelationalDataConnector, and DataConnection classes.

      • Modified data_extract_spec to allow both the filter and select parameters to be NULL, which results in the data_extract_ui acting as if a filter_spec with all variables as possible choices had been supplied as the filter argument and a select_spec with the multiple parameter set to TRUE had been supplied as the select argument.

      • Added support of the full screen for a module when the filters argument is equal NULL.

      • @@ -302,11 +404,14 @@
        Other -

        Bug fixes

        -
    + +
    -

    teal 0.10.0

    +

    teal 0.10.0 +

    -

    New features

    -
    • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
    • +

      New features +

      +
        +
      • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
      • Refactored filter panel to use MultiAssayExperiment objects. Filters can be set on a subject level (colData of MAE object) and on a experiment level (colData and rowData of an assay).
      • Added cdse_dataset_connector to create delayed data objects from CDSE.
      • Added datasetdb_dataset_connector to create delayed data objects from DataSetDB.
      • Added ricepass_connection to create delayed data objects from entimICE via ricepass.
      • Refactor of the filter panel: -
        • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
        • +
            +
          • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
          • Dataset type determines an appearance and a functionality of related filters and filters summary.
          • Datasets are passed (by reference) from DDL to FilteredData skipping extracting data and their attributes.
          • Redesigned variable filter labels in “Active Filter Variables” panel.
          • Fully testable server functions.
          • -
          -
    + + + +
    -

    Bug fixes

    -
    • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
    • +

      Bug fixes +

      +
        +
      • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
      • Fixed a bug that caused the output of get_code function to not reproduce its raw data set.
      • Changed filter_spec to allow no variable selection upon app initialization, where the first possible value was previously selected.
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal 0.9.5

    +

    teal 0.9.5 +

    -

    Enhancements

    -
    • Added informational stop message when using mutate_data with RelationalDataConnector.
    • +

      Enhancements +

      +
        +
      • Added informational stop message when using mutate_data with RelationalDataConnector.
      • Modified as_cdisc to behave similarly to cdisc_dataset when called on a Dataset object.
      • Changed the displayed format of the data name and the column name in data_extract_spec UI elements. Both are now compressed to <data name>.<column name> if they don’t change during runtime of the app.
      • Added ADSAFTTE to the list of recognized ADaM dataset names.
      • Added another example to data_extract_spec’s doc string showcasing app users can choose a variable used for filtering in the encoding panel.
      • Added CSS styling to tool tips in teal modules.
      • -
    + +
    -

    Bug fixes

    -
    • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
    • +

      Bug fixes +

      +
        +
      • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
      • Fixed a bug that crashes app whenever a Date or datetime column is selected from a filter_spec.
      • -
    + +
    -

    teal 0.9.4

    +

    teal 0.9.4 +

    -

    Enhancements

    -
    • Released snowflake connection and connectors.
    • +

      Enhancements +

      +
        +
      • Released snowflake connection and connectors.
      • Changed ordering of datasets to be more intuitive (topologically first for CDISC datasets only and then according to input datasets order).
      • When closing a teal app (ending a user shiny session), all DataConnections will now try to close their connections.
      • Added ADHY keys to configuration file.
      • Extended the filter_spec function: the parameter choices is no longer mandatory (the function will take all possible choices by default) and the vars parameter additionally accepts the choices_selected and allows to change the variables for filtering using the UI elements in the encoding panel.
      • -
    + +
    -

    Bug fixes

    -
    • Cleaned up imports in the package.
    • -
    • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
    • +

      Bug fixes +

      +
        +
      • Cleaned up imports in the package.
      • +
      • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
        +
      • Fixed issue with cloning Callable class.
      • -
    + +
    -

    teal 0.9.3

    +

    teal 0.9.3 +

    -

    New Features

    -
    • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
    • +

      New Features +

      +
        +
      • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
      • New JoinKeys class (with join_keys() constructors and join_key() constructor for its elements) to store joining key columns between datasets.
      • Refactored the most basic dataset() constructor, added cdisc_dataset() constructor and as_cdisc() conversion function.
      • Soft-deprecate removed class constructors and obsolete functions (e.g. keys()).
      • Added get_keys() and set_keys() functions to extract and manipulate datasets primary keys respectively.
      • Unexported filtered_data_new, filtered_data_set and filtered_data_set_filters.
      • -
    + +
    -

    Bug fixes

    -
    • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
    • +

      Bug fixes +

      +
        +
      • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
      • Added ability to press “Enter” key without having to set focus to the Submit button for delayed data loading.
      • Allow variable_choices to use datasets with missing labels.
      • Fixed bug that ignores input of NULL to selected argument of select_spec function.
      • -
    + +
    -

    Enhancements

    -
    • Added button to remove all active filters from the Filter Panel.
    • -
    +

    Enhancements +

    +
      +
    • Added button to remove all active filters from the Filter Panel.
    • +
    +
    -

    teal 0.9.2

    +

    teal 0.9.2 +

    -

    New Features

    -
    • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
    • +

      New Features +

      +
        +
      • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
      • NOTE: python_dataset_connector is not yet ready to be deployed on RSConnect because it does not contain numpy and pandas, which are Python libraries used in python_dataset_connector.
      • Added support for filtering on Date and Datetime variables in the Filter Panel.
      • Added buttons for date and datetime filter widgets to reset the value to the original.
      • Added new function check_key_duplicates, which creates a short summary about rows with duplicated primary key (row numbers and the number of duplicates)
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    • Removed include_factors option in get_class_colnames in RawDataset.
    • -
    +

    Miscellaneous +

    +
      +
    • Removed include_factors option in get_class_colnames in RawDataset.
    • +
    +
    -

    teal 0.9.1

    -
    • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
    • +

      teal 0.9.1 +

      +
        +
      • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
      • Nested tabs module now has better alignment with the filter panel on the page.
      • Allow width argument in optionalSelectInput.
      • Added lifecycle badges to all exported functions.
      • @@ -483,10 +644,13 @@

        teal 0.9.1 -

        teal 0.9.0

        -
        • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

        • +

          teal 0.9.0 +

          +
            +
          • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

          • A new teal_data function to include datasets and connectors into teal application.

          • cdisc_data function to include datasets and connectors into teal application where a check argument still could be used and other consistency tests are performed.

          • get_raw_data can be used to derive raw data from R6 objects e.g. (RelationalDataset).

          • @@ -507,91 +671,133 @@

            teal 0.9.0 -

            Refactor of FilteredData (for developers)

            -
            • +
            +
            +

            Refactor of FilteredData (for developers) +

            +
              +
            • FilteredData is now fully reactive. Now filtered data is lazy evaluated as per need. This further opens the door to bookmarking teal apps (bookmarking currently works for the right filtering panel, but we will make this feature more sophisticated in a future release, each module must be reviewed and adapted if it contains reactiveValues).
            • Datasets and materialized connectors are provided to FilteredData by set_datasets_data function located in init_datasets.R file.
            • Renamed get_dataset() method to get_data().
            • Renamed get_filter_call() method to get_filter_expr(); returns an expression rather than a list.
            • Removed argument isolate from get_data() method and similar methods. You must isolate it yourself as needed. If you want to temporarily deactivate shiny errors due to missing errors, you can set options(shiny.suppressMissingContextError = TRUE). In general, avoid isolate as this breaks reactivity.
            • We added a development module to add several filters at once, e.g. safety filters. This is to be evaluated before it is converted into a proper module and made available to end-users.
            • -
            +

          +

    -

    teal 0.8.5

    -
    • UI bug fix to hide filter elements for not used datasets.
    • -
    +

    teal 0.8.5 +

    +
      +
    • UI bug fix to hide filter elements for not used datasets.
    • +
    +
    -

    teal 0.8.4

    -
    • Progress bar for UI creation in delayed loading module.
    • +

      teal 0.8.4 +

      +
        +
      • Progress bar for UI creation in delayed loading module.
      • Change output of keys function to keys object.
      • Delayed version of choices_selected.
      • Fix an error in choices_selected when selected is not in choices.
      • Fix pickerInput not to display column name as label if it’s missing.
      • -
    + +
    -

    teal 0.8.3

    -
    • Enable teal app to initialize without data. The data are then loaded from within the teal app.
    • +

      teal 0.8.3 +

      +
        +
      • Enable teal app to initialize without data. The data are then loaded from within the teal app.
      • New classes (DatasetConnector, DataConnector) to connect to various data sources, including: * connector to rice API - rice_data and rice_dataset_connector * connector to RDS files - rds_data and rds_dataset_connector
      • Message appears at bottom right of shiny app when shiny is busy to update the views.
      • Remove labels argument of cdisc_data function. Labels should now already be present in the data passed to the cdisc_data function. This can be achieved using the var_relabel function.
      • -
    + +
    -

    teal 0.8.2

    -
    • Fixed several BUGS in optionalSelectInput and improved inputs look.
    • +

      teal 0.8.2 +

      +
        +
      • Fixed several BUGS in optionalSelectInput and improved inputs look.
      • Added get_data_labels function to FilteredData class.
      • Improved sep passing within data_extract_spec.
      • -
    + +
    -

    teal 0.8.1

    -
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • -
    +

    teal 0.8.1 +

    +
      +
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • +
    +
    -

    teal 0.8.0

    -
    • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
    • +

      teal 0.8.0 +

      +
        +
      • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
      • Possibility to load custom .css and .js files.
      • Renamed columns_spec to select_spec.
      • Show number of observations on filter panel.
      • Add labeling functions variable_choices and value_choices.
      • -
    + +
    -

    teal 0.7.0

    -
    • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
    • +

      teal 0.7.0 +

      +
        +
      • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
      • Moved teal.utils functions to teal: log_app_usage, stop_shiny.
      • Added *_spec functions.
      • Improvements on usage of PickerInput and SelectInput.
      • -
    + +
    -

    teal 0.6.0

    -
    • Removed deprecated functions tab*.
    • +

      teal 0.6.0 +

      +
        +
      • Removed deprecated functions tab*.
      • Removed data generation functions including generate_sample_data.
      • Incorporate shinyjs package.
      • Added “Copy R code to clipboard” button.
      • -
    + +
    -

    teal 0.0.5

    -
    • Added limit to data_table with scrolling, preventing overlap of UI elements.
    • +

      teal 0.0.5 +

      +
        +
      • Added limit to data_table with scrolling, preventing overlap of UI elements.
      • Boolean filtering.
      • -
    + +
    -

    teal 0.0.4

    -
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • -
    +

    teal 0.0.4 +

    +
      +
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • +
    +
    -

    teal 0.0.3

    -
    • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
    • -
    -
    New features
    -
    • +

      teal 0.0.3 +

      +
        +
      • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
      • +
      +
      +
      New features +
      +
        +
      • tm_scatterplot module.
      • tm_table module.
      • -
      +
    +
    -
    Changes
    -
    • All tabs arguments were renamed to modules.
    • +
      Changes +
      +
        +
      • All tabs arguments were renamed to modules.
      • tab_item function is now called module.
      • @@ -604,30 +810,39 @@
        Changes -

        teal 0.0.2

        -
        • New ‘01_getting_started’ vignette.
        • +

          teal 0.0.2 +

          +
            +
          • New ‘01_getting_started’ vignette.
          • Datanames in FilteredData are now case sensitive.
          • -
    + +
    -

    teal 0.0.1

    -
    • March 28, 2016 - Initial Release.
    • -
    +

    teal 0.0.1 +

    +
      +
    • March 28, 2016 - Initial Release.
    • +
    + + + + + - - + + diff --git a/v0.15.0/pull_request_template.html b/v0.15.0/pull_request_template.html index 8568b3108f..1613b70b48 100644 --- a/v0.15.0/pull_request_template.html +++ b/v0.15.0/pull_request_template.html @@ -1,8 +1,22 @@ - -Pull Request • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -114,17 +134,19 @@

    Fixes #nnn

    - + + + + - - + + diff --git a/v0.15.0/reference/TealReportCard.html b/v0.15.0/reference/TealReportCard.html index aaca5c74c0..af2585e303 100644 --- a/v0.15.0/reference/TealReportCard.html +++ b/v0.15.0/reference/TealReportCard.html @@ -1,16 +1,32 @@ - - + + + + + +TealReportCard — TealReportCard • teal +TealReportCard — TealReportCard • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -127,20 +149,27 @@
    -

    Super class

    +

    Super class +

    teal.reporter::ReportCard -> TealReportCard

    +

    Inherited methods


    -

    Method append_src()

    -

    Appends the source code to the content meta data of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_src(src, ...)

    +

    +
    +
    +

    Method append_src() +

    +

    Appends the source code to the content meta data of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_src(src, ...)
    +

    +
    -

    Arguments

    -

    src
    +

    Arguments +

    +

    +
    +
    +
    src

    (character(1)) code as text.

    @@ -172,85 +214,148 @@

    Arguments -

    Returns

    +

    Returns +

    Object of class TealReportCard, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_src(
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_src(
       "plot(iris)"
     )
    -card$get_content()[[1]]$get_content()

    +card$get_content()[[1]]$get_content()
    +

    +
    -


    -

    Method append_fs()

    +
    +

    +
    +
    +

    Method append_fs() +

    Appends the filter state list to the content and metadata of this TealReportCard. If the filter state list has an attribute named formatted, it appends it to the card otherwise it uses the default yaml::as.yaml to format the list. -If the filter state list is empty, nothing is appended to the content.

    -

    Usage

    -

    TealReportCard$append_fs(fs)

    +If the filter state list is empty, nothing is appended to the content.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_fs(fs)
    +

    +
    -

    Arguments

    -

    fs
    +

    Arguments +

    +

    +
    +
    +
    fs

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method append_encodings()

    -

    Appends the encodings list to the content and metadata of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_encodings(encodings)

    +
    +

    +
    +
    +

    Method append_encodings() +

    +

    Appends the encodings list to the content and metadata of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_encodings(encodings)
    +

    +
    -

    Arguments

    -

    encodings
    +

    Arguments +

    +

    +
    +
    +
    encodings

    (list) list of encodings selections of the teal app.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
     card$get_content()[[1]]$get_content()
    -

    +
    +

    +
    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealReportCard$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -258,7 +363,8 @@

    Arguments -

    Examples

    +

    Examples +

    
     ## ------------------------------------------------
     ## Method `TealReportCard$append_src`
    @@ -281,17 +387,19 @@ 

    Examples

    + +
    + +
    - - + + diff --git a/v0.15.0/reference/TealSlicesBlock.html b/v0.15.0/reference/TealSlicesBlock.html index 2ce1be9d02..64492dba4c 100644 --- a/v0.15.0/reference/TealSlicesBlock.html +++ b/v0.15.0/reference/TealSlicesBlock.html @@ -1,10 +1,26 @@ - -RcodeBlock — TealSlicesBlock • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,34 +140,54 @@
    -

    Super classes

    +

    Super classes +

    teal.reporter::ContentBlock -> teal.reporter::TextBlock -> TealSlicesBlock

    +

    Inherited methods


    -

    Method new()

    -

    Returns a TealSlicesBlock object.

    -

    Usage

    -

    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")

    +

    +
    +
    +

    Method new() +

    +

    Returns a TealSlicesBlock object.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    @@ -153,89 +195,154 @@

    Arguments -

    Details

    +

    Details +

    Returns a TealSlicesBlock object with no content and no parameters.

    -

    Returns

    +

    Returns +

    Object of class TealSlicesBlock, invisibly.

    -


    -

    Method set_content()

    +
    +

    +
    +
    +

    Method set_content() +

    Sets content of this TealSlicesBlock. Sets content as YAML text which represents a list generated from teal_slices. The list displays limited number of fields from teal_slice objects, but this list is sufficient to conclude which filters were applied. -When selected field in teal_slice object is a range, then it is displayed as a "min"

    -

    Usage

    -

    TealSlicesBlock$set_content(content)

    +When selected field in teal_slice object is a range, then it is displayed as a "min"

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$set_content(content)
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method from_list()

    -

    Create the RcodeBlock from a list.

    -

    Usage

    -

    TealSlicesBlock$from_list(x)

    +
    +

    +
    +
    +

    Method from_list() +

    +

    Create the RcodeBlock from a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$from_list(x)
    +

    +
    -

    Arguments

    -

    x
    +

    Arguments +

    +

    +
    +
    +
    x

    (named list) with two fields c("text", "params"). Use the get_available_params method to get all possible parameters.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method to_list()

    -

    Convert the RcodeBlock to a list.

    -

    Usage

    -

    TealSlicesBlock$to_list()

    +
    +

    +
    +
    +

    Method to_list() +

    +

    Convert the RcodeBlock to a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$to_list()
    +

    +
    -

    Returns

    +

    Returns +

    named list with a text and params.

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealSlicesBlock$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -243,17 +350,19 @@

    Arguments

    + +
    + +
    - - + + diff --git a/v0.15.0/reference/append_module.html b/v0.15.0/reference/append_module.html index bb7884d58d..27f75ec673 100644 --- a/v0.15.0/reference/append_module.html +++ b/v0.15.0/reference/append_module.html @@ -1,8 +1,24 @@ - -Append a teal_module to children of a teal_modules object — append_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    append_module(modules, module)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    module

    (teal_module) object to be appended onto the children of modules

    -
    + +
    -

    Value

    +

    Value +

    A teal_modules object with module appended.

    + +
    + + - - + + diff --git a/v0.15.0/reference/build_app_title.html b/v0.15.0/reference/build_app_title.html index 9029cb6a27..f683336d0b 100644 --- a/v0.15.0/reference/build_app_title.html +++ b/v0.15.0/reference/build_app_title.html @@ -1,8 +1,24 @@ - -Build app title with favicon — build_app_title • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    build_app_title(
       title = "teal app",
       favicon =
    @@ -123,8 +146,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character) The browser title for the teal app.

    @@ -132,26 +157,30 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag containing the element that adds the title and logo to the shiny app.

    + + + + - - + + diff --git a/v0.15.0/reference/calculate_hashes.html b/v0.15.0/reference/calculate_hashes.html index fbf0a4a43b..f7b74d1b04 100644 --- a/v0.15.0/reference/calculate_hashes.html +++ b/v0.15.0/reference/calculate_hashes.html @@ -1,8 +1,24 @@ - -Get the hash of a dataset — calculate_hashes • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    calculate_hashes(datanames, datasets)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets

    datasets

    (FilteredData) object holding the data

    -
    + +
    -

    Value

    +

    Value +

    A list of hashes per dataset.

    + + + + - - + + diff --git a/v0.15.0/reference/check_filter_datanames.html b/v0.15.0/reference/check_filter_datanames.html index 5992cf8b8a..e09686ea84 100644 --- a/v0.15.0/reference/check_filter_datanames.html +++ b/v0.15.0/reference/check_filter_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in filters — check_filter_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_filter_datanames(filters, datanames)
    -

    Arguments

    -
    filters
    +

    Arguments +

    +
    +
    filters

    (teal_slices) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/v0.15.0/reference/check_modules_datanames.html b/v0.15.0/reference/check_modules_datanames.html index 1a6452ae5c..22ecf2130b 100644 --- a/v0.15.0/reference/check_modules_datanames.html +++ b/v0.15.0/reference/check_modules_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in modules — check_modules_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_modules_datanames(modules, datanames)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/v0.15.0/reference/create_app_id.html b/v0.15.0/reference/create_app_id.html index 9e27aa11cf..d1c59f0afd 100644 --- a/v0.15.0/reference/create_app_id.html +++ b/v0.15.0/reference/create_app_id.html @@ -1,8 +1,24 @@ - -Application ID — create_app_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,53 @@
    -

    Usage

    +

    Usage +

    create_app_id(data, modules)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) as accepted by init

    modules

    (teal_modules) object as accepted by init

    -
    + +
    -

    Value

    +

    Value +

    A single character string.

    -

    Details

    +

    Details +

    Calculate app ID that will be used to stamp filter state snapshots. App ID is a hash of the app's data and modules. See "transferring snapshots" section in ?snapshot.

    + + + + - - + + diff --git a/v0.15.0/reference/deep_copy_filter.html b/v0.15.0/reference/deep_copy_filter.html index 4c8ae8260c..daa2d6d954 100644 --- a/v0.15.0/reference/deep_copy_filter.html +++ b/v0.15.0/reference/deep_copy_filter.html @@ -1,14 +1,30 @@ - - + + + + + +Deep copy teal_slices — deep_copy_filter • teal +Deep copy teal_slices — deep_copy_filter • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + +
    @@ -123,18 +146,23 @@
    -

    Usage

    +

    Usage +

    deep_copy_filter(filter)
    -

    Arguments

    -
    filter
    +

    Arguments +

    +
    +
    filter

    (teal_slices)

    -
    + +
    -

    Value

    +

    Value +

    teal_slices

    @@ -143,17 +171,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.0/reference/dot-datasets_to_data.html b/v0.15.0/reference/dot-datasets_to_data.html index d7732a2c48..f313d30c42 100644 --- a/v0.15.0/reference/dot-datasets_to_data.html +++ b/v0.15.0/reference/dot-datasets_to_data.html @@ -1,12 +1,28 @@ - - + + + + + +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    .datasets_to_data(module, datasets)
    -

    Arguments

    -
    module
    +

    Arguments +

    +
    +
    module

    (teal_module) module where needed filters are taken from

    datasets

    (FilteredData) object where needed data are taken from

    -
    + +
    -

    Value

    +

    Value +

    A teal_data object.

    + + + + - - + + diff --git a/v0.15.0/reference/example_module.html b/v0.15.0/reference/example_module.html index 24c0aa3385..f0ac151f66 100644 --- a/v0.15.0/reference/example_module.html +++ b/v0.15.0/reference/example_module.html @@ -1,8 +1,24 @@ - -An example teal module — example_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    example_module(label = "example teal module", datanames = "all")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -132,16 +157,19 @@

    Arguments will show filters of all datasets. datanames also determines a subset of datasets which are appended to the data argument in server function.

    -

    + +
    -

    Value

    +

    Value +

    A teal module which can be included in the modules argument to init().

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(IRIS = iris, MTCARS = mtcars),
       modules = example_module()
    @@ -152,17 +180,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/filter_manager_module_srv.html b/v0.15.0/reference/filter_manager_module_srv.html index b5ebd5ecd6..4f34bf77c3 100644 --- a/v0.15.0/reference/filter_manager_module_srv.html +++ b/v0.15.0/reference/filter_manager_module_srv.html @@ -1,8 +1,24 @@ - -Module specific filter manager — filter_manager_module_srv • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    filter_manager_module_srv(id, module_fd, slices_global)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -131,21 +156,28 @@

    Arguments -

    Value

    +

    Value +

    A reactive expression containing the slices active in this module.

    -

    Details

    +

    Details +

    This module tracks the state of a single FilteredData object and global teal_slices and updates both objects as necessary. Filter states added in different modules Filter states added any individual module are added to global teal_slices @@ -154,17 +186,19 @@

    Details

    + + + + - - + + diff --git a/v0.15.0/reference/get_client_timezone.html b/v0.15.0/reference/get_client_timezone.html index 8bf1dc3519..4e2e2b2dfb 100644 --- a/v0.15.0/reference/get_client_timezone.html +++ b/v0.15.0/reference/get_client_timezone.html @@ -1,10 +1,26 @@ - -Get client timezone — get_client_timezone • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,19 +139,24 @@
    -

    Usage

    +

    Usage +

    get_client_timezone(ns)
    -

    Arguments

    -
    ns
    +

    Arguments +

    +
    +
    ns

    (function) namespace function passed from the session object in the shiny server. For shiny modules this will allow for proper name spacing of the registered input.

    -
    + +
    -

    Value

    +

    Value +

    (shiny) input variable accessible with input$tz which is a (character) @@ -137,17 +164,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.0/reference/get_code_tdata.html b/v0.15.0/reference/get_code_tdata.html index 58f1d920d9..2d1debabbe 100644 --- a/v0.15.0/reference/get_code_tdata.html +++ b/v0.15.0/reference/get_code_tdata.html @@ -1,8 +1,24 @@ - -Wrapper for get_code.tdata — get_code_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,35 +137,42 @@
    -

    Usage

    +

    Usage +

    get_code_tdata(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    (character) code used in the tdata object.

    + + + + - - + + diff --git a/v0.15.0/reference/get_datasets_code.html b/v0.15.0/reference/get_datasets_code.html index c662cb2787..c79ab1d964 100644 --- a/v0.15.0/reference/get_datasets_code.html +++ b/v0.15.0/reference/get_datasets_code.html @@ -1,8 +1,24 @@ - -Get datasets code — get_datasets_code • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    get_datasets_code(datanames, datasets, hashes)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets to extract code from

    @@ -131,28 +156,35 @@

    Arguments -

    Value

    +

    Value +

    -

    Character string concatenated from the following elements:

    • data pre-processing code (from data argument in init)

    • +

      Character string concatenated from the following elements:

      +
        +
      • data pre-processing code (from data argument in init)

      • hash check of loaded objects

      • filter code (if any)

      • -
    + + + + + + - - + + diff --git a/v0.15.0/reference/get_metadata.html b/v0.15.0/reference/get_metadata.html index e9836e5a2a..4caf9141a7 100644 --- a/v0.15.0/reference/get_metadata.html +++ b/v0.15.0/reference/get_metadata.html @@ -1,8 +1,24 @@ - -Function to get metadata from a tdata object — get_metadata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    get_metadata(data, dataname)
     
     # S3 method for tdata
    @@ -125,34 +148,40 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata - object) to extract the data from

    dataname

    (character(1)) the dataset name whose metadata is requested

    -
    + +
    -

    Value

    +

    Value +

    Either list of metadata or NULL if no metadata.

    + + + + - - + + diff --git a/v0.15.0/reference/get_rcode_libraries.html b/v0.15.0/reference/get_rcode_libraries.html index 2977f3f891..c9347a2d55 100644 --- a/v0.15.0/reference/get_rcode_libraries.html +++ b/v0.15.0/reference/get_rcode_libraries.html @@ -1,8 +1,24 @@ - -Generates library calls from current session info — get_rcode_libraries • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,29 +136,33 @@
    -

    Usage

    +

    Usage +

    get_rcode_libraries()
    -

    Value

    +

    Value +

    Character vector of library(<package>) calls.

    + + + + - - + + diff --git a/v0.15.0/reference/include_css_files.html b/v0.15.0/reference/include_css_files.html index fcea90638c..52b1cbd3d4 100644 --- a/v0.15.0/reference/include_css_files.html +++ b/v0.15.0/reference/include_css_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,35 +142,42 @@
    -

    Usage

    +

    Usage +

    include_css_files(pattern = "*")
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes CSS files.

    + + + + - - + + diff --git a/v0.15.0/reference/include_js_files.html b/v0.15.0/reference/include_js_files.html index f4f02474d7..c201901488 100644 --- a/v0.15.0/reference/include_js_files.html +++ b/v0.15.0/reference/include_js_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include JS files from /inst/js/ package directory to application header — include_js_files • teal +Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    include_js_files(pattern = NULL, except = NULL)
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included, passed to system.file

    except

    (character) vector of basename filenames to be excluded

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes JS files.

    + + + + - - + + diff --git a/v0.15.0/reference/include_teal_css_js.html b/v0.15.0/reference/include_teal_css_js.html index 907a9a70b5..f08411d95b 100644 --- a/v0.15.0/reference/include_teal_css_js.html +++ b/v0.15.0/reference/include_teal_css_js.html @@ -1,16 +1,32 @@ - - + + + + + +Code to include teal CSS and JavaScript files — include_teal_css_js • teal +Code to include teal CSS and JavaScript files — include_teal_css_js • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -126,33 +148,38 @@
    -

    Usage

    +

    Usage +

    include_teal_css_js()
    -

    Value

    +

    Value +

    A shiny.tag.list.

    -

    Details

    +

    Details +

    Simply add include_teal_css_js() as one of the UI elements.

    + + + + - - + + diff --git a/v0.15.0/reference/index.html b/v0.15.0/reference/index.html index 88a4c42b44..5501cb8122 100644 --- a/v0.15.0/reference/index.html +++ b/v0.15.0/reference/index.html @@ -1,8 +1,22 @@ - -Function reference • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -108,230 +128,312 @@
    -

    Core teal functions

    +

    Core teal functions +

    -

    Main functions needed to build a teal app

    +

    +

    Main functions needed to build a teal app

    -
    +
    +
    -
    +
    +
    init()
    Create the server and UI function for the shiny app
    -
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    module() modules() format(<teal_module>) print(<teal_module>) format(<teal_modules>) print(<teal_modules>)
    Create teal_module and teal_modules objects.
    -
    +
    +
    +
    ui_teal_with_splash() srv_teal_with_splash()
    Add splash screen to teal application.
    -
    +
    +
    +
    teal_slices() as.teal_slices() c(<teal_slices>)
    Filter settings for teal applications
    -
    -

    Helper Functions

    + +
    +
    +

    Helper Functions +

    -

    Helper functions for teal

    +

    +

    Helper functions for teal

    -
    +
    +
    -
    +
    +
    build_app_title()
    Build app title with favicon
    -
    -

    Example module

    + +
    +
    +

    Example module +

    -

    A simple teal module

    +

    +

    A simple teal module

    -
    +
    +
    -
    +
    +
    example_module()
    An example teal module
    -
    -

    Creating reports

    + +
    +
    +

    Creating reports +

    -
    +
    +
    -
    +
    +
    reporter_previewer_module()
    Create a teal module for previewing a report
    -
    +
    +
    +
    TealReportCard
    TealReportCard
    -
    +
    +
    +
    report_card_template()
    Template function for TealReportCard creation and customization
    -
    -

    Landing popup

    + +
    +
    +

    Landing popup +

    -
    +
    +
    -
    +
    +
    landing_popup_module()
    Landing popup module
    -
    -

    Functions for module developers

    + +
    +
    +

    Functions for module developers +

    -
    +
    +
    -
    +
    +
    as_tdata()
    Downgrade teal_data objects in modules for compatibility
    -
    +
    +
    +
    new_tdata()
    Create a tdata object
    -
    +
    +
    +
    get_code_tdata()
    -
    Wrapper for get_code.tdata
    -
    +
    Wrapper for get_code.tdata +
    +
    +
    +
    get_metadata()
    Function to get metadata from a tdata object
    -
    +
    +
    +
    tdata2env()
    -
    Function to convert a tdata object to an environment
    -
    +
    Function to convert a tdata object to an environment +
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    show_rcode_modal()
    Show R code modal
    -
    +
    +
    +
    join_keys(<tdata>)
    -
    Extract join_keys from tdata
    -
    -

    Validation functions

    +
    Extract join_keys from tdata +
    + +
    +
    +

    Validation functions +

    -
    +
    +
    -
    +
    +
    validate_has_data()
    Validate that dataset has a minimum number of observations
    -
    +
    +
    +
    validate_has_elements()
    Validates that vector has length greater than 0
    -
    +
    +
    +
    validate_has_variable()
    Validates that dataset contains specific variable
    -
    +
    +
    +
    validate_in()
    Validates that vector includes all expected values
    -
    +
    +
    +
    validate_inputs()
    Send input validation messages to output.
    -
    +
    +
    +
    validate_n_levels()
    Validate that variables has expected number of levels
    -
    +
    +
    +
    validate_no_intersection()
    Validates no intersection between two vectors
    -
    +
    +
    +
    validate_one_row_per_id()
    Validate that dataset has unique rows for key variables
    -
    + + + + + + - - + + diff --git a/v0.15.0/reference/init.html b/v0.15.0/reference/init.html index 986de01606..e51857df83 100644 --- a/v0.15.0/reference/init.html +++ b/v0.15.0/reference/init.html @@ -1,12 +1,28 @@ - - + + + + + +Create the server and UI function for the shiny app — init • teal +Create the server and UI function for the shiny app — init • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    init(
       data,
       modules,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) For constructing the data object, refer to teal_data() and teal_data_module().

    @@ -174,21 +199,25 @@

    Arguments -

    Value

    +

    Value +

    Named list with server and UI functions.

    -

    Details

    +

    Details +

    When initializing the teal app, if datanames are not set for the teal_data object, defaults from the teal_data environment will be used.

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(
         new_iris = transform(iris, id = seq_len(nrow(iris))),
    @@ -242,17 +271,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/is_arg_used.html b/v0.15.0/reference/is_arg_used.html index a0b0ccddea..ae2bece2fd 100644 --- a/v0.15.0/reference/is_arg_used.html +++ b/v0.15.0/reference/is_arg_used.html @@ -1,8 +1,24 @@ - -Does the object make use of the arg — is_arg_used • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    is_arg_used(modules, arg)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_module or teal_modules) object

    arg

    (character(1)) names of the arguments to be checked against formals of teal modules.

    -
    + +
    -

    Value

    +

    Value +

    logical whether the object makes use of arg.

    + + + + - - + + diff --git a/v0.15.0/reference/join_keys.tdata.html b/v0.15.0/reference/join_keys.tdata.html index f5fd899cab..2dcf922901 100644 --- a/v0.15.0/reference/join_keys.tdata.html +++ b/v0.15.0/reference/join_keys.tdata.html @@ -1,8 +1,24 @@ - -Extract join_keys from tdata — join_keys.tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,34 +137,40 @@
    -

    Usage

    +

    Usage +

    # S3 method for tdata
     join_keys(data, ...)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    ...

    Additional arguments (not used)

    -
    + +
    + + + + - - + + diff --git a/v0.15.0/reference/landing_popup_module.html b/v0.15.0/reference/landing_popup_module.html index eef79d0a70..4cf6944e05 100644 --- a/v0.15.0/reference/landing_popup_module.html +++ b/v0.15.0/reference/landing_popup_module.html @@ -1,12 +1,28 @@ - - + + + + + +Landing popup module — landing_popup_module • teal +Landing popup module — landing_popup_module • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    landing_popup_module(
       label = "Landing Popup",
       title = NULL,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label of the module.

    @@ -147,16 +172,19 @@

    Arguments -

    Value

    +

    Value +

    A teal_module (extended with teal_landing_module class) to be used in teal applications.

    -

    Examples

    +

    Examples +

    app1 <- init(
       data = teal_data(iris = iris),
       modules = modules(
    @@ -203,17 +231,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/matrix_to_mapping.html b/v0.15.0/reference/matrix_to_mapping.html index a376ed5822..4c0fce454a 100644 --- a/v0.15.0/reference/matrix_to_mapping.html +++ b/v0.15.0/reference/matrix_to_mapping.html @@ -1,14 +1,30 @@ - - + + + + + +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,36 +145,43 @@
    -

    Usage

    +

    Usage +

    matrix_to_mapping(mapping_matrix)
    -

    Arguments

    -
    mapping_matrix
    +

    Arguments +

    +
    +
    mapping_matrix

    (data.frame) of logical vectors where columns represent modules and row represent teal_slices

    -
    + +
    -

    Value

    +

    Value +

    Named list like that in the mapping attribute of a teal_slices object.

    + + + + - - + + diff --git a/v0.15.0/reference/module_filter_manager.html b/v0.15.0/reference/module_filter_manager.html index 1171f77f60..5ce9a74049 100644 --- a/v0.15.0/reference/module_filter_manager.html +++ b/v0.15.0/reference/module_filter_manager.html @@ -1,8 +1,24 @@ - -Manage multiple FilteredData objects — module_filter_manager • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_ui(id)
     
     filter_manager_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,15 +164,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    A list of reactives, each holding a teal_slices, as returned by filter_manager_module_srv.

    -

    Details

    +

    Details +

    This module observes changes in the filters of each FilteredData object and keeps track of all filters used. A mapping of filters to modules is kept in the mapping_matrix object (which is actually a data.frame) @@ -155,17 +183,19 @@

    Details

    + + + + - - + + diff --git a/v0.15.0/reference/module_filter_manager_modal.html b/v0.15.0/reference/module_filter_manager_modal.html index dcc2eb5288..a262337cba 100644 --- a/v0.15.0/reference/module_filter_manager_modal.html +++ b/v0.15.0/reference/module_filter_manager_modal.html @@ -1,8 +1,24 @@ - -Filter manager modal — module_filter_manager_modal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_modal_ui(id)
     
     filter_manager_modal_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,20 +164,23 @@

    Argumentsteal_slices().

    -

    + + + + + + - - + + diff --git a/v0.15.0/reference/module_labels.html b/v0.15.0/reference/module_labels.html index e01f5b48e5..02079adcdc 100644 --- a/v0.15.0/reference/module_labels.html +++ b/v0.15.0/reference/module_labels.html @@ -1,8 +1,24 @@ - -Retrieve labels from teal_modules — module_labels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,18 +137,23 @@
    -

    Usage

    +

    Usage +

    module_labels(modules)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    -
    + +
    -

    Value

    +

    Value +

    A list containing the labels of the modules. If the modules are nested, @@ -133,17 +161,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.0/reference/module_management.html b/v0.15.0/reference/module_management.html index 1a45bb2cdc..bf8040ada4 100644 --- a/v0.15.0/reference/module_management.html +++ b/v0.15.0/reference/module_management.html @@ -1,8 +1,24 @@ - -Extract/Remove module(s) of specific class — extract_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,54 @@
    -

    Usage

    +

    Usage +

    extract_module(modules, class)
     
     drop_module(modules, class)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    class

    The class name of teal_module to be extracted or dropped.

    -
    + +
    -

    Value

    +

    Value +

    -
    • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

    • +
        +
      • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

      • For drop_module, the opposite, which is all teal_modules of class other than class.

      • -

      teal_modules

      +
    +

    teal_modules

    + + + + - - + + diff --git a/v0.15.0/reference/module_nested_tabs.html b/v0.15.0/reference/module_nested_tabs.html index 0dfe1bf7ca..f699744348 100644 --- a/v0.15.0/reference/module_nested_tabs.html +++ b/v0.15.0/reference/module_nested_tabs.html @@ -1,8 +1,24 @@ - -Create a UI of nested tabs of teal_modules — module_nested_tabs • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)
     
     # S3 method for default
    @@ -163,8 +187,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -197,18 +223,25 @@

    Arguments -

    Value

    +

    Value +

    -

    Depending on the class of modules, ui_nested_tabs returns:

    • teal_module: instantiated UI of the module.

    • +

      Depending on the class of modules, ui_nested_tabs returns:

      +
        +
      • teal_module: instantiated UI of the module.

      • teal_modules: tabsetPanel with each tab corresponding to recursively calling this function on it.

      • -

      srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

      +
    +

    srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

    -

    ui_nested_tabs

    +

    +ui_nested_tabs +

    Each teal_modules is translated to a tabsetPanel and each @@ -218,25 +251,32 @@

    ui_nested_tabs

    -

    srv_nested_tabs

    +

    +srv_nested_tabs +

    -

    This module recursively calls all elements of modules and returns currently active one.

    • teal_module returns self as a active module.

    • +

      This module recursively calls all elements of modules and returns currently active one.

      +
        +
      • teal_module returns self as a active module.

      • teal_modules also returns module active within self which is determined by the input$active_tab.

      • -
    + +
    + + + + - - + + diff --git a/v0.15.0/reference/module_tabs_with_filters.html b/v0.15.0/reference/module_tabs_with_filters.html index 01a2ed11b4..d0bb531648 100644 --- a/v0.15.0/reference/module_tabs_with_filters.html +++ b/v0.15.0/reference/module_tabs_with_filters.html @@ -1,12 +1,28 @@ - - + + + + + +Add right filter panel into each of the top-level teal_modules UIs. — module_tabs_with_filters • teal +Add right filter panel into each of the top-level teal_modules UIs. — module_tabs_with_filters • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    ui_tabs_with_filters(id, modules, datasets, filter = teal_slices())
     
     srv_tabs_with_filters(
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -161,15 +186,18 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag.list containing the main menu, placeholders for filters and placeholders for the teal modules.

    -

    Details

    +

    Details +

    The right filter panel's filter choices affect the datasets object. Therefore, all modules using the same datasets share the same filters.

    This works with nested modules of depth greater than 2, though the filter @@ -177,17 +205,19 @@

    Details

    + +
    + + - - + + diff --git a/v0.15.0/reference/module_teal.html b/v0.15.0/reference/module_teal.html index fb3cc44828..736373e346 100644 --- a/v0.15.0/reference/module_teal.html +++ b/v0.15.0/reference/module_teal.html @@ -1,8 +1,24 @@ - -teal main app module — module_teal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_teal(
       id,
       splash_ui = tags$h2("Starting the Teal App"),
    @@ -127,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -171,15 +197,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression which returns the currently active module.

    -

    Details

    +

    Details +

    It displays the splash UI which is used to fetch the data, possibly prompting for a password input to fetch the data. Once the data is ready, the splash screen is replaced by the actual teal UI that is tabsetted and @@ -200,17 +229,19 @@

    Details

    + +
    + + - - + + diff --git a/v0.15.0/reference/module_teal_with_splash.html b/v0.15.0/reference/module_teal_with_splash.html index 9a6685f784..fcb9b90c35 100644 --- a/v0.15.0/reference/module_teal_with_splash.html +++ b/v0.15.0/reference/module_teal_with_splash.html @@ -1,10 +1,26 @@ - -Add splash screen to teal application. — module_teal_with_splash • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    ui_teal_with_splash(
       id,
       data,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -168,15 +193,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression containing a teal_data object when data is loaded or NULL when it is not.

    -

    Details

    +

    Details +

    This module pauses app initialization pending delayed data loading. This is necessary because the filter panel and modules depend on the data to initialize.

    teal_with_splash follows the shiny module convention. @@ -186,12 +214,14 @@

    Detailsinit to create a standalone application.

    -

    See also

    +

    See also +

    -

    Examples

    +

    Examples +

    teal_modules <- modules(example_module())
     # Shiny app with modular integration of teal
     ui <- fluidPage(
    @@ -213,17 +243,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/modules_depth.html b/v0.15.0/reference/modules_depth.html index e21717035d..755c51dc5a 100644 --- a/v0.15.0/reference/modules_depth.html +++ b/v0.15.0/reference/modules_depth.html @@ -1,10 +1,26 @@ - -Get module depth — modules_depth • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    modules_depth(modules, depth = 0L)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (list or teal_modules or teal_module) nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -134,26 +159,30 @@

    Arguments -

    Value

    +

    Value +

    Depth level for given module.

    + + + + - - + + diff --git a/v0.15.0/reference/reexports.html b/v0.15.0/reference/reexports.html index 560b46f655..b3dbcb6e01 100644 --- a/v0.15.0/reference/reexports.html +++ b/v0.15.0/reference/reexports.html @@ -1,5 +1,10 @@ - - + + + + + +Objects exported from other packages — reexports • teal +Objects exported from other packages — reexports • teal + + + + + + + + + + Skip to contents @@ -40,7 +56,8 @@ + + @@ -134,7 +156,8 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    lifecycle
    +
    +
    lifecycle

    badge

    @@ -142,21 +165,24 @@

    %>%

    -
    + + - + + + + - - + + diff --git a/v0.15.0/reference/report_card_template.html b/v0.15.0/reference/report_card_template.html index 7d850abaea..c6f1d7db53 100644 --- a/v0.15.0/reference/report_card_template.html +++ b/v0.15.0/reference/report_card_template.html @@ -1,10 +1,26 @@ - -Template function for TealReportCard creation and customization — report_card_template • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    report_card_template(
       title,
       label,
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) title of the card (unless overwritten by label)

    @@ -149,26 +174,30 @@

    Arguments -

    Value

    +

    Value +

    (TealReportCard) populated with a title, description and filter state.

    + + + + - - + + diff --git a/v0.15.0/reference/reporter_previewer_module.html b/v0.15.0/reference/reporter_previewer_module.html index 01e36ad8c2..9dfb233c3c 100644 --- a/v0.15.0/reference/reporter_previewer_module.html +++ b/v0.15.0/reference/reporter_previewer_module.html @@ -1,20 +1,36 @@ - - + + + + + +Create a teal module for previewing a report — reporter_previewer_module • teal +Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + @@ -132,13 +154,16 @@
    -

    Usage

    +

    Usage +

    reporter_previewer_module(label = "Report previewer", server_args = list())
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -147,26 +172,30 @@

    Argumentsteal.reporter::reporter_previewer_srv().

    -

    + +
    -

    Value

    +

    Value +

    teal_module (extended with teal_module_previewer class) containing the teal.reporter previewer functionality.

    + + + + - - + + diff --git a/v0.15.0/reference/resolve_modules_datanames.html b/v0.15.0/reference/resolve_modules_datanames.html index de9b604882..7896ec8651 100644 --- a/v0.15.0/reference/resolve_modules_datanames.html +++ b/v0.15.0/reference/resolve_modules_datanames.html @@ -1,10 +1,26 @@ - -Resolve datanames for the modules — resolve_modules_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    resolve_modules_datanames(modules, datanames, join_keys)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules) object

    @@ -134,26 +159,30 @@

    Arguments -

    Value

    +

    Value +

    teal_modules with resolved datanames.

    + + + + - - + + diff --git a/v0.15.0/reference/run_js_files.html b/v0.15.0/reference/run_js_files.html index c7554443cf..c2cf6e714d 100644 --- a/v0.15.0/reference/run_js_files.html +++ b/v0.15.0/reference/run_js_files.html @@ -1,14 +1,30 @@ - - + + + + + +Run JS file from /inst/js/ package directory — run_js_files • teal +Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,41 +145,49 @@
    -

    Usage

    +

    Usage +

    run_js_files(files)
    -

    Arguments

    -
    files
    +

    Arguments +

    +
    +
    files

    (character) vector of filenames.

    -
    + +
    -

    Value

    +

    Value +

    returns NULL, invisibly.

    -

    Details

    +

    Details +

    system.file should not be used to access files in other packages, it does not work with devtools. Therefore, we redefine this method in each package as needed. Thus, we do not export this method.

    + + + + - - + + diff --git a/v0.15.0/reference/show_rcode_modal.html b/v0.15.0/reference/show_rcode_modal.html index 5fd80252a2..43e2b9322f 100644 --- a/v0.15.0/reference/show_rcode_modal.html +++ b/v0.15.0/reference/show_rcode_modal.html @@ -1,10 +1,26 @@ - -Show R code modal — show_rcode_modal • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())
    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) Title of the modal, displayed in the first comment of the R code.

    @@ -137,24 +162,28 @@

    Argumentsshiny::getDefaultReactiveDomain() is used.

    -

    + +
    -

    References

    +

    References +

    shiny::showModal()

    + + + + - - + + diff --git a/v0.15.0/reference/slices_store.html b/v0.15.0/reference/slices_store.html index 6f01db59fd..3dea9bf984 100644 --- a/v0.15.0/reference/slices_store.html +++ b/v0.15.0/reference/slices_store.html @@ -1,10 +1,26 @@ - -Store and restore teal_slices object — slices_store • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,15 +139,18 @@
    -

    Usage

    +

    Usage +

    slices_store(tss, file)
     
     slices_restore(file)
    -

    Arguments

    -
    tss
    +

    Arguments +

    +
    +
    tss

    (teal_slices) object to be stored.

    @@ -133,9 +158,11 @@

    Arguments.

    -

    + +
    -

    Value

    +

    Value +

    slices_store returns NULL, invisibly.

    @@ -144,32 +171,39 @@

    Value

    slices_restore returns a teal_slices object restored from the file.

    -

    Details

    -

    Date and date time objects are stored in the following formats:

    • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

    • +

      Details +

      +

      Date and date time objects are stored in the following formats:

      +
        +
      • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

      • POSIX*t classes are converted to character by using format.POSIX*t(usetz = TRUE, tz = "UTC") (YYYY-MM-DD HH:MM:SS UTC, where UTC is the Coordinated Universal Time timezone short-code).

      • -

      This format is assumed during slices_restore. All POSIX*t objects in +

    +

    This format is assumed during slices_restore. All POSIX*t objects in selected or choices fields of teal_slice objects are always printed in UTC timezone as well.

    -

    See also

    +

    See also +

    + + + + - - + + diff --git a/v0.15.0/reference/snapshot_manager_module.html b/v0.15.0/reference/snapshot_manager_module.html index 4d84afc103..fe1f412439 100644 --- a/v0.15.0/reference/snapshot_manager_module.html +++ b/v0.15.0/reference/snapshot_manager_module.html @@ -1,8 +1,24 @@ - -Filter state snapshot management. — snapshot_manager_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    snapshot_manager_ui(id)
     
     snapshot_manager_srv(id, slices_global, mapping_matrix, filtered_data_list)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id

    @@ -140,15 +165,18 @@

    Arguments -

    Value

    +

    Value +

    Nothing is returned.

    -

    Details

    +

    Details +

    This module introduces snapshots: stored descriptions of the filter state of the entire application. Snapshots allow the user to save the current filter state of the application for later use in the session, as well as to save it to file in order to share it with an app developer or other users, @@ -160,7 +188,8 @@

    Details

    -

    Server logic

    +

    Server logic +

    Snapshots are basically teal_slices objects, however, since each module is served by a separate instance @@ -175,7 +204,8 @@

    Server logic -

    Snapshot mechanics

    +

    Snapshot mechanics +

    When a snapshot is captured, the user is prompted to name it. @@ -205,7 +235,8 @@

    Snapshot mechanics -

    Transferring snapshots

    +

    Transferring snapshots +

    Snapshots uploaded from disk should only be used in the same application they come from, @@ -215,22 +246,25 @@

    Transferring snapshots

    -

    Author

    +

    Author +

    Aleksander Chlebowski

    + + + + - - + + diff --git a/v0.15.0/reference/tdata.html b/v0.15.0/reference/tdata.html index bd929e6ef5..dc800ec0ef 100644 --- a/v0.15.0/reference/tdata.html +++ b/v0.15.0/reference/tdata.html @@ -1,22 +1,38 @@ - - + + + + + +Create a tdata object — tdata • teal +Create a tdata object — tdata • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + + @@ -126,19 +148,25 @@

    [Deprecated]

    Create a new object called tdata which contains data, a reactive list of data.frames -(or MultiAssayExperiment), with attributes:

    • code (reactive) containing code used to generate the data

    • +(or MultiAssayExperiment), with attributes:

      +
        +
      • code (reactive) containing code used to generate the data

      • join_keys (join_keys) containing the relationships between the data

      • metadata (named list) containing any metadata associated with the data frames

      • -
    + +
    -

    Usage

    +

    Usage +

    new_tdata(data, code = "", join_keys = NULL, metadata = NULL)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (named list) A list of data.frame or MultiAssayExperiment objects, which optionally can be reactive. Inside this object all of these items will be made reactive.

    @@ -160,20 +188,24 @@

    Arguments -

    Value

    +

    Value +

    A tdata object.

    -

    See also

    +

    See also +

    as_tdata

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars), dd = data.frame(x = 1:10)),
    @@ -354,17 +386,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/tdata2env.html b/v0.15.0/reference/tdata2env.html index fc2cb4371d..80f527da77 100644 --- a/v0.15.0/reference/tdata2env.html +++ b/v0.15.0/reference/tdata2env.html @@ -1,8 +1,24 @@ - -Function to convert a tdata object to an environment — tdata2env • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,25 +137,31 @@
    -

    Usage

    +

    Usage +

    tdata2env(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    An environment.

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars)),
    @@ -145,17 +174,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/tdata_deprecation.html b/v0.15.0/reference/tdata_deprecation.html index a2368891e6..104f2f5bcd 100644 --- a/v0.15.0/reference/tdata_deprecation.html +++ b/v0.15.0/reference/tdata_deprecation.html @@ -1,8 +1,24 @@ - -Downgrade teal_data objects in modules for compatibility — as_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,24 +136,30 @@
    -

    Usage

    +

    Usage +

    as_tdata(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    data object, either tdata or teal_data, the latter possibly in a reactive expression

    -
    + +
    -

    Value

    +

    Value +

    Object of class tdata.

    -

    Details

    +

    Details +

    Recent changes in teal cause modules to fail because modules expect a tdata object to be passed to the data argument but instead they receive a teal_data object, which is additionally wrapped in a reactive expression in the server functions. @@ -140,7 +168,8 @@

    Details
    -

    Examples

    +

    Examples +

    td <- teal_data()
     td <- within(td, iris <- iris) %>% within(mtcars <- mtcars)
     td
    @@ -192,17 +221,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.15.0/reference/teal-package.html b/v0.15.0/reference/teal-package.html index e603a0de4c..5e44b12b98 100644 --- a/v0.15.0/reference/teal-package.html +++ b/v0.15.0/reference/teal-package.html @@ -1,10 +1,26 @@ - -teal: Interactive exploration of clinical trials data — teal-package • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,21 +141,30 @@
    -

    Details

    +

    Details +

    To learn mode about the package, visit the project website or read the init() manual page.

    -

    Author

    +

    Author +

    Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID)

    -

    Authors:

    + +
    + + + + - - + + diff --git a/v0.15.0/reference/teal_data_datanames.html b/v0.15.0/reference/teal_data_datanames.html index 2901de199d..c6b027e604 100644 --- a/v0.15.0/reference/teal_data_datanames.html +++ b/v0.15.0/reference/teal_data_datanames.html @@ -1,10 +1,26 @@ - -Wrapper on teal.data::datanames — teal_data_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -117,18 +140,23 @@
    -

    Usage

    +

    Usage +

    teal_data_datanames(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data)

    -
    + +
    -

    Value

    +

    Value +

    character

    @@ -137,17 +165,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.0/reference/teal_data_module.html b/v0.15.0/reference/teal_data_module.html index e6ee6536da..efe9af6438 100644 --- a/v0.15.0/reference/teal_data_module.html +++ b/v0.15.0/reference/teal_data_module.html @@ -1,10 +1,26 @@ - -Data module for teal applications — teal_data_module • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    teal_data_module(ui, server)
     
     # S4 method for teal_data_module,character
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    ui
    +

    Arguments +

    +
    +
    ui

    (function(id)) shiny module UI function; must only take id argument

    @@ -159,9 +184,11 @@

    Arguments -

    Value

    +

    Value +

    teal_data_module returns an object of class teal_data_module.

    @@ -173,7 +200,8 @@

    Value

    within returns a teal_data_module object with a delayed evaluation of expr when the module is run.

    -

    Details

    +

    Details +

    teal_data_module creates a shiny module to supply or modify data in a teal application. The module allows for running data pre-processing code (creation and some modification) after the app starts. The body of the server function will be run in the app rather than in the global environment. @@ -188,12 +216,14 @@

    Details... argument: as name:value pairs are passed to ..., name in expr will be replaced with value.

    -

    Examples

    +

    Examples +

    tdm <- teal_data_module(
       ui = function(id) {
         ns <- NS(id)
    @@ -326,17 +356,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/teal_data_to_filtered_data.html b/v0.15.0/reference/teal_data_to_filtered_data.html index f9e827988b..da4321eab4 100644 --- a/v0.15.0/reference/teal_data_to_filtered_data.html +++ b/v0.15.0/reference/teal_data_to_filtered_data.html @@ -1,8 +1,24 @@ - -Create a FilteredData — teal_data_to_filtered_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    teal_data_to_filtered_data(x, datanames = teal_data_datanames(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (teal_data) object

    datanames

    (character) vector of data set names to include; must be subset of datanames(x)

    -
    + +
    -

    Value

    +

    Value +

    A FilteredData object.

    + + + + - - + + diff --git a/v0.15.0/reference/teal_modules.html b/v0.15.0/reference/teal_modules.html index 0045dc4651..581495110a 100644 --- a/v0.15.0/reference/teal_modules.html +++ b/v0.15.0/reference/teal_modules.html @@ -1,10 +1,26 @@ - -Create teal_module and teal_modules objects. — teal_modules • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    module(
       label = "module",
       server = function(id, ...) {
    @@ -151,14 +174,19 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    server
    -

    (function) shiny module with following arguments:

    • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

    • +
      +

      (function) shiny module with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

      • input, output, session - (not recommended) then shiny::callModule() will be used to call a module.

      • data (optional) module will receive a teal_data object, a list of reactive (filtered) data specified in the filters argument.

      • @@ -166,13 +194,18 @@

        Argumentsteal.reporter::Reporter).

      • filter_panel_api (optional) module will receive FilterPanelAPI. (See teal.slice::FilterPanelAPI).

      • ... (optional) server_args elements will be passed to the module named argument or to the ....

      • -

      +
    +
    ui
    -

    (function) shiny UI module function with following arguments:

    • id - teal will set proper shiny namespace for this module.

    • +
      +

      (function) shiny UI module function with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module.

      • ... (optional) ui_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    filters
    @@ -196,7 +229,8 @@

    Argumentsformat() and print(): Arguments passed to other methods.

    @@ -208,20 +242,26 @@

    Arguments -

    Value

    +

    Value +

    module() returns an object of class teal_module.

    -

    modules() returns a teal_modules object which contains following fields:

    • label: taken from the label argument.

    • +

      modules() returns a teal_modules object which contains following fields:

      +
        +
      • label: taken from the label argument.

      • children: a list containing objects passed in .... List elements are named after their label attribute converted to a valid shiny id.

      • -
    + +
    -

    Details

    +

    Details +

    module() creates an instance of a teal_module that can be placed in a teal application. modules() shapes the structure of a the application by organizing teal_module within the navigation panel. It wraps teal_module and teal_modules objects in a teal_modules object, @@ -234,7 +274,8 @@

    Details
    -

    Examples

    +

    Examples +

    library(shiny)
     
     module_1 <- module(
    @@ -291,17 +332,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.15.0/reference/teal_slices.html b/v0.15.0/reference/teal_slices.html index 49b834b90f..a605fbfb76 100644 --- a/v0.15.0/reference/teal_slices.html +++ b/v0.15.0/reference/teal_slices.html @@ -1,8 +1,24 @@ - -Filter settings for teal applications — teal_slices • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    teal_slices(
       ...,
       exclude_varnames = NULL,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    any number of teal_slice objects. For print and format, additional arguments passed to other functions.

    @@ -146,15 +171,19 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal.slice's GitHub repository.

    (character(1)) string specifying how observations are tallied by these filter states. -Possible options:

    • "none" (default) to have counts of single FilterState to show unfiltered number only.

    • +Possible options:

      +
        +
      • "none" (default) to have counts of single FilterState to show unfiltered number only.

      • "all" to have counts of single FilterState to show number of observation in filtered and unfiltered dataset. Note, that issues were reported when using this option with MultiAssayExperiment. Please make sure that adding new filters doesn't fail on target platform before deploying for production.

      • -
    + +
    allow_add
    @@ -162,24 +191,32 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal's GitHub repository.

    (named list) specifies which filters will be active in which modules on app start. Elements should contain character vector of teal_slice ids (see teal.slice::teal_slice). -Names of the list should correspond to teal_module label set in module() function.

    • ids listed under "global_filters will be active in all modules.

    • +Names of the list should correspond to teal_module label set in module() function.

      +
        +
      • ids listed under "global_filters will be active in all modules.

      • If missing, all filters will be applied to all modules.

      • If empty list, all filters will be available to all modules but will start inactive.

      • If module_specific is FALSE, only global_filters will be active on start.

      • -
    + +
    app_id
    @@ -192,27 +229,32 @@

    Arguments -

    Value

    +

    Value +

    A teal_slices object.

    -

    Details

    +

    Details +

    Produces a teal_slices object. The teal_slice components will specify filter states that will be active when the app starts. Attributes (created with the named arguments) will configure the way the app applies filters. See argument descriptions for details.

    -

    Examples

    +

    Examples +

    filter <- teal_slices(
       teal_slice(dataname = "iris", varname = "Species", id = "species"),
       teal_slice(dataname = "iris", varname = "Sepal.Length", id = "sepal_length"),
    @@ -245,17 +287,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/unfold_mapping.html b/v0.15.0/reference/unfold_mapping.html index 82f3ee9651..37e8f16893 100644 --- a/v0.15.0/reference/unfold_mapping.html +++ b/v0.15.0/reference/unfold_mapping.html @@ -1,8 +1,24 @@ - -Explicitly enumerate global filters. — unfold_mapping • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    unfold_mapping(mapping, module_names)
    -

    Arguments

    -
    mapping
    +

    Arguments +

    +
    +
    mapping

    (named list) as stored in mapping parameter of teal_slices

    module_names

    (character) vector containing names of all modules in the app

    -
    + +
    -

    Value

    +

    Value +

    A named_list with one element per module, each element containing all filters applied to that module.

    + + + + - - + + diff --git a/v0.15.0/reference/validate_app_title_tag.html b/v0.15.0/reference/validate_app_title_tag.html index 8fee84c2ba..5ff10c34b7 100644 --- a/v0.15.0/reference/validate_app_title_tag.html +++ b/v0.15.0/reference/validate_app_title_tag.html @@ -1,8 +1,24 @@ - -Function for validating the title parameter of teal::init — validate_app_title_tag • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,29 +137,35 @@
    -

    Usage

    +

    Usage +

    validate_app_title_tag(shiny_tag)
    -

    Arguments

    -
    shiny_tag
    +

    Arguments +

    +
    +
    shiny_tag

    (shiny.tag) Object to validate for a valid title.

    -
    + +
    + + + + - - + + diff --git a/v0.15.0/reference/validate_has_data.html b/v0.15.0/reference/validate_has_data.html index 09ab1d01de..c605e65e32 100644 --- a/v0.15.0/reference/validate_has_data.html +++ b/v0.15.0/reference/validate_has_data.html @@ -1,8 +1,24 @@ - -Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    validate_has_data(
       x,
       min_nrow = NULL,
    @@ -125,8 +148,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    @@ -145,14 +170,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(teal)
     ui <- fluidPage(
       sliderInput("len", "Max Length of Sepal",
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/validate_has_elements.html b/v0.15.0/reference/validate_has_elements.html index 152ec667c4..20d5ced576 100644 --- a/v0.15.0/reference/validate_has_elements.html +++ b/v0.15.0/reference/validate_has_elements.html @@ -1,8 +1,24 @@ - -Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_has_elements(x, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    msg

    message to display

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B"), each = 15)
    @@ -169,17 +197,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/validate_has_variable.html b/v0.15.0/reference/validate_has_variable.html index 5d0084a657..d81ea66411 100644 --- a/v0.15.0/reference/validate_has_variable.html +++ b/v0.15.0/reference/validate_has_variable.html @@ -1,8 +1,24 @@ - -Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_has_variable(data, varname, msg)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20)
    @@ -165,17 +193,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/validate_in.html b/v0.15.0/reference/validate_in.html index 7b943fa3a4..69db5aa2a2 100644 --- a/v0.15.0/reference/validate_in.html +++ b/v0.15.0/reference/validate_in.html @@ -1,8 +1,24 @@ - -Validates that vector includes all expected values — validate_in • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_in(x, choices, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Vector of values to test.

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    ui <- fluidPage(
       selectInput(
         "species",
    @@ -163,17 +191,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/validate_inputs.html b/v0.15.0/reference/validate_inputs.html index a945a79ebf..1aa474c5cc 100644 --- a/v0.15.0/reference/validate_inputs.html +++ b/v0.15.0/reference/validate_inputs.html @@ -1,10 +1,26 @@ - -Send input validation messages to output. — validate_inputs • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    validate_inputs(..., header = "Some inputs require attention")
    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    either any number of InputValidator objects or an optionally named, possibly nested list of InputValidator objects, see Details

    @@ -132,15 +157,18 @@

    Arguments -

    Value

    +

    Value +

    Returns NULL if the final validation call passes and a shiny.silent.error if it fails.

    -

    Details

    +

    Details +

    shiny::validate is used to withhold rendering of an output element until certain conditions are met and to print a validation message in place of the output element. @@ -159,12 +187,14 @@

    Detailsheader.

    -

    Examples

    +

    Examples +

    library(shiny)
     library(shinyvalidate)
     
    @@ -234,17 +264,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/validate_n_levels.html b/v0.15.0/reference/validate_n_levels.html index 43de48a433..a8cc1c6aca 100644 --- a/v0.15.0/reference/validate_n_levels.html +++ b/v0.15.0/reference/validate_n_levels.html @@ -1,8 +1,24 @@ - -Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    variable name. If x is not a factor, the unique values are treated as levels.

    @@ -137,16 +162,19 @@

    Arguments -

    Details

    +

    Details +

    If the number of levels of x is less than min_levels or greater than max_levels the validation will fail. This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20),
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/validate_no_intersection.html b/v0.15.0/reference/validate_no_intersection.html index dbfefab59b..0aa280b876 100644 --- a/v0.15.0/reference/validate_no_intersection.html +++ b/v0.15.0/reference/validate_no_intersection.html @@ -1,8 +1,24 @@ - -Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_no_intersection(x, y, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B", "C"), each = 10)
    @@ -178,17 +206,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.0/reference/validate_one_row_per_id.html b/v0.15.0/reference/validate_one_row_per_id.html index 29519d3c95..04d3086e23 100644 --- a/v0.15.0/reference/validate_one_row_per_id.html +++ b/v0.15.0/reference/validate_one_row_per_id.html @@ -1,8 +1,24 @@ - -Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_one_row_per_id(x, key = c("USUBJID", "STUDYID"))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    key

    (character) Vector of ID variables from x that identify unique records.

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    iris$id <- rep(1:50, times = 3)
     ui <- fluidPage(
       selectInput(
    @@ -161,17 +189,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/404.html b/v0.15.1-rc1/404.html index 0f23fc4a15..2358308843 100644 --- a/v0.15.1-rc1/404.html +++ b/v0.15.1-rc1/404.html @@ -1,5 +1,4 @@ - - + @@ -80,23 +79,7 @@ - - + - + + diff --git a/v0.15.1-rc1/CODE_OF_CONDUCT.html b/v0.15.1-rc1/CODE_OF_CONDUCT.html index f5d01cf1dc..139895ba1f 100644 --- a/v0.15.1-rc1/CODE_OF_CONDUCT.html +++ b/v0.15.1-rc1/CODE_OF_CONDUCT.html @@ -1,8 +1,22 @@ - -Contributor Covenant Code of Conduct • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,65 +131,80 @@
    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    • Demonstrating empathy and kindness toward other people
    • +
        +
      • Demonstrating empathy and kindness toward other people
      • Being respectful of differing opinions, viewpoints, and experiences
      • Giving and gracefully accepting constructive feedback
      • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
      • Focusing on what is best not just for us as individuals, but for the overall community
      • -

      Examples of unacceptable behavior include:

      -
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • +
      +

      Examples of unacceptable behavior include:

      +
        +
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • Trolling, insulting or derogatory comments, and personal or political attacks
      • Public or private harassment
      • Publishing others’ private information, such as a physical or email address, without their explicit permission
      • Other conduct which could reasonably be considered inappropriate in a professional setting
      • -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -177,17 +212,19 @@

    Attribution

    + + + + - - + + diff --git a/v0.15.1-rc1/CONTRIBUTING.html b/v0.15.1-rc1/CONTRIBUTING.html index 6cf00270c7..97fa071431 100644 --- a/v0.15.1-rc1/CONTRIBUTING.html +++ b/v0.15.1-rc1/CONTRIBUTING.html @@ -1,8 +1,22 @@ - -Contribution Guidelines • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -113,7 +133,8 @@

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -124,38 +145,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    GitHub Flow

    +

    GitHub Flow +

    This repository uses the GitHub Flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes

        Make sure your code

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR)

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -169,76 +199,93 @@

        GitHub Flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    -

    Coding guidelines

    +

    Coding guidelines +

    This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Dependency management

    +

    Dependency management +

    Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

    -

    Dependency version management

    +

    Dependency version management +

    If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    -
    • Minimum 5% of lines of code authored* (determined by git blame query) OR
    • +
        +
      • Minimum 5% of lines of code authored* (determined by git blame query) OR
      • Being at the top 5 contributors in terms of number of commits OR lines added OR lines removed*
      • -

      *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

      +
    +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + + + - - + + diff --git a/v0.15.1-rc1/LICENSE-text.html b/v0.15.1-rc1/LICENSE-text.html index 8634d769b4..c6d8b1dcf6 100644 --- a/v0.15.1-rc1/LICENSE-text.html +++ b/v0.15.1-rc1/LICENSE-text.html @@ -1,8 +1,22 @@ - -License • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -123,17 +143,19 @@ limitations under the License. - + + + + - - + + diff --git a/v0.15.1-rc1/SECURITY.html b/v0.15.1-rc1/SECURITY.html index 04699ccf3c..681590b39e 100644 --- a/v0.15.1-rc1/SECURITY.html +++ b/v0.15.1-rc1/SECURITY.html @@ -1,8 +1,22 @@ - -Security Policy • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,38 +131,44 @@
    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    -
    • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
    • +
        +
      • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
      • Full paths of source file(s) related to the manifestation of the issue
      • The location of the affected source code (tag/branch/commit or direct URL)
      • Any special configuration required to reproduce the issue
      • Step-by-step instructions to reproduce the issue
      • Proof-of-concept or exploit code (if possible)
      • Impact of the issue, including how an attacker might exploit the issue
      • -

      This information will help us triage your report more quickly.

      +
    +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + + + - - + + diff --git a/v0.15.1-rc1/articles/adding-support-for-reporting.html b/v0.15.1-rc1/articles/adding-support-for-reporting.html index 924eeddcd0..2ec9123738 100644 --- a/v0.15.1-rc1/articles/adding-support-for-reporting.html +++ b/v0.15.1-rc1/articles/adding-support-for-reporting.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/blueprint/actors.html b/v0.15.1-rc1/articles/blueprint/actors.html index 245b8a375a..b313d4d19f 100644 --- a/v0.15.1-rc1/articles/blueprint/actors.html +++ b/v0.15.1-rc1/articles/blueprint/actors.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/blueprint/dataflow.html b/v0.15.1-rc1/articles/blueprint/dataflow.html index 1d22d06c19..b99e21ed1f 100644 --- a/v0.15.1-rc1/articles/blueprint/dataflow.html +++ b/v0.15.1-rc1/articles/blueprint/dataflow.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/blueprint/filter_panel.html b/v0.15.1-rc1/articles/blueprint/filter_panel.html index b7cecaee24..0f8bb1cac6 100644 --- a/v0.15.1-rc1/articles/blueprint/filter_panel.html +++ b/v0.15.1-rc1/articles/blueprint/filter_panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/blueprint/in_app_data.html b/v0.15.1-rc1/articles/blueprint/in_app_data.html index adcb28998c..66c6b9a894 100644 --- a/v0.15.1-rc1/articles/blueprint/in_app_data.html +++ b/v0.15.1-rc1/articles/blueprint/in_app_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/blueprint/index.html b/v0.15.1-rc1/articles/blueprint/index.html index 2c5d91824c..4022a7671e 100644 --- a/v0.15.1-rc1/articles/blueprint/index.html +++ b/v0.15.1-rc1/articles/blueprint/index.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/blueprint/input_data.html b/v0.15.1-rc1/articles/blueprint/input_data.html index 1846f4667b..4f48d0c63e 100644 --- a/v0.15.1-rc1/articles/blueprint/input_data.html +++ b/v0.15.1-rc1/articles/blueprint/input_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/blueprint/intro.html b/v0.15.1-rc1/articles/blueprint/intro.html index 063c8a03f3..272ade1c9d 100644 --- a/v0.15.1-rc1/articles/blueprint/intro.html +++ b/v0.15.1-rc1/articles/blueprint/intro.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/blueprint/module_encapsulation.html b/v0.15.1-rc1/articles/blueprint/module_encapsulation.html index ce1f2daf01..ceaedda56f 100644 --- a/v0.15.1-rc1/articles/blueprint/module_encapsulation.html +++ b/v0.15.1-rc1/articles/blueprint/module_encapsulation.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/blueprint/product_map.html b/v0.15.1-rc1/articles/blueprint/product_map.html index 7f73166fe4..aba4052625 100644 --- a/v0.15.1-rc1/articles/blueprint/product_map.html +++ b/v0.15.1-rc1/articles/blueprint/product_map.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/bootstrap-themes-in-teal.html b/v0.15.1-rc1/articles/bootstrap-themes-in-teal.html index cbd80418c7..51b86a6ea4 100644 --- a/v0.15.1-rc1/articles/bootstrap-themes-in-teal.html +++ b/v0.15.1-rc1/articles/bootstrap-themes-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/creating-custom-modules.html b/v0.15.1-rc1/articles/creating-custom-modules.html index 3468b6a784..adb503deef 100644 --- a/v0.15.1-rc1/articles/creating-custom-modules.html +++ b/v0.15.1-rc1/articles/creating-custom-modules.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/data-as-shiny-module.html b/v0.15.1-rc1/articles/data-as-shiny-module.html index e9dcea8d82..2def2e1628 100644 --- a/v0.15.1-rc1/articles/data-as-shiny-module.html +++ b/v0.15.1-rc1/articles/data-as-shiny-module.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/filter-panel.html b/v0.15.1-rc1/articles/filter-panel.html index a82170da4f..bfb73541b6 100644 --- a/v0.15.1-rc1/articles/filter-panel.html +++ b/v0.15.1-rc1/articles/filter-panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/getting-started-with-teal.html b/v0.15.1-rc1/articles/getting-started-with-teal.html index ecb75f86e7..fa9a542298 100644 --- a/v0.15.1-rc1/articles/getting-started-with-teal.html +++ b/v0.15.1-rc1/articles/getting-started-with-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/including-data-in-teal-applications.html b/v0.15.1-rc1/articles/including-data-in-teal-applications.html index 5fd25946cd..0487ee643c 100644 --- a/v0.15.1-rc1/articles/including-data-in-teal-applications.html +++ b/v0.15.1-rc1/articles/including-data-in-teal-applications.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/articles/index.html b/v0.15.1-rc1/articles/index.html index 8dc9ec8e9e..2a1f6e6d29 100644 --- a/v0.15.1-rc1/articles/index.html +++ b/v0.15.1-rc1/articles/index.html @@ -1,8 +1,22 @@ - -Articles • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,78 +131,113 @@

    Get started

    -
    Getting Started with teal
    +
    +
    Getting Started with teal
    -
    + +
    + + + + + + + + + +

    📃 Technical blueprint

    -

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    +

    +

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    -
    About Technical Blueprint
    +
    +
    About Technical Blueprint
    -
    Introduction
    + +
    Introduction
    -
    Actors
    + +
    Actors
    -
    Data Flow
    + +
    Data Flow
    -
    Product Map
    + +
    Product Map
    -
    + + + + + + + + + + - - + + diff --git a/v0.15.1-rc1/articles/teal-options.html b/v0.15.1-rc1/articles/teal-options.html index 160ac060eb..b644ee15e6 100644 --- a/v0.15.1-rc1/articles/teal-options.html +++ b/v0.15.1-rc1/articles/teal-options.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1-rc1/authors.html b/v0.15.1-rc1/authors.html index 2c396f5a92..0da0f76078 100644 --- a/v0.15.1-rc1/authors.html +++ b/v0.15.1-rc1/authors.html @@ -1,8 +1,22 @@ - -Authors and Citation • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -110,7 +130,8 @@

    Authors

    -
    • +
        +
      • Dawid Kaledkowski. Author, maintainer.

      • @@ -182,7 +203,8 @@

        Authors

        Maximilian Mordig. Contributor.

        -
    + +

    Citation

    @@ -203,17 +225,19 @@

    Citation

    }
    + + + + - - + + diff --git a/v0.15.1-rc1/coverage-report/index.html b/v0.15.1-rc1/coverage-report/index.html index eed3d58abd..2234c742d8 100644 --- a/v0.15.1-rc1/coverage-report/index.html +++ b/v0.15.1-rc1/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -165,28 +164,32 @@

    teal coverage - 68.02%

    8 - 6x + 6x +
      vapply(
    9 - 6x + 6x +
        utils::sessionInfo()$otherPkgs,
    10 - 6x + 6x +
        function(x) {
    11 - 36x + 36x +
          paste0("library(", x$Package, ")")
    @@ -200,7 +203,8 @@

    teal coverage - 68.02%

    13 - 6x + 6x +
        character(1)
    @@ -221,21 +225,24 @@

    teal coverage - 68.02%

    16 - 6x + 6x +
        rev() %>%
    17 - 6x + 6x +
        paste0(sep = "\n") %>%
    18 - 6x + 6x +
        paste0(collapse = "")
    @@ -277,21 +284,24 @@

    teal coverage - 68.02%

    24 - 10x + 10x +
      code_string <- getOption("teal.load_nest_code")
    25 - 10x + 10x +
      if (is.character(code_string)) {
    26 - 2x + 2x +
        code_string
    @@ -305,7 +315,8 @@

    teal coverage - 68.02%

    28 - 8x + 8x +
        "# Add any code to install/load your NEST environment here\n"
    @@ -445,21 +456,24 @@

    teal coverage - 68.02%

    48 - 4x + 4x +
      str_prepro <-
    49 - 4x + 4x +
        teal.data:::get_code_dependency(attr(datasets, "preprocessing_code"), names = datanames, check_names = FALSE)
    50 - 4x + 4x +
      if (length(str_prepro) == 0) {
    @@ -480,7 +494,8 @@

    teal coverage - 68.02%

    53 - 4x + 4x +
        str_prepro <- paste(str_prepro, collapse = "\n")
    @@ -508,35 +523,40 @@

    teal coverage - 68.02%

    57 - 4x + 4x +
      str_hash <- vapply(datanames, function(dataname) {
    58 - 6x + 6x +
        sprintf(
    59 - 6x + 6x +
          "stopifnot(%s == %s)",
    60 - 6x + 6x +
          deparse1(bquote(rlang::hash(.(as.name(dataname))))),
    61 - 6x + 6x +
          deparse1(hashes[[dataname]])
    @@ -550,14 +570,16 @@

    teal coverage - 68.02%

    63 - 4x + 4x +
      }, character(1))
    64 - 4x + 4x +
      str_hash <- paste(str_hash, collapse = "\n")
    @@ -578,21 +600,24 @@

    teal coverage - 68.02%

    67 - 4x + 4x +
      str_filter <- teal.slice::get_filter_expr(datasets, datanames)
    68 - 4x + 4x +
      if (str_filter == "") {
    69 - 2x + 2x +
        str_filter <- character(0)
    @@ -620,14 +645,16 @@

    teal coverage - 68.02%

    73 - 4x + 4x +
      str_code <- paste(c(str_prepro, str_hash, str_filter), collapse = "\n\n")
    74 - 4x + 4x +
      sprintf("%s\n", str_code)
    @@ -1606,42 +1633,48 @@

    teal coverage - 68.02%

    138 - 143x + 143x +
      checkmate::assert_string(label)
    139 - 140x + 140x +
      if (label == "global_filters") {
    140 - 1x + 1x +
        stop(
    141 - 1x + 1x +
          sprintf("module(label = \"%s\", ...\n  ", label),
    142 - 1x + 1x +
          "Label 'global_filters' is reserved in teal. Please change to something else.",
    143 - 1x + 1x +
          call. = FALSE
    @@ -1662,7 +1695,8 @@

    teal coverage - 68.02%

    146 - 139x + 139x +
      if (label == "Report previewer") {
    @@ -1725,35 +1759,40 @@

    teal coverage - 68.02%

    155 - 139x + 139x +
      checkmate::assert_function(server)
    156 - 139x + 139x +
      server_formals <- names(formals(server))
    157 - 139x + 139x +
      if (!(
    158 - 139x + 139x +
        "id" %in% server_formals ||
    159 - 139x + 139x +
          all(c("input", "output", "session") %in% server_formals)
    @@ -1767,70 +1806,80 @@

    teal coverage - 68.02%

    161 - 2x + 2x +
        stop(
    162 - 2x + 2x +
          "\nmodule() `server` argument requires a function with following arguments:",
    163 - 2x + 2x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    164 - 2x + 2x +
          "\n - input, output, session (not recommended) - then `shiny::callModule` will be used to call a module.",
    165 - 2x + 2x +
          "\n\nFollowing arguments can be used optionaly:",
    166 - 2x + 2x +
          "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
    167 - 2x + 2x +
          "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
    168 - 2x + 2x +
          "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
    169 - 2x + 2x +
          "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
    170 - 2x + 2x +
          "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
    @@ -1851,42 +1900,48 @@

    teal coverage - 68.02%

    173 - 137x + 137x +
      if ("datasets" %in% server_formals) {
    174 - 2x + 2x +
        warning(
    175 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    176 - 2x + 2x +
          "`datasets` argument in the server is deprecated and will be removed in the next release. ",
    177 - 2x + 2x +
          "Please use `data` instead.",
    178 - 2x + 2x +
          call. = FALSE
    @@ -1928,56 +1983,64 @@

    teal coverage - 68.02%

    184 - 137x + 137x +
      checkmate::assert_function(ui)
    185 - 137x + 137x +
      ui_formals <- names(formals(ui))
    186 - 137x + 137x +
      if (!"id" %in% ui_formals) {
    187 - 1x + 1x +
        stop(
    188 - 1x + 1x +
          "\nmodule() `ui` argument requires a function with following arguments:",
    189 - 1x + 1x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    190 - 1x + 1x +
          "\n\nFollowing arguments can be used optionally:",
    191 - 1x + 1x +
          "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
    @@ -1998,42 +2061,48 @@

    teal coverage - 68.02%

    194 - 136x + 136x +
      if (any(c("data", "datasets") %in% ui_formals)) {
    195 - 2x + 2x +
        stop(
    196 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    197 - 2x + 2x +
          "UI with `data` or `datasets` argument is no longer accepted.\n  ",
    198 - 2x + 2x +
          "If some UI inputs depend on data, please move the logic to your server instead.\n  ",
    199 - 2x + 2x +
          "Possible solutions are renderUI() or updateXyzInput() functions."
    @@ -2075,7 +2144,8 @@

    teal coverage - 68.02%

    205 - 134x + 134x +
      if (!missing(filters)) {
    @@ -2145,21 +2215,24 @@

    teal coverage - 68.02%

    215 - 134x + 134x +
      if (!is.element("data", server_formals) && !is.null(datanames)) {
    216 - 50x + 50x +
        message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
    217 - 50x + 50x +
        datanames <- NULL
    @@ -2173,7 +2246,8 @@

    teal coverage - 68.02%

    219 - 134x + 134x +
      checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
    @@ -2194,49 +2268,56 @@

    teal coverage - 68.02%

    222 - 133x + 133x +
      checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
    223 - 131x + 131x +
      srv_extra_args <- setdiff(names(server_args), server_formals)
    224 - 131x + 131x +
      if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
    225 - 1x + 1x +
        stop(
    226 - 1x + 1x +
          "\nFollowing `server_args` elements have no equivalent in the formals of the server:\n",
    227 - 1x + 1x +
          paste(paste(" -", srv_extra_args), collapse = "\n"),
    228 - 1x + 1x +
          "\n\nUpdate the server arguments by including above or add `...`"
    @@ -2271,49 +2352,56 @@

    teal coverage - 68.02%

    233 - 130x + 130x +
      checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
    234 - 128x + 128x +
      ui_extra_args <- setdiff(names(ui_args), ui_formals)
    235 - 128x + 128x +
      if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
    236 - 1x + 1x +
        stop(
    237 - 1x + 1x +
          "\nFollowing `ui_args` elements have no equivalent in the formals of UI:\n",
    238 - 1x + 1x +
          paste(paste(" -", ui_extra_args), collapse = "\n"),
    239 - 1x + 1x +
          "\n\nUpdate the UI arguments by including above or add `...`"
    @@ -2341,35 +2429,40 @@

    teal coverage - 68.02%

    243 - 127x + 127x +
      structure(
    244 - 127x + 127x +
        list(
    245 - 127x + 127x +
          label = label,
    246 - 127x + 127x +
          server = server, ui = ui, datanames = unique(datanames),
    247 - 127x + 127x +
          server_args = server_args, ui_args = ui_args
    @@ -2383,7 +2476,8 @@

    teal coverage - 68.02%

    249 - 127x + 127x +
        class = "teal_module"
    @@ -2439,42 +2533,48 @@

    teal coverage - 68.02%

    257 - 99x + 99x +
      checkmate::assert_string(label)
    258 - 97x + 97x +
      submodules <- list(...)
    259 - 97x + 97x +
      if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
    260 - 2x + 2x +
        stop(
    261 - 2x + 2x +
          "The only character argument to modules() must be 'label' and it must be named, ",
    262 - 2x + 2x +
          "change modules('lab', ...) to modules(label = 'lab', ...)"
    @@ -2502,7 +2602,8 @@

    teal coverage - 68.02%

    266 - 95x + 95x +
      checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -2523,42 +2624,48 @@

    teal coverage - 68.02%

    269 - 92x + 92x +
      labels <- vapply(submodules, function(submodule) submodule$label, character(1))
    270 - 92x + 92x +
      names(submodules) <- make.unique(gsub("[^[:alnum:]]+", "_", labels), sep = "_")
    271 - 92x + 92x +
      structure(
    272 - 92x + 92x +
        list(
    273 - 92x + 92x +
          label = label,
    274 - 92x + 92x +
          children = submodules
    @@ -2572,7 +2679,8 @@

    teal coverage - 68.02%

    276 - 92x + 92x +
        class = "teal_modules"
    @@ -2635,7 +2743,8 @@

    teal coverage - 68.02%

    285 - 3x + 3x +
      paste0(paste(rep(" ", indent), collapse = ""), "+ ", x$label, "\n", collapse = "")
    @@ -2740,28 +2849,32 @@

    teal coverage - 68.02%

    300 - 1x + 1x +
      paste(
    301 - 1x + 1x +
        c(
    302 - 1x + 1x +
          paste0(rep(" ", indent), "+ ", x$label, "\n"),
    303 - 1x + 1x +
          unlist(lapply(x$children, format, indent = indent + 1, ...))
    @@ -2775,7 +2888,8 @@

    teal coverage - 68.02%

    305 - 1x + 1x +
        collapse = ""
    @@ -2908,42 +3022,48 @@

    teal coverage - 68.02%

    324 - 8x + 8x +
      checkmate::assert_class(modules, "teal_modules")
    325 - 6x + 6x +
      checkmate::assert_class(module, "teal_module")
    326 - 4x + 4x +
      modules$children <- c(modules$children, list(module))
    327 - 4x + 4x +
      labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
    328 - 4x + 4x +
      names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
    329 - 4x + 4x +
      modules
    @@ -3048,7 +3168,8 @@

    teal coverage - 68.02%

    344 - 20x + 20x +
      if (inherits(modules, class)) {
    @@ -3062,28 +3183,32 @@

    teal coverage - 68.02%

    346 - 20x + 20x +
      } else if (inherits(modules, "teal_module")) {
    347 - 11x + 11x +
        NULL
    348 - 9x + 9x +
      } else if (inherits(modules, "teal_modules")) {
    349 - 9x + 9x +
        Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
    @@ -3293,49 +3418,56 @@

    teal coverage - 68.02%

    379 - 286x + 286x +
      checkmate::assert_string(arg)
    380 - 283x + 283x +
      if (inherits(modules, "teal_modules")) {
    381 - 29x + 29x +
        any(unlist(lapply(modules$children, is_arg_used, arg)))
    382 - 254x + 254x +
      } else if (inherits(modules, "teal_module")) {
    383 - 43x + 43x +
        is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
    384 - 211x + 211x +
      } else if (is.function(modules)) {
    385 - 209x + 209x +
        isTRUE(arg %in% names(formals(modules)))
    @@ -3349,7 +3481,8 @@

    teal coverage - 68.02%

    387 - 2x + 2x +
        stop("is_arg_used function not implemented for this object")
    @@ -3461,28 +3594,32 @@

    teal coverage - 68.02%

    403 - 12x + 12x +
      checkmate::assert_multi_class(modules, c("teal_module", "teal_modules"))
    404 - 12x + 12x +
      checkmate::assert_int(depth, lower = 0)
    405 - 11x + 11x +
      if (inherits(modules, "teal_modules")) {
    406 - 4x + 4x +
        max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
    @@ -3496,7 +3633,8 @@

    teal coverage - 68.02%

    408 - 7x + 7x +
        depth
    @@ -3950,14 +4088,16 @@

    teal coverage - 68.02%

    48 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    49 - 3x + 3x +
        observeEvent(input$show, {
    @@ -4041,7 +4181,8 @@

    teal coverage - 68.02%

    61 - 3x + 3x +
        filter_manager_srv("filter_manager", filtered_data_list, filter)
    @@ -4153,14 +4294,16 @@

    teal coverage - 68.02%

    77 - 5x + 5x +
      moduleServer(id, function(input, output, session) {
    78 - 5x + 5x +
        logger::log_trace("filter_manager_srv initializing for: { paste(names(filtered_data_list), collapse = ', ')}.")
    @@ -4174,7 +4317,8 @@

    teal coverage - 68.02%

    80 - 5x + 5x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    @@ -4216,7 +4360,8 @@

    teal coverage - 68.02%

    86 - 5x + 5x +
        slices_global <- reactiveVal(filter)
    @@ -4230,14 +4375,16 @@

    teal coverage - 68.02%

    88 - 5x + 5x +
        filtered_data_list <-
    89 - 5x + 5x +
          if (!is_module_specific) {
    @@ -4258,7 +4405,8 @@

    teal coverage - 68.02%

    92 - 4x + 4x +
            list(global_filters = unlist(filtered_data_list)[[1]])
    @@ -4286,21 +4434,24 @@

    teal coverage - 68.02%

    96 - 1x + 1x +
            flatten_nested <- function(x, name = NULL) {
    97 - 5x + 5x +
              if (inherits(x, "FilteredData")) {
    98 - 3x + 3x +
                setNames(list(x), name)
    @@ -4314,7 +4465,8 @@

    teal coverage - 68.02%

    100 - 2x + 2x +
                unlist(lapply(names(x), function(name) flatten_nested(x[[name]], name)))
    @@ -4335,7 +4487,8 @@

    teal coverage - 68.02%

    103 - 1x + 1x +
            flatten_nested(filtered_data_list)
    @@ -4370,49 +4523,56 @@

    teal coverage - 68.02%

    108 - 5x + 5x +
        mapping_matrix <- reactive({
    109 - 5x + 5x +
          state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
    110 - 5x + 5x +
          mapping_smooth <- lapply(filtered_data_list, function(x) {
    111 - 7x + 7x +
            state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
    112 - 7x + 7x +
            state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
    113 - 7x + 7x +
            states_active <- state_ids_global %in% state_ids_local
    114 - 7x + 7x +
            ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
    @@ -4433,7 +4593,8 @@

    teal coverage - 68.02%

    117 - 5x + 5x +
          as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
    @@ -4454,14 +4615,16 @@

    teal coverage - 68.02%

    120 - 5x + 5x +
        output$slices_table <- renderTable(
    121 - 5x + 5x +
          expr = {
    @@ -4475,28 +4638,32 @@

    teal coverage - 68.02%

    123 - 2x + 2x +
            mm <- mapping_matrix()
    124 - 2x + 2x +
            mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
    125 - 2x + 2x +
            mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
    126 - 2x + 2x +
            if (!is_module_specific) colnames(mm) <- "Global Filters"
    @@ -4517,21 +4684,24 @@

    teal coverage - 68.02%

    129 - 2x + 2x +
            if (nrow(mm) == 0L) {
    130 - 2x + 2x +
              mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
    131 - 2x + 2x +
              rownames(mm) <- ""
    @@ -4559,7 +4729,8 @@

    teal coverage - 68.02%

    135 - 2x + 2x +
            mm[names(mm) != "Report previewer"]
    @@ -4573,14 +4744,16 @@

    teal coverage - 68.02%

    137 - 5x + 5x +
          align = paste(c("l", rep("c", sum(names(filtered_data_list) != "Report previewer"))), collapse = ""),
    138 - 5x + 5x +
          rownames = TRUE
    @@ -4608,35 +4781,40 @@

    teal coverage - 68.02%

    142 - 5x + 5x +
        modules_out <- lapply(names(filtered_data_list), function(module_name) {
    143 - 7x + 7x +
          filter_manager_module_srv(
    144 - 7x + 7x +
            id = module_name,
    145 - 7x + 7x +
            module_fd = filtered_data_list[[module_name]],
    146 - 7x + 7x +
            slices_global = slices_global
    @@ -4671,7 +4849,8 @@

    teal coverage - 68.02%

    151 - 5x + 5x +
        snapshot_manager_srv("snapshot_manager", slices_global, mapping_matrix, filtered_data_list)
    @@ -4685,7 +4864,8 @@

    teal coverage - 68.02%

    153 - 5x + 5x +
        modules_out # returned for testing purpose
    @@ -4874,7 +5054,8 @@

    teal coverage - 68.02%

    180 - 7x + 7x +
      moduleServer(id, function(input, output, session) {
    @@ -4888,7 +5069,8 @@

    teal coverage - 68.02%

    182 - 7x + 7x +
        module_fd$set_available_teal_slices(reactive(slices_global()))
    @@ -4909,7 +5091,8 @@

    teal coverage - 68.02%

    185 - 7x + 7x +
        slices_module <- reactive(module_fd$get_filter_state())
    @@ -4930,14 +5113,16 @@

    teal coverage - 68.02%

    188 - 7x + 7x +
        previous_slices <- reactiveVal(isolate(slices_module()))
    189 - 7x + 7x +
        slices_added <- reactiveVal(NULL)
    @@ -4958,21 +5143,24 @@

    teal coverage - 68.02%

    192 - 7x + 7x +
        observeEvent(slices_module(), ignoreNULL = FALSE, {
    193 - 2x + 2x +
          logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
    194 - 2x + 2x +
          added <- setdiff_teal_slices(slices_module(), slices_global())
    @@ -4986,7 +5174,8 @@

    teal coverage - 68.02%

    196 - 2x + 2x +
          previous_slices(slices_module())
    @@ -5007,7 +5196,8 @@

    teal coverage - 68.02%

    199 - 7x + 7x +
        observeEvent(slices_added(), ignoreNULL = TRUE, {
    @@ -5126,7 +5316,8 @@

    teal coverage - 68.02%

    216 - 7x + 7x +
        slices_module # returned for testing purpose
    @@ -5482,42 +5673,48 @@

    teal coverage - 68.02%

    48 - 34x + 34x +
      lifecycle::deprecate_soft(
    49 - 34x + 34x +
        when = "0.15.0",
    50 - 34x + 34x +
        what = "tdata()",
    51 - 34x + 34x +
        details = paste(
    52 - 34x + 34x +
          "tdata is deprecated and will be removed in the next release. Use `teal_data` instead.\n",
    53 - 34x + 34x +
          "Please follow migration instructions https://github.com/insightsengineering/teal/discussions/987."
    @@ -5538,28 +5735,32 @@

    teal coverage - 68.02%

    56 - 34x + 34x +
      checkmate::assert_list(
    57 - 34x + 34x +
        data,
    58 - 34x + 34x +
        any.missing = FALSE, names = "unique",
    59 - 34x + 34x +
        types = c("data.frame", "reactive", "MultiAssayExperiment")
    @@ -5573,14 +5774,16 @@

    teal coverage - 68.02%

    61 - 30x + 30x +
      checkmate::assert_class(join_keys, "join_keys", null.ok = TRUE)
    62 - 29x + 29x +
      checkmate::assert_multi_class(code, c("character", "reactive"))
    @@ -5594,14 +5797,16 @@

    teal coverage - 68.02%

    64 - 28x + 28x +
      checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
    65 - 26x + 26x +
      checkmate::assert_subset(names(metadata), names(data))
    @@ -5615,14 +5820,16 @@

    teal coverage - 68.02%

    67 - 25x + 25x +
      if (is.reactive(code)) {
    68 - 9x + 9x +
        isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
    @@ -5650,21 +5857,24 @@

    teal coverage - 68.02%

    72 - 24x + 24x +
      for (x in names(data)) {
    73 - 47x + 47x +
        if (!is.reactive(data[[x]])) {
    74 - 31x + 31x +
          data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
    @@ -5699,21 +5909,24 @@

    teal coverage - 68.02%

    79 - 24x + 24x +
      attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
    80 - 24x + 24x +
      attr(data, "join_keys") <- join_keys
    81 - 24x + 24x +
      attr(data, "metadata") <- metadata
    @@ -5734,14 +5947,16 @@

    teal coverage - 68.02%

    84 - 24x + 24x +
      class(data) <- c("tdata", class(data))
    85 - 24x + 24x +
      data
    @@ -5881,14 +6096,16 @@

    teal coverage - 68.02%

    105 - 2x + 2x +
      checkmate::assert_class(data, "tdata")
    106 - 1x + 1x +
      list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
    @@ -5979,14 +6196,16 @@

    teal coverage - 68.02%

    119 - 7x + 7x +
      checkmate::assert_class(data, "tdata")
    120 - 5x + 5x +
      attr(data, "code")()
    @@ -6042,7 +6261,8 @@

    teal coverage - 68.02%

    128 - 2x + 2x +
      attr(data, "join_keys")
    @@ -6105,14 +6325,16 @@

    teal coverage - 68.02%

    137 - 4x + 4x +
      checkmate::assert_string(dataname)
    138 - 4x + 4x +
      UseMethod("get_metadata", data)
    @@ -6154,21 +6376,24 @@

    teal coverage - 68.02%

    144 - 4x + 4x +
      metadata <- attr(data, "metadata")
    145 - 4x + 4x +
      if (is.null(metadata)) {
    146 - 1x + 1x +
        return(NULL)
    @@ -6182,7 +6407,8 @@

    teal coverage - 68.02%

    148 - 3x + 3x +
      metadata[[dataname]]
    @@ -6427,14 +6653,16 @@

    teal coverage - 68.02%

    183 - 8x + 8x +
      if (inherits(x, "tdata")) {
    184 - 2x + 2x +
        return(x)
    @@ -6448,77 +6676,88 @@

    teal coverage - 68.02%

    186 - 6x + 6x +
      if (is.reactive(x)) {
    187 - 1x + 1x +
        checkmate::assert_class(isolate(x()), "teal_data")
    188 - 1x + 1x +
        datanames <- isolate(teal_data_datanames(x()))
    189 - 1x + 1x +
        datasets <- sapply(datanames, function(dataname) reactive(x()[[dataname]]), simplify = FALSE)
    190 - 1x + 1x +
        code <- reactive(teal.code::get_code(x()))
    191 - 1x + 1x +
        join_keys <- isolate(teal.data::join_keys(x()))
    192 - 5x + 5x +
      } else if (inherits(x, "teal_data")) {
    193 - 5x + 5x +
        datanames <- teal_data_datanames(x)
    194 - 5x + 5x +
        datasets <- sapply(datanames, function(dataname) reactive(x[[dataname]]), simplify = FALSE)
    195 - 5x + 5x +
        code <- reactive(teal.code::get_code(x))
    196 - 5x + 5x +
        join_keys <- isolate(teal.data::join_keys(x))
    @@ -6539,7 +6778,8 @@

    teal coverage - 68.02%

    199 - 6x + 6x +
      new_tdata(data = datasets, code = code, join_keys = join_keys)
    @@ -6657,21 +6897,24 @@

    teal coverage - 68.02%

    15 - 18x + 18x +
      script <- sprintf(
    16 - 18x + 18x +
        "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
    17 - 18x + 18x +
        ns("timezone")
    @@ -6685,14 +6928,16 @@

    teal coverage - 68.02%

    19 - 18x + 18x +
      shinyjs::runjs(script) # function does not return anything
    20 - 18x + 18x +
      invisible(NULL)
    @@ -6741,42 +6986,48 @@

    teal coverage - 68.02%

    27 - 11x + 11x +
      bs_theme <- getOption("teal.bs_theme")
    28 - 11x + 11x +
      if (is.null(bs_theme)) {
    29 - 8x + 8x +
        NULL
    30 - 3x + 3x +
      } else if (!inherits(bs_theme, "bs_theme")) {
    31 - 2x + 2x +
        warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
    32 - 2x + 2x +
        NULL
    @@ -6790,7 +7041,8 @@

    teal coverage - 68.02%

    34 - 1x + 1x +
        bs_theme
    @@ -6846,42 +7098,48 @@

    teal coverage - 68.02%

    42 - 11x + 11x +
      parents <- character(0)
    43 - 11x + 11x +
      for (i in dataname) {
    44 - 16x + 16x +
        while (length(i) > 0) {
    45 - 18x + 18x +
          parent_i <- teal.data::parent(join_keys, i)
    46 - 18x + 18x +
          parents <- c(parent_i, parents)
    47 - 18x + 18x +
          i <- parent_i
    @@ -6909,7 +7167,8 @@

    teal coverage - 68.02%

    51 - 11x + 11x +
      unique(c(parents, dataname))
    @@ -6993,14 +7252,16 @@

    teal coverage - 68.02%

    63 - 13x + 13x +
      checkmate::assert_class(x, "teal_data")
    64 - 13x + 13x +
      checkmate::assert_character(datanames, min.chars = 1L, any.missing = FALSE)
    @@ -7014,21 +7275,24 @@

    teal coverage - 68.02%

    66 - 13x + 13x +
      ans <- teal.slice::init_filtered_data(
    67 - 13x + 13x +
        x = sapply(datanames, function(dn) x[[dn]], simplify = FALSE),
    68 - 13x + 13x +
        join_keys = teal.data::join_keys(x)
    @@ -7049,21 +7313,24 @@

    teal coverage - 68.02%

    71 - 13x + 13x +
      attr(ans, "preprocessing_code") <- teal.code::get_code(x)
    72 - 13x + 13x +
      attr(ans, "verification_status") <- x@verified
    73 - 13x + 13x +
      ans
    @@ -7196,35 +7463,40 @@

    teal coverage - 68.02%

    92 - 2x + 2x +
      checkmate::assert_string(title)
    93 - 2x + 2x +
      checkmate::assert_string(label)
    94 - 2x + 2x +
      checkmate::assert_string(description, null.ok = TRUE)
    95 - 2x + 2x +
      checkmate::assert_flag(with_filter)
    96 - 2x + 2x +
      checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
    @@ -7238,49 +7510,56 @@

    teal coverage - 68.02%

    98 - 2x + 2x +
      card <- teal::TealReportCard$new()
    99 - 2x + 2x +
      title <- if (label == "") title else label
    100 - 2x + 2x +
      card$set_name(title)
    101 - 2x + 2x +
      card$append_text(title, "header2")
    102 - 1x + 1x +
      if (!is.null(description)) card$append_text(description, "header3")
    103 - 1x + 1x +
      if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
    104 - 2x + 2x +
      card
    @@ -7665,14 +7944,16 @@

    teal coverage - 68.02%

    159 - 12x + 12x +
      checkmate::assert_class(modules, "teal_modules")
    160 - 12x + 12x +
      checkmate::assert_character(datanames)
    @@ -7686,7 +7967,8 @@

    teal coverage - 68.02%

    162 - 12x + 12x +
      recursive_check_datanames <- function(modules, datanames) {
    @@ -7700,14 +7982,16 @@

    teal coverage - 68.02%

    164 - 26x + 26x +
        if (inherits(modules, "teal_modules")) {
    165 - 12x + 12x +
          sapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
    @@ -7721,49 +8005,56 @@

    teal coverage - 68.02%

    167 - 14x + 14x +
          extra_datanames <- setdiff(modules$datanames, c("all", datanames))
    168 - 14x + 14x +
          if (length(extra_datanames)) {
    169 - 2x + 2x +
            sprintf(
    170 - 2x + 2x +
              "- Module '%s' uses datanames not available in 'data': (%s) not in (%s)",
    171 - 2x + 2x +
              modules$label,
    172 - 2x + 2x +
              toString(dQuote(extra_datanames, q = FALSE)),
    173 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -7798,21 +8089,24 @@

    teal coverage - 68.02%

    178 - 12x + 12x +
      check_datanames <- unlist(recursive_check_datanames(modules, datanames))
    179 - 12x + 12x +
      if (length(check_datanames)) {
    180 - 2x + 2x +
        paste(check_datanames, collapse = "\n")
    @@ -7826,7 +8120,8 @@

    teal coverage - 68.02%

    182 - 10x + 10x +
        TRUE
    @@ -7931,14 +8226,16 @@

    teal coverage - 68.02%

    197 - 10x + 10x +
      checkmate::assert_class(filters, "teal_slices")
    198 - 10x + 10x +
      checkmate::assert_character(datanames)
    @@ -7959,63 +8256,72 @@

    teal coverage - 68.02%

    201 - 10x + 10x +
      out <- unlist(sapply(
    202 - 10x + 10x +
        filters, function(filter) {
    203 - 3x + 3x +
          dataname <- shiny::isolate(filter$dataname)
    204 - 3x + 3x +
          if (!dataname %in% datanames) {
    205 - 2x + 2x +
            sprintf(
    206 - 2x + 2x +
              "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
    207 - 2x + 2x +
              shiny::isolate(filter$id),
    208 - 2x + 2x +
              dQuote(dataname, q = FALSE),
    209 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -8064,14 +8370,16 @@

    teal coverage - 68.02%

    216 - 10x + 10x +
      if (length(out)) {
    217 - 2x + 2x +
        paste(out, collapse = "\n")
    @@ -8085,7 +8393,8 @@

    teal coverage - 68.02%

    219 - 8x + 8x +
        TRUE
    @@ -8169,21 +8478,24 @@

    teal coverage - 68.02%

    231 - 51x + 51x +
      checkmate::assert_class(data, "teal_data")
    232 - 51x + 51x +
      if (length(teal.data::datanames(data))) {
    233 - 47x + 47x +
        teal.data::datanames(data)
    @@ -8197,7 +8509,8 @@

    teal coverage - 68.02%

    235 - 4x + 4x +
        ls(teal.code::get_env(data), all.names = TRUE)
    @@ -8267,70 +8580,80 @@

    teal coverage - 68.02%

    245 - 14x + 14x +
      checkmate::assert_class(shiny_tag, "shiny.tag")
    246 - 14x + 14x +
      checkmate::assert_true(shiny_tag$name == "head")
    247 - 13x + 13x +
      child_names <- vapply(shiny_tag$children, `[[`, character(1L), "name")
    248 - 13x + 13x +
      checkmate::assert_subset(c("title", "link"), child_names, .var.name = "child tags")
    249 - 11x + 11x +
      rel_attr <- shiny_tag$children[[which(child_names == "link")]]$attribs$rel
    250 - 11x + 11x +
      checkmate::assert_subset(
    251 - 11x + 11x +
        rel_attr,
    252 - 11x + 11x +
        c("icon", "shortcut icon"),
    253 - 11x + 11x +
        .var.name = "Link tag's rel attribute",
    254 - 11x + 11x +
        empty.ok = FALSE
    @@ -8449,56 +8772,64 @@

    teal coverage - 68.02%

    271 - 11x + 11x +
      checkmate::assert_string(title, null.ok = TRUE)
    272 - 11x + 11x +
      checkmate::assert_string(favicon, null.ok = TRUE)
    273 - 11x + 11x +
      tags$head(
    274 - 11x + 11x +
        tags$title(title),
    275 - 11x + 11x +
        tags$link(
    276 - 11x + 11x +
          rel = "icon",
    277 - 11x + 11x +
          href = favicon,
    278 - 11x + 11x +
          sizes = "any"
    @@ -8638,14 +8969,16 @@

    teal coverage - 68.02%

    298 - 19x + 19x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    299 - 18x + 18x +
      checkmate::assert_class(modules, "teal_modules")
    @@ -8659,28 +8992,32 @@

    teal coverage - 68.02%

    301 - 17x + 17x +
      data <- if (inherits(data, "teal_data")) {
    302 - 15x + 15x +
        as.list(data@env)
    303 - 17x + 17x +
      } else if (inherits(data, "teal_data_module")) {
    304 - 2x + 2x +
        deparse1(body(data$server))
    @@ -8694,7 +9031,8 @@

    teal coverage - 68.02%

    306 - 17x + 17x +
      modules <- lapply(modules, defunction)
    @@ -8708,7 +9046,8 @@

    teal coverage - 68.02%

    308 - 17x + 17x +
      rlang::hash(list(data = data, modules = modules))
    @@ -8757,28 +9096,32 @@

    teal coverage - 68.02%

    315 - 186x + 186x +
      if (is.list(x)) {
    316 - 40x + 40x +
        lapply(x, defunction)
    317 - 146x + 146x +
      } else if (is.function(x)) {
    318 - 44x + 44x +
        deparse1(body(x))
    @@ -8792,7 +9135,8 @@

    teal coverage - 68.02%

    320 - 102x + 102x +
        x
    @@ -8987,56 +9331,64 @@

    teal coverage - 68.02%

    25 - 4x + 4x +
          checkmate::assert_character(src, min.len = 0, max.len = 1)
    26 - 4x + 4x +
          params <- list(...)
    27 - 4x + 4x +
          params$eval <- FALSE
    28 - 4x + 4x +
          rblock <- RcodeBlock$new(src)
    29 - 4x + 4x +
          rblock$set_params(params)
    30 - 4x + 4x +
          self$append_content(rblock)
    31 - 4x + 4x +
          self$append_metadata("SRC", src)
    32 - 4x + 4x +
          invisible(self)
    @@ -9106,28 +9458,32 @@

    teal coverage - 68.02%

    42 - 5x + 5x +
          checkmate::assert_class(fs, "teal_slices")
    43 - 4x + 4x +
          self$append_text("Filter State", "header3")
    44 - 4x + 4x +
          self$append_content(TealSlicesBlock$new(fs))
    45 - 4x + 4x +
          invisible(self)
    @@ -9204,56 +9560,64 @@

    teal coverage - 68.02%

    56 - 4x + 4x +
          checkmate::assert_list(encodings)
    57 - 4x + 4x +
          self$append_text("Selected Options", "header3")
    58 - 4x + 4x +
          if (requireNamespace("yaml", quietly = TRUE)) {
    59 - 4x + 4x +
            self$append_text(yaml::as.yaml(encodings, handlers = list(
    60 - 4x + 4x +
              POSIXct = function(x) format(x, "%Y-%m-%d"),
    61 - 4x + 4x +
              POSIXlt = function(x) format(x, "%Y-%m-%d"),
    62 - 4x + 4x +
              Date = function(x) format(x, "%Y-%m-%d")
    63 - 4x + 4x +
            )), "verbatim")
    @@ -9281,14 +9645,16 @@

    teal coverage - 68.02%

    67 - 4x + 4x +
          self$append_metadata("Encodings", encodings)
    68 - 4x + 4x +
          invisible(self)
    @@ -9442,21 +9808,24 @@

    teal coverage - 68.02%

    90 - 10x + 10x +
          self$set_content(content)
    91 - 9x + 9x +
          self$set_style(style)
    92 - 9x + 9x +
          invisible(self)
    @@ -9547,56 +9916,64 @@

    teal coverage - 68.02%

    105 - 11x + 11x +
          checkmate::assert_class(content, "teal_slices")
    106 - 10x + 10x +
          if (length(content) != 0) {
    107 - 7x + 7x +
            states_list <- lapply(content, function(x) {
    108 - 7x + 7x +
              x_list <- shiny::isolate(as.list(x))
    109 - 7x + 7x +
              if (
    110 - 7x + 7x +
                inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
    111 - 7x + 7x +
                  length(x_list$choices) == 2 &&
    112 - 7x + 7x +
                  length(x_list$selected) == 2
    @@ -9631,7 +10008,8 @@

    teal coverage - 68.02%

    117 - 7x + 7x +
              if (!is.null(x_list$arg)) {
    @@ -9659,14 +10037,16 @@

    teal coverage - 68.02%

    121 - 7x + 7x +
              x_list <- x_list[
    122 - 7x + 7x +
                c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
    @@ -9680,21 +10060,24 @@

    teal coverage - 68.02%

    124 - 7x + 7x +
              names(x_list) <- c(
    125 - 7x + 7x +
                "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
    126 - 7x + 7x +
                "Selected Values", "Selected range", "Include NA values", "Include Inf values"
    @@ -9715,7 +10098,8 @@

    teal coverage - 68.02%

    129 - 7x + 7x +
              Filter(Negate(is.null), x_list)
    @@ -9736,14 +10120,16 @@

    teal coverage - 68.02%

    132 - 7x + 7x +
            if (requireNamespace("yaml", quietly = TRUE)) {
    133 - 7x + 7x +
              super$set_content(yaml::as.yaml(states_list))
    @@ -9778,14 +10164,16 @@

    teal coverage - 68.02%

    138 - 10x + 10x +
          private$teal_slices <- content
    139 - 10x + 10x +
          invisible(self)
    @@ -9834,28 +10222,32 @@

    teal coverage - 68.02%

    146 - 1x + 1x +
          checkmate::assert_list(x)
    147 - 1x + 1x +
          checkmate::assert_names(names(x), must.include = c("teal_slices"))
    148 - 1x + 1x +
          self$set_content(x$teal_slices)
    149 - 1x + 1x +
          invisible(self)
    @@ -9897,7 +10289,8 @@

    teal coverage - 68.02%

    155 - 2x + 2x +
          list(teal_slices = private$teal_slices)
    @@ -10694,42 +11087,48 @@

    teal coverage - 68.02%

    106 - 6x + 6x +
      checkmate::assert_character(id)
    107 - 6x + 6x +
      checkmate::assert_true(is.reactive(slices_global))
    108 - 6x + 6x +
      checkmate::assert_class(isolate(slices_global()), "teal_slices")
    109 - 6x + 6x +
      checkmate::assert_true(is.reactive(mapping_matrix))
    110 - 6x + 6x +
      checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
    111 - 6x + 6x +
      checkmate::assert_list(filtered_data_list, types = "FilteredData", any.missing = FALSE, names = "named")
    @@ -10743,14 +11142,16 @@

    teal coverage - 68.02%

    113 - 6x + 6x +
      moduleServer(id, function(input, output, session) {
    114 - 6x + 6x +
        ns <- session$ns
    @@ -10771,28 +11172,32 @@

    teal coverage - 68.02%

    117 - 6x + 6x +
        filter <- isolate(slices_global())
    118 - 6x + 6x +
        snapshot_history <- reactiveVal({
    119 - 6x + 6x +
          list(
    120 - 6x + 6x +
            "Initial application state" = as.list(filter, recursive = TRUE)
    @@ -10834,7 +11239,8 @@

    teal coverage - 68.02%

    126 - 6x + 6x +
        observeEvent(input$snapshot_add, {
    @@ -10925,7 +11331,8 @@

    teal coverage - 68.02%

    139 - 6x + 6x +
        observeEvent(input$snapshot_name_accept, {
    @@ -11121,7 +11528,8 @@

    teal coverage - 68.02%

    167 - 6x + 6x +
        observeEvent(input$snapshot_load, {
    @@ -11247,7 +11655,8 @@

    teal coverage - 68.02%

    185 - 6x + 6x +
        observeEvent(input$snaphot_file_accept, {
    @@ -11597,7 +12006,8 @@

    teal coverage - 68.02%

    235 - 6x + 6x +
        observeEvent(input$snapshot_reset, {
    @@ -11765,21 +12175,24 @@

    teal coverage - 68.02%

    259 - 6x + 6x +
        observers <- reactiveValues()
    260 - 6x + 6x +
        handlers <- reactiveValues()
    261 - 6x + 6x +
        divs <- reactiveValues()
    @@ -11793,14 +12206,16 @@

    teal coverage - 68.02%

    263 - 6x + 6x +
        observeEvent(snapshot_history(), {
    264 - 2x + 2x +
          lapply(names(snapshot_history())[-1L], function(s) {
    @@ -12171,42 +12586,48 @@

    teal coverage - 68.02%

    317 - 6x + 6x +
        output$snapshot_list <- renderUI({
    318 - 2x + 2x +
          rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
    319 - 2x + 2x +
          if (length(rows) == 0L) {
    320 - 2x + 2x +
            div(
    321 - 2x + 2x +
              class = "snapshot_manager_placeholder",
    322 - 2x + 2x +
              "Snapshots will appear here."
    @@ -12723,14 +13144,16 @@

    teal coverage - 68.02%

    28 - 9x + 9x +
      checkmate::assert_class(tss, "teal_slices")
    29 - 9x + 9x +
      checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
    @@ -12744,7 +13167,8 @@

    teal coverage - 68.02%

    31 - 9x + 9x +
      cat(format(tss, trim_lines = FALSE), "\n", file = file)
    @@ -12793,7 +13217,8 @@

    teal coverage - 68.02%

    38 - 9x + 9x +
      checkmate::assert_file_exists(file, access = "r", extension = "json")
    @@ -12807,56 +13232,64 @@

    teal coverage - 68.02%

    40 - 9x + 9x +
      tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
    41 - 9x + 9x +
      tss_json$slices <-
    42 - 9x + 9x +
        lapply(tss_json$slices, function(slice) {
    43 - 9x + 9x +
          for (field in c("selected", "choices")) {
    44 - 18x + 18x +
            if (!is.null(slice[[field]])) {
    45 - 12x + 12x +
              if (length(slice[[field]]) > 0) {
    46 - 9x + 9x +
                date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
    47 - 9x + 9x +
                time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
    @@ -12870,35 +13303,40 @@

    teal coverage - 68.02%

    49 - 9x + 9x +
                slice[[field]] <-
    50 - 9x + 9x +
                  if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
    51 - 3x + 3x +
                    as.Date(slice[[field]])
    52 - 9x + 9x +
                  } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
    53 - 3x + 3x +
                    as.POSIXct(slice[[field]], tz = "UTC")
    @@ -12912,7 +13350,8 @@

    teal coverage - 68.02%

    55 - 3x + 3x +
                    slice[[field]]
    @@ -12933,7 +13372,8 @@

    teal coverage - 68.02%

    58 - 3x + 3x +
                slice[[field]] <- character(0)
    @@ -12961,7 +13401,8 @@

    teal coverage - 68.02%

    62 - 9x + 9x +
          slice
    @@ -12982,7 +13423,8 @@

    teal coverage - 68.02%

    65 - 9x + 9x +
      tss_elements <- lapply(tss_json$slices, as.teal_slice)
    @@ -12996,7 +13438,8 @@

    teal coverage - 68.02%

    67 - 9x + 9x +
      do.call(teal_slices, c(tss_elements, tss_json$attributes))
    @@ -13842,21 +14285,24 @@

    teal coverage - 68.02%

    119 - 50x + 50x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    120 - 50x + 50x +
      checkmate::assert_class(reporter, "Reporter")
    121 - 49x + 49x +
      UseMethod("srv_nested_tabs", modules)
    @@ -13954,7 +14400,8 @@

    teal coverage - 68.02%

    135 - 22x + 22x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    @@ -13968,14 +14415,16 @@

    teal coverage - 68.02%

    137 - 22x + 22x +
      moduleServer(id = id, module = function(input, output, session) {
    138 - 22x + 22x +
        logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
    @@ -13989,70 +14438,80 @@

    teal coverage - 68.02%

    140 - 22x + 22x +
        labels <- vapply(modules$children, `[[`, character(1), "label")
    141 - 22x + 22x +
        modules_reactive <- sapply(
    142 - 22x + 22x +
          names(modules$children),
    143 - 22x + 22x +
          function(module_id) {
    144 - 33x + 33x +
            srv_nested_tabs(
    145 - 33x + 33x +
              id = module_id,
    146 - 33x + 33x +
              datasets = datasets[[labels[module_id]]],
    147 - 33x + 33x +
              modules = modules$children[[module_id]],
    148 - 33x + 33x +
              is_module_specific = is_module_specific,
    149 - 33x + 33x +
              reporter = reporter
    @@ -14073,7 +14532,8 @@

    teal coverage - 68.02%

    152 - 22x + 22x +
          simplify = FALSE
    @@ -14101,21 +14561,24 @@

    teal coverage - 68.02%

    156 - 22x + 22x +
        input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
    157 - 22x + 22x +
        get_active_module <- reactive({
    158 - 12x + 12x +
          if (length(modules$children) == 1L) {
    @@ -14129,7 +14592,8 @@

    teal coverage - 68.02%

    160 - 1x + 1x +
            modules_reactive[[1]]()
    @@ -14150,7 +14614,8 @@

    teal coverage - 68.02%

    163 - 11x + 11x +
            modules_reactive[[input_validated()]]()
    @@ -14178,7 +14643,8 @@

    teal coverage - 68.02%

    167 - 22x + 22x +
        get_active_module
    @@ -14234,14 +14700,16 @@

    teal coverage - 68.02%

    175 - 27x + 27x +
      checkmate::assert_class(datasets, "FilteredData")
    176 - 27x + 27x +
      logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
    @@ -14255,14 +14723,16 @@

    teal coverage - 68.02%

    178 - 27x + 27x +
      moduleServer(id = id, module = function(input, output, session) {
    179 - 27x + 27x +
        if (!is.null(modules$datanames) && is_module_specific) {
    @@ -14318,35 +14788,40 @@

    teal coverage - 68.02%

    187 - 27x + 27x +
        trigger_data <- reactiveVal(1L)
    188 - 27x + 27x +
        trigger_module <- reactiveVal(NULL)
    189 - 27x + 27x +
        output$data_reactive <- renderUI({
    190 - 17x + 17x +
          lapply(datasets$datanames(), function(x) {
    191 - 21x + 21x +
            datasets$get_data(x, filtered = TRUE)
    @@ -14360,14 +14835,16 @@

    teal coverage - 68.02%

    193 - 17x + 17x +
          isolate(trigger_data(trigger_data() + 1))
    194 - 17x + 17x +
          isolate(trigger_module(TRUE))
    @@ -14381,7 +14858,8 @@

    teal coverage - 68.02%

    196 - 17x + 17x +
          NULL
    @@ -14409,14 +14887,16 @@

    teal coverage - 68.02%

    200 - 27x + 27x +
        args <- c(list(id = "module"), modules$server_args)
    201 - 27x + 27x +
        if (is_arg_used(modules$server, "reporter")) {
    @@ -14444,14 +14924,16 @@

    teal coverage - 68.02%

    205 - 27x + 27x +
        if (is_arg_used(modules$server, "datasets")) {
    206 - 1x + 1x +
          args <- c(args, datasets = datasets)
    @@ -14472,21 +14954,24 @@

    teal coverage - 68.02%

    209 - 27x + 27x +
        if (is_arg_used(modules$server, "data")) {
    210 - 7x + 7x +
          data <- eventReactive(trigger_data(), .datasets_to_data(modules, datasets))
    211 - 7x + 7x +
          args <- c(args, data = list(data))
    @@ -14507,21 +14992,24 @@

    teal coverage - 68.02%

    214 - 27x + 27x +
        if (is_arg_used(modules$server, "filter_panel_api")) {
    215 - 2x + 2x +
          filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
    216 - 2x + 2x +
          args <- c(args, filter_panel_api = filter_panel_api)
    @@ -14549,49 +15037,56 @@

    teal coverage - 68.02%

    220 - 27x + 27x +
        observeEvent(
    221 - 27x + 27x +
          ignoreNULL = TRUE,
    222 - 27x + 27x +
          once = TRUE,
    223 - 27x + 27x +
          eventExpr = trigger_module(),
    224 - 27x + 27x +
          handlerExpr = {
    225 - 17x + 17x +
            module_output <- if (is_arg_used(modules$server, "id")) {
    226 - 17x + 17x +
              do.call(modules$server, args)
    @@ -14640,7 +15135,8 @@

    teal coverage - 68.02%

    233 - 27x + 27x +
        reactive(modules)
    @@ -14759,14 +15255,16 @@

    teal coverage - 68.02%

    250 - 4x + 4x +
      checkmate::assert_class(module, "teal_module")
    251 - 4x + 4x +
      checkmate::assert_class(datasets, "FilteredData")
    @@ -14780,14 +15278,16 @@

    teal coverage - 68.02%

    253 - 4x + 4x +
      datanames <- if (is.null(module$datanames) || identical(module$datanames, "all")) {
    254 - 1x + 1x +
        datasets$datanames()
    @@ -14801,21 +15301,24 @@

    teal coverage - 68.02%

    256 - 3x + 3x +
        include_parent_datanames(
    257 - 3x + 3x +
          module$datanames,
    258 - 3x + 3x +
          datasets$get_join_keys()
    @@ -14850,7 +15353,8 @@

    teal coverage - 68.02%

    263 - 4x + 4x +
      data <- sapply(datanames, function(x) datasets$get_data(x, filtered = TRUE), simplify = FALSE)
    @@ -14864,7 +15368,8 @@

    teal coverage - 68.02%

    265 - 4x + 4x +
      hashes <- calculate_hashes(datanames, datasets)
    @@ -14878,28 +15383,32 @@

    teal coverage - 68.02%

    267 - 4x + 4x +
      code <- c(
    268 - 4x + 4x +
        get_rcode_str_install(),
    269 - 4x + 4x +
        get_rcode_libraries(),
    270 - 4x + 4x +
        get_datasets_code(datanames, datasets, hashes)
    @@ -14927,21 +15436,24 @@

    teal coverage - 68.02%

    274 - 4x + 4x +
      data <- do.call(
    275 - 4x + 4x +
        teal.data::teal_data,
    276 - 4x + 4x +
        args = c(data, code = list(code), join_keys = list(datasets$get_join_keys()[datanames]))
    @@ -14962,14 +15474,16 @@

    teal coverage - 68.02%

    279 - 4x + 4x +
      data@verified <- attr(datasets, "verification_status")
    280 - 4x + 4x +
      data
    @@ -15053,7 +15567,8 @@

    teal coverage - 68.02%

    292 - 7x + 7x +
      sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
    @@ -15612,28 +16127,32 @@

    teal coverage - 68.02%

    78 - 5x + 5x +
      checkmate::assert_class(modules, "teal_modules")
    79 - 5x + 5x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    80 - 5x + 5x +
      checkmate::assert_class(reporter, "Reporter")
    81 - 3x + 3x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -15647,14 +16166,16 @@

    teal coverage - 68.02%

    83 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    84 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initializing the module.")
    @@ -15668,14 +16189,16 @@

    teal coverage - 68.02%

    86 - 3x + 3x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    87 - 3x + 3x +
        manager_out <- filter_manager_modal_srv("filter_manager", filtered_data_list = datasets, filter = filter)
    @@ -15689,42 +16212,48 @@

    teal coverage - 68.02%

    89 - 3x + 3x +
        active_module <- srv_nested_tabs(
    90 - 3x + 3x +
          id = "root",
    91 - 3x + 3x +
          datasets = datasets,
    92 - 3x + 3x +
          modules = modules,
    93 - 3x + 3x +
          reporter = reporter,
    94 - 3x + 3x +
          is_module_specific = is_module_specific
    @@ -15745,21 +16274,24 @@

    teal coverage - 68.02%

    97 - 3x + 3x +
        if (!is_module_specific) {
    98 - 3x + 3x +
          active_datanames <- reactive({
    99 - 6x + 6x +
            if (identical(active_module()$datanames, "all")) {
    @@ -15780,21 +16312,24 @@

    teal coverage - 68.02%

    102 - 5x + 5x +
              include_parent_datanames(
    103 - 5x + 5x +
                active_module()$datanames,
    104 - 5x + 5x +
                singleton$get_join_keys()
    @@ -15822,14 +16357,16 @@

    teal coverage - 68.02%

    108 - 3x + 3x +
          singleton <- unlist(datasets)[[1]]
    109 - 3x + 3x +
          singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
    @@ -15843,28 +16380,32 @@

    teal coverage - 68.02%

    111 - 3x + 3x +
          observeEvent(
    112 - 3x + 3x +
            eventExpr = active_datanames(),
    113 - 3x + 3x +
            handlerExpr = {
    114 - 4x + 4x +
              script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
    @@ -15899,7 +16440,8 @@

    teal coverage - 68.02%

    119 - 4x + 4x +
                "handleActiveDatasetsPresent();"
    @@ -15913,7 +16455,8 @@

    teal coverage - 68.02%

    121 - 4x + 4x +
              shinyjs::runjs(script)
    @@ -15927,7 +16470,8 @@

    teal coverage - 68.02%

    123 - 3x + 3x +
            ignoreNULL = FALSE
    @@ -15955,14 +16499,16 @@

    teal coverage - 68.02%

    127 - 3x + 3x +
        showNotification("Data loaded - App fully started up")
    128 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initialized the module")
    @@ -15976,7 +16522,8 @@

    teal coverage - 68.02%

    130 - 3x + 3x +
        active_module
    @@ -16416,42 +16963,48 @@

    teal coverage - 68.02%

    60 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    61 - 7x + 7x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "title",
    64 - 7x + 7x +
        checkmate::check_string(title),
    65 - 7x + 7x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -16465,28 +17018,32 @@

    teal coverage - 68.02%

    67 - 7x + 7x +
      checkmate::assert(
    68 - 7x + 7x +
        .var.name = "header",
    69 - 7x + 7x +
        checkmate::check_string(header),
    70 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -16500,28 +17057,32 @@

    teal coverage - 68.02%

    72 - 7x + 7x +
      checkmate::assert(
    73 - 7x + 7x +
        .var.name = "footer",
    74 - 7x + 7x +
        checkmate::check_string(footer),
    75 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -16542,7 +17103,8 @@

    teal coverage - 68.02%

    78 - 7x + 7x +
      ns <- NS(id)
    @@ -16584,28 +17146,32 @@

    teal coverage - 68.02%

    84 - 7x + 7x +
      splash_ui <- if (inherits(data, "teal_data_module")) {
    85 - 1x + 1x +
        data$ui(ns("teal_data_module"))
    86 - 7x + 7x +
      } else if (inherits(data, "teal_data")) {
    87 - 6x + 6x +
        div()
    @@ -16619,42 +17185,48 @@

    teal coverage - 68.02%

    89 - 7x + 7x +
      ui_teal(
    90 - 7x + 7x +
        id = ns("teal"),
    91 - 7x + 7x +
        splash_ui = div(splash_ui, uiOutput(ns("error"))),
    92 - 7x + 7x +
        title = title,
    93 - 7x + 7x +
        header = header,
    94 - 7x + 7x +
        footer = footer
    @@ -16703,28 +17275,32 @@

    teal coverage - 68.02%

    101 - 15x + 15x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    102 - 15x + 15x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    103 - 15x + 15x +
      checkmate::assert_class(modules, "teal_modules")
    104 - 15x + 15x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -16738,14 +17314,16 @@

    teal coverage - 68.02%

    106 - 15x + 15x +
      moduleServer(id, function(input, output, session) {
    107 - 15x + 15x +
        logger::log_trace("srv_teal_with_splash initializing module with data.")
    @@ -16759,7 +17337,8 @@

    teal coverage - 68.02%

    109 - 15x + 15x +
        if (getOption("teal.show_js_log", default = FALSE)) {
    @@ -16801,28 +17380,32 @@

    teal coverage - 68.02%

    115 - 15x + 15x +
        teal_data_rv <- if (inherits(data, "teal_data_module")) {
    116 - 10x + 10x +
          data <- data$server(id = "teal_data_module")
    117 - 10x + 10x +
          if (!is.reactive(data)) {
    118 - 1x + 1x +
            stop("The `teal_data_module` passed to `data` must return a reactive expression.", call. = FALSE)
    @@ -16836,21 +17419,24 @@

    teal coverage - 68.02%

    120 - 9x + 9x +
          data
    121 - 15x + 15x +
        } else if (inherits(data, "teal_data")) {
    122 - 5x + 5x +
          reactiveVal(data)
    @@ -16871,7 +17457,8 @@

    teal coverage - 68.02%

    125 - 14x + 14x +
        teal_data_rv_validate <- reactive({
    @@ -16885,7 +17472,8 @@

    teal coverage - 68.02%

    127 - 11x + 11x +
          data <- tryCatch(teal_data_rv(), error = function(e) e)
    @@ -16906,7 +17494,8 @@

    teal coverage - 68.02%

    130 - 11x + 11x +
          if (inherits(data, "shiny.silent.error") && identical(data$message, "")) {
    @@ -16941,56 +17530,64 @@

    teal coverage - 68.02%

    135 - 11x + 11x +
          if (inherits(data, "qenv.error")) {
    136 - 2x + 2x +
            validate(
    137 - 2x + 2x +
              need(
    138 - 2x + 2x +
                FALSE,
    139 - 2x + 2x +
                paste(
    140 - 2x + 2x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    141 - 2x + 2x +
                  paste(data$message, collapse = "\n"),
    142 - 2x + 2x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -17039,56 +17636,64 @@

    teal coverage - 68.02%

    149 - 9x + 9x +
          if (inherits(data, "error")) {
    150 - 1x + 1x +
            validate(
    151 - 1x + 1x +
              need(
    152 - 1x + 1x +
                FALSE,
    153 - 1x + 1x +
                paste(
    154 - 1x + 1x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    155 - 1x + 1x +
                  paste(data$message, collpase = "\n"),
    156 - 1x + 1x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -17130,56 +17735,64 @@

    teal coverage - 68.02%

    162 - 8x + 8x +
          validate(
    163 - 8x + 8x +
            need(
    164 - 8x + 8x +
              inherits(data, "teal_data"),
    165 - 8x + 8x +
              paste(
    166 - 8x + 8x +
                "Error: `teal_data_module` passed to `data` failed to return `teal_data` object, returned",
    167 - 8x + 8x +
                toString(sQuote(class(data))),
    168 - 8x + 8x +
                "instead.",
    169 - 8x + 8x +
                "\n Check your inputs or contact app developer if error persists."
    @@ -17214,14 +17827,16 @@

    teal coverage - 68.02%

    174 - 5x + 5x +
          if (!length(teal.data::datanames(data))) {
    175 - 1x + 1x +
            warning("`data` object has no datanames. Default datanames are set using `teal_data`'s environment.")
    @@ -17242,21 +17857,24 @@

    teal coverage - 68.02%

    178 - 5x + 5x +
          is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    179 - 5x + 5x +
          if (!isTRUE(is_modules_ok)) {
    180 - 1x + 1x +
            validate(need(isTRUE(is_modules_ok), sprintf("%s. Contact app developer.", is_modules_ok)))
    @@ -17277,42 +17895,48 @@

    teal coverage - 68.02%

    183 - 4x + 4x +
          is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    184 - 4x + 4x +
          if (!isTRUE(is_filter_ok)) {
    185 - 1x + 1x +
            showNotification(
    186 - 1x + 1x +
              "Some filters were not applied because of incompatibility with data. Contact app developer.",
    187 - 1x + 1x +
              type = "warning",
    188 - 1x + 1x +
              duration = 10
    @@ -17326,7 +17950,8 @@

    teal coverage - 68.02%

    190 - 1x + 1x +
            warning(is_filter_ok)
    @@ -17347,7 +17972,8 @@

    teal coverage - 68.02%

    193 - 4x + 4x +
          teal_data_rv()
    @@ -17368,7 +17994,8 @@

    teal coverage - 68.02%

    196 - 14x + 14x +
        output$error <- renderUI({
    @@ -17410,14 +18037,16 @@

    teal coverage - 68.02%

    202 - 14x + 14x +
        res <- srv_teal(id = "teal", modules = modules, teal_data_rv = teal_data_rv_validate, filter = filter)
    203 - 14x + 14x +
        logger::log_trace("srv_teal_with_splash initialized module with data.")
    @@ -17431,7 +18060,8 @@

    teal coverage - 68.02%

    205 - 14x + 14x +
        res
    @@ -17577,14 +18207,16 @@

    teal coverage - 68.02%

    18 - 2x + 2x +
      packageStartupMessage(
    19 - 2x + 2x +
        "\nYou are using teal version ",
    @@ -17605,7 +18237,8 @@

    teal coverage - 68.02%

    22 - 2x + 2x +
        read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
    @@ -17863,21 +18496,24 @@

    teal coverage - 68.02%

    23 - 4x + 4x +
      checkmate::assert_string(label)
    24 - 2x + 2x +
      checkmate::assert_list(server_args, names = "named")
    25 - 2x + 2x +
      checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
    @@ -17891,7 +18527,8 @@

    teal coverage - 68.02%

    27 - 2x + 2x +
      logger::log_info("Initializing reporter_previewer_module")
    @@ -17905,7 +18542,8 @@

    teal coverage - 68.02%

    29 - 2x + 2x +
      srv <- function(id, reporter, ...) {
    @@ -17933,7 +18571,8 @@

    teal coverage - 68.02%

    33 - 2x + 2x +
      ui <- function(id, ...) {
    @@ -17961,28 +18600,32 @@

    teal coverage - 68.02%

    37 - 2x + 2x +
      module <- module(
    38 - 2x + 2x +
        label = "temporary label",
    39 - 2x + 2x +
        server = srv, ui = ui,
    40 - 2x + 2x +
        server_args = server_args, ui_args = list(), datanames = NULL
    @@ -18010,21 +18653,24 @@

    teal coverage - 68.02%

    44 - 2x + 2x +
      class(module) <- c("teal_module_previewer", class(module))
    45 - 2x + 2x +
      module$label <- label
    46 - 2x + 2x +
      module
    @@ -18576,35 +19222,40 @@

    teal coverage - 68.02%

    77 - 78x + 78x +
      shiny::isolate({
    78 - 78x + 78x +
        checkmate::assert_flag(allow_add)
    79 - 78x + 78x +
        checkmate::assert_flag(module_specific)
    80 - 32x + 32x +
        if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
    81 - 75x + 75x +
        checkmate::assert_string(app_id, null.ok = TRUE)
    @@ -18618,14 +19269,16 @@

    teal coverage - 68.02%

    83 - 75x + 75x +
        slices <- list(...)
    84 - 75x + 75x +
        all_slice_id <- vapply(slices, `[[`, character(1L), "id")
    @@ -18639,14 +19292,16 @@

    teal coverage - 68.02%

    86 - 75x + 75x +
        if (missing(mapping)) {
    87 - 46x + 46x +
          mapping <- list(global_filters = all_slice_id)
    @@ -18660,14 +19315,16 @@

    teal coverage - 68.02%

    89 - 75x + 75x +
        if (!module_specific) {
    90 - 71x + 71x +
          mapping[setdiff(names(mapping), "global_filters")] <- NULL
    @@ -18688,42 +19345,48 @@

    teal coverage - 68.02%

    93 - 75x + 75x +
        failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
    94 - 75x + 75x +
        if (length(failed_slice_id)) {
    95 - 1x + 1x +
          stop(sprintf(
    96 - 1x + 1x +
            "Filters in mapping don't match any available filter.\n %s not in %s",
    97 - 1x + 1x +
            toString(failed_slice_id),
    98 - 1x + 1x +
            toString(all_slice_id)
    @@ -18751,7 +19414,8 @@

    teal coverage - 68.02%

    102 - 74x + 74x +
        tss <- teal.slice::teal_slices(
    @@ -18765,28 +19429,32 @@

    teal coverage - 68.02%

    104 - 74x + 74x +
          exclude_varnames = exclude_varnames,
    105 - 74x + 74x +
          include_varnames = include_varnames,
    106 - 74x + 74x +
          count_type = count_type,
    107 - 74x + 74x +
          allow_add = allow_add
    @@ -18800,35 +19468,40 @@

    teal coverage - 68.02%

    109 - 74x + 74x +
        attr(tss, "mapping") <- mapping
    110 - 74x + 74x +
        attr(tss, "module_specific") <- module_specific
    111 - 74x + 74x +
        attr(tss, "app_id") <- app_id
    112 - 74x + 74x +
        class(tss) <- c("modules_teal_slices", class(tss))
    113 - 74x + 74x +
        tss
    @@ -18898,14 +19571,16 @@

    teal coverage - 68.02%

    123 - 10x + 10x +
      checkmate::assert_list(x)
    124 - 10x + 10x +
      lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
    @@ -18919,21 +19594,24 @@

    teal coverage - 68.02%

    126 - 10x + 10x +
      attrs <- attributes(unclass(x))
    127 - 10x + 10x +
      ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
    128 - 10x + 10x +
      do.call(teal_slices, c(ans, attrs))
    @@ -19185,28 +19863,32 @@

    teal coverage - 68.02%

    164 - 1x + 1x +
      checkmate::assert_class(filter, "teal_slices")
    165 - 1x + 1x +
      shiny::isolate({
    166 - 1x + 1x +
        filter_copy <- lapply(filter, function(slice) {
    167 - 2x + 2x +
          teal.slice::as.teal_slice(as.list(slice))
    @@ -19220,14 +19902,16 @@

    teal coverage - 68.02%

    169 - 1x + 1x +
        attributes(filter_copy) <- attributes(filter)
    170 - 1x + 1x +
        filter_copy
    @@ -19961,7 +20645,8 @@

    teal coverage - 68.02%

    102 - 10x + 10x +
      logger::log_trace("init initializing teal app with: data ('{ class(data) }').")
    @@ -19989,7 +20674,8 @@

    teal coverage - 68.02%

    106 - 10x + 10x +
      if (inherits(data, "TealData")) {
    @@ -20059,7 +20745,8 @@

    teal coverage - 68.02%

    116 - 10x + 10x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    @@ -20080,28 +20767,32 @@

    teal coverage - 68.02%

    119 - 10x + 10x +
      checkmate::assert(
    120 - 10x + 10x +
        .var.name = "modules",
    121 - 10x + 10x +
        checkmate::check_multi_class(modules, c("teal_modules", "teal_module")),
    122 - 10x + 10x +
        checkmate::check_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -20115,14 +20806,16 @@

    teal coverage - 68.02%

    124 - 10x + 10x +
      if (inherits(modules, "teal_module")) {
    125 - 1x + 1x +
        modules <- list(modules)
    @@ -20136,14 +20829,16 @@

    teal coverage - 68.02%

    127 - 10x + 10x +
      if (checkmate::test_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))) {
    128 - 4x + 4x +
        modules <- do.call(teal::modules, modules)
    @@ -20171,7 +20866,8 @@

    teal coverage - 68.02%

    132 - 10x + 10x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -20192,28 +20888,32 @@

    teal coverage - 68.02%

    135 - 9x + 9x +
      checkmate::assert(
    136 - 9x + 9x +
        .var.name = "title",
    137 - 9x + 9x +
        checkmate::check_string(title),
    138 - 9x + 9x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -20227,28 +20927,32 @@

    teal coverage - 68.02%

    140 - 9x + 9x +
      checkmate::assert(
    141 - 9x + 9x +
        .var.name = "header",
    142 - 9x + 9x +
        checkmate::check_string(header),
    143 - 9x + 9x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -20262,28 +20966,32 @@

    teal coverage - 68.02%

    145 - 9x + 9x +
      checkmate::assert(
    146 - 9x + 9x +
        .var.name = "footer",
    147 - 9x + 9x +
        checkmate::check_string(footer),
    148 - 9x + 9x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -20297,7 +21005,8 @@

    teal coverage - 68.02%

    150 - 9x + 9x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -20318,7 +21027,8 @@

    teal coverage - 68.02%

    153 - 9x + 9x +
      teal.logger::log_system_info()
    @@ -20346,21 +21056,24 @@

    teal coverage - 68.02%

    157 - 9x + 9x +
      landing <- extract_module(modules, "teal_module_landing")
    158 - 9x + 9x +
      landing_module <- NULL
    159 - 9x + 9x +
      if (length(landing) == 1L) {
    @@ -20381,7 +21094,8 @@

    teal coverage - 68.02%

    162 - 9x + 9x +
      } else if (length(landing) > 1L) {
    @@ -20416,7 +21130,8 @@

    teal coverage - 68.02%

    167 - 9x + 9x +
      attr(filter, "app_id") <- create_app_id(data, modules)
    @@ -20437,7 +21152,8 @@

    teal coverage - 68.02%

    170 - 9x + 9x +
      filter <- as.teal_slices(as.list(filter))
    @@ -20465,7 +21181,8 @@

    teal coverage - 68.02%

    174 - 9x + 9x +
      if (isTRUE(attr(filter, "module_specific"))) {
    @@ -20654,21 +21371,24 @@

    teal coverage - 68.02%

    201 - 9x + 9x +
      if (inherits(data, "teal_data")) {
    202 - 8x + 8x +
        if (length(teal_data_datanames(data)) == 0) {
    203 - 1x + 1x +
          stop("The environment of `data` is empty.")
    @@ -20689,28 +21409,32 @@

    teal coverage - 68.02%

    206 - 7x + 7x +
        is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    207 - 7x + 7x +
        if (!isTRUE(is_modules_ok)) {
    208 - 1x + 1x +
          logger::log_error(is_modules_ok)
    209 - 1x + 1x +
          checkmate::assert(is_modules_ok, .var.name = "modules")
    @@ -20731,21 +21455,24 @@

    teal coverage - 68.02%

    212 - 6x + 6x +
        is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    213 - 6x + 6x +
        if (!isTRUE(is_filter_ok)) {
    214 - 1x + 1x +
          warning(is_filter_ok)
    @@ -20808,21 +21535,24 @@

    teal coverage - 68.02%

    223 - 7x + 7x +
      res <- list(
    224 - 7x + 7x +
        ui = ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
    225 - 7x + 7x +
        server = function(input, output, session) {
    @@ -20878,7 +21608,8 @@

    teal coverage - 68.02%

    233 - 7x + 7x +
      logger::log_trace("init teal app has been initialized.")
    @@ -20892,7 +21623,8 @@

    teal coverage - 68.02%

    235 - 7x + 7x +
      res
    @@ -21633,14 +22365,16 @@

    teal coverage - 68.02%

    104 - 36x + 36x +
      dots <- list(...)
    105 - 2x + 2x +
      if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
    @@ -21654,21 +22388,24 @@

    teal coverage - 68.02%

    107 - 34x + 34x +
      messages <- extract_validator(dots, header)
    108 - 34x + 34x +
      failings <- if (!any_names(dots)) {
    109 - 29x + 29x +
        add_header(messages, header)
    @@ -21682,7 +22419,8 @@

    teal coverage - 68.02%

    111 - 5x + 5x +
        unlist(messages)
    @@ -21703,7 +22441,8 @@

    teal coverage - 68.02%

    114 - 34x + 34x +
      shiny::validate(shiny::need(is.null(failings), failings))
    @@ -21773,7 +22512,8 @@

    teal coverage - 68.02%

    124 - 118x + 118x +
      all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
    @@ -21836,7 +22576,8 @@

    teal coverage - 68.02%

    133 - 49x + 49x +
      x$.__enclos_env__$private$enabled
    @@ -21892,14 +22633,16 @@

    teal coverage - 68.02%

    141 - 113x + 113x +
      if (inherits(iv, "InputValidator")) {
    142 - 49x + 49x +
        add_header(gather_messages(iv), header)
    @@ -21913,14 +22656,16 @@

    teal coverage - 68.02%

    144 - 58x + 58x +
        if (is.null(names(iv))) names(iv) <- rep("", length(iv))
    145 - 64x + 64x +
        mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
    @@ -21983,28 +22728,32 @@

    teal coverage - 68.02%

    154 - 49x + 49x +
      if (validator_enabled(iv)) {
    155 - 46x + 46x +
        status <- iv$validate()
    156 - 46x + 46x +
        failing_inputs <- Filter(Negate(is.null), status)
    157 - 46x + 46x +
        unique(lapply(failing_inputs, function(x) x[["message"]]))
    @@ -22018,14 +22767,16 @@

    teal coverage - 68.02%

    159 - 3x + 3x +
        warning("Validator is disabled and will be omitted.")
    160 - 3x + 3x +
        list()
    @@ -22081,21 +22832,24 @@

    teal coverage - 68.02%

    168 - 78x + 78x +
      ans <- unlist(messages)
    169 - 78x + 78x +
      if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
    170 - 31x + 31x +
        ans <- c(paste0(header, "\n"), ans, "\n")
    @@ -22109,7 +22863,8 @@

    teal coverage - 68.02%

    172 - 78x + 78x +
      ans
    @@ -22158,21 +22913,24 @@

    teal coverage - 68.02%

    179 - 103x + 103x +
      any(
    180 - 103x + 103x +
        if (is.list(x)) {
    181 - 58x + 58x +
          if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
    @@ -22186,7 +22944,8 @@

    teal coverage - 68.02%

    183 - 40x + 40x +
          FALSE
    @@ -22577,7 +23336,8 @@

    teal coverage - 68.02%

    52 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -22591,7 +23351,8 @@

    teal coverage - 68.02%

    54 - 7x + 7x +
      checkmate::assert_multi_class(splash_ui, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -22605,7 +23366,8 @@

    teal coverage - 68.02%

    56 - 7x + 7x +
      if (is.character(title)) {
    @@ -22626,7 +23388,8 @@

    teal coverage - 68.02%

    59 - 7x + 7x +
        validate_app_title_tag(title)
    @@ -22647,28 +23410,32 @@

    teal coverage - 68.02%

    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "header",
    64 - 7x + 7x +
        checkmate::check_string(header),
    65 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -22682,7 +23449,8 @@

    teal coverage - 68.02%

    67 - 7x + 7x +
      if (checkmate::test_string(header)) {
    @@ -22710,28 +23478,32 @@

    teal coverage - 68.02%

    71 - 7x + 7x +
      checkmate::assert(
    72 - 7x + 7x +
        .var.name = "footer",
    73 - 7x + 7x +
        checkmate::check_string(footer),
    74 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -22745,7 +23517,8 @@

    teal coverage - 68.02%

    76 - 7x + 7x +
      if (checkmate::test_string(footer)) {
    @@ -22773,7 +23546,8 @@

    teal coverage - 68.02%

    80 - 7x + 7x +
      ns <- NS(id)
    @@ -22794,7 +23568,8 @@

    teal coverage - 68.02%

    83 - 7x + 7x +
      splash_ui <- div(
    @@ -22808,7 +23583,8 @@

    teal coverage - 68.02%

    85 - 7x + 7x +
        id = ns("main_ui_container"),
    @@ -22829,7 +23605,8 @@

    teal coverage - 68.02%

    88 - 7x + 7x +
        div(splash_ui)
    @@ -22864,35 +23641,40 @@

    teal coverage - 68.02%

    93 - 7x + 7x +
      shiny_busy_message_panel <- conditionalPanel(
    94 - 7x + 7x +
        condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint
    95 - 7x + 7x +
        div(
    96 - 7x + 7x +
          icon("arrows-rotate", "spin fa-spin"),
    97 - 7x + 7x +
          "Computing ...",
    @@ -22906,7 +23688,8 @@

    teal coverage - 68.02%

    99 - 7x + 7x +
          class = "shinybusymessage"
    @@ -22934,98 +23717,112 @@

    teal coverage - 68.02%

    103 - 7x + 7x +
      fluidPage(
    104 - 7x + 7x +
        title = title,
    105 - 7x + 7x +
        theme = get_teal_bs_theme(),
    106 - 7x + 7x +
        include_teal_css_js(),
    107 - 7x + 7x +
        tags$header(header),
    108 - 7x + 7x +
        tags$hr(class = "my-2"),
    109 - 7x + 7x +
        shiny_busy_message_panel,
    110 - 7x + 7x +
        splash_ui,
    111 - 7x + 7x +
        tags$hr(),
    112 - 7x + 7x +
        tags$footer(
    113 - 7x + 7x +
          div(
    114 - 7x + 7x +
            footer,
    115 - 7x + 7x +
            teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
    116 - 7x + 7x +
            textOutput(ns("identifier"))
    @@ -23088,21 +23885,24 @@

    teal coverage - 68.02%

    125 - 19x + 19x +
      stopifnot(is.reactive(teal_data_rv))
    126 - 18x + 18x +
      moduleServer(id, function(input, output, session) {
    127 - 18x + 18x +
        logger::log_trace("srv_teal initializing the module.")
    @@ -23116,14 +23916,16 @@

    teal coverage - 68.02%

    129 - 18x + 18x +
        output$identifier <- renderText(
    130 - 18x + 18x +
          paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
    @@ -23144,28 +23946,32 @@

    teal coverage - 68.02%

    133 - 18x + 18x +
        teal.widgets::verbatim_popup_srv(
    134 - 18x + 18x +
          "sessionInfo",
    135 - 18x + 18x +
          verbatim_content = utils::capture.output(utils::sessionInfo()),
    136 - 18x + 18x +
          title = "SessionInfo"
    @@ -23193,7 +23999,8 @@

    teal coverage - 68.02%

    140 - 18x + 18x +
        run_js_files(files = "init.js")
    @@ -23228,35 +24035,40 @@

    teal coverage - 68.02%

    145 - 18x + 18x +
        get_client_timezone(session$ns)
    146 - 18x + 18x +
        observeEvent(
    147 - 18x + 18x +
          eventExpr = input$timezone,
    148 - 18x + 18x +
          once = TRUE,
    149 - 18x + 18x +
          handlerExpr = {
    @@ -23298,14 +24110,16 @@

    teal coverage - 68.02%

    155 - 18x + 18x +
        reporter <- teal.reporter::Reporter$new()
    156 - 18x + 18x +
        if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
    @@ -23333,28 +24147,32 @@

    teal coverage - 68.02%

    160 - 18x + 18x +
        env <- environment()
    161 - 18x + 18x +
        datasets_reactive <- eventReactive(teal_data_rv(), {
    162 - 4x + 4x +
          env$progress <- shiny::Progress$new(session)
    163 - 4x + 4x +
          env$progress$set(0.25, message = "Setting data")
    @@ -23382,7 +24200,8 @@

    teal coverage - 68.02%

    167 - 4x + 4x +
          datasets_singleton <- teal_data_to_filtered_data(teal_data_rv())
    @@ -23403,14 +24222,16 @@

    teal coverage - 68.02%

    170 - 4x + 4x +
          filter_global <- Filter(function(x) x$id %in% attr(filter, "mapping")$global_filters, filter)
    171 - 4x + 4x +
          datasets_singleton$set_filter_state(filter_global)
    @@ -23424,49 +24245,56 @@

    teal coverage - 68.02%

    173 - 4x + 4x +
          module_datasets <- function(modules) {
    174 - 18x + 18x +
            if (inherits(modules, "teal_modules")) {
    175 - 7x + 7x +
              datasets <- lapply(modules$children, module_datasets)
    176 - 7x + 7x +
              labels <- vapply(modules$children, `[[`, character(1), "label")
    177 - 7x + 7x +
              names(datasets) <- labels
    178 - 7x + 7x +
              datasets
    179 - 11x + 11x +
            } else if (isTRUE(attr(filter, "module_specific"))) {
    @@ -23487,28 +24315,32 @@

    teal coverage - 68.02%

    182 - 3x + 3x +
              datanames <- if (is.null(modules$datanames) || identical(modules$datanames, "all")) {
    183 - 3x + 3x +
                include_parent_datanames(
    184 - 3x + 3x +
                  teal_data_datanames(teal_data_rv()),
    185 - 3x + 3x +
                  teal.data::join_keys(teal_data_rv())
    @@ -23550,7 +24382,8 @@

    teal coverage - 68.02%

    191 - 3x + 3x +
              datasets_module <- teal_data_to_filtered_data(teal_data_rv(), datanames = datanames)
    @@ -23578,7 +24411,8 @@

    teal coverage - 68.02%

    195 - 3x + 3x +
              slices <- Filter(x = filter, f = function(x) {
    @@ -23606,42 +24440,48 @@

    teal coverage - 68.02%

    199 - 3x + 3x +
              include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
    200 - 3x + 3x +
              exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
    201 - 3x + 3x +
              slices$include_varnames <- include_varnames
    202 - 3x + 3x +
              slices$exclude_varnames <- exclude_varnames
    203 - 3x + 3x +
              datasets_module$set_filter_state(slices)
    204 - 3x + 3x +
              datasets_module
    @@ -23655,7 +24495,8 @@

    teal coverage - 68.02%

    206 - 8x + 8x +
              datasets_singleton
    @@ -23676,7 +24517,8 @@

    teal coverage - 68.02%

    209 - 4x + 4x +
          module_datasets(modules)
    @@ -23739,7 +24581,8 @@

    teal coverage - 68.02%

    218 - 18x + 18x +
        observeEvent(datasets_reactive(), once = TRUE, {
    @@ -24312,56 +25155,64 @@

    teal coverage - 68.02%

    46 - 17x + 17x +
      checkmate::assert_string(msg, null.ok = TRUE)
    47 - 15x + 15x +
      checkmate::assert_data_frame(x)
    48 - 15x + 15x +
      if (!is.null(min_nrow)) {
    49 - 15x + 15x +
        if (complete) {
    50 - 5x + 5x +
          complete_index <- stats::complete.cases(x)
    51 - 5x + 5x +
          validate(need(
    52 - 5x + 5x +
            sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
    53 - 5x + 5x +
            paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
    @@ -24382,35 +25233,40 @@

    teal coverage - 68.02%

    56 - 10x + 10x +
          validate(need(
    57 - 10x + 10x +
            nrow(x) >= min_nrow,
    58 - 10x + 10x +
            paste(
    59 - 10x + 10x +
              c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
    60 - 10x + 10x +
              collapse = "\n"
    @@ -24445,28 +25301,32 @@

    teal coverage - 68.02%

    65 - 10x + 10x +
        if (!allow_inf) {
    66 - 6x + 6x +
          validate(need(
    67 - 6x + 6x +
            all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
    68 - 6x + 6x +
            "Dataframe contains Inf values which is not allowed."
    @@ -26733,21 +27593,24 @@

    teal coverage - 68.02%

    12 - 7x + 7x +
      css_files <- list.files(
    13 - 7x + 7x +
        system.file("css", package = "teal", mustWork = TRUE),
    14 - 7x + 7x +
        pattern = pattern, full.names = TRUE
    @@ -26768,14 +27631,16 @@

    teal coverage - 68.02%

    17 - 7x + 7x +
      singleton(
    18 - 7x + 7x +
        tags$head(lapply(css_files, includeCSS))
    @@ -26887,21 +27752,24 @@

    teal coverage - 68.02%

    34 - 7x + 7x +
      checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
    35 - 7x + 7x +
      js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
    36 - 7x + 7x +
      js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
    @@ -26915,7 +27783,8 @@

    teal coverage - 68.02%

    38 - 7x + 7x +
      singleton(lapply(js_files, includeScript))
    @@ -27048,21 +27917,24 @@

    teal coverage - 68.02%

    57 - 18x + 18x +
      checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
    58 - 18x + 18x +
      lapply(files, function(file) {
    59 - 18x + 18x +
        shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
    @@ -27076,7 +27948,8 @@

    teal coverage - 68.02%

    61 - 18x + 18x +
      invisible(NULL)
    @@ -27181,21 +28054,24 @@

    teal coverage - 68.02%

    76 - 7x + 7x +
      tagList(
    77 - 7x + 7x +
        shinyjs::useShinyjs(),
    78 - 7x + 7x +
        include_css_files(),
    @@ -27209,14 +28085,16 @@

    teal coverage - 68.02%

    80 - 7x + 7x +
        include_js_files(except = "init.js"),
    81 - 7x + 7x +
        shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
    @@ -27432,14 +28310,16 @@

    teal coverage - 68.02%

    28 - 6x + 6x +
      expr <- substitute(expr)
    29 - 6x + 6x +
      extras <- list(...)
    @@ -27460,14 +28340,16 @@

    teal coverage - 68.02%

    32 - 6x + 6x +
      if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
    33 - 6x + 6x +
        expr <- call("{", expr)
    @@ -27488,7 +28370,8 @@

    teal coverage - 68.02%

    36 - 6x + 6x +
      calls <- as.list(expr)[-1]
    @@ -27509,7 +28392,8 @@

    teal coverage - 68.02%

    39 - 6x + 6x +
      calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
    @@ -27523,7 +28407,8 @@

    teal coverage - 68.02%

    41 - 6x + 6x +
      eval_code(object = data, code = as.expression(calls))
    @@ -27655,28 +28540,32 @@

    teal coverage - 68.02%

    17 - 49x + 49x +
      checkmate::assert_string(label)
    18 - 49x + 49x +
      module(
    19 - 49x + 49x +
        label,
    20 - 49x + 49x +
        server = function(id, data) {
    @@ -27781,7 +28670,8 @@

    teal coverage - 68.02%

    35 - 49x + 49x +
        ui = function(id) {
    @@ -27851,7 +28741,8 @@

    teal coverage - 68.02%

    45 - 49x + 49x +
        datanames = datanames
    @@ -28074,28 +28965,32 @@

    teal coverage - 68.02%

    29 - 13x + 13x +
      teal_data_module(
    30 - 13x + 13x +
        ui = function(id) {
    31 - 1x + 1x +
          ns <- NS(id)
    32 - 1x + 1x +
          object$ui(ns("mutate_inner"))
    @@ -28109,21 +29004,24 @@

    teal coverage - 68.02%

    34 - 13x + 13x +
        server = function(id) {
    35 - 11x + 11x +
          moduleServer(id, function(input, output, session) {
    36 - 11x + 11x +
            teal_data_rv <- object$server("mutate_inner")
    @@ -28137,14 +29035,16 @@

    teal coverage - 68.02%

    38 - 11x + 11x +
            if (!is.reactive(teal_data_rv)) {
    39 - 1x + 1x +
              stop("The `teal_data_module` must return a reactive expression.", call. = FALSE)
    @@ -28165,7 +29065,8 @@

    teal coverage - 68.02%

    42 - 10x + 10x +
            td <- eventReactive(teal_data_rv(),
    @@ -28179,14 +29080,16 @@

    teal coverage - 68.02%

    44 - 10x + 10x +
                if (inherits(teal_data_rv(), c("teal_data", "qenv.error"))) {
    45 - 6x + 6x +
                  eval_code(teal_data_rv(), code)
    @@ -28200,7 +29103,8 @@

    teal coverage - 68.02%

    47 - 4x + 4x +
                  teal_data_rv()
    @@ -28221,7 +29125,8 @@

    teal coverage - 68.02%

    50 - 10x + 10x +
              ignoreNULL = FALSE
    @@ -28235,7 +29140,8 @@

    teal coverage - 68.02%

    52 - 10x + 10x +
            td
    @@ -28284,7 +29190,8 @@

    teal coverage - 68.02%

    59 - 1x + 1x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -28312,7 +29219,8 @@

    teal coverage - 68.02%

    63 - 6x + 6x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -29346,35 +30254,40 @@

    teal coverage - 68.02%

    57 - 36x + 36x +
      checkmate::assert_function(ui, args = "id", nargs = 1)
    58 - 35x + 35x +
      checkmate::assert_function(server, args = "id", nargs = 1)
    59 - 34x + 34x +
      structure(
    60 - 34x + 34x +
        list(ui = ui, server = server),
    61 - 34x + 34x +
        class = "teal_data_module"
    diff --git a/v0.15.1-rc1/index.html b/v0.15.1-rc1/index.html index e9fc641ca3..66640ecf5d 100644 --- a/v0.15.1-rc1/index.html +++ b/v0.15.1-rc1/index.html @@ -1,5 +1,4 @@ - - + @@ -88,23 +87,7 @@ - - + - + + diff --git a/v0.15.1-rc1/news/index.html b/v0.15.1-rc1/news/index.html index 27295dcfe2..e69462b9d2 100644 --- a/v0.15.1-rc1/news/index.html +++ b/v0.15.1-rc1/news/index.html @@ -1,8 +1,22 @@ - -Changelog • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -109,28 +129,42 @@
    -

    teal 0.15.1

    -
    -

    Bug fixes

    -
    • Fixed a bug that stopped the module_specific feature when a teal module specified datanames of length more than 1.
    • -
    +

    teal 0.15.1 +

    +
    +

    Bug fixes +

    +
      +
    • Fixed a bug that stopped the module_specific feature when a teal module specified datanames of length more than 1.
    • +
    +
    -

    Miscellaneous

    -
    • Updated links in vignettes
    • -
    +

    Miscellaneous +

    +
      +
    • Updated links in vignettes
    • +
    +
    -

    teal 0.15.0

    CRAN release: 2024-02-08

    -
    -

    New features

    -
    • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
    • +

      teal 0.15.0 +

      +

      CRAN release: 2024-02-08

      +
      +

      New features +

      +
        +
      • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
      • Filter state snapshots can now be uploaded from file. See ?snapshot.
      • Added as_tdata function to facilitate migration of modules to the new teal_data class.
      • Added build_app_title function to facilitate adding favicons to app title.
      • -
      +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • data argument in init now accepts only teal_data and teal_data_module.
      • tdata has been deprecated and replaced with teal_data. Support for tdata passed to the data argument in module(server) will be removed in the next release.
      • @@ -139,114 +173,166 @@

        Breaking changes -

        Miscellaneous

        -
        • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
        • +

          Miscellaneous +

          +
            +
          • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
          • Added argument to teal_slices and made modifications to init to enable tagging teal_slices with an app id to safely upload snapshots from disk.
          • FilteredData no longer stores pre-processing code in specific slots. Code is now attached as attribute. Adjusted appropriately.
          • -

    + +
    -

    Bug fixes

    -
    • Removed Report previewer module from mapping matrix display in filter manager.
    • +

      Bug fixes +

      +
        +
      • Removed Report previewer module from mapping matrix display in filter manager.
      • Specified minimal version of package dependencies.
      • -
    + +
    -

    teal 0.14.0

    +

    teal 0.14.0 +

    -

    New features

    -
    • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
    • +

      New features +

      +
        +
      • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
      • Enabled capturing and resetting application filter state with snapshots. See ?snapshot.
      • Enabled reporter_previewer_module to customize default values through srv_args.
      • Enabled passing own reporter_previewer_module in a list of modules to override default one.
      • -
    + +
    -

    Breaking changes

    -
    • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
    • +

      Breaking changes +

      +
        +
      • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
      • Soft deprecated filters argument in module and replaced it with datanames. Details in documentation of teal::module
      • -
    + +
    -

    Miscellaneous

    -
    • Removed scda package dependency from examples.
    • +

      Miscellaneous +

      +
        +
      • Removed scda package dependency from examples.
      • Updated the header tag style to enhance element containment.
      • -
    + +
    -

    teal 0.13.0

    +

    teal 0.13.0 +

    -

    Breaking changes

    -
    • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
    • +

      Breaking changes +

      +
        +
      • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
      • Due to deprecation of chunks in teal.code, the teal framework now uses their replacement (qenv) instead. The documentation in teal has been updated to reflect this and custom modules written with chunks should be updated to use qenv.
      • Due to deprecation of chunks in teal.code, get_rcode, get_rcode_srv, and get_rcode_ui have been removed.
      • -
    + +
    -

    New features

    -
    • Added the validate_inputs function that transfers input validation messages to app output.
    • +

      New features +

      +
        +
      • Added the validate_inputs function that transfers input validation messages to app output.
      • modules argument of init accepts teal_module type of object. There is no need to wrap up a single module in modules() or list().
      • Updated module_nested_tabs so that only active modules are calculated in a teal app.
      • -
    + +
    -

    Miscellaneous

    -
    • Updated examples to use scda.2022.
    • +

      Miscellaneous +

      +
        +
      • Updated examples to use scda.2022.
      • Added R session information into a link in the footer of teal applications.
      • Added data hashing step using rlang instead of digest package to calculate the hash (which has been moved from teal.data and teal.slice). There is now an explicit hashing check in the reproducible code output.
      • Removed deprecated functions: root_modules, default_filter, bookmarkableShinyApp, as well as deprecated logging mechanism, including the functions log_app_usage and .log.
      • Updated the “Teal and Bootstrap Themes” vignette to provide more details customizing a teal app with bslib::run_with_themer.
      • Removed outdated diagram from srv_nested_tabs documentation.
      • Changed default values of header and footer arguments in init to empty text.
      • -
    + +
    -

    teal 0.12.0

    -
    -

    New features

    -
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • -
    +

    teal 0.12.0 +

    +
    +

    New features +

    +
      +
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • +
    +
    -

    Enhancements

    -
    • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
    • +

      Enhancements +

      +
        +
      • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
      • Updated teal_module to have data argument which receives a list of reactive filter data with "code" and "join_keys" attributes.
      • Updated teal_module to have filter_panel_api argument which receives a FilterPanelAPI object.
      • Updated the internals of module_teal to reflect changes in teal.slice.
      • -
    + +
    -

    Breaking changes

    -
    • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
    • +

      Breaking changes +

      +
        +
      • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
      • Deprecated merge_expression argument in get_rcode_srv function and removed it in get_rcode function.
      • Deprecated session argument in get_rcode function.
      • -
    + +
    -

    Miscellaneous

    -
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • -
    +

    Miscellaneous +

    +
      +
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • +
    +
    -

    teal 0.11.1

    +

    teal 0.11.1 +

    -

    Enhancements

    -
    • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
    • +

      Enhancements +

      +
        +
      • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
      • Updated teal to support modules which include reporting. If any module which supports reporting is included then a reporter_previewer_module is included.
      • Added default arguments to module() and the server argument is now a function where the second argument can be ... or datasets.
      • -
    + +
    -

    Breaking changes

    -
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • -
    +

    Breaking changes +

    +
      +
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • +
    +
    -

    Miscellaneous

    -
    • Added a template to the pkgdown configuration.
    • +

      Miscellaneous +

      +
        +
      • Added a template to the pkgdown configuration.
      • Removed unneeded shinytest app tests.
      • Updated package authors.
      • Added package vignettes.
      • -
    + +
    -

    teal 0.11.0

    -
    +

    The teal package contains the code to create apps (teal::init), to create a module (teal::module) and to group modules in the app (teal::modules). teal depends on teal.transform and teal.data which contain the functions that teal app creators are likely to need. The other package teal only imports from and therefore teal module creators should either fully specify functions from these packages when required or import them into custom packages as library(teal) will not load them.

    +
    +

    New features +

    +
      +
    • A simple new teal module named example_module has been included in the package.
    • +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • teal package has been split into multiple smaller packages, see above.
      • Deprecated root_modules function, users should use modules directly inside init.
      • Due to deprecation of root_modules any label argument to modules must be explicitly named. For example modules("lab", mod1, mod2) should be replaced with modules(label = "lab", mod1, mod2).
      • -
    + +
    -

    Miscellaneous

    -
    • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
    • +

      Miscellaneous +

      +
        +
      • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
      • MultiAssayExperiment is now suggested packages, not required. Objects dependent on MultiAssayExperiment are changed to lazy-load this now suggested package.
      • -
    + +
    -

    Bug fixes

    -
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • -
    +

    Bug fixes +

    +
      +
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • +
    +
    -

    teal 0.10.1

    +

    teal 0.10.1 +

    -

    Breaking changes

    -
    • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
    • +

      Breaking changes +

      +
        +
      • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
      • Deprecated all functions related to connectors that have been moved to their own separate packages.
      • Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational.
      • Removed rcd_connection and rcd_data; scda_dataset_connectors can be passed into cdisc_data and teal_data directly.
      • Replaced rcd_dataset_connector and rcd_cdisc_dataset_connector with scda_dataset_connector and scda_cdisc_dataset_connector respectively.
      • Renamed teal_show_js_log option into teal.show_js_log to match options naming convention.
      • Removed %is_in% and stop_shiny internal utility functions.
      • -
    + +
    -

    New features

    +

    New features +

    -
    Logging
    -
    • Added support for logging using the logger package.
    • +
      Logging +
      +
        +
      • Added support for logging using the logger package.
      • Added a new function register_logger, which registers a logger in a given namespace.
      • Added trace and info levels log messages to the teal framework.
      • Added pid and shiny session token into footnote so app developers can identify logs for apps.
      • -
    + +
    -
    Other
    -
    • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

    • +
      Other +
      +
        +
      • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

      • Added public facing constructor functions for CDISCDataConnector, RelationalDataConnector, and DataConnection classes.

      • Modified data_extract_spec to allow both the filter and select parameters to be NULL, which results in the data_extract_ui acting as if a filter_spec with all variables as possible choices had been supplied as the filter argument and a select_spec with the multiple parameter set to TRUE had been supplied as the select argument.

      • Added support of the full screen for a module when the filters argument is equal NULL.

      • @@ -313,11 +422,14 @@
        Other -

        Bug fixes

        -
    + +
    -

    teal 0.10.0

    +

    teal 0.10.0 +

    -

    New features

    -
    • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
    • +

      New features +

      +
        +
      • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
      • Refactored filter panel to use MultiAssayExperiment objects. Filters can be set on a subject level (colData of MAE object) and on a experiment level (colData and rowData of an assay).
      • Added cdse_dataset_connector to create delayed data objects from CDSE.
      • Added datasetdb_dataset_connector to create delayed data objects from DataSetDB.
      • Added ricepass_connection to create delayed data objects from entimICE via ricepass.
      • Refactor of the filter panel: -
        • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
        • +
            +
          • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
          • Dataset type determines an appearance and a functionality of related filters and filters summary.
          • Datasets are passed (by reference) from DDL to FilteredData skipping extracting data and their attributes.
          • Redesigned variable filter labels in “Active Filter Variables” panel.
          • Fully testable server functions.
          • -
          -
    + + + +
    -

    Bug fixes

    -
    • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
    • +

      Bug fixes +

      +
        +
      • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
      • Fixed a bug that caused the output of get_code function to not reproduce its raw data set.
      • Changed filter_spec to allow no variable selection upon app initialization, where the first possible value was previously selected.
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal 0.9.5

    +

    teal 0.9.5 +

    -

    Enhancements

    -
    • Added informational stop message when using mutate_data with RelationalDataConnector.
    • +

      Enhancements +

      +
        +
      • Added informational stop message when using mutate_data with RelationalDataConnector.
      • Modified as_cdisc to behave similarly to cdisc_dataset when called on a Dataset object.
      • Changed the displayed format of the data name and the column name in data_extract_spec UI elements. Both are now compressed to <data name>.<column name> if they don’t change during runtime of the app.
      • Added ADSAFTTE to the list of recognized ADaM dataset names.
      • Added another example to data_extract_spec’s doc string showcasing app users can choose a variable used for filtering in the encoding panel.
      • Added CSS styling to tool tips in teal modules.
      • -
    + +
    -

    Bug fixes

    -
    • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
    • +

      Bug fixes +

      +
        +
      • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
      • Fixed a bug that crashes app whenever a Date or datetime column is selected from a filter_spec.
      • -
    + +
    -

    teal 0.9.4

    +

    teal 0.9.4 +

    -

    Enhancements

    -
    • Released snowflake connection and connectors.
    • +

      Enhancements +

      +
        +
      • Released snowflake connection and connectors.
      • Changed ordering of datasets to be more intuitive (topologically first for CDISC datasets only and then according to input datasets order).
      • When closing a teal app (ending a user shiny session), all DataConnections will now try to close their connections.
      • Added ADHY keys to configuration file.
      • Extended the filter_spec function: the parameter choices is no longer mandatory (the function will take all possible choices by default) and the vars parameter additionally accepts the choices_selected and allows to change the variables for filtering using the UI elements in the encoding panel.
      • -
    + +
    -

    Bug fixes

    -
    • Cleaned up imports in the package.
    • -
    • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
    • +

      Bug fixes +

      +
        +
      • Cleaned up imports in the package.
      • +
      • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
        +
      • Fixed issue with cloning Callable class.
      • -
    + +
    -

    teal 0.9.3

    +

    teal 0.9.3 +

    -

    New Features

    -
    • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
    • +

      New Features +

      +
        +
      • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
      • New JoinKeys class (with join_keys() constructors and join_key() constructor for its elements) to store joining key columns between datasets.
      • Refactored the most basic dataset() constructor, added cdisc_dataset() constructor and as_cdisc() conversion function.
      • Soft-deprecate removed class constructors and obsolete functions (e.g. keys()).
      • Added get_keys() and set_keys() functions to extract and manipulate datasets primary keys respectively.
      • Unexported filtered_data_new, filtered_data_set and filtered_data_set_filters.
      • -
    + +
    -

    Bug fixes

    -
    • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
    • +

      Bug fixes +

      +
        +
      • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
      • Added ability to press “Enter” key without having to set focus to the Submit button for delayed data loading.
      • Allow variable_choices to use datasets with missing labels.
      • Fixed bug that ignores input of NULL to selected argument of select_spec function.
      • -
    + +
    -

    Enhancements

    -
    • Added button to remove all active filters from the Filter Panel.
    • -
    +

    Enhancements +

    +
      +
    • Added button to remove all active filters from the Filter Panel.
    • +
    +
    -

    teal 0.9.2

    +

    teal 0.9.2 +

    -

    New Features

    -
    • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
    • +

      New Features +

      +
        +
      • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
      • NOTE: python_dataset_connector is not yet ready to be deployed on RSConnect because it does not contain numpy and pandas, which are Python libraries used in python_dataset_connector.
      • Added support for filtering on Date and Datetime variables in the Filter Panel.
      • Added buttons for date and datetime filter widgets to reset the value to the original.
      • Added new function check_key_duplicates, which creates a short summary about rows with duplicated primary key (row numbers and the number of duplicates)
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    • Removed include_factors option in get_class_colnames in RawDataset.
    • -
    +

    Miscellaneous +

    +
      +
    • Removed include_factors option in get_class_colnames in RawDataset.
    • +
    +
    -

    teal 0.9.1

    -
    • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
    • +

      teal 0.9.1 +

      +
        +
      • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
      • Nested tabs module now has better alignment with the filter panel on the page.
      • Allow width argument in optionalSelectInput.
      • Added lifecycle badges to all exported functions.
      • @@ -494,10 +662,13 @@

        teal 0.9.1 -

        teal 0.9.0

        -
        • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

        • +

          teal 0.9.0 +

          +
            +
          • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

          • A new teal_data function to include datasets and connectors into teal application.

          • cdisc_data function to include datasets and connectors into teal application where a check argument still could be used and other consistency tests are performed.

          • get_raw_data can be used to derive raw data from R6 objects e.g. (RelationalDataset).

          • @@ -518,91 +689,133 @@

            teal 0.9.0 -

            Refactor of FilteredData (for developers)

            -
            • +
            +
            +

            Refactor of FilteredData (for developers) +

            +
              +
            • FilteredData is now fully reactive. Now filtered data is lazy evaluated as per need. This further opens the door to bookmarking teal apps (bookmarking currently works for the right filtering panel, but we will make this feature more sophisticated in a future release, each module must be reviewed and adapted if it contains reactiveValues).
            • Datasets and materialized connectors are provided to FilteredData by set_datasets_data function located in init_datasets.R file.
            • Renamed get_dataset() method to get_data().
            • Renamed get_filter_call() method to get_filter_expr(); returns an expression rather than a list.
            • Removed argument isolate from get_data() method and similar methods. You must isolate it yourself as needed. If you want to temporarily deactivate shiny errors due to missing errors, you can set options(shiny.suppressMissingContextError = TRUE). In general, avoid isolate as this breaks reactivity.
            • We added a development module to add several filters at once, e.g. safety filters. This is to be evaluated before it is converted into a proper module and made available to end-users.
            • -
            +

          +

    -

    teal 0.8.5

    -
    • UI bug fix to hide filter elements for not used datasets.
    • -
    +

    teal 0.8.5 +

    +
      +
    • UI bug fix to hide filter elements for not used datasets.
    • +
    +
    -

    teal 0.8.4

    -
    • Progress bar for UI creation in delayed loading module.
    • +

      teal 0.8.4 +

      +
        +
      • Progress bar for UI creation in delayed loading module.
      • Change output of keys function to keys object.
      • Delayed version of choices_selected.
      • Fix an error in choices_selected when selected is not in choices.
      • Fix pickerInput not to display column name as label if it’s missing.
      • -
    + +
    -

    teal 0.8.3

    -
    • Enable teal app to initialize without data. The data are then loaded from within the teal app.
    • +

      teal 0.8.3 +

      +
        +
      • Enable teal app to initialize without data. The data are then loaded from within the teal app.
      • New classes (DatasetConnector, DataConnector) to connect to various data sources, including: * connector to rice API - rice_data and rice_dataset_connector * connector to RDS files - rds_data and rds_dataset_connector
      • Message appears at bottom right of shiny app when shiny is busy to update the views.
      • Remove labels argument of cdisc_data function. Labels should now already be present in the data passed to the cdisc_data function. This can be achieved using the var_relabel function.
      • -
    + +
    -

    teal 0.8.2

    -
    • Fixed several BUGS in optionalSelectInput and improved inputs look.
    • +

      teal 0.8.2 +

      +
        +
      • Fixed several BUGS in optionalSelectInput and improved inputs look.
      • Added get_data_labels function to FilteredData class.
      • Improved sep passing within data_extract_spec.
      • -
    + +
    -

    teal 0.8.1

    -
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • -
    +

    teal 0.8.1 +

    +
      +
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • +
    +
    -

    teal 0.8.0

    -
    • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
    • +

      teal 0.8.0 +

      +
        +
      • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
      • Possibility to load custom .css and .js files.
      • Renamed columns_spec to select_spec.
      • Show number of observations on filter panel.
      • Add labeling functions variable_choices and value_choices.
      • -
    + +
    -

    teal 0.7.0

    -
    • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
    • +

      teal 0.7.0 +

      +
        +
      • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
      • Moved teal.utils functions to teal: log_app_usage, stop_shiny.
      • Added *_spec functions.
      • Improvements on usage of PickerInput and SelectInput.
      • -
    + +
    -

    teal 0.6.0

    -
    • Removed deprecated functions tab*.
    • +

      teal 0.6.0 +

      +
        +
      • Removed deprecated functions tab*.
      • Removed data generation functions including generate_sample_data.
      • Incorporate shinyjs package.
      • Added “Copy R code to clipboard” button.
      • -
    + +
    -

    teal 0.0.5

    -
    • Added limit to data_table with scrolling, preventing overlap of UI elements.
    • +

      teal 0.0.5 +

      +
        +
      • Added limit to data_table with scrolling, preventing overlap of UI elements.
      • Boolean filtering.
      • -
    + +
    -

    teal 0.0.4

    -
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • -
    +

    teal 0.0.4 +

    +
      +
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • +
    +
    -

    teal 0.0.3

    -
    • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
    • -
    -
    New features
    -
    • +

      teal 0.0.3 +

      +
        +
      • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
      • +
      +
      +
      New features +
      +
        +
      • tm_scatterplot module.
      • tm_table module.
      • -
      +
    +
    -
    Changes
    -
    • All tabs arguments were renamed to modules.
    • +
      Changes +
      +
        +
      • All tabs arguments were renamed to modules.
      • tab_item function is now called module.
      • @@ -615,30 +828,39 @@
        Changes -

        teal 0.0.2

        -
        • New ‘01_getting_started’ vignette.
        • +

          teal 0.0.2 +

          +
            +
          • New ‘01_getting_started’ vignette.
          • Datanames in FilteredData are now case sensitive.
          • -
    + +
    -

    teal 0.0.1

    -
    • March 28, 2016 - Initial Release.
    • -
    +

    teal 0.0.1 +

    +
      +
    • March 28, 2016 - Initial Release.
    • +
    + + + + + - - + + diff --git a/v0.15.1-rc1/pull_request_template.html b/v0.15.1-rc1/pull_request_template.html index c7d6e7e3bc..384a248551 100644 --- a/v0.15.1-rc1/pull_request_template.html +++ b/v0.15.1-rc1/pull_request_template.html @@ -1,8 +1,22 @@ - -Pull Request • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -114,17 +134,19 @@

    Fixes #nnn

    - + + + + - - + + diff --git a/v0.15.1-rc1/reference/TealReportCard.html b/v0.15.1-rc1/reference/TealReportCard.html index 9ba9ee9085..5ca438d79d 100644 --- a/v0.15.1-rc1/reference/TealReportCard.html +++ b/v0.15.1-rc1/reference/TealReportCard.html @@ -1,16 +1,32 @@ - - + + + + + +TealReportCard — TealReportCard • teal +TealReportCard — TealReportCard • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -127,20 +149,27 @@
    -

    Super class

    +

    Super class +

    teal.reporter::ReportCard -> TealReportCard

    +

    Inherited methods


    -

    Method append_src()

    -

    Appends the source code to the content meta data of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_src(src, ...)

    +

    +
    +
    +

    Method append_src() +

    +

    Appends the source code to the content meta data of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_src(src, ...)
    +

    +
    -

    Arguments

    -

    src
    +

    Arguments +

    +

    +
    +
    +
    src

    (character(1)) code as text.

    @@ -172,85 +214,148 @@

    Arguments -

    Returns

    +

    Returns +

    Object of class TealReportCard, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_src(
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_src(
       "plot(iris)"
     )
    -card$get_content()[[1]]$get_content()

    +card$get_content()[[1]]$get_content()
    +

    +
    -


    -

    Method append_fs()

    +
    +

    +
    +
    +

    Method append_fs() +

    Appends the filter state list to the content and metadata of this TealReportCard. If the filter state list has an attribute named formatted, it appends it to the card otherwise it uses the default yaml::as.yaml to format the list. -If the filter state list is empty, nothing is appended to the content.

    -

    Usage

    -

    TealReportCard$append_fs(fs)

    +If the filter state list is empty, nothing is appended to the content.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_fs(fs)
    +

    +
    -

    Arguments

    -

    fs
    +

    Arguments +

    +

    +
    +
    +
    fs

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method append_encodings()

    -

    Appends the encodings list to the content and metadata of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_encodings(encodings)

    +
    +

    +
    +
    +

    Method append_encodings() +

    +

    Appends the encodings list to the content and metadata of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_encodings(encodings)
    +

    +
    -

    Arguments

    -

    encodings
    +

    Arguments +

    +

    +
    +
    +
    encodings

    (list) list of encodings selections of the teal app.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
     card$get_content()[[1]]$get_content()
    -

    +
    +

    +
    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealReportCard$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -258,7 +363,8 @@

    Arguments -

    Examples

    +

    Examples +

    
     ## ------------------------------------------------
     ## Method `TealReportCard$append_src`
    @@ -281,17 +387,19 @@ 

    Examples

    + +
    + +
    - - + + diff --git a/v0.15.1-rc1/reference/TealSlicesBlock.html b/v0.15.1-rc1/reference/TealSlicesBlock.html index b77a8810a4..0365360be8 100644 --- a/v0.15.1-rc1/reference/TealSlicesBlock.html +++ b/v0.15.1-rc1/reference/TealSlicesBlock.html @@ -1,10 +1,26 @@ - -RcodeBlock — TealSlicesBlock • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,34 +140,54 @@
    -

    Super classes

    +

    Super classes +

    teal.reporter::ContentBlock -> teal.reporter::TextBlock -> TealSlicesBlock

    +

    Inherited methods


    -

    Method new()

    -

    Returns a TealSlicesBlock object.

    -

    Usage

    -

    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")

    +

    +
    +
    +

    Method new() +

    +

    Returns a TealSlicesBlock object.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    @@ -153,89 +195,154 @@

    Arguments -

    Details

    +

    Details +

    Returns a TealSlicesBlock object with no content and no parameters.

    -

    Returns

    +

    Returns +

    Object of class TealSlicesBlock, invisibly.

    -


    -

    Method set_content()

    +
    +

    +
    +
    +

    Method set_content() +

    Sets content of this TealSlicesBlock. Sets content as YAML text which represents a list generated from teal_slices. The list displays limited number of fields from teal_slice objects, but this list is sufficient to conclude which filters were applied. -When selected field in teal_slice object is a range, then it is displayed as a "min"

    -

    Usage

    -

    TealSlicesBlock$set_content(content)

    +When selected field in teal_slice object is a range, then it is displayed as a "min"

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$set_content(content)
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method from_list()

    -

    Create the RcodeBlock from a list.

    -

    Usage

    -

    TealSlicesBlock$from_list(x)

    +
    +

    +
    +
    +

    Method from_list() +

    +

    Create the RcodeBlock from a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$from_list(x)
    +

    +
    -

    Arguments

    -

    x
    +

    Arguments +

    +

    +
    +
    +
    x

    (named list) with two fields c("text", "params"). Use the get_available_params method to get all possible parameters.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method to_list()

    -

    Convert the RcodeBlock to a list.

    -

    Usage

    -

    TealSlicesBlock$to_list()

    +
    +

    +
    +
    +

    Method to_list() +

    +

    Convert the RcodeBlock to a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$to_list()
    +

    +
    -

    Returns

    +

    Returns +

    named list with a text and params.

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealSlicesBlock$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -243,17 +350,19 @@

    Arguments

    + +
    + +
    - - + + diff --git a/v0.15.1-rc1/reference/append_module.html b/v0.15.1-rc1/reference/append_module.html index 714fc86c3f..b4d32412a3 100644 --- a/v0.15.1-rc1/reference/append_module.html +++ b/v0.15.1-rc1/reference/append_module.html @@ -1,8 +1,24 @@ - -Append a teal_module to children of a teal_modules object — append_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    append_module(modules, module)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    module

    (teal_module) object to be appended onto the children of modules

    -
    + +
    -

    Value

    +

    Value +

    A teal_modules object with module appended.

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/build_app_title.html b/v0.15.1-rc1/reference/build_app_title.html index f25d3b14f4..4a0cdd2ba5 100644 --- a/v0.15.1-rc1/reference/build_app_title.html +++ b/v0.15.1-rc1/reference/build_app_title.html @@ -1,8 +1,24 @@ - -Build app title with favicon — build_app_title • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    build_app_title(
       title = "teal app",
       favicon =
    @@ -123,8 +146,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character) The browser title for the teal app.

    @@ -132,26 +157,30 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag containing the element that adds the title and logo to the shiny app.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/calculate_hashes.html b/v0.15.1-rc1/reference/calculate_hashes.html index c9c657bf16..98d13d9929 100644 --- a/v0.15.1-rc1/reference/calculate_hashes.html +++ b/v0.15.1-rc1/reference/calculate_hashes.html @@ -1,8 +1,24 @@ - -Get the hash of a dataset — calculate_hashes • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    calculate_hashes(datanames, datasets)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets

    datasets

    (FilteredData) object holding the data

    -
    + +
    -

    Value

    +

    Value +

    A list of hashes per dataset.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/check_filter_datanames.html b/v0.15.1-rc1/reference/check_filter_datanames.html index 578f3a68ca..e0edcacb26 100644 --- a/v0.15.1-rc1/reference/check_filter_datanames.html +++ b/v0.15.1-rc1/reference/check_filter_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in filters — check_filter_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_filter_datanames(filters, datanames)
    -

    Arguments

    -
    filters
    +

    Arguments +

    +
    +
    filters

    (teal_slices) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/check_modules_datanames.html b/v0.15.1-rc1/reference/check_modules_datanames.html index 0d0284aa82..9b4cf85d92 100644 --- a/v0.15.1-rc1/reference/check_modules_datanames.html +++ b/v0.15.1-rc1/reference/check_modules_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in modules — check_modules_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_modules_datanames(modules, datanames)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/create_app_id.html b/v0.15.1-rc1/reference/create_app_id.html index 740279bdcb..d722ef6b26 100644 --- a/v0.15.1-rc1/reference/create_app_id.html +++ b/v0.15.1-rc1/reference/create_app_id.html @@ -1,8 +1,24 @@ - -Application ID — create_app_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,53 @@
    -

    Usage

    +

    Usage +

    create_app_id(data, modules)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) as accepted by init

    modules

    (teal_modules) object as accepted by init

    -
    + +
    -

    Value

    +

    Value +

    A single character string.

    -

    Details

    +

    Details +

    Calculate app ID that will be used to stamp filter state snapshots. App ID is a hash of the app's data and modules. See "transferring snapshots" section in ?snapshot.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/deep_copy_filter.html b/v0.15.1-rc1/reference/deep_copy_filter.html index b0b39f34d0..b87b09927a 100644 --- a/v0.15.1-rc1/reference/deep_copy_filter.html +++ b/v0.15.1-rc1/reference/deep_copy_filter.html @@ -1,14 +1,30 @@ - - + + + + + +Deep copy teal_slices — deep_copy_filter • teal +Deep copy teal_slices — deep_copy_filter • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + +
    @@ -123,18 +146,23 @@
    -

    Usage

    +

    Usage +

    deep_copy_filter(filter)
    -

    Arguments

    -
    filter
    +

    Arguments +

    +
    +
    filter

    (teal_slices)

    -
    + +
    -

    Value

    +

    Value +

    teal_slices

    @@ -143,17 +171,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/dot-datasets_to_data.html b/v0.15.1-rc1/reference/dot-datasets_to_data.html index 6dcd4a12fa..02a030b733 100644 --- a/v0.15.1-rc1/reference/dot-datasets_to_data.html +++ b/v0.15.1-rc1/reference/dot-datasets_to_data.html @@ -1,12 +1,28 @@ - - + + + + + +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    .datasets_to_data(module, datasets)
    -

    Arguments

    -
    module
    +

    Arguments +

    +
    +
    module

    (teal_module) module where needed filters are taken from

    datasets

    (FilteredData) object where needed data are taken from

    -
    + +
    -

    Value

    +

    Value +

    A teal_data object.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/example_module.html b/v0.15.1-rc1/reference/example_module.html index 26f20b464d..6d6fea5071 100644 --- a/v0.15.1-rc1/reference/example_module.html +++ b/v0.15.1-rc1/reference/example_module.html @@ -1,8 +1,24 @@ - -An example teal module — example_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    example_module(label = "example teal module", datanames = "all")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -132,16 +157,19 @@

    Arguments will show filters of all datasets. datanames also determines a subset of datasets which are appended to the data argument in server function.

    -

    + +
    -

    Value

    +

    Value +

    A teal module which can be included in the modules argument to init().

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(IRIS = iris, MTCARS = mtcars),
       modules = example_module()
    @@ -152,17 +180,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/filter_manager_module_srv.html b/v0.15.1-rc1/reference/filter_manager_module_srv.html index c64b399930..1114996baa 100644 --- a/v0.15.1-rc1/reference/filter_manager_module_srv.html +++ b/v0.15.1-rc1/reference/filter_manager_module_srv.html @@ -1,8 +1,24 @@ - -Module specific filter manager — filter_manager_module_srv • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    filter_manager_module_srv(id, module_fd, slices_global)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -131,21 +156,28 @@

    Arguments -

    Value

    +

    Value +

    A reactive expression containing the slices active in this module.

    -

    Details

    +

    Details +

    This module tracks the state of a single FilteredData object and global teal_slices and updates both objects as necessary. Filter states added in different modules Filter states added any individual module are added to global teal_slices @@ -154,17 +186,19 @@

    Details

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/get_client_timezone.html b/v0.15.1-rc1/reference/get_client_timezone.html index 66e58df9f3..b581c4b80e 100644 --- a/v0.15.1-rc1/reference/get_client_timezone.html +++ b/v0.15.1-rc1/reference/get_client_timezone.html @@ -1,10 +1,26 @@ - -Get client timezone — get_client_timezone • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,19 +139,24 @@
    -

    Usage

    +

    Usage +

    get_client_timezone(ns)
    -

    Arguments

    -
    ns
    +

    Arguments +

    +
    +
    ns

    (function) namespace function passed from the session object in the shiny server. For shiny modules this will allow for proper name spacing of the registered input.

    -
    + +
    -

    Value

    +

    Value +

    (shiny) input variable accessible with input$tz which is a (character) @@ -137,17 +164,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/get_code_tdata.html b/v0.15.1-rc1/reference/get_code_tdata.html index 0583fbb756..92fd96ab2d 100644 --- a/v0.15.1-rc1/reference/get_code_tdata.html +++ b/v0.15.1-rc1/reference/get_code_tdata.html @@ -1,8 +1,24 @@ - -Wrapper for get_code.tdata — get_code_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,35 +137,42 @@
    -

    Usage

    +

    Usage +

    get_code_tdata(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    (character) code used in the tdata object.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/get_datasets_code.html b/v0.15.1-rc1/reference/get_datasets_code.html index acf3adc143..31e2f30c86 100644 --- a/v0.15.1-rc1/reference/get_datasets_code.html +++ b/v0.15.1-rc1/reference/get_datasets_code.html @@ -1,8 +1,24 @@ - -Get datasets code — get_datasets_code • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    get_datasets_code(datanames, datasets, hashes)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets to extract code from

    @@ -131,28 +156,35 @@

    Arguments -

    Value

    +

    Value +

    -

    Character string concatenated from the following elements:

    • data pre-processing code (from data argument in init)

    • +

      Character string concatenated from the following elements:

      +
        +
      • data pre-processing code (from data argument in init)

      • hash check of loaded objects

      • filter code (if any)

      • -
    + + + + + + - - + + diff --git a/v0.15.1-rc1/reference/get_metadata.html b/v0.15.1-rc1/reference/get_metadata.html index a3a20b92e6..2625832d24 100644 --- a/v0.15.1-rc1/reference/get_metadata.html +++ b/v0.15.1-rc1/reference/get_metadata.html @@ -1,8 +1,24 @@ - -Function to get metadata from a tdata object — get_metadata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    get_metadata(data, dataname)
     
     # S3 method for tdata
    @@ -125,34 +148,40 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata - object) to extract the data from

    dataname

    (character(1)) the dataset name whose metadata is requested

    -
    + +
    -

    Value

    +

    Value +

    Either list of metadata or NULL if no metadata.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/get_rcode_libraries.html b/v0.15.1-rc1/reference/get_rcode_libraries.html index b576e9fa04..8b7cca98e6 100644 --- a/v0.15.1-rc1/reference/get_rcode_libraries.html +++ b/v0.15.1-rc1/reference/get_rcode_libraries.html @@ -1,8 +1,24 @@ - -Generates library calls from current session info — get_rcode_libraries • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,29 +136,33 @@
    -

    Usage

    +

    Usage +

    get_rcode_libraries()
    -

    Value

    +

    Value +

    Character vector of library(<package>) calls.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/include_css_files.html b/v0.15.1-rc1/reference/include_css_files.html index a5ec6fe845..622851389d 100644 --- a/v0.15.1-rc1/reference/include_css_files.html +++ b/v0.15.1-rc1/reference/include_css_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,35 +142,42 @@
    -

    Usage

    +

    Usage +

    include_css_files(pattern = "*")
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes CSS files.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/include_js_files.html b/v0.15.1-rc1/reference/include_js_files.html index 759dcb48b4..b6f801fc54 100644 --- a/v0.15.1-rc1/reference/include_js_files.html +++ b/v0.15.1-rc1/reference/include_js_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include JS files from /inst/js/ package directory to application header — include_js_files • teal +Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    include_js_files(pattern = NULL, except = NULL)
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included, passed to system.file

    except

    (character) vector of basename filenames to be excluded

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes JS files.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/include_teal_css_js.html b/v0.15.1-rc1/reference/include_teal_css_js.html index b9711c14cd..69f2316877 100644 --- a/v0.15.1-rc1/reference/include_teal_css_js.html +++ b/v0.15.1-rc1/reference/include_teal_css_js.html @@ -1,16 +1,32 @@ - - + + + + + +Code to include teal CSS and JavaScript files — include_teal_css_js • teal +Code to include teal CSS and JavaScript files — include_teal_css_js • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -126,33 +148,38 @@
    -

    Usage

    +

    Usage +

    include_teal_css_js()
    -

    Value

    +

    Value +

    A shiny.tag.list.

    -

    Details

    +

    Details +

    Simply add include_teal_css_js() as one of the UI elements.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/index.html b/v0.15.1-rc1/reference/index.html index 272ff7f9d5..12662d8e79 100644 --- a/v0.15.1-rc1/reference/index.html +++ b/v0.15.1-rc1/reference/index.html @@ -1,8 +1,22 @@ - -Function reference • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -108,230 +128,312 @@
    -

    Core teal functions

    +

    Core teal functions +

    -

    Main functions needed to build a teal app

    +

    +

    Main functions needed to build a teal app

    -
    +
    +
    -
    +
    +
    init()
    Create the server and UI function for the shiny app
    -
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    module() modules() format(<teal_module>) print(<teal_module>) format(<teal_modules>) print(<teal_modules>)
    Create teal_module and teal_modules objects
    -
    +
    +
    +
    ui_teal_with_splash() srv_teal_with_splash()
    Add splash screen to teal application
    -
    +
    +
    +
    teal_slices() as.teal_slices() c(<teal_slices>)
    Filter settings for teal applications
    -
    -

    Helper Functions

    + +
    +
    +

    Helper Functions +

    -

    Helper functions for teal

    +

    +

    Helper functions for teal

    -
    +
    +
    -
    +
    +
    build_app_title()
    Build app title with favicon
    -
    -

    Example module

    + +
    +
    +

    Example module +

    -

    A simple teal module

    +

    +

    A simple teal module

    -
    +
    +
    -
    +
    +
    example_module()
    An example teal module
    -
    -

    Creating reports

    + +
    +
    +

    Creating reports +

    -
    +
    +
    -
    +
    +
    reporter_previewer_module()
    Create a teal module for previewing a report
    -
    +
    +
    +
    TealReportCard
    TealReportCard
    -
    +
    +
    +
    report_card_template()
    Template function for TealReportCard creation and customization
    -
    -

    Landing popup

    + +
    +
    +

    Landing popup +

    -
    +
    +
    -
    +
    +
    landing_popup_module()
    Landing popup module
    -
    -

    Functions for module developers

    + +
    +
    +

    Functions for module developers +

    -
    +
    +
    -
    +
    +
    as_tdata()
    Downgrade teal_data objects in modules for compatibility
    -
    +
    +
    +
    new_tdata()
    Create a tdata object
    -
    +
    +
    +
    get_code_tdata()
    -
    Wrapper for get_code.tdata
    -
    +
    Wrapper for get_code.tdata +
    +
    +
    +
    get_metadata()
    Function to get metadata from a tdata object
    -
    +
    +
    +
    tdata2env()
    -
    Function to convert a tdata object to an environment
    -
    +
    Function to convert a tdata object to an environment +
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    show_rcode_modal()
    Show R code modal
    -
    +
    +
    +
    join_keys(<tdata>)
    -
    Extract join_keys from tdata
    -
    -

    Validation functions

    +
    Extract join_keys from tdata +
    + +
    +
    +

    Validation functions +

    -
    +
    +
    -
    +
    +
    validate_has_data()
    Validate that dataset has a minimum number of observations
    -
    +
    +
    +
    validate_has_elements()
    Validates that vector has length greater than 0
    -
    +
    +
    +
    validate_has_variable()
    Validates that dataset contains specific variable
    -
    +
    +
    +
    validate_in()
    Validates that vector includes all expected values
    -
    +
    +
    +
    validate_inputs()
    Send input validation messages to output
    -
    +
    +
    +
    validate_n_levels()
    Validate that variables has expected number of levels
    -
    +
    +
    +
    validate_no_intersection()
    Validates no intersection between two vectors
    -
    +
    +
    +
    validate_one_row_per_id()
    Validate that dataset has unique rows for key variables
    -
    + + + + + + - - + + diff --git a/v0.15.1-rc1/reference/init.html b/v0.15.1-rc1/reference/init.html index ab89724f55..b3ea488e0d 100644 --- a/v0.15.1-rc1/reference/init.html +++ b/v0.15.1-rc1/reference/init.html @@ -1,12 +1,28 @@ - - + + + + + +Create the server and UI function for the shiny app — init • teal +Create the server and UI function for the shiny app — init • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    init(
       data,
       modules,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) For constructing the data object, refer to teal_data() and teal_data_module().

    @@ -174,21 +199,25 @@

    Arguments -

    Value

    +

    Value +

    Named list with server and UI functions.

    -

    Details

    +

    Details +

    When initializing the teal app, if datanames are not set for the teal_data object, defaults from the teal_data environment will be used.

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(
         new_iris = transform(iris, id = seq_len(nrow(iris))),
    @@ -242,17 +271,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/is_arg_used.html b/v0.15.1-rc1/reference/is_arg_used.html index c065c81851..7267e54f4e 100644 --- a/v0.15.1-rc1/reference/is_arg_used.html +++ b/v0.15.1-rc1/reference/is_arg_used.html @@ -1,8 +1,24 @@ - -Does the object make use of the arg — is_arg_used • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    is_arg_used(modules, arg)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_module or teal_modules) object

    arg

    (character(1)) names of the arguments to be checked against formals of teal modules.

    -
    + +
    -

    Value

    +

    Value +

    logical whether the object makes use of arg.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/join_keys.tdata.html b/v0.15.1-rc1/reference/join_keys.tdata.html index 107cb7c356..01a72fbad4 100644 --- a/v0.15.1-rc1/reference/join_keys.tdata.html +++ b/v0.15.1-rc1/reference/join_keys.tdata.html @@ -1,8 +1,24 @@ - -Extract join_keys from tdata — join_keys.tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,34 +137,40 @@
    -

    Usage

    +

    Usage +

    # S3 method for tdata
     join_keys(data, ...)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    ...

    Additional arguments (not used)

    -
    + +
    + + + + - - + + diff --git a/v0.15.1-rc1/reference/landing_popup_module.html b/v0.15.1-rc1/reference/landing_popup_module.html index 5b554bd98d..c452dd160f 100644 --- a/v0.15.1-rc1/reference/landing_popup_module.html +++ b/v0.15.1-rc1/reference/landing_popup_module.html @@ -1,12 +1,28 @@ - - + + + + + +Landing popup module — landing_popup_module • teal +Landing popup module — landing_popup_module • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    landing_popup_module(
       label = "Landing Popup",
       title = NULL,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label of the module.

    @@ -147,16 +172,19 @@

    Arguments -

    Value

    +

    Value +

    A teal_module (extended with teal_landing_module class) to be used in teal applications.

    -

    Examples

    +

    Examples +

    app1 <- init(
       data = teal_data(iris = iris),
       modules = modules(
    @@ -203,17 +231,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/matrix_to_mapping.html b/v0.15.1-rc1/reference/matrix_to_mapping.html index d79a9ee379..e3aadaf780 100644 --- a/v0.15.1-rc1/reference/matrix_to_mapping.html +++ b/v0.15.1-rc1/reference/matrix_to_mapping.html @@ -1,14 +1,30 @@ - - + + + + + +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,36 +145,43 @@
    -

    Usage

    +

    Usage +

    matrix_to_mapping(mapping_matrix)
    -

    Arguments

    -
    mapping_matrix
    +

    Arguments +

    +
    +
    mapping_matrix

    (data.frame) of logical vectors where columns represent modules and row represent teal_slices

    -
    + +
    -

    Value

    +

    Value +

    Named list like that in the mapping attribute of a teal_slices object.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/module_filter_manager.html b/v0.15.1-rc1/reference/module_filter_manager.html index 1f1eb70f4a..b5a999b836 100644 --- a/v0.15.1-rc1/reference/module_filter_manager.html +++ b/v0.15.1-rc1/reference/module_filter_manager.html @@ -1,8 +1,24 @@ - -Manage multiple FilteredData objects — module_filter_manager • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_ui(id)
     
     filter_manager_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,15 +164,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    A list of reactives, each holding a teal_slices, as returned by filter_manager_module_srv.

    -

    Details

    +

    Details +

    This module observes changes in the filters of each FilteredData object and keeps track of all filters used. A mapping of filters to modules is kept in the mapping_matrix object (which is actually a data.frame) @@ -155,17 +183,19 @@

    Details

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/module_filter_manager_modal.html b/v0.15.1-rc1/reference/module_filter_manager_modal.html index e9fdd0109a..1f229a8fa3 100644 --- a/v0.15.1-rc1/reference/module_filter_manager_modal.html +++ b/v0.15.1-rc1/reference/module_filter_manager_modal.html @@ -1,8 +1,24 @@ - -Filter manager modal — module_filter_manager_modal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_modal_ui(id)
     
     filter_manager_modal_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,20 +164,23 @@

    Argumentsteal_slices().

    -

    + + + + + + - - + + diff --git a/v0.15.1-rc1/reference/module_labels.html b/v0.15.1-rc1/reference/module_labels.html index 5106a40d6a..8874325d07 100644 --- a/v0.15.1-rc1/reference/module_labels.html +++ b/v0.15.1-rc1/reference/module_labels.html @@ -1,8 +1,24 @@ - -Retrieve labels from teal_modules — module_labels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,18 +137,23 @@
    -

    Usage

    +

    Usage +

    module_labels(modules)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    -
    + +
    -

    Value

    +

    Value +

    A list containing the labels of the modules. If the modules are nested, @@ -133,17 +161,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/module_management.html b/v0.15.1-rc1/reference/module_management.html index db12b6434b..fa40e8ef81 100644 --- a/v0.15.1-rc1/reference/module_management.html +++ b/v0.15.1-rc1/reference/module_management.html @@ -1,8 +1,24 @@ - -Extract/Remove module(s) of specific class — extract_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,54 @@
    -

    Usage

    +

    Usage +

    extract_module(modules, class)
     
     drop_module(modules, class)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    class

    The class name of teal_module to be extracted or dropped.

    -
    + +
    -

    Value

    +

    Value +

    -
    • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

    • +
        +
      • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

      • For drop_module, the opposite, which is all teal_modules of class other than class.

      • -

      teal_modules

      +
    +

    teal_modules

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/module_nested_tabs.html b/v0.15.1-rc1/reference/module_nested_tabs.html index e847dc99dd..4fb445f930 100644 --- a/v0.15.1-rc1/reference/module_nested_tabs.html +++ b/v0.15.1-rc1/reference/module_nested_tabs.html @@ -1,8 +1,24 @@ - -Create a UI of nested tabs of teal_modules — module_nested_tabs • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)
     
     # S3 method for default
    @@ -163,8 +187,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -197,18 +223,25 @@

    Arguments -

    Value

    +

    Value +

    -

    Depending on the class of modules, ui_nested_tabs returns:

    • teal_module: instantiated UI of the module.

    • +

      Depending on the class of modules, ui_nested_tabs returns:

      +
        +
      • teal_module: instantiated UI of the module.

      • teal_modules: tabsetPanel with each tab corresponding to recursively calling this function on it.

      • -

      srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

      +
    +

    srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

    -

    ui_nested_tabs

    +

    +ui_nested_tabs +

    Each teal_modules is translated to a tabsetPanel and each @@ -218,25 +251,32 @@

    ui_nested_tabs

    -

    srv_nested_tabs

    +

    +srv_nested_tabs +

    -

    This module recursively calls all elements of modules and returns currently active one.

    • teal_module returns self as a active module.

    • +

      This module recursively calls all elements of modules and returns currently active one.

      +
        +
      • teal_module returns self as a active module.

      • teal_modules also returns module active within self which is determined by the input$active_tab.

      • -
    + +
    + + + + - - + + diff --git a/v0.15.1-rc1/reference/module_tabs_with_filters.html b/v0.15.1-rc1/reference/module_tabs_with_filters.html index 61b0d60162..c8b3b7a585 100644 --- a/v0.15.1-rc1/reference/module_tabs_with_filters.html +++ b/v0.15.1-rc1/reference/module_tabs_with_filters.html @@ -1,12 +1,28 @@ - - + + + + + +Add right filter panel into each of the top-level teal_modules UIs — module_tabs_with_filters • teal +Add right filter panel into each of the top-level teal_modules UIs — module_tabs_with_filters • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    ui_tabs_with_filters(id, modules, datasets, filter = teal_slices())
     
     srv_tabs_with_filters(
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -161,15 +186,18 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag.list containing the main menu, placeholders for filters and placeholders for the teal modules.

    -

    Details

    +

    Details +

    The right filter panel's filter choices affect the datasets object. Therefore, all modules using the same datasets share the same filters.

    This works with nested modules of depth greater than 2, though the filter @@ -177,17 +205,19 @@

    Details

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/module_teal.html b/v0.15.1-rc1/reference/module_teal.html index cd26c489f9..d00709e48e 100644 --- a/v0.15.1-rc1/reference/module_teal.html +++ b/v0.15.1-rc1/reference/module_teal.html @@ -1,8 +1,24 @@ - -teal main app module — module_teal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_teal(
       id,
       splash_ui = tags$h2("Starting the Teal App"),
    @@ -127,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -171,15 +197,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression which returns the currently active module.

    -

    Details

    +

    Details +

    It displays the splash UI which is used to fetch the data, possibly prompting for a password input to fetch the data. Once the data is ready, the splash screen is replaced by the actual teal UI that is tabsetted and @@ -200,17 +229,19 @@

    Details

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/module_teal_with_splash.html b/v0.15.1-rc1/reference/module_teal_with_splash.html index e212f27b5f..854c093afb 100644 --- a/v0.15.1-rc1/reference/module_teal_with_splash.html +++ b/v0.15.1-rc1/reference/module_teal_with_splash.html @@ -1,10 +1,26 @@ - -Add splash screen to teal application — module_teal_with_splash • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    ui_teal_with_splash(
       id,
       data,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -168,15 +193,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression containing a teal_data object when data is loaded or NULL when it is not.

    -

    Details

    +

    Details +

    This module pauses app initialization pending delayed data loading. This is necessary because the filter panel and modules depend on the data to initialize.

    teal_with_splash follows the shiny module convention. @@ -186,12 +214,14 @@

    Detailsinit to create a standalone application.

    -

    See also

    +

    See also +

    -

    Examples

    +

    Examples +

    teal_modules <- modules(example_module())
     # Shiny app with modular integration of teal
     ui <- fluidPage(
    @@ -213,17 +243,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/modules_depth.html b/v0.15.1-rc1/reference/modules_depth.html index 9a2e6dbff3..6502f900c2 100644 --- a/v0.15.1-rc1/reference/modules_depth.html +++ b/v0.15.1-rc1/reference/modules_depth.html @@ -1,10 +1,26 @@ - -Get module depth — modules_depth • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    modules_depth(modules, depth = 0L)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (list or teal_modules or teal_module) nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -134,26 +159,30 @@

    Arguments -

    Value

    +

    Value +

    Depth level for given module.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/reexports.html b/v0.15.1-rc1/reference/reexports.html index ead6016f14..aa380e143b 100644 --- a/v0.15.1-rc1/reference/reexports.html +++ b/v0.15.1-rc1/reference/reexports.html @@ -1,5 +1,10 @@ - - + + + + + +Objects exported from other packages — reexports • teal +Objects exported from other packages — reexports • teal + + + + + + + + + + Skip to contents @@ -40,7 +56,8 @@ + + @@ -134,7 +156,8 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    lifecycle
    +
    +
    lifecycle

    badge

    @@ -142,21 +165,24 @@

    %>%

    -
    + + - + + + + - - + + diff --git a/v0.15.1-rc1/reference/report_card_template.html b/v0.15.1-rc1/reference/report_card_template.html index 1627bf98df..95aab2b69f 100644 --- a/v0.15.1-rc1/reference/report_card_template.html +++ b/v0.15.1-rc1/reference/report_card_template.html @@ -1,10 +1,26 @@ - -Template function for TealReportCard creation and customization — report_card_template • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    report_card_template(
       title,
       label,
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) title of the card (unless overwritten by label)

    @@ -149,26 +174,30 @@

    Arguments -

    Value

    +

    Value +

    (TealReportCard) populated with a title, description and filter state.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/reporter_previewer_module.html b/v0.15.1-rc1/reference/reporter_previewer_module.html index 60d091a2cb..22429cf221 100644 --- a/v0.15.1-rc1/reference/reporter_previewer_module.html +++ b/v0.15.1-rc1/reference/reporter_previewer_module.html @@ -1,20 +1,36 @@ - - + + + + + +Create a teal module for previewing a report — reporter_previewer_module • teal +Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + @@ -132,13 +154,16 @@
    -

    Usage

    +

    Usage +

    reporter_previewer_module(label = "Report previewer", server_args = list())
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -147,26 +172,30 @@

    Argumentsteal.reporter::reporter_previewer_srv().

    -

    + +
    -

    Value

    +

    Value +

    teal_module (extended with teal_module_previewer class) containing the teal.reporter previewer functionality.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/resolve_modules_datanames.html b/v0.15.1-rc1/reference/resolve_modules_datanames.html index b545073d31..59d9802965 100644 --- a/v0.15.1-rc1/reference/resolve_modules_datanames.html +++ b/v0.15.1-rc1/reference/resolve_modules_datanames.html @@ -1,10 +1,26 @@ - -Resolve datanames for the modules — resolve_modules_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    resolve_modules_datanames(modules, datanames, join_keys)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules) object

    @@ -134,26 +159,30 @@

    Arguments -

    Value

    +

    Value +

    teal_modules with resolved datanames.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/run_js_files.html b/v0.15.1-rc1/reference/run_js_files.html index 2ae35ae855..b4f4a734c7 100644 --- a/v0.15.1-rc1/reference/run_js_files.html +++ b/v0.15.1-rc1/reference/run_js_files.html @@ -1,14 +1,30 @@ - - + + + + + +Run JS file from /inst/js/ package directory — run_js_files • teal +Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,41 +145,49 @@
    -

    Usage

    +

    Usage +

    run_js_files(files)
    -

    Arguments

    -
    files
    +

    Arguments +

    +
    +
    files

    (character) vector of filenames.

    -
    + +
    -

    Value

    +

    Value +

    returns NULL, invisibly.

    -

    Details

    +

    Details +

    system.file should not be used to access files in other packages, it does not work with devtools. Therefore, we redefine this method in each package as needed. Thus, we do not export this method.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/show_rcode_modal.html b/v0.15.1-rc1/reference/show_rcode_modal.html index e5cc5eef3c..5adad1f46d 100644 --- a/v0.15.1-rc1/reference/show_rcode_modal.html +++ b/v0.15.1-rc1/reference/show_rcode_modal.html @@ -1,10 +1,26 @@ - -Show R code modal — show_rcode_modal • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())
    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) Title of the modal, displayed in the first comment of the R code.

    @@ -137,24 +162,28 @@

    Argumentsshiny::getDefaultReactiveDomain() is used.

    -

    + +
    -

    References

    +

    References +

    shiny::showModal()

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/slices_store.html b/v0.15.1-rc1/reference/slices_store.html index 972b732090..c8384e28f9 100644 --- a/v0.15.1-rc1/reference/slices_store.html +++ b/v0.15.1-rc1/reference/slices_store.html @@ -1,10 +1,26 @@ - -Store and restore teal_slices object — slices_store • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,15 +139,18 @@
    -

    Usage

    +

    Usage +

    slices_store(tss, file)
     
     slices_restore(file)
    -

    Arguments

    -
    tss
    +

    Arguments +

    +
    +
    tss

    (teal_slices) object to be stored.

    @@ -133,9 +158,11 @@

    Arguments.

    -

    + +
    -

    Value

    +

    Value +

    slices_store returns NULL, invisibly.

    @@ -144,32 +171,39 @@

    Value

    slices_restore returns a teal_slices object restored from the file.

    -

    Details

    -

    Date and date time objects are stored in the following formats:

    • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

    • +

      Details +

      +

      Date and date time objects are stored in the following formats:

      +
        +
      • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

      • POSIX*t classes are converted to character by using format.POSIX*t(usetz = TRUE, tz = "UTC") (YYYY-MM-DD HH:MM:SS UTC, where UTC is the Coordinated Universal Time timezone short-code).

      • -

      This format is assumed during slices_restore. All POSIX*t objects in +

    +

    This format is assumed during slices_restore. All POSIX*t objects in selected or choices fields of teal_slice objects are always printed in UTC timezone as well.

    -

    See also

    +

    See also +

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/snapshot_manager_module.html b/v0.15.1-rc1/reference/snapshot_manager_module.html index 490be07c86..204da6dd4e 100644 --- a/v0.15.1-rc1/reference/snapshot_manager_module.html +++ b/v0.15.1-rc1/reference/snapshot_manager_module.html @@ -1,8 +1,24 @@ - -Filter state snapshot management — snapshot_manager_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    snapshot_manager_ui(id)
     
     snapshot_manager_srv(id, slices_global, mapping_matrix, filtered_data_list)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id

    @@ -140,15 +165,18 @@

    Arguments -

    Value

    +

    Value +

    Nothing is returned.

    -

    Details

    +

    Details +

    This module introduces snapshots: stored descriptions of the filter state of the entire application. Snapshots allow the user to save the current filter state of the application for later use in the session, as well as to save it to file in order to share it with an app developer or other users, @@ -160,7 +188,8 @@

    Details

    -

    Server logic

    +

    Server logic +

    Snapshots are basically teal_slices objects, however, since each module is served by a separate instance @@ -175,7 +204,8 @@

    Server logic -

    Snapshot mechanics

    +

    Snapshot mechanics +

    When a snapshot is captured, the user is prompted to name it. @@ -205,7 +235,8 @@

    Snapshot mechanics -

    Transferring snapshots

    +

    Transferring snapshots +

    Snapshots uploaded from disk should only be used in the same application they come from, @@ -215,22 +246,25 @@

    Transferring snapshots

    -

    Author

    +

    Author +

    Aleksander Chlebowski

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/tdata.html b/v0.15.1-rc1/reference/tdata.html index 0a1e671613..1179994bc8 100644 --- a/v0.15.1-rc1/reference/tdata.html +++ b/v0.15.1-rc1/reference/tdata.html @@ -1,22 +1,38 @@ - - + + + + + +Create a tdata object — tdata • teal +Create a tdata object — tdata • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + + @@ -126,19 +148,25 @@

    [Deprecated]

    Create a new object called tdata which contains data, a reactive list of data.frames -(or MultiAssayExperiment), with attributes:

    • code (reactive) containing code used to generate the data

    • +(or MultiAssayExperiment), with attributes:

      +
        +
      • code (reactive) containing code used to generate the data

      • join_keys (join_keys) containing the relationships between the data

      • metadata (named list) containing any metadata associated with the data frames

      • -
    + +
    -

    Usage

    +

    Usage +

    new_tdata(data, code = "", join_keys = NULL, metadata = NULL)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (named list) A list of data.frame or MultiAssayExperiment objects, which optionally can be reactive. Inside this object all of these items will be made reactive.

    @@ -160,20 +188,24 @@

    Arguments -

    Value

    +

    Value +

    A tdata object.

    -

    See also

    +

    See also +

    as_tdata

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars), dd = data.frame(x = 1:10)),
    @@ -354,17 +386,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/tdata2env.html b/v0.15.1-rc1/reference/tdata2env.html index 107e7ed4c7..9788e4121c 100644 --- a/v0.15.1-rc1/reference/tdata2env.html +++ b/v0.15.1-rc1/reference/tdata2env.html @@ -1,8 +1,24 @@ - -Function to convert a tdata object to an environment — tdata2env • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,25 +137,31 @@
    -

    Usage

    +

    Usage +

    tdata2env(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    An environment.

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars)),
    @@ -145,17 +174,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/tdata_deprecation.html b/v0.15.1-rc1/reference/tdata_deprecation.html index b53a96bf1d..d9c93b3a44 100644 --- a/v0.15.1-rc1/reference/tdata_deprecation.html +++ b/v0.15.1-rc1/reference/tdata_deprecation.html @@ -1,8 +1,24 @@ - -Downgrade teal_data objects in modules for compatibility — as_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,24 +136,30 @@
    -

    Usage

    +

    Usage +

    as_tdata(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    data object, either tdata or teal_data, the latter possibly in a reactive expression

    -
    + +
    -

    Value

    +

    Value +

    Object of class tdata.

    -

    Details

    +

    Details +

    Recent changes in teal cause modules to fail because modules expect a tdata object to be passed to the data argument but instead they receive a teal_data object, which is additionally wrapped in a reactive expression in the server functions. @@ -140,7 +168,8 @@

    Details
    -

    Examples

    +

    Examples +

    td <- teal_data()
     td <- within(td, iris <- iris) %>% within(mtcars <- mtcars)
     td
    @@ -192,17 +221,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.15.1-rc1/reference/teal-package.html b/v0.15.1-rc1/reference/teal-package.html index 5879522bc0..ba363d5bb6 100644 --- a/v0.15.1-rc1/reference/teal-package.html +++ b/v0.15.1-rc1/reference/teal-package.html @@ -1,10 +1,26 @@ - -teal: Interactive exploration of clinical trials data — teal-package • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,21 +141,30 @@
    -

    Details

    +

    Details +

    To learn mode about the package, visit the project website or read the init() manual page.

    -

    Author

    +

    Author +

    Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID)

    -

    Authors:

    + +
    + + + + - - + + diff --git a/v0.15.1-rc1/reference/teal_data_datanames.html b/v0.15.1-rc1/reference/teal_data_datanames.html index 14d1c264d3..ef5e6164c4 100644 --- a/v0.15.1-rc1/reference/teal_data_datanames.html +++ b/v0.15.1-rc1/reference/teal_data_datanames.html @@ -1,10 +1,26 @@ - -Wrapper on teal.data::datanames — teal_data_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -117,18 +140,23 @@
    -

    Usage

    +

    Usage +

    teal_data_datanames(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data)

    -
    + +
    -

    Value

    +

    Value +

    character

    @@ -137,17 +165,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/teal_data_module.html b/v0.15.1-rc1/reference/teal_data_module.html index bf54e6ed49..7502dd8d0a 100644 --- a/v0.15.1-rc1/reference/teal_data_module.html +++ b/v0.15.1-rc1/reference/teal_data_module.html @@ -1,10 +1,26 @@ - -Data module for teal applications — teal_data_module • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    teal_data_module(ui, server)
     
     # S4 method for teal_data_module,character
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    ui
    +

    Arguments +

    +
    +
    ui

    (function(id)) shiny module UI function; must only take id argument

    @@ -159,9 +184,11 @@

    Arguments -

    Value

    +

    Value +

    teal_data_module returns an object of class teal_data_module.

    @@ -173,7 +200,8 @@

    Value

    within returns a teal_data_module object with a delayed evaluation of expr when the module is run.

    -

    Details

    +

    Details +

    teal_data_module creates a shiny module to supply or modify data in a teal application. The module allows for running data pre-processing code (creation and some modification) after the app starts. The body of the server function will be run in the app rather than in the global environment. @@ -188,12 +216,14 @@

    Details... argument: as name:value pairs are passed to ..., name in expr will be replaced with value.

    -

    Examples

    +

    Examples +

    tdm <- teal_data_module(
       ui = function(id) {
         ns <- NS(id)
    @@ -326,17 +356,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/teal_data_to_filtered_data.html b/v0.15.1-rc1/reference/teal_data_to_filtered_data.html index 5c60f8ccb4..67d70a0b02 100644 --- a/v0.15.1-rc1/reference/teal_data_to_filtered_data.html +++ b/v0.15.1-rc1/reference/teal_data_to_filtered_data.html @@ -1,8 +1,24 @@ - -Create a FilteredData — teal_data_to_filtered_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    teal_data_to_filtered_data(x, datanames = teal_data_datanames(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (teal_data) object

    datanames

    (character) vector of data set names to include; must be subset of datanames(x)

    -
    + +
    -

    Value

    +

    Value +

    A FilteredData object.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/teal_modules.html b/v0.15.1-rc1/reference/teal_modules.html index 38dc1233d1..ea7c93c564 100644 --- a/v0.15.1-rc1/reference/teal_modules.html +++ b/v0.15.1-rc1/reference/teal_modules.html @@ -1,10 +1,26 @@ - -Create teal_module and teal_modules objects — teal_modules • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    module(
       label = "module",
       server = function(id, ...) {
    @@ -151,14 +174,19 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    server
    -

    (function) shiny module with following arguments:

    • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

    • +
      +

      (function) shiny module with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

      • input, output, session - (optional; not recommended) When provided, then shiny::callModule() will be used to call a module. From shiny 1.5.0, the recommended way is to use shiny::moduleServer() instead which doesn't require these arguments.

      • @@ -172,14 +200,19 @@

        Argumentsteal.slice::FilterPanelAPI).

      • ... (optional) When provided, server_args elements will be passed to the module named argument or to the ....

      • -

      +
    +
    ui
    -

    (function) shiny UI module function with following arguments:

    • id - teal will set proper shiny namespace for this module.

    • +
      +

      (function) shiny UI module function with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module.

      • ... (optional) When provided, ui_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    filters
    @@ -203,7 +236,8 @@

    Argumentsformat() and print(): Arguments passed to other methods.

    @@ -215,20 +249,26 @@

    Arguments -

    Value

    +

    Value +

    module() returns an object of class teal_module.

    -

    modules() returns a teal_modules object which contains following fields:

    • label: taken from the label argument.

    • +

      modules() returns a teal_modules object which contains following fields:

      +
        +
      • label: taken from the label argument.

      • children: a list containing objects passed in .... List elements are named after their label attribute converted to a valid shiny id.

      • -
    + +
    -

    Details

    +

    Details +

    module() creates an instance of a teal_module that can be placed in a teal application. modules() shapes the structure of a the application by organizing teal_module within the navigation panel. It wraps teal_module and teal_modules objects in a teal_modules object, @@ -241,7 +281,8 @@

    Details
    -

    Examples

    +

    Examples +

    library(shiny)
     
     module_1 <- module(
    @@ -298,17 +339,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.15.1-rc1/reference/teal_slices.html b/v0.15.1-rc1/reference/teal_slices.html index 434ffbbc26..27f9e3519a 100644 --- a/v0.15.1-rc1/reference/teal_slices.html +++ b/v0.15.1-rc1/reference/teal_slices.html @@ -1,8 +1,24 @@ - -Filter settings for teal applications — teal_slices • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    teal_slices(
       ...,
       exclude_varnames = NULL,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    any number of teal_slice objects. For print and format, additional arguments passed to other functions.

    @@ -146,15 +171,19 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal.slice's GitHub repository.

    (character(1)) string specifying how observations are tallied by these filter states. -Possible options:

    • "none" (default) to have counts of single FilterState to show unfiltered number only.

    • +Possible options:

      +
        +
      • "none" (default) to have counts of single FilterState to show unfiltered number only.

      • "all" to have counts of single FilterState to show number of observation in filtered and unfiltered dataset. Note, that issues were reported when using this option with MultiAssayExperiment. Please make sure that adding new filters doesn't fail on target platform before deploying for production.

      • -
    + +
    allow_add
    @@ -162,24 +191,32 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal's GitHub repository.

    (named list) specifies which filters will be active in which modules on app start. Elements should contain character vector of teal_slice ids (see teal.slice::teal_slice). -Names of the list should correspond to teal_module label set in module() function.

    • ids listed under "global_filters will be active in all modules.

    • +Names of the list should correspond to teal_module label set in module() function.

      +
        +
      • ids listed under "global_filters will be active in all modules.

      • If missing, all filters will be applied to all modules.

      • If empty list, all filters will be available to all modules but will start inactive.

      • If module_specific is FALSE, only global_filters will be active on start.

      • -
    + +
    app_id
    @@ -192,27 +229,32 @@

    Arguments -

    Value

    +

    Value +

    A teal_slices object.

    -

    Details

    +

    Details +

    Produces a teal_slices object. The teal_slice components will specify filter states that will be active when the app starts. Attributes (created with the named arguments) will configure the way the app applies filters. See argument descriptions for details.

    -

    Examples

    +

    Examples +

    filter <- teal_slices(
       teal_slice(dataname = "iris", varname = "Species", id = "species"),
       teal_slice(dataname = "iris", varname = "Sepal.Length", id = "sepal_length"),
    @@ -245,17 +287,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/unfold_mapping.html b/v0.15.1-rc1/reference/unfold_mapping.html index 5f8dfee691..735add3a26 100644 --- a/v0.15.1-rc1/reference/unfold_mapping.html +++ b/v0.15.1-rc1/reference/unfold_mapping.html @@ -1,8 +1,24 @@ - -Explicitly enumerate global filters. — unfold_mapping • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    unfold_mapping(mapping, module_names)
    -

    Arguments

    -
    mapping
    +

    Arguments +

    +
    +
    mapping

    (named list) as stored in mapping parameter of teal_slices

    module_names

    (character) vector containing names of all modules in the app

    -
    + +
    -

    Value

    +

    Value +

    A named_list with one element per module, each element containing all filters applied to that module.

    + + + + - - + + diff --git a/v0.15.1-rc1/reference/validate_app_title_tag.html b/v0.15.1-rc1/reference/validate_app_title_tag.html index c7f144c035..677e85de09 100644 --- a/v0.15.1-rc1/reference/validate_app_title_tag.html +++ b/v0.15.1-rc1/reference/validate_app_title_tag.html @@ -1,8 +1,24 @@ - -Function for validating the title parameter of teal::init — validate_app_title_tag • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,29 +137,35 @@
    -

    Usage

    +

    Usage +

    validate_app_title_tag(shiny_tag)
    -

    Arguments

    -
    shiny_tag
    +

    Arguments +

    +
    +
    shiny_tag

    (shiny.tag) Object to validate for a valid title.

    -
    + +
    + + + + - - + + diff --git a/v0.15.1-rc1/reference/validate_has_data.html b/v0.15.1-rc1/reference/validate_has_data.html index e821961f73..1e625cccda 100644 --- a/v0.15.1-rc1/reference/validate_has_data.html +++ b/v0.15.1-rc1/reference/validate_has_data.html @@ -1,8 +1,24 @@ - -Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    validate_has_data(
       x,
       min_nrow = NULL,
    @@ -125,8 +148,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    @@ -145,14 +170,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(teal)
     ui <- fluidPage(
       sliderInput("len", "Max Length of Sepal",
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/validate_has_elements.html b/v0.15.1-rc1/reference/validate_has_elements.html index 08ef18684e..d4cd201b80 100644 --- a/v0.15.1-rc1/reference/validate_has_elements.html +++ b/v0.15.1-rc1/reference/validate_has_elements.html @@ -1,8 +1,24 @@ - -Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_has_elements(x, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    msg

    message to display

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B"), each = 15)
    @@ -169,17 +197,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/validate_has_variable.html b/v0.15.1-rc1/reference/validate_has_variable.html index 2c49c0f142..f86a27d383 100644 --- a/v0.15.1-rc1/reference/validate_has_variable.html +++ b/v0.15.1-rc1/reference/validate_has_variable.html @@ -1,8 +1,24 @@ - -Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_has_variable(data, varname, msg)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20)
    @@ -165,17 +193,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/validate_in.html b/v0.15.1-rc1/reference/validate_in.html index edab0c5dbc..2feaa0dd3e 100644 --- a/v0.15.1-rc1/reference/validate_in.html +++ b/v0.15.1-rc1/reference/validate_in.html @@ -1,8 +1,24 @@ - -Validates that vector includes all expected values — validate_in • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_in(x, choices, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Vector of values to test.

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    ui <- fluidPage(
       selectInput(
         "species",
    @@ -163,17 +191,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/validate_inputs.html b/v0.15.1-rc1/reference/validate_inputs.html index 23ae501c12..38e39dcc2d 100644 --- a/v0.15.1-rc1/reference/validate_inputs.html +++ b/v0.15.1-rc1/reference/validate_inputs.html @@ -1,10 +1,26 @@ - -Send input validation messages to output — validate_inputs • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    validate_inputs(..., header = "Some inputs require attention")
    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    either any number of InputValidator objects or an optionally named, possibly nested list of InputValidator objects, see Details

    @@ -132,15 +157,18 @@

    Arguments -

    Value

    +

    Value +

    Returns NULL if the final validation call passes and a shiny.silent.error if it fails.

    -

    Details

    +

    Details +

    shiny::validate is used to withhold rendering of an output element until certain conditions are met and to print a validation message in place of the output element. @@ -159,12 +187,14 @@

    Detailsheader.

    -

    Examples

    +

    Examples +

    library(shiny)
     library(shinyvalidate)
     
    @@ -234,17 +264,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/validate_n_levels.html b/v0.15.1-rc1/reference/validate_n_levels.html index 25ec1f2b5c..af9c67466a 100644 --- a/v0.15.1-rc1/reference/validate_n_levels.html +++ b/v0.15.1-rc1/reference/validate_n_levels.html @@ -1,8 +1,24 @@ - -Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    variable name. If x is not a factor, the unique values are treated as levels.

    @@ -137,16 +162,19 @@

    Arguments -

    Details

    +

    Details +

    If the number of levels of x is less than min_levels or greater than max_levels the validation will fail. This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20),
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/validate_no_intersection.html b/v0.15.1-rc1/reference/validate_no_intersection.html index 85ef27a640..fda185eea4 100644 --- a/v0.15.1-rc1/reference/validate_no_intersection.html +++ b/v0.15.1-rc1/reference/validate_no_intersection.html @@ -1,8 +1,24 @@ - -Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_no_intersection(x, y, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B", "C"), each = 10)
    @@ -178,17 +206,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1-rc1/reference/validate_one_row_per_id.html b/v0.15.1-rc1/reference/validate_one_row_per_id.html index 4c0e1d3783..60dc879c69 100644 --- a/v0.15.1-rc1/reference/validate_one_row_per_id.html +++ b/v0.15.1-rc1/reference/validate_one_row_per_id.html @@ -1,8 +1,24 @@ - -Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_one_row_per_id(x, key = c("USUBJID", "STUDYID"))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    key

    (character) Vector of ID variables from x that identify unique records.

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    iris$id <- rep(1:50, times = 3)
     ui <- fluidPage(
       selectInput(
    @@ -161,17 +189,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/404.html b/v0.15.1/404.html index 0f23fc4a15..2358308843 100644 --- a/v0.15.1/404.html +++ b/v0.15.1/404.html @@ -1,5 +1,4 @@ - - + @@ -80,23 +79,7 @@ - - + - + + diff --git a/v0.15.1/CODE_OF_CONDUCT.html b/v0.15.1/CODE_OF_CONDUCT.html index f5d01cf1dc..139895ba1f 100644 --- a/v0.15.1/CODE_OF_CONDUCT.html +++ b/v0.15.1/CODE_OF_CONDUCT.html @@ -1,8 +1,22 @@ - -Contributor Covenant Code of Conduct • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,65 +131,80 @@
    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    • Demonstrating empathy and kindness toward other people
    • +
        +
      • Demonstrating empathy and kindness toward other people
      • Being respectful of differing opinions, viewpoints, and experiences
      • Giving and gracefully accepting constructive feedback
      • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
      • Focusing on what is best not just for us as individuals, but for the overall community
      • -

      Examples of unacceptable behavior include:

      -
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • +
      +

      Examples of unacceptable behavior include:

      +
        +
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • Trolling, insulting or derogatory comments, and personal or political attacks
      • Public or private harassment
      • Publishing others’ private information, such as a physical or email address, without their explicit permission
      • Other conduct which could reasonably be considered inappropriate in a professional setting
      • -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -177,17 +212,19 @@

    Attribution

    + + + + - - + + diff --git a/v0.15.1/CONTRIBUTING.html b/v0.15.1/CONTRIBUTING.html index 6cf00270c7..97fa071431 100644 --- a/v0.15.1/CONTRIBUTING.html +++ b/v0.15.1/CONTRIBUTING.html @@ -1,8 +1,22 @@ - -Contribution Guidelines • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -113,7 +133,8 @@

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -124,38 +145,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    GitHub Flow

    +

    GitHub Flow +

    This repository uses the GitHub Flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes

        Make sure your code

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR)

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -169,76 +199,93 @@

        GitHub Flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    -

    Coding guidelines

    +

    Coding guidelines +

    This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Dependency management

    +

    Dependency management +

    Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

    -

    Dependency version management

    +

    Dependency version management +

    If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    -
    • Minimum 5% of lines of code authored* (determined by git blame query) OR
    • +
        +
      • Minimum 5% of lines of code authored* (determined by git blame query) OR
      • Being at the top 5 contributors in terms of number of commits OR lines added OR lines removed*
      • -

      *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

      +
    +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + + + - - + + diff --git a/v0.15.1/LICENSE-text.html b/v0.15.1/LICENSE-text.html index 8634d769b4..c6d8b1dcf6 100644 --- a/v0.15.1/LICENSE-text.html +++ b/v0.15.1/LICENSE-text.html @@ -1,8 +1,22 @@ - -License • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -123,17 +143,19 @@ limitations under the License. - + + + + - - + + diff --git a/v0.15.1/SECURITY.html b/v0.15.1/SECURITY.html index 04699ccf3c..681590b39e 100644 --- a/v0.15.1/SECURITY.html +++ b/v0.15.1/SECURITY.html @@ -1,8 +1,22 @@ - -Security Policy • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,38 +131,44 @@
    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    -
    • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
    • +
        +
      • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
      • Full paths of source file(s) related to the manifestation of the issue
      • The location of the affected source code (tag/branch/commit or direct URL)
      • Any special configuration required to reproduce the issue
      • Step-by-step instructions to reproduce the issue
      • Proof-of-concept or exploit code (if possible)
      • Impact of the issue, including how an attacker might exploit the issue
      • -

      This information will help us triage your report more quickly.

      +
    +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + + + - - + + diff --git a/v0.15.1/articles/adding-support-for-reporting.html b/v0.15.1/articles/adding-support-for-reporting.html index 924eeddcd0..2ec9123738 100644 --- a/v0.15.1/articles/adding-support-for-reporting.html +++ b/v0.15.1/articles/adding-support-for-reporting.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/blueprint/actors.html b/v0.15.1/articles/blueprint/actors.html index 245b8a375a..b313d4d19f 100644 --- a/v0.15.1/articles/blueprint/actors.html +++ b/v0.15.1/articles/blueprint/actors.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/blueprint/dataflow.html b/v0.15.1/articles/blueprint/dataflow.html index 1d22d06c19..b99e21ed1f 100644 --- a/v0.15.1/articles/blueprint/dataflow.html +++ b/v0.15.1/articles/blueprint/dataflow.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/blueprint/filter_panel.html b/v0.15.1/articles/blueprint/filter_panel.html index b7cecaee24..0f8bb1cac6 100644 --- a/v0.15.1/articles/blueprint/filter_panel.html +++ b/v0.15.1/articles/blueprint/filter_panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/blueprint/in_app_data.html b/v0.15.1/articles/blueprint/in_app_data.html index adcb28998c..66c6b9a894 100644 --- a/v0.15.1/articles/blueprint/in_app_data.html +++ b/v0.15.1/articles/blueprint/in_app_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/blueprint/index.html b/v0.15.1/articles/blueprint/index.html index 2c5d91824c..4022a7671e 100644 --- a/v0.15.1/articles/blueprint/index.html +++ b/v0.15.1/articles/blueprint/index.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/blueprint/input_data.html b/v0.15.1/articles/blueprint/input_data.html index 1846f4667b..4f48d0c63e 100644 --- a/v0.15.1/articles/blueprint/input_data.html +++ b/v0.15.1/articles/blueprint/input_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/blueprint/intro.html b/v0.15.1/articles/blueprint/intro.html index 063c8a03f3..272ade1c9d 100644 --- a/v0.15.1/articles/blueprint/intro.html +++ b/v0.15.1/articles/blueprint/intro.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/blueprint/module_encapsulation.html b/v0.15.1/articles/blueprint/module_encapsulation.html index ce1f2daf01..ceaedda56f 100644 --- a/v0.15.1/articles/blueprint/module_encapsulation.html +++ b/v0.15.1/articles/blueprint/module_encapsulation.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/blueprint/product_map.html b/v0.15.1/articles/blueprint/product_map.html index 7f73166fe4..aba4052625 100644 --- a/v0.15.1/articles/blueprint/product_map.html +++ b/v0.15.1/articles/blueprint/product_map.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/bootstrap-themes-in-teal.html b/v0.15.1/articles/bootstrap-themes-in-teal.html index cbd80418c7..51b86a6ea4 100644 --- a/v0.15.1/articles/bootstrap-themes-in-teal.html +++ b/v0.15.1/articles/bootstrap-themes-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/creating-custom-modules.html b/v0.15.1/articles/creating-custom-modules.html index 3468b6a784..adb503deef 100644 --- a/v0.15.1/articles/creating-custom-modules.html +++ b/v0.15.1/articles/creating-custom-modules.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/data-as-shiny-module.html b/v0.15.1/articles/data-as-shiny-module.html index e9dcea8d82..2def2e1628 100644 --- a/v0.15.1/articles/data-as-shiny-module.html +++ b/v0.15.1/articles/data-as-shiny-module.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/filter-panel.html b/v0.15.1/articles/filter-panel.html index a82170da4f..bfb73541b6 100644 --- a/v0.15.1/articles/filter-panel.html +++ b/v0.15.1/articles/filter-panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/getting-started-with-teal.html b/v0.15.1/articles/getting-started-with-teal.html index ecb75f86e7..fa9a542298 100644 --- a/v0.15.1/articles/getting-started-with-teal.html +++ b/v0.15.1/articles/getting-started-with-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/including-data-in-teal-applications.html b/v0.15.1/articles/including-data-in-teal-applications.html index 682b44fe72..c32ef88462 100644 --- a/v0.15.1/articles/including-data-in-teal-applications.html +++ b/v0.15.1/articles/including-data-in-teal-applications.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/articles/index.html b/v0.15.1/articles/index.html index 8dc9ec8e9e..2a1f6e6d29 100644 --- a/v0.15.1/articles/index.html +++ b/v0.15.1/articles/index.html @@ -1,8 +1,22 @@ - -Articles • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,78 +131,113 @@

    Get started

    -
    Getting Started with teal
    +
    +
    Getting Started with teal
    -
    + +
    + + + + + + + + + +

    📃 Technical blueprint

    -

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    +

    +

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    -
    About Technical Blueprint
    +
    +
    About Technical Blueprint
    -
    Introduction
    + +
    Introduction
    -
    Actors
    + +
    Actors
    -
    Data Flow
    + +
    Data Flow
    -
    Product Map
    + +
    Product Map
    -
    + + + + + + + + + + - - + + diff --git a/v0.15.1/articles/teal-options.html b/v0.15.1/articles/teal-options.html index 160ac060eb..b644ee15e6 100644 --- a/v0.15.1/articles/teal-options.html +++ b/v0.15.1/articles/teal-options.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.1/authors.html b/v0.15.1/authors.html index 2c396f5a92..0da0f76078 100644 --- a/v0.15.1/authors.html +++ b/v0.15.1/authors.html @@ -1,8 +1,22 @@ - -Authors and Citation • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -110,7 +130,8 @@

    Authors

    -
    • +
        +
      • Dawid Kaledkowski. Author, maintainer.

      • @@ -182,7 +203,8 @@

        Authors

        Maximilian Mordig. Contributor.

        -
    + +

    Citation

    @@ -203,17 +225,19 @@

    Citation

    }
    + + + + - - + + diff --git a/v0.15.1/coverage-report/index.html b/v0.15.1/coverage-report/index.html index fef4bdec0c..1c50dd427e 100644 --- a/v0.15.1/coverage-report/index.html +++ b/v0.15.1/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -165,28 +164,32 @@

    teal coverage - 68.02%

    8 - 6x + 6x +
      vapply(
    9 - 6x + 6x +
        utils::sessionInfo()$otherPkgs,
    10 - 6x + 6x +
        function(x) {
    11 - 36x + 36x +
          paste0("library(", x$Package, ")")
    @@ -200,7 +203,8 @@

    teal coverage - 68.02%

    13 - 6x + 6x +
        character(1)
    @@ -221,21 +225,24 @@

    teal coverage - 68.02%

    16 - 6x + 6x +
        rev() %>%
    17 - 6x + 6x +
        paste0(sep = "\n") %>%
    18 - 6x + 6x +
        paste0(collapse = "")
    @@ -277,21 +284,24 @@

    teal coverage - 68.02%

    24 - 10x + 10x +
      code_string <- getOption("teal.load_nest_code")
    25 - 10x + 10x +
      if (is.character(code_string)) {
    26 - 2x + 2x +
        code_string
    @@ -305,7 +315,8 @@

    teal coverage - 68.02%

    28 - 8x + 8x +
        "# Add any code to install/load your NEST environment here\n"
    @@ -445,21 +456,24 @@

    teal coverage - 68.02%

    48 - 4x + 4x +
      str_prepro <-
    49 - 4x + 4x +
        teal.data:::get_code_dependency(attr(datasets, "preprocessing_code"), names = datanames, check_names = FALSE)
    50 - 4x + 4x +
      if (length(str_prepro) == 0) {
    @@ -480,7 +494,8 @@

    teal coverage - 68.02%

    53 - 4x + 4x +
        str_prepro <- paste(str_prepro, collapse = "\n")
    @@ -508,35 +523,40 @@

    teal coverage - 68.02%

    57 - 4x + 4x +
      str_hash <- vapply(datanames, function(dataname) {
    58 - 6x + 6x +
        sprintf(
    59 - 6x + 6x +
          "stopifnot(%s == %s)",
    60 - 6x + 6x +
          deparse1(bquote(rlang::hash(.(as.name(dataname))))),
    61 - 6x + 6x +
          deparse1(hashes[[dataname]])
    @@ -550,14 +570,16 @@

    teal coverage - 68.02%

    63 - 4x + 4x +
      }, character(1))
    64 - 4x + 4x +
      str_hash <- paste(str_hash, collapse = "\n")
    @@ -578,21 +600,24 @@

    teal coverage - 68.02%

    67 - 4x + 4x +
      str_filter <- teal.slice::get_filter_expr(datasets, datanames)
    68 - 4x + 4x +
      if (str_filter == "") {
    69 - 2x + 2x +
        str_filter <- character(0)
    @@ -620,14 +645,16 @@

    teal coverage - 68.02%

    73 - 4x + 4x +
      str_code <- paste(c(str_prepro, str_hash, str_filter), collapse = "\n\n")
    74 - 4x + 4x +
      sprintf("%s\n", str_code)
    @@ -1606,42 +1633,48 @@

    teal coverage - 68.02%

    138 - 143x + 143x +
      checkmate::assert_string(label)
    139 - 140x + 140x +
      if (label == "global_filters") {
    140 - 1x + 1x +
        stop(
    141 - 1x + 1x +
          sprintf("module(label = \"%s\", ...\n  ", label),
    142 - 1x + 1x +
          "Label 'global_filters' is reserved in teal. Please change to something else.",
    143 - 1x + 1x +
          call. = FALSE
    @@ -1662,7 +1695,8 @@

    teal coverage - 68.02%

    146 - 139x + 139x +
      if (label == "Report previewer") {
    @@ -1725,35 +1759,40 @@

    teal coverage - 68.02%

    155 - 139x + 139x +
      checkmate::assert_function(server)
    156 - 139x + 139x +
      server_formals <- names(formals(server))
    157 - 139x + 139x +
      if (!(
    158 - 139x + 139x +
        "id" %in% server_formals ||
    159 - 139x + 139x +
          all(c("input", "output", "session") %in% server_formals)
    @@ -1767,70 +1806,80 @@

    teal coverage - 68.02%

    161 - 2x + 2x +
        stop(
    162 - 2x + 2x +
          "\nmodule() `server` argument requires a function with following arguments:",
    163 - 2x + 2x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    164 - 2x + 2x +
          "\n - input, output, session (not recommended) - then `shiny::callModule` will be used to call a module.",
    165 - 2x + 2x +
          "\n\nFollowing arguments can be used optionaly:",
    166 - 2x + 2x +
          "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
    167 - 2x + 2x +
          "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
    168 - 2x + 2x +
          "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
    169 - 2x + 2x +
          "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
    170 - 2x + 2x +
          "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
    @@ -1851,42 +1900,48 @@

    teal coverage - 68.02%

    173 - 137x + 137x +
      if ("datasets" %in% server_formals) {
    174 - 2x + 2x +
        warning(
    175 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    176 - 2x + 2x +
          "`datasets` argument in the server is deprecated and will be removed in the next release. ",
    177 - 2x + 2x +
          "Please use `data` instead.",
    178 - 2x + 2x +
          call. = FALSE
    @@ -1928,56 +1983,64 @@

    teal coverage - 68.02%

    184 - 137x + 137x +
      checkmate::assert_function(ui)
    185 - 137x + 137x +
      ui_formals <- names(formals(ui))
    186 - 137x + 137x +
      if (!"id" %in% ui_formals) {
    187 - 1x + 1x +
        stop(
    188 - 1x + 1x +
          "\nmodule() `ui` argument requires a function with following arguments:",
    189 - 1x + 1x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    190 - 1x + 1x +
          "\n\nFollowing arguments can be used optionally:",
    191 - 1x + 1x +
          "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
    @@ -1998,42 +2061,48 @@

    teal coverage - 68.02%

    194 - 136x + 136x +
      if (any(c("data", "datasets") %in% ui_formals)) {
    195 - 2x + 2x +
        stop(
    196 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    197 - 2x + 2x +
          "UI with `data` or `datasets` argument is no longer accepted.\n  ",
    198 - 2x + 2x +
          "If some UI inputs depend on data, please move the logic to your server instead.\n  ",
    199 - 2x + 2x +
          "Possible solutions are renderUI() or updateXyzInput() functions."
    @@ -2075,7 +2144,8 @@

    teal coverage - 68.02%

    205 - 134x + 134x +
      if (!missing(filters)) {
    @@ -2145,21 +2215,24 @@

    teal coverage - 68.02%

    215 - 134x + 134x +
      if (!is.element("data", server_formals) && !is.null(datanames)) {
    216 - 50x + 50x +
        message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
    217 - 50x + 50x +
        datanames <- NULL
    @@ -2173,7 +2246,8 @@

    teal coverage - 68.02%

    219 - 134x + 134x +
      checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
    @@ -2194,49 +2268,56 @@

    teal coverage - 68.02%

    222 - 133x + 133x +
      checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
    223 - 131x + 131x +
      srv_extra_args <- setdiff(names(server_args), server_formals)
    224 - 131x + 131x +
      if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
    225 - 1x + 1x +
        stop(
    226 - 1x + 1x +
          "\nFollowing `server_args` elements have no equivalent in the formals of the server:\n",
    227 - 1x + 1x +
          paste(paste(" -", srv_extra_args), collapse = "\n"),
    228 - 1x + 1x +
          "\n\nUpdate the server arguments by including above or add `...`"
    @@ -2271,49 +2352,56 @@

    teal coverage - 68.02%

    233 - 130x + 130x +
      checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
    234 - 128x + 128x +
      ui_extra_args <- setdiff(names(ui_args), ui_formals)
    235 - 128x + 128x +
      if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
    236 - 1x + 1x +
        stop(
    237 - 1x + 1x +
          "\nFollowing `ui_args` elements have no equivalent in the formals of UI:\n",
    238 - 1x + 1x +
          paste(paste(" -", ui_extra_args), collapse = "\n"),
    239 - 1x + 1x +
          "\n\nUpdate the UI arguments by including above or add `...`"
    @@ -2341,35 +2429,40 @@

    teal coverage - 68.02%

    243 - 127x + 127x +
      structure(
    244 - 127x + 127x +
        list(
    245 - 127x + 127x +
          label = label,
    246 - 127x + 127x +
          server = server, ui = ui, datanames = unique(datanames),
    247 - 127x + 127x +
          server_args = server_args, ui_args = ui_args
    @@ -2383,7 +2476,8 @@

    teal coverage - 68.02%

    249 - 127x + 127x +
        class = "teal_module"
    @@ -2439,42 +2533,48 @@

    teal coverage - 68.02%

    257 - 99x + 99x +
      checkmate::assert_string(label)
    258 - 97x + 97x +
      submodules <- list(...)
    259 - 97x + 97x +
      if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
    260 - 2x + 2x +
        stop(
    261 - 2x + 2x +
          "The only character argument to modules() must be 'label' and it must be named, ",
    262 - 2x + 2x +
          "change modules('lab', ...) to modules(label = 'lab', ...)"
    @@ -2502,7 +2602,8 @@

    teal coverage - 68.02%

    266 - 95x + 95x +
      checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -2523,42 +2624,48 @@

    teal coverage - 68.02%

    269 - 92x + 92x +
      labels <- vapply(submodules, function(submodule) submodule$label, character(1))
    270 - 92x + 92x +
      names(submodules) <- make.unique(gsub("[^[:alnum:]]+", "_", labels), sep = "_")
    271 - 92x + 92x +
      structure(
    272 - 92x + 92x +
        list(
    273 - 92x + 92x +
          label = label,
    274 - 92x + 92x +
          children = submodules
    @@ -2572,7 +2679,8 @@

    teal coverage - 68.02%

    276 - 92x + 92x +
        class = "teal_modules"
    @@ -2635,7 +2743,8 @@

    teal coverage - 68.02%

    285 - 3x + 3x +
      paste0(paste(rep(" ", indent), collapse = ""), "+ ", x$label, "\n", collapse = "")
    @@ -2740,28 +2849,32 @@

    teal coverage - 68.02%

    300 - 1x + 1x +
      paste(
    301 - 1x + 1x +
        c(
    302 - 1x + 1x +
          paste0(rep(" ", indent), "+ ", x$label, "\n"),
    303 - 1x + 1x +
          unlist(lapply(x$children, format, indent = indent + 1, ...))
    @@ -2775,7 +2888,8 @@

    teal coverage - 68.02%

    305 - 1x + 1x +
        collapse = ""
    @@ -2908,42 +3022,48 @@

    teal coverage - 68.02%

    324 - 8x + 8x +
      checkmate::assert_class(modules, "teal_modules")
    325 - 6x + 6x +
      checkmate::assert_class(module, "teal_module")
    326 - 4x + 4x +
      modules$children <- c(modules$children, list(module))
    327 - 4x + 4x +
      labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
    328 - 4x + 4x +
      names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
    329 - 4x + 4x +
      modules
    @@ -3048,7 +3168,8 @@

    teal coverage - 68.02%

    344 - 20x + 20x +
      if (inherits(modules, class)) {
    @@ -3062,28 +3183,32 @@

    teal coverage - 68.02%

    346 - 20x + 20x +
      } else if (inherits(modules, "teal_module")) {
    347 - 11x + 11x +
        NULL
    348 - 9x + 9x +
      } else if (inherits(modules, "teal_modules")) {
    349 - 9x + 9x +
        Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
    @@ -3293,49 +3418,56 @@

    teal coverage - 68.02%

    379 - 286x + 286x +
      checkmate::assert_string(arg)
    380 - 283x + 283x +
      if (inherits(modules, "teal_modules")) {
    381 - 29x + 29x +
        any(unlist(lapply(modules$children, is_arg_used, arg)))
    382 - 254x + 254x +
      } else if (inherits(modules, "teal_module")) {
    383 - 43x + 43x +
        is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
    384 - 211x + 211x +
      } else if (is.function(modules)) {
    385 - 209x + 209x +
        isTRUE(arg %in% names(formals(modules)))
    @@ -3349,7 +3481,8 @@

    teal coverage - 68.02%

    387 - 2x + 2x +
        stop("is_arg_used function not implemented for this object")
    @@ -3461,28 +3594,32 @@

    teal coverage - 68.02%

    403 - 12x + 12x +
      checkmate::assert_multi_class(modules, c("teal_module", "teal_modules"))
    404 - 12x + 12x +
      checkmate::assert_int(depth, lower = 0)
    405 - 11x + 11x +
      if (inherits(modules, "teal_modules")) {
    406 - 4x + 4x +
        max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
    @@ -3496,7 +3633,8 @@

    teal coverage - 68.02%

    408 - 7x + 7x +
        depth
    @@ -3950,14 +4088,16 @@

    teal coverage - 68.02%

    48 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    49 - 3x + 3x +
        observeEvent(input$show, {
    @@ -4041,7 +4181,8 @@

    teal coverage - 68.02%

    61 - 3x + 3x +
        filter_manager_srv("filter_manager", filtered_data_list, filter)
    @@ -4153,14 +4294,16 @@

    teal coverage - 68.02%

    77 - 5x + 5x +
      moduleServer(id, function(input, output, session) {
    78 - 5x + 5x +
        logger::log_trace("filter_manager_srv initializing for: { paste(names(filtered_data_list), collapse = ', ')}.")
    @@ -4174,7 +4317,8 @@

    teal coverage - 68.02%

    80 - 5x + 5x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    @@ -4216,7 +4360,8 @@

    teal coverage - 68.02%

    86 - 5x + 5x +
        slices_global <- reactiveVal(filter)
    @@ -4230,14 +4375,16 @@

    teal coverage - 68.02%

    88 - 5x + 5x +
        filtered_data_list <-
    89 - 5x + 5x +
          if (!is_module_specific) {
    @@ -4258,7 +4405,8 @@

    teal coverage - 68.02%

    92 - 4x + 4x +
            list(global_filters = unlist(filtered_data_list)[[1]])
    @@ -4286,21 +4434,24 @@

    teal coverage - 68.02%

    96 - 1x + 1x +
            flatten_nested <- function(x, name = NULL) {
    97 - 5x + 5x +
              if (inherits(x, "FilteredData")) {
    98 - 3x + 3x +
                setNames(list(x), name)
    @@ -4314,7 +4465,8 @@

    teal coverage - 68.02%

    100 - 2x + 2x +
                unlist(lapply(names(x), function(name) flatten_nested(x[[name]], name)))
    @@ -4335,7 +4487,8 @@

    teal coverage - 68.02%

    103 - 1x + 1x +
            flatten_nested(filtered_data_list)
    @@ -4370,49 +4523,56 @@

    teal coverage - 68.02%

    108 - 5x + 5x +
        mapping_matrix <- reactive({
    109 - 5x + 5x +
          state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
    110 - 5x + 5x +
          mapping_smooth <- lapply(filtered_data_list, function(x) {
    111 - 7x + 7x +
            state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
    112 - 7x + 7x +
            state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
    113 - 7x + 7x +
            states_active <- state_ids_global %in% state_ids_local
    114 - 7x + 7x +
            ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
    @@ -4433,7 +4593,8 @@

    teal coverage - 68.02%

    117 - 5x + 5x +
          as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
    @@ -4454,14 +4615,16 @@

    teal coverage - 68.02%

    120 - 5x + 5x +
        output$slices_table <- renderTable(
    121 - 5x + 5x +
          expr = {
    @@ -4475,28 +4638,32 @@

    teal coverage - 68.02%

    123 - 2x + 2x +
            mm <- mapping_matrix()
    124 - 2x + 2x +
            mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
    125 - 2x + 2x +
            mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
    126 - 2x + 2x +
            if (!is_module_specific) colnames(mm) <- "Global Filters"
    @@ -4517,21 +4684,24 @@

    teal coverage - 68.02%

    129 - 2x + 2x +
            if (nrow(mm) == 0L) {
    130 - 2x + 2x +
              mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
    131 - 2x + 2x +
              rownames(mm) <- ""
    @@ -4559,7 +4729,8 @@

    teal coverage - 68.02%

    135 - 2x + 2x +
            mm[names(mm) != "Report previewer"]
    @@ -4573,14 +4744,16 @@

    teal coverage - 68.02%

    137 - 5x + 5x +
          align = paste(c("l", rep("c", sum(names(filtered_data_list) != "Report previewer"))), collapse = ""),
    138 - 5x + 5x +
          rownames = TRUE
    @@ -4608,35 +4781,40 @@

    teal coverage - 68.02%

    142 - 5x + 5x +
        modules_out <- lapply(names(filtered_data_list), function(module_name) {
    143 - 7x + 7x +
          filter_manager_module_srv(
    144 - 7x + 7x +
            id = module_name,
    145 - 7x + 7x +
            module_fd = filtered_data_list[[module_name]],
    146 - 7x + 7x +
            slices_global = slices_global
    @@ -4671,7 +4849,8 @@

    teal coverage - 68.02%

    151 - 5x + 5x +
        snapshot_manager_srv("snapshot_manager", slices_global, mapping_matrix, filtered_data_list)
    @@ -4685,7 +4864,8 @@

    teal coverage - 68.02%

    153 - 5x + 5x +
        modules_out # returned for testing purpose
    @@ -4874,7 +5054,8 @@

    teal coverage - 68.02%

    180 - 7x + 7x +
      moduleServer(id, function(input, output, session) {
    @@ -4888,7 +5069,8 @@

    teal coverage - 68.02%

    182 - 7x + 7x +
        module_fd$set_available_teal_slices(reactive(slices_global()))
    @@ -4909,7 +5091,8 @@

    teal coverage - 68.02%

    185 - 7x + 7x +
        slices_module <- reactive(module_fd$get_filter_state())
    @@ -4930,14 +5113,16 @@

    teal coverage - 68.02%

    188 - 7x + 7x +
        previous_slices <- reactiveVal(isolate(slices_module()))
    189 - 7x + 7x +
        slices_added <- reactiveVal(NULL)
    @@ -4958,21 +5143,24 @@

    teal coverage - 68.02%

    192 - 7x + 7x +
        observeEvent(slices_module(), ignoreNULL = FALSE, {
    193 - 2x + 2x +
          logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
    194 - 2x + 2x +
          added <- setdiff_teal_slices(slices_module(), slices_global())
    @@ -4986,7 +5174,8 @@

    teal coverage - 68.02%

    196 - 2x + 2x +
          previous_slices(slices_module())
    @@ -5007,7 +5196,8 @@

    teal coverage - 68.02%

    199 - 7x + 7x +
        observeEvent(slices_added(), ignoreNULL = TRUE, {
    @@ -5126,7 +5316,8 @@

    teal coverage - 68.02%

    216 - 7x + 7x +
        slices_module # returned for testing purpose
    @@ -5482,42 +5673,48 @@

    teal coverage - 68.02%

    48 - 34x + 34x +
      lifecycle::deprecate_soft(
    49 - 34x + 34x +
        when = "0.15.0",
    50 - 34x + 34x +
        what = "tdata()",
    51 - 34x + 34x +
        details = paste(
    52 - 34x + 34x +
          "tdata is deprecated and will be removed in the next release. Use `teal_data` instead.\n",
    53 - 34x + 34x +
          "Please follow migration instructions https://github.com/insightsengineering/teal/discussions/987."
    @@ -5538,28 +5735,32 @@

    teal coverage - 68.02%

    56 - 34x + 34x +
      checkmate::assert_list(
    57 - 34x + 34x +
        data,
    58 - 34x + 34x +
        any.missing = FALSE, names = "unique",
    59 - 34x + 34x +
        types = c("data.frame", "reactive", "MultiAssayExperiment")
    @@ -5573,14 +5774,16 @@

    teal coverage - 68.02%

    61 - 30x + 30x +
      checkmate::assert_class(join_keys, "join_keys", null.ok = TRUE)
    62 - 29x + 29x +
      checkmate::assert_multi_class(code, c("character", "reactive"))
    @@ -5594,14 +5797,16 @@

    teal coverage - 68.02%

    64 - 28x + 28x +
      checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
    65 - 26x + 26x +
      checkmate::assert_subset(names(metadata), names(data))
    @@ -5615,14 +5820,16 @@

    teal coverage - 68.02%

    67 - 25x + 25x +
      if (is.reactive(code)) {
    68 - 9x + 9x +
        isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
    @@ -5650,21 +5857,24 @@

    teal coverage - 68.02%

    72 - 24x + 24x +
      for (x in names(data)) {
    73 - 47x + 47x +
        if (!is.reactive(data[[x]])) {
    74 - 31x + 31x +
          data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
    @@ -5699,21 +5909,24 @@

    teal coverage - 68.02%

    79 - 24x + 24x +
      attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
    80 - 24x + 24x +
      attr(data, "join_keys") <- join_keys
    81 - 24x + 24x +
      attr(data, "metadata") <- metadata
    @@ -5734,14 +5947,16 @@

    teal coverage - 68.02%

    84 - 24x + 24x +
      class(data) <- c("tdata", class(data))
    85 - 24x + 24x +
      data
    @@ -5881,14 +6096,16 @@

    teal coverage - 68.02%

    105 - 2x + 2x +
      checkmate::assert_class(data, "tdata")
    106 - 1x + 1x +
      list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
    @@ -5979,14 +6196,16 @@

    teal coverage - 68.02%

    119 - 7x + 7x +
      checkmate::assert_class(data, "tdata")
    120 - 5x + 5x +
      attr(data, "code")()
    @@ -6042,7 +6261,8 @@

    teal coverage - 68.02%

    128 - 2x + 2x +
      attr(data, "join_keys")
    @@ -6105,14 +6325,16 @@

    teal coverage - 68.02%

    137 - 4x + 4x +
      checkmate::assert_string(dataname)
    138 - 4x + 4x +
      UseMethod("get_metadata", data)
    @@ -6154,21 +6376,24 @@

    teal coverage - 68.02%

    144 - 4x + 4x +
      metadata <- attr(data, "metadata")
    145 - 4x + 4x +
      if (is.null(metadata)) {
    146 - 1x + 1x +
        return(NULL)
    @@ -6182,7 +6407,8 @@

    teal coverage - 68.02%

    148 - 3x + 3x +
      metadata[[dataname]]
    @@ -6427,14 +6653,16 @@

    teal coverage - 68.02%

    183 - 8x + 8x +
      if (inherits(x, "tdata")) {
    184 - 2x + 2x +
        return(x)
    @@ -6448,77 +6676,88 @@

    teal coverage - 68.02%

    186 - 6x + 6x +
      if (is.reactive(x)) {
    187 - 1x + 1x +
        checkmate::assert_class(isolate(x()), "teal_data")
    188 - 1x + 1x +
        datanames <- isolate(teal_data_datanames(x()))
    189 - 1x + 1x +
        datasets <- sapply(datanames, function(dataname) reactive(x()[[dataname]]), simplify = FALSE)
    190 - 1x + 1x +
        code <- reactive(teal.code::get_code(x()))
    191 - 1x + 1x +
        join_keys <- isolate(teal.data::join_keys(x()))
    192 - 5x + 5x +
      } else if (inherits(x, "teal_data")) {
    193 - 5x + 5x +
        datanames <- teal_data_datanames(x)
    194 - 5x + 5x +
        datasets <- sapply(datanames, function(dataname) reactive(x[[dataname]]), simplify = FALSE)
    195 - 5x + 5x +
        code <- reactive(teal.code::get_code(x))
    196 - 5x + 5x +
        join_keys <- isolate(teal.data::join_keys(x))
    @@ -6539,7 +6778,8 @@

    teal coverage - 68.02%

    199 - 6x + 6x +
      new_tdata(data = datasets, code = code, join_keys = join_keys)
    @@ -6657,21 +6897,24 @@

    teal coverage - 68.02%

    15 - 18x + 18x +
      script <- sprintf(
    16 - 18x + 18x +
        "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
    17 - 18x + 18x +
        ns("timezone")
    @@ -6685,14 +6928,16 @@

    teal coverage - 68.02%

    19 - 18x + 18x +
      shinyjs::runjs(script) # function does not return anything
    20 - 18x + 18x +
      invisible(NULL)
    @@ -6741,42 +6986,48 @@

    teal coverage - 68.02%

    27 - 11x + 11x +
      bs_theme <- getOption("teal.bs_theme")
    28 - 11x + 11x +
      if (is.null(bs_theme)) {
    29 - 8x + 8x +
        NULL
    30 - 3x + 3x +
      } else if (!inherits(bs_theme, "bs_theme")) {
    31 - 2x + 2x +
        warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
    32 - 2x + 2x +
        NULL
    @@ -6790,7 +7041,8 @@

    teal coverage - 68.02%

    34 - 1x + 1x +
        bs_theme
    @@ -6846,42 +7098,48 @@

    teal coverage - 68.02%

    42 - 11x + 11x +
      parents <- character(0)
    43 - 11x + 11x +
      for (i in dataname) {
    44 - 16x + 16x +
        while (length(i) > 0) {
    45 - 18x + 18x +
          parent_i <- teal.data::parent(join_keys, i)
    46 - 18x + 18x +
          parents <- c(parent_i, parents)
    47 - 18x + 18x +
          i <- parent_i
    @@ -6909,7 +7167,8 @@

    teal coverage - 68.02%

    51 - 11x + 11x +
      unique(c(parents, dataname))
    @@ -6993,14 +7252,16 @@

    teal coverage - 68.02%

    63 - 13x + 13x +
      checkmate::assert_class(x, "teal_data")
    64 - 13x + 13x +
      checkmate::assert_character(datanames, min.chars = 1L, any.missing = FALSE)
    @@ -7014,21 +7275,24 @@

    teal coverage - 68.02%

    66 - 13x + 13x +
      ans <- teal.slice::init_filtered_data(
    67 - 13x + 13x +
        x = sapply(datanames, function(dn) x[[dn]], simplify = FALSE),
    68 - 13x + 13x +
        join_keys = teal.data::join_keys(x)
    @@ -7049,21 +7313,24 @@

    teal coverage - 68.02%

    71 - 13x + 13x +
      attr(ans, "preprocessing_code") <- teal.code::get_code(x)
    72 - 13x + 13x +
      attr(ans, "verification_status") <- x@verified
    73 - 13x + 13x +
      ans
    @@ -7196,35 +7463,40 @@

    teal coverage - 68.02%

    92 - 2x + 2x +
      checkmate::assert_string(title)
    93 - 2x + 2x +
      checkmate::assert_string(label)
    94 - 2x + 2x +
      checkmate::assert_string(description, null.ok = TRUE)
    95 - 2x + 2x +
      checkmate::assert_flag(with_filter)
    96 - 2x + 2x +
      checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
    @@ -7238,49 +7510,56 @@

    teal coverage - 68.02%

    98 - 2x + 2x +
      card <- teal::TealReportCard$new()
    99 - 2x + 2x +
      title <- if (label == "") title else label
    100 - 2x + 2x +
      card$set_name(title)
    101 - 2x + 2x +
      card$append_text(title, "header2")
    102 - 1x + 1x +
      if (!is.null(description)) card$append_text(description, "header3")
    103 - 1x + 1x +
      if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
    104 - 2x + 2x +
      card
    @@ -7665,14 +7944,16 @@

    teal coverage - 68.02%

    159 - 12x + 12x +
      checkmate::assert_class(modules, "teal_modules")
    160 - 12x + 12x +
      checkmate::assert_character(datanames)
    @@ -7686,7 +7967,8 @@

    teal coverage - 68.02%

    162 - 12x + 12x +
      recursive_check_datanames <- function(modules, datanames) {
    @@ -7700,14 +7982,16 @@

    teal coverage - 68.02%

    164 - 26x + 26x +
        if (inherits(modules, "teal_modules")) {
    165 - 12x + 12x +
          sapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
    @@ -7721,49 +8005,56 @@

    teal coverage - 68.02%

    167 - 14x + 14x +
          extra_datanames <- setdiff(modules$datanames, c("all", datanames))
    168 - 14x + 14x +
          if (length(extra_datanames)) {
    169 - 2x + 2x +
            sprintf(
    170 - 2x + 2x +
              "- Module '%s' uses datanames not available in 'data': (%s) not in (%s)",
    171 - 2x + 2x +
              modules$label,
    172 - 2x + 2x +
              toString(dQuote(extra_datanames, q = FALSE)),
    173 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -7798,21 +8089,24 @@

    teal coverage - 68.02%

    178 - 12x + 12x +
      check_datanames <- unlist(recursive_check_datanames(modules, datanames))
    179 - 12x + 12x +
      if (length(check_datanames)) {
    180 - 2x + 2x +
        paste(check_datanames, collapse = "\n")
    @@ -7826,7 +8120,8 @@

    teal coverage - 68.02%

    182 - 10x + 10x +
        TRUE
    @@ -7931,14 +8226,16 @@

    teal coverage - 68.02%

    197 - 10x + 10x +
      checkmate::assert_class(filters, "teal_slices")
    198 - 10x + 10x +
      checkmate::assert_character(datanames)
    @@ -7959,63 +8256,72 @@

    teal coverage - 68.02%

    201 - 10x + 10x +
      out <- unlist(sapply(
    202 - 10x + 10x +
        filters, function(filter) {
    203 - 3x + 3x +
          dataname <- shiny::isolate(filter$dataname)
    204 - 3x + 3x +
          if (!dataname %in% datanames) {
    205 - 2x + 2x +
            sprintf(
    206 - 2x + 2x +
              "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
    207 - 2x + 2x +
              shiny::isolate(filter$id),
    208 - 2x + 2x +
              dQuote(dataname, q = FALSE),
    209 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -8064,14 +8370,16 @@

    teal coverage - 68.02%

    216 - 10x + 10x +
      if (length(out)) {
    217 - 2x + 2x +
        paste(out, collapse = "\n")
    @@ -8085,7 +8393,8 @@

    teal coverage - 68.02%

    219 - 8x + 8x +
        TRUE
    @@ -8169,21 +8478,24 @@

    teal coverage - 68.02%

    231 - 51x + 51x +
      checkmate::assert_class(data, "teal_data")
    232 - 51x + 51x +
      if (length(teal.data::datanames(data))) {
    233 - 47x + 47x +
        teal.data::datanames(data)
    @@ -8197,7 +8509,8 @@

    teal coverage - 68.02%

    235 - 4x + 4x +
        ls(teal.code::get_env(data), all.names = TRUE)
    @@ -8267,70 +8580,80 @@

    teal coverage - 68.02%

    245 - 14x + 14x +
      checkmate::assert_class(shiny_tag, "shiny.tag")
    246 - 14x + 14x +
      checkmate::assert_true(shiny_tag$name == "head")
    247 - 13x + 13x +
      child_names <- vapply(shiny_tag$children, `[[`, character(1L), "name")
    248 - 13x + 13x +
      checkmate::assert_subset(c("title", "link"), child_names, .var.name = "child tags")
    249 - 11x + 11x +
      rel_attr <- shiny_tag$children[[which(child_names == "link")]]$attribs$rel
    250 - 11x + 11x +
      checkmate::assert_subset(
    251 - 11x + 11x +
        rel_attr,
    252 - 11x + 11x +
        c("icon", "shortcut icon"),
    253 - 11x + 11x +
        .var.name = "Link tag's rel attribute",
    254 - 11x + 11x +
        empty.ok = FALSE
    @@ -8449,56 +8772,64 @@

    teal coverage - 68.02%

    271 - 11x + 11x +
      checkmate::assert_string(title, null.ok = TRUE)
    272 - 11x + 11x +
      checkmate::assert_string(favicon, null.ok = TRUE)
    273 - 11x + 11x +
      tags$head(
    274 - 11x + 11x +
        tags$title(title),
    275 - 11x + 11x +
        tags$link(
    276 - 11x + 11x +
          rel = "icon",
    277 - 11x + 11x +
          href = favicon,
    278 - 11x + 11x +
          sizes = "any"
    @@ -8638,14 +8969,16 @@

    teal coverage - 68.02%

    298 - 19x + 19x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    299 - 18x + 18x +
      checkmate::assert_class(modules, "teal_modules")
    @@ -8659,28 +8992,32 @@

    teal coverage - 68.02%

    301 - 17x + 17x +
      data <- if (inherits(data, "teal_data")) {
    302 - 15x + 15x +
        as.list(data@env)
    303 - 17x + 17x +
      } else if (inherits(data, "teal_data_module")) {
    304 - 2x + 2x +
        deparse1(body(data$server))
    @@ -8694,7 +9031,8 @@

    teal coverage - 68.02%

    306 - 17x + 17x +
      modules <- lapply(modules, defunction)
    @@ -8708,7 +9046,8 @@

    teal coverage - 68.02%

    308 - 17x + 17x +
      rlang::hash(list(data = data, modules = modules))
    @@ -8757,28 +9096,32 @@

    teal coverage - 68.02%

    315 - 186x + 186x +
      if (is.list(x)) {
    316 - 40x + 40x +
        lapply(x, defunction)
    317 - 146x + 146x +
      } else if (is.function(x)) {
    318 - 44x + 44x +
        deparse1(body(x))
    @@ -8792,7 +9135,8 @@

    teal coverage - 68.02%

    320 - 102x + 102x +
        x
    @@ -8987,56 +9331,64 @@

    teal coverage - 68.02%

    25 - 4x + 4x +
          checkmate::assert_character(src, min.len = 0, max.len = 1)
    26 - 4x + 4x +
          params <- list(...)
    27 - 4x + 4x +
          params$eval <- FALSE
    28 - 4x + 4x +
          rblock <- RcodeBlock$new(src)
    29 - 4x + 4x +
          rblock$set_params(params)
    30 - 4x + 4x +
          self$append_content(rblock)
    31 - 4x + 4x +
          self$append_metadata("SRC", src)
    32 - 4x + 4x +
          invisible(self)
    @@ -9106,28 +9458,32 @@

    teal coverage - 68.02%

    42 - 5x + 5x +
          checkmate::assert_class(fs, "teal_slices")
    43 - 4x + 4x +
          self$append_text("Filter State", "header3")
    44 - 4x + 4x +
          self$append_content(TealSlicesBlock$new(fs))
    45 - 4x + 4x +
          invisible(self)
    @@ -9204,56 +9560,64 @@

    teal coverage - 68.02%

    56 - 4x + 4x +
          checkmate::assert_list(encodings)
    57 - 4x + 4x +
          self$append_text("Selected Options", "header3")
    58 - 4x + 4x +
          if (requireNamespace("yaml", quietly = TRUE)) {
    59 - 4x + 4x +
            self$append_text(yaml::as.yaml(encodings, handlers = list(
    60 - 4x + 4x +
              POSIXct = function(x) format(x, "%Y-%m-%d"),
    61 - 4x + 4x +
              POSIXlt = function(x) format(x, "%Y-%m-%d"),
    62 - 4x + 4x +
              Date = function(x) format(x, "%Y-%m-%d")
    63 - 4x + 4x +
            )), "verbatim")
    @@ -9281,14 +9645,16 @@

    teal coverage - 68.02%

    67 - 4x + 4x +
          self$append_metadata("Encodings", encodings)
    68 - 4x + 4x +
          invisible(self)
    @@ -9442,21 +9808,24 @@

    teal coverage - 68.02%

    90 - 10x + 10x +
          self$set_content(content)
    91 - 9x + 9x +
          self$set_style(style)
    92 - 9x + 9x +
          invisible(self)
    @@ -9547,56 +9916,64 @@

    teal coverage - 68.02%

    105 - 11x + 11x +
          checkmate::assert_class(content, "teal_slices")
    106 - 10x + 10x +
          if (length(content) != 0) {
    107 - 7x + 7x +
            states_list <- lapply(content, function(x) {
    108 - 7x + 7x +
              x_list <- shiny::isolate(as.list(x))
    109 - 7x + 7x +
              if (
    110 - 7x + 7x +
                inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
    111 - 7x + 7x +
                  length(x_list$choices) == 2 &&
    112 - 7x + 7x +
                  length(x_list$selected) == 2
    @@ -9631,7 +10008,8 @@

    teal coverage - 68.02%

    117 - 7x + 7x +
              if (!is.null(x_list$arg)) {
    @@ -9659,14 +10037,16 @@

    teal coverage - 68.02%

    121 - 7x + 7x +
              x_list <- x_list[
    122 - 7x + 7x +
                c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
    @@ -9680,21 +10060,24 @@

    teal coverage - 68.02%

    124 - 7x + 7x +
              names(x_list) <- c(
    125 - 7x + 7x +
                "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
    126 - 7x + 7x +
                "Selected Values", "Selected range", "Include NA values", "Include Inf values"
    @@ -9715,7 +10098,8 @@

    teal coverage - 68.02%

    129 - 7x + 7x +
              Filter(Negate(is.null), x_list)
    @@ -9736,14 +10120,16 @@

    teal coverage - 68.02%

    132 - 7x + 7x +
            if (requireNamespace("yaml", quietly = TRUE)) {
    133 - 7x + 7x +
              super$set_content(yaml::as.yaml(states_list))
    @@ -9778,14 +10164,16 @@

    teal coverage - 68.02%

    138 - 10x + 10x +
          private$teal_slices <- content
    139 - 10x + 10x +
          invisible(self)
    @@ -9834,28 +10222,32 @@

    teal coverage - 68.02%

    146 - 1x + 1x +
          checkmate::assert_list(x)
    147 - 1x + 1x +
          checkmate::assert_names(names(x), must.include = c("teal_slices"))
    148 - 1x + 1x +
          self$set_content(x$teal_slices)
    149 - 1x + 1x +
          invisible(self)
    @@ -9897,7 +10289,8 @@

    teal coverage - 68.02%

    155 - 2x + 2x +
          list(teal_slices = private$teal_slices)
    @@ -10694,42 +11087,48 @@

    teal coverage - 68.02%

    106 - 6x + 6x +
      checkmate::assert_character(id)
    107 - 6x + 6x +
      checkmate::assert_true(is.reactive(slices_global))
    108 - 6x + 6x +
      checkmate::assert_class(isolate(slices_global()), "teal_slices")
    109 - 6x + 6x +
      checkmate::assert_true(is.reactive(mapping_matrix))
    110 - 6x + 6x +
      checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
    111 - 6x + 6x +
      checkmate::assert_list(filtered_data_list, types = "FilteredData", any.missing = FALSE, names = "named")
    @@ -10743,14 +11142,16 @@

    teal coverage - 68.02%

    113 - 6x + 6x +
      moduleServer(id, function(input, output, session) {
    114 - 6x + 6x +
        ns <- session$ns
    @@ -10771,28 +11172,32 @@

    teal coverage - 68.02%

    117 - 6x + 6x +
        filter <- isolate(slices_global())
    118 - 6x + 6x +
        snapshot_history <- reactiveVal({
    119 - 6x + 6x +
          list(
    120 - 6x + 6x +
            "Initial application state" = as.list(filter, recursive = TRUE)
    @@ -10834,7 +11239,8 @@

    teal coverage - 68.02%

    126 - 6x + 6x +
        observeEvent(input$snapshot_add, {
    @@ -10925,7 +11331,8 @@

    teal coverage - 68.02%

    139 - 6x + 6x +
        observeEvent(input$snapshot_name_accept, {
    @@ -11121,7 +11528,8 @@

    teal coverage - 68.02%

    167 - 6x + 6x +
        observeEvent(input$snapshot_load, {
    @@ -11247,7 +11655,8 @@

    teal coverage - 68.02%

    185 - 6x + 6x +
        observeEvent(input$snaphot_file_accept, {
    @@ -11597,7 +12006,8 @@

    teal coverage - 68.02%

    235 - 6x + 6x +
        observeEvent(input$snapshot_reset, {
    @@ -11765,21 +12175,24 @@

    teal coverage - 68.02%

    259 - 6x + 6x +
        observers <- reactiveValues()
    260 - 6x + 6x +
        handlers <- reactiveValues()
    261 - 6x + 6x +
        divs <- reactiveValues()
    @@ -11793,14 +12206,16 @@

    teal coverage - 68.02%

    263 - 6x + 6x +
        observeEvent(snapshot_history(), {
    264 - 2x + 2x +
          lapply(names(snapshot_history())[-1L], function(s) {
    @@ -12171,42 +12586,48 @@

    teal coverage - 68.02%

    317 - 6x + 6x +
        output$snapshot_list <- renderUI({
    318 - 2x + 2x +
          rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
    319 - 2x + 2x +
          if (length(rows) == 0L) {
    320 - 2x + 2x +
            div(
    321 - 2x + 2x +
              class = "snapshot_manager_placeholder",
    322 - 2x + 2x +
              "Snapshots will appear here."
    @@ -12723,14 +13144,16 @@

    teal coverage - 68.02%

    28 - 9x + 9x +
      checkmate::assert_class(tss, "teal_slices")
    29 - 9x + 9x +
      checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
    @@ -12744,7 +13167,8 @@

    teal coverage - 68.02%

    31 - 9x + 9x +
      cat(format(tss, trim_lines = FALSE), "\n", file = file)
    @@ -12793,7 +13217,8 @@

    teal coverage - 68.02%

    38 - 9x + 9x +
      checkmate::assert_file_exists(file, access = "r", extension = "json")
    @@ -12807,56 +13232,64 @@

    teal coverage - 68.02%

    40 - 9x + 9x +
      tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
    41 - 9x + 9x +
      tss_json$slices <-
    42 - 9x + 9x +
        lapply(tss_json$slices, function(slice) {
    43 - 9x + 9x +
          for (field in c("selected", "choices")) {
    44 - 18x + 18x +
            if (!is.null(slice[[field]])) {
    45 - 12x + 12x +
              if (length(slice[[field]]) > 0) {
    46 - 9x + 9x +
                date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
    47 - 9x + 9x +
                time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
    @@ -12870,35 +13303,40 @@

    teal coverage - 68.02%

    49 - 9x + 9x +
                slice[[field]] <-
    50 - 9x + 9x +
                  if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
    51 - 3x + 3x +
                    as.Date(slice[[field]])
    52 - 9x + 9x +
                  } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
    53 - 3x + 3x +
                    as.POSIXct(slice[[field]], tz = "UTC")
    @@ -12912,7 +13350,8 @@

    teal coverage - 68.02%

    55 - 3x + 3x +
                    slice[[field]]
    @@ -12933,7 +13372,8 @@

    teal coverage - 68.02%

    58 - 3x + 3x +
                slice[[field]] <- character(0)
    @@ -12961,7 +13401,8 @@

    teal coverage - 68.02%

    62 - 9x + 9x +
          slice
    @@ -12982,7 +13423,8 @@

    teal coverage - 68.02%

    65 - 9x + 9x +
      tss_elements <- lapply(tss_json$slices, as.teal_slice)
    @@ -12996,7 +13438,8 @@

    teal coverage - 68.02%

    67 - 9x + 9x +
      do.call(teal_slices, c(tss_elements, tss_json$attributes))
    @@ -13842,21 +14285,24 @@

    teal coverage - 68.02%

    119 - 50x + 50x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    120 - 50x + 50x +
      checkmate::assert_class(reporter, "Reporter")
    121 - 49x + 49x +
      UseMethod("srv_nested_tabs", modules)
    @@ -13954,7 +14400,8 @@

    teal coverage - 68.02%

    135 - 22x + 22x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    @@ -13968,14 +14415,16 @@

    teal coverage - 68.02%

    137 - 22x + 22x +
      moduleServer(id = id, module = function(input, output, session) {
    138 - 22x + 22x +
        logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
    @@ -13989,70 +14438,80 @@

    teal coverage - 68.02%

    140 - 22x + 22x +
        labels <- vapply(modules$children, `[[`, character(1), "label")
    141 - 22x + 22x +
        modules_reactive <- sapply(
    142 - 22x + 22x +
          names(modules$children),
    143 - 22x + 22x +
          function(module_id) {
    144 - 33x + 33x +
            srv_nested_tabs(
    145 - 33x + 33x +
              id = module_id,
    146 - 33x + 33x +
              datasets = datasets[[labels[module_id]]],
    147 - 33x + 33x +
              modules = modules$children[[module_id]],
    148 - 33x + 33x +
              is_module_specific = is_module_specific,
    149 - 33x + 33x +
              reporter = reporter
    @@ -14073,7 +14532,8 @@

    teal coverage - 68.02%

    152 - 22x + 22x +
          simplify = FALSE
    @@ -14101,21 +14561,24 @@

    teal coverage - 68.02%

    156 - 22x + 22x +
        input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
    157 - 22x + 22x +
        get_active_module <- reactive({
    158 - 12x + 12x +
          if (length(modules$children) == 1L) {
    @@ -14129,7 +14592,8 @@

    teal coverage - 68.02%

    160 - 1x + 1x +
            modules_reactive[[1]]()
    @@ -14150,7 +14614,8 @@

    teal coverage - 68.02%

    163 - 11x + 11x +
            modules_reactive[[input_validated()]]()
    @@ -14178,7 +14643,8 @@

    teal coverage - 68.02%

    167 - 22x + 22x +
        get_active_module
    @@ -14234,14 +14700,16 @@

    teal coverage - 68.02%

    175 - 27x + 27x +
      checkmate::assert_class(datasets, "FilteredData")
    176 - 27x + 27x +
      logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
    @@ -14255,14 +14723,16 @@

    teal coverage - 68.02%

    178 - 27x + 27x +
      moduleServer(id = id, module = function(input, output, session) {
    179 - 27x + 27x +
        if (!is.null(modules$datanames) && is_module_specific) {
    @@ -14318,35 +14788,40 @@

    teal coverage - 68.02%

    187 - 27x + 27x +
        trigger_data <- reactiveVal(1L)
    188 - 27x + 27x +
        trigger_module <- reactiveVal(NULL)
    189 - 27x + 27x +
        output$data_reactive <- renderUI({
    190 - 17x + 17x +
          lapply(datasets$datanames(), function(x) {
    191 - 21x + 21x +
            datasets$get_data(x, filtered = TRUE)
    @@ -14360,14 +14835,16 @@

    teal coverage - 68.02%

    193 - 17x + 17x +
          isolate(trigger_data(trigger_data() + 1))
    194 - 17x + 17x +
          isolate(trigger_module(TRUE))
    @@ -14381,7 +14858,8 @@

    teal coverage - 68.02%

    196 - 17x + 17x +
          NULL
    @@ -14409,14 +14887,16 @@

    teal coverage - 68.02%

    200 - 27x + 27x +
        args <- c(list(id = "module"), modules$server_args)
    201 - 27x + 27x +
        if (is_arg_used(modules$server, "reporter")) {
    @@ -14444,14 +14924,16 @@

    teal coverage - 68.02%

    205 - 27x + 27x +
        if (is_arg_used(modules$server, "datasets")) {
    206 - 1x + 1x +
          args <- c(args, datasets = datasets)
    @@ -14472,21 +14954,24 @@

    teal coverage - 68.02%

    209 - 27x + 27x +
        if (is_arg_used(modules$server, "data")) {
    210 - 7x + 7x +
          data <- eventReactive(trigger_data(), .datasets_to_data(modules, datasets))
    211 - 7x + 7x +
          args <- c(args, data = list(data))
    @@ -14507,21 +14992,24 @@

    teal coverage - 68.02%

    214 - 27x + 27x +
        if (is_arg_used(modules$server, "filter_panel_api")) {
    215 - 2x + 2x +
          filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
    216 - 2x + 2x +
          args <- c(args, filter_panel_api = filter_panel_api)
    @@ -14549,49 +15037,56 @@

    teal coverage - 68.02%

    220 - 27x + 27x +
        observeEvent(
    221 - 27x + 27x +
          ignoreNULL = TRUE,
    222 - 27x + 27x +
          once = TRUE,
    223 - 27x + 27x +
          eventExpr = trigger_module(),
    224 - 27x + 27x +
          handlerExpr = {
    225 - 17x + 17x +
            module_output <- if (is_arg_used(modules$server, "id")) {
    226 - 17x + 17x +
              do.call(modules$server, args)
    @@ -14640,7 +15135,8 @@

    teal coverage - 68.02%

    233 - 27x + 27x +
        reactive(modules)
    @@ -14759,14 +15255,16 @@

    teal coverage - 68.02%

    250 - 4x + 4x +
      checkmate::assert_class(module, "teal_module")
    251 - 4x + 4x +
      checkmate::assert_class(datasets, "FilteredData")
    @@ -14780,14 +15278,16 @@

    teal coverage - 68.02%

    253 - 4x + 4x +
      datanames <- if (is.null(module$datanames) || identical(module$datanames, "all")) {
    254 - 1x + 1x +
        datasets$datanames()
    @@ -14801,21 +15301,24 @@

    teal coverage - 68.02%

    256 - 3x + 3x +
        include_parent_datanames(
    257 - 3x + 3x +
          module$datanames,
    258 - 3x + 3x +
          datasets$get_join_keys()
    @@ -14850,7 +15353,8 @@

    teal coverage - 68.02%

    263 - 4x + 4x +
      data <- sapply(datanames, function(x) datasets$get_data(x, filtered = TRUE), simplify = FALSE)
    @@ -14864,7 +15368,8 @@

    teal coverage - 68.02%

    265 - 4x + 4x +
      hashes <- calculate_hashes(datanames, datasets)
    @@ -14878,28 +15383,32 @@

    teal coverage - 68.02%

    267 - 4x + 4x +
      code <- c(
    268 - 4x + 4x +
        get_rcode_str_install(),
    269 - 4x + 4x +
        get_rcode_libraries(),
    270 - 4x + 4x +
        get_datasets_code(datanames, datasets, hashes)
    @@ -14927,21 +15436,24 @@

    teal coverage - 68.02%

    274 - 4x + 4x +
      data <- do.call(
    275 - 4x + 4x +
        teal.data::teal_data,
    276 - 4x + 4x +
        args = c(data, code = list(code), join_keys = list(datasets$get_join_keys()[datanames]))
    @@ -14962,14 +15474,16 @@

    teal coverage - 68.02%

    279 - 4x + 4x +
      data@verified <- attr(datasets, "verification_status")
    280 - 4x + 4x +
      data
    @@ -15053,7 +15567,8 @@

    teal coverage - 68.02%

    292 - 7x + 7x +
      sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
    @@ -15612,28 +16127,32 @@

    teal coverage - 68.02%

    78 - 5x + 5x +
      checkmate::assert_class(modules, "teal_modules")
    79 - 5x + 5x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    80 - 5x + 5x +
      checkmate::assert_class(reporter, "Reporter")
    81 - 3x + 3x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -15647,14 +16166,16 @@

    teal coverage - 68.02%

    83 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    84 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initializing the module.")
    @@ -15668,14 +16189,16 @@

    teal coverage - 68.02%

    86 - 3x + 3x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    87 - 3x + 3x +
        manager_out <- filter_manager_modal_srv("filter_manager", filtered_data_list = datasets, filter = filter)
    @@ -15689,42 +16212,48 @@

    teal coverage - 68.02%

    89 - 3x + 3x +
        active_module <- srv_nested_tabs(
    90 - 3x + 3x +
          id = "root",
    91 - 3x + 3x +
          datasets = datasets,
    92 - 3x + 3x +
          modules = modules,
    93 - 3x + 3x +
          reporter = reporter,
    94 - 3x + 3x +
          is_module_specific = is_module_specific
    @@ -15745,21 +16274,24 @@

    teal coverage - 68.02%

    97 - 3x + 3x +
        if (!is_module_specific) {
    98 - 3x + 3x +
          active_datanames <- reactive({
    99 - 6x + 6x +
            if (identical(active_module()$datanames, "all")) {
    @@ -15780,21 +16312,24 @@

    teal coverage - 68.02%

    102 - 5x + 5x +
              include_parent_datanames(
    103 - 5x + 5x +
                active_module()$datanames,
    104 - 5x + 5x +
                singleton$get_join_keys()
    @@ -15822,14 +16357,16 @@

    teal coverage - 68.02%

    108 - 3x + 3x +
          singleton <- unlist(datasets)[[1]]
    109 - 3x + 3x +
          singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
    @@ -15843,28 +16380,32 @@

    teal coverage - 68.02%

    111 - 3x + 3x +
          observeEvent(
    112 - 3x + 3x +
            eventExpr = active_datanames(),
    113 - 3x + 3x +
            handlerExpr = {
    114 - 4x + 4x +
              script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
    @@ -15899,7 +16440,8 @@

    teal coverage - 68.02%

    119 - 4x + 4x +
                "handleActiveDatasetsPresent();"
    @@ -15913,7 +16455,8 @@

    teal coverage - 68.02%

    121 - 4x + 4x +
              shinyjs::runjs(script)
    @@ -15927,7 +16470,8 @@

    teal coverage - 68.02%

    123 - 3x + 3x +
            ignoreNULL = FALSE
    @@ -15955,14 +16499,16 @@

    teal coverage - 68.02%

    127 - 3x + 3x +
        showNotification("Data loaded - App fully started up")
    128 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initialized the module")
    @@ -15976,7 +16522,8 @@

    teal coverage - 68.02%

    130 - 3x + 3x +
        active_module
    @@ -16416,42 +16963,48 @@

    teal coverage - 68.02%

    60 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    61 - 7x + 7x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "title",
    64 - 7x + 7x +
        checkmate::check_string(title),
    65 - 7x + 7x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -16465,28 +17018,32 @@

    teal coverage - 68.02%

    67 - 7x + 7x +
      checkmate::assert(
    68 - 7x + 7x +
        .var.name = "header",
    69 - 7x + 7x +
        checkmate::check_string(header),
    70 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -16500,28 +17057,32 @@

    teal coverage - 68.02%

    72 - 7x + 7x +
      checkmate::assert(
    73 - 7x + 7x +
        .var.name = "footer",
    74 - 7x + 7x +
        checkmate::check_string(footer),
    75 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -16542,7 +17103,8 @@

    teal coverage - 68.02%

    78 - 7x + 7x +
      ns <- NS(id)
    @@ -16584,28 +17146,32 @@

    teal coverage - 68.02%

    84 - 7x + 7x +
      splash_ui <- if (inherits(data, "teal_data_module")) {
    85 - 1x + 1x +
        data$ui(ns("teal_data_module"))
    86 - 7x + 7x +
      } else if (inherits(data, "teal_data")) {
    87 - 6x + 6x +
        div()
    @@ -16619,42 +17185,48 @@

    teal coverage - 68.02%

    89 - 7x + 7x +
      ui_teal(
    90 - 7x + 7x +
        id = ns("teal"),
    91 - 7x + 7x +
        splash_ui = div(splash_ui, uiOutput(ns("error"))),
    92 - 7x + 7x +
        title = title,
    93 - 7x + 7x +
        header = header,
    94 - 7x + 7x +
        footer = footer
    @@ -16703,28 +17275,32 @@

    teal coverage - 68.02%

    101 - 15x + 15x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    102 - 15x + 15x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    103 - 15x + 15x +
      checkmate::assert_class(modules, "teal_modules")
    104 - 15x + 15x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -16738,14 +17314,16 @@

    teal coverage - 68.02%

    106 - 15x + 15x +
      moduleServer(id, function(input, output, session) {
    107 - 15x + 15x +
        logger::log_trace("srv_teal_with_splash initializing module with data.")
    @@ -16759,7 +17337,8 @@

    teal coverage - 68.02%

    109 - 15x + 15x +
        if (getOption("teal.show_js_log", default = FALSE)) {
    @@ -16801,28 +17380,32 @@

    teal coverage - 68.02%

    115 - 15x + 15x +
        teal_data_rv <- if (inherits(data, "teal_data_module")) {
    116 - 10x + 10x +
          data <- data$server(id = "teal_data_module")
    117 - 10x + 10x +
          if (!is.reactive(data)) {
    118 - 1x + 1x +
            stop("The `teal_data_module` passed to `data` must return a reactive expression.", call. = FALSE)
    @@ -16836,21 +17419,24 @@

    teal coverage - 68.02%

    120 - 9x + 9x +
          data
    121 - 15x + 15x +
        } else if (inherits(data, "teal_data")) {
    122 - 5x + 5x +
          reactiveVal(data)
    @@ -16871,7 +17457,8 @@

    teal coverage - 68.02%

    125 - 14x + 14x +
        teal_data_rv_validate <- reactive({
    @@ -16885,7 +17472,8 @@

    teal coverage - 68.02%

    127 - 11x + 11x +
          data <- tryCatch(teal_data_rv(), error = function(e) e)
    @@ -16906,7 +17494,8 @@

    teal coverage - 68.02%

    130 - 11x + 11x +
          if (inherits(data, "shiny.silent.error") && identical(data$message, "")) {
    @@ -16941,56 +17530,64 @@

    teal coverage - 68.02%

    135 - 11x + 11x +
          if (inherits(data, "qenv.error")) {
    136 - 2x + 2x +
            validate(
    137 - 2x + 2x +
              need(
    138 - 2x + 2x +
                FALSE,
    139 - 2x + 2x +
                paste(
    140 - 2x + 2x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    141 - 2x + 2x +
                  paste(data$message, collapse = "\n"),
    142 - 2x + 2x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -17039,56 +17636,64 @@

    teal coverage - 68.02%

    149 - 9x + 9x +
          if (inherits(data, "error")) {
    150 - 1x + 1x +
            validate(
    151 - 1x + 1x +
              need(
    152 - 1x + 1x +
                FALSE,
    153 - 1x + 1x +
                paste(
    154 - 1x + 1x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    155 - 1x + 1x +
                  paste(data$message, collpase = "\n"),
    156 - 1x + 1x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -17130,56 +17735,64 @@

    teal coverage - 68.02%

    162 - 8x + 8x +
          validate(
    163 - 8x + 8x +
            need(
    164 - 8x + 8x +
              inherits(data, "teal_data"),
    165 - 8x + 8x +
              paste(
    166 - 8x + 8x +
                "Error: `teal_data_module` passed to `data` failed to return `teal_data` object, returned",
    167 - 8x + 8x +
                toString(sQuote(class(data))),
    168 - 8x + 8x +
                "instead.",
    169 - 8x + 8x +
                "\n Check your inputs or contact app developer if error persists."
    @@ -17214,14 +17827,16 @@

    teal coverage - 68.02%

    174 - 5x + 5x +
          if (!length(teal.data::datanames(data))) {
    175 - 1x + 1x +
            warning("`data` object has no datanames. Default datanames are set using `teal_data`'s environment.")
    @@ -17242,21 +17857,24 @@

    teal coverage - 68.02%

    178 - 5x + 5x +
          is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    179 - 5x + 5x +
          if (!isTRUE(is_modules_ok)) {
    180 - 1x + 1x +
            validate(need(isTRUE(is_modules_ok), sprintf("%s. Contact app developer.", is_modules_ok)))
    @@ -17277,42 +17895,48 @@

    teal coverage - 68.02%

    183 - 4x + 4x +
          is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    184 - 4x + 4x +
          if (!isTRUE(is_filter_ok)) {
    185 - 1x + 1x +
            showNotification(
    186 - 1x + 1x +
              "Some filters were not applied because of incompatibility with data. Contact app developer.",
    187 - 1x + 1x +
              type = "warning",
    188 - 1x + 1x +
              duration = 10
    @@ -17326,7 +17950,8 @@

    teal coverage - 68.02%

    190 - 1x + 1x +
            warning(is_filter_ok)
    @@ -17347,7 +17972,8 @@

    teal coverage - 68.02%

    193 - 4x + 4x +
          teal_data_rv()
    @@ -17368,7 +17994,8 @@

    teal coverage - 68.02%

    196 - 14x + 14x +
        output$error <- renderUI({
    @@ -17410,14 +18037,16 @@

    teal coverage - 68.02%

    202 - 14x + 14x +
        res <- srv_teal(id = "teal", modules = modules, teal_data_rv = teal_data_rv_validate, filter = filter)
    203 - 14x + 14x +
        logger::log_trace("srv_teal_with_splash initialized module with data.")
    @@ -17431,7 +18060,8 @@

    teal coverage - 68.02%

    205 - 14x + 14x +
        res
    @@ -17577,14 +18207,16 @@

    teal coverage - 68.02%

    18 - 2x + 2x +
      packageStartupMessage(
    19 - 2x + 2x +
        "\nYou are using teal version ",
    @@ -17605,7 +18237,8 @@

    teal coverage - 68.02%

    22 - 2x + 2x +
        read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
    @@ -17863,21 +18496,24 @@

    teal coverage - 68.02%

    23 - 4x + 4x +
      checkmate::assert_string(label)
    24 - 2x + 2x +
      checkmate::assert_list(server_args, names = "named")
    25 - 2x + 2x +
      checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
    @@ -17891,7 +18527,8 @@

    teal coverage - 68.02%

    27 - 2x + 2x +
      logger::log_info("Initializing reporter_previewer_module")
    @@ -17905,7 +18542,8 @@

    teal coverage - 68.02%

    29 - 2x + 2x +
      srv <- function(id, reporter, ...) {
    @@ -17933,7 +18571,8 @@

    teal coverage - 68.02%

    33 - 2x + 2x +
      ui <- function(id, ...) {
    @@ -17961,28 +18600,32 @@

    teal coverage - 68.02%

    37 - 2x + 2x +
      module <- module(
    38 - 2x + 2x +
        label = "temporary label",
    39 - 2x + 2x +
        server = srv, ui = ui,
    40 - 2x + 2x +
        server_args = server_args, ui_args = list(), datanames = NULL
    @@ -18010,21 +18653,24 @@

    teal coverage - 68.02%

    44 - 2x + 2x +
      class(module) <- c("teal_module_previewer", class(module))
    45 - 2x + 2x +
      module$label <- label
    46 - 2x + 2x +
      module
    @@ -18576,35 +19222,40 @@

    teal coverage - 68.02%

    77 - 78x + 78x +
      shiny::isolate({
    78 - 78x + 78x +
        checkmate::assert_flag(allow_add)
    79 - 78x + 78x +
        checkmate::assert_flag(module_specific)
    80 - 32x + 32x +
        if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
    81 - 75x + 75x +
        checkmate::assert_string(app_id, null.ok = TRUE)
    @@ -18618,14 +19269,16 @@

    teal coverage - 68.02%

    83 - 75x + 75x +
        slices <- list(...)
    84 - 75x + 75x +
        all_slice_id <- vapply(slices, `[[`, character(1L), "id")
    @@ -18639,14 +19292,16 @@

    teal coverage - 68.02%

    86 - 75x + 75x +
        if (missing(mapping)) {
    87 - 46x + 46x +
          mapping <- list(global_filters = all_slice_id)
    @@ -18660,14 +19315,16 @@

    teal coverage - 68.02%

    89 - 75x + 75x +
        if (!module_specific) {
    90 - 71x + 71x +
          mapping[setdiff(names(mapping), "global_filters")] <- NULL
    @@ -18688,42 +19345,48 @@

    teal coverage - 68.02%

    93 - 75x + 75x +
        failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
    94 - 75x + 75x +
        if (length(failed_slice_id)) {
    95 - 1x + 1x +
          stop(sprintf(
    96 - 1x + 1x +
            "Filters in mapping don't match any available filter.\n %s not in %s",
    97 - 1x + 1x +
            toString(failed_slice_id),
    98 - 1x + 1x +
            toString(all_slice_id)
    @@ -18751,7 +19414,8 @@

    teal coverage - 68.02%

    102 - 74x + 74x +
        tss <- teal.slice::teal_slices(
    @@ -18765,28 +19429,32 @@

    teal coverage - 68.02%

    104 - 74x + 74x +
          exclude_varnames = exclude_varnames,
    105 - 74x + 74x +
          include_varnames = include_varnames,
    106 - 74x + 74x +
          count_type = count_type,
    107 - 74x + 74x +
          allow_add = allow_add
    @@ -18800,35 +19468,40 @@

    teal coverage - 68.02%

    109 - 74x + 74x +
        attr(tss, "mapping") <- mapping
    110 - 74x + 74x +
        attr(tss, "module_specific") <- module_specific
    111 - 74x + 74x +
        attr(tss, "app_id") <- app_id
    112 - 74x + 74x +
        class(tss) <- c("modules_teal_slices", class(tss))
    113 - 74x + 74x +
        tss
    @@ -18898,14 +19571,16 @@

    teal coverage - 68.02%

    123 - 10x + 10x +
      checkmate::assert_list(x)
    124 - 10x + 10x +
      lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
    @@ -18919,21 +19594,24 @@

    teal coverage - 68.02%

    126 - 10x + 10x +
      attrs <- attributes(unclass(x))
    127 - 10x + 10x +
      ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
    128 - 10x + 10x +
      do.call(teal_slices, c(ans, attrs))
    @@ -19185,28 +19863,32 @@

    teal coverage - 68.02%

    164 - 1x + 1x +
      checkmate::assert_class(filter, "teal_slices")
    165 - 1x + 1x +
      shiny::isolate({
    166 - 1x + 1x +
        filter_copy <- lapply(filter, function(slice) {
    167 - 2x + 2x +
          teal.slice::as.teal_slice(as.list(slice))
    @@ -19220,14 +19902,16 @@

    teal coverage - 68.02%

    169 - 1x + 1x +
        attributes(filter_copy) <- attributes(filter)
    170 - 1x + 1x +
        filter_copy
    @@ -19961,7 +20645,8 @@

    teal coverage - 68.02%

    102 - 10x + 10x +
      logger::log_trace("init initializing teal app with: data ('{ class(data) }').")
    @@ -19989,7 +20674,8 @@

    teal coverage - 68.02%

    106 - 10x + 10x +
      if (inherits(data, "TealData")) {
    @@ -20059,7 +20745,8 @@

    teal coverage - 68.02%

    116 - 10x + 10x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    @@ -20080,28 +20767,32 @@

    teal coverage - 68.02%

    119 - 10x + 10x +
      checkmate::assert(
    120 - 10x + 10x +
        .var.name = "modules",
    121 - 10x + 10x +
        checkmate::check_multi_class(modules, c("teal_modules", "teal_module")),
    122 - 10x + 10x +
        checkmate::check_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -20115,14 +20806,16 @@

    teal coverage - 68.02%

    124 - 10x + 10x +
      if (inherits(modules, "teal_module")) {
    125 - 1x + 1x +
        modules <- list(modules)
    @@ -20136,14 +20829,16 @@

    teal coverage - 68.02%

    127 - 10x + 10x +
      if (checkmate::test_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))) {
    128 - 4x + 4x +
        modules <- do.call(teal::modules, modules)
    @@ -20171,7 +20866,8 @@

    teal coverage - 68.02%

    132 - 10x + 10x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -20192,28 +20888,32 @@

    teal coverage - 68.02%

    135 - 9x + 9x +
      checkmate::assert(
    136 - 9x + 9x +
        .var.name = "title",
    137 - 9x + 9x +
        checkmate::check_string(title),
    138 - 9x + 9x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -20227,28 +20927,32 @@

    teal coverage - 68.02%

    140 - 9x + 9x +
      checkmate::assert(
    141 - 9x + 9x +
        .var.name = "header",
    142 - 9x + 9x +
        checkmate::check_string(header),
    143 - 9x + 9x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -20262,28 +20966,32 @@

    teal coverage - 68.02%

    145 - 9x + 9x +
      checkmate::assert(
    146 - 9x + 9x +
        .var.name = "footer",
    147 - 9x + 9x +
        checkmate::check_string(footer),
    148 - 9x + 9x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -20297,7 +21005,8 @@

    teal coverage - 68.02%

    150 - 9x + 9x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -20318,7 +21027,8 @@

    teal coverage - 68.02%

    153 - 9x + 9x +
      teal.logger::log_system_info()
    @@ -20346,21 +21056,24 @@

    teal coverage - 68.02%

    157 - 9x + 9x +
      landing <- extract_module(modules, "teal_module_landing")
    158 - 9x + 9x +
      landing_module <- NULL
    159 - 9x + 9x +
      if (length(landing) == 1L) {
    @@ -20381,7 +21094,8 @@

    teal coverage - 68.02%

    162 - 9x + 9x +
      } else if (length(landing) > 1L) {
    @@ -20416,7 +21130,8 @@

    teal coverage - 68.02%

    167 - 9x + 9x +
      attr(filter, "app_id") <- create_app_id(data, modules)
    @@ -20437,7 +21152,8 @@

    teal coverage - 68.02%

    170 - 9x + 9x +
      filter <- as.teal_slices(as.list(filter))
    @@ -20465,7 +21181,8 @@

    teal coverage - 68.02%

    174 - 9x + 9x +
      if (isTRUE(attr(filter, "module_specific"))) {
    @@ -20654,21 +21371,24 @@

    teal coverage - 68.02%

    201 - 9x + 9x +
      if (inherits(data, "teal_data")) {
    202 - 8x + 8x +
        if (length(teal_data_datanames(data)) == 0) {
    203 - 1x + 1x +
          stop("The environment of `data` is empty.")
    @@ -20689,28 +21409,32 @@

    teal coverage - 68.02%

    206 - 7x + 7x +
        is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    207 - 7x + 7x +
        if (!isTRUE(is_modules_ok)) {
    208 - 1x + 1x +
          logger::log_error(is_modules_ok)
    209 - 1x + 1x +
          checkmate::assert(is_modules_ok, .var.name = "modules")
    @@ -20731,21 +21455,24 @@

    teal coverage - 68.02%

    212 - 6x + 6x +
        is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    213 - 6x + 6x +
        if (!isTRUE(is_filter_ok)) {
    214 - 1x + 1x +
          warning(is_filter_ok)
    @@ -20808,21 +21535,24 @@

    teal coverage - 68.02%

    223 - 7x + 7x +
      res <- list(
    224 - 7x + 7x +
        ui = ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
    225 - 7x + 7x +
        server = function(input, output, session) {
    @@ -20878,7 +21608,8 @@

    teal coverage - 68.02%

    233 - 7x + 7x +
      logger::log_trace("init teal app has been initialized.")
    @@ -20892,7 +21623,8 @@

    teal coverage - 68.02%

    235 - 7x + 7x +
      res
    @@ -21633,14 +22365,16 @@

    teal coverage - 68.02%

    104 - 36x + 36x +
      dots <- list(...)
    105 - 2x + 2x +
      if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
    @@ -21654,21 +22388,24 @@

    teal coverage - 68.02%

    107 - 34x + 34x +
      messages <- extract_validator(dots, header)
    108 - 34x + 34x +
      failings <- if (!any_names(dots)) {
    109 - 29x + 29x +
        add_header(messages, header)
    @@ -21682,7 +22419,8 @@

    teal coverage - 68.02%

    111 - 5x + 5x +
        unlist(messages)
    @@ -21703,7 +22441,8 @@

    teal coverage - 68.02%

    114 - 34x + 34x +
      shiny::validate(shiny::need(is.null(failings), failings))
    @@ -21773,7 +22512,8 @@

    teal coverage - 68.02%

    124 - 118x + 118x +
      all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
    @@ -21836,7 +22576,8 @@

    teal coverage - 68.02%

    133 - 49x + 49x +
      x$.__enclos_env__$private$enabled
    @@ -21892,14 +22633,16 @@

    teal coverage - 68.02%

    141 - 113x + 113x +
      if (inherits(iv, "InputValidator")) {
    142 - 49x + 49x +
        add_header(gather_messages(iv), header)
    @@ -21913,14 +22656,16 @@

    teal coverage - 68.02%

    144 - 58x + 58x +
        if (is.null(names(iv))) names(iv) <- rep("", length(iv))
    145 - 64x + 64x +
        mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
    @@ -21983,28 +22728,32 @@

    teal coverage - 68.02%

    154 - 49x + 49x +
      if (validator_enabled(iv)) {
    155 - 46x + 46x +
        status <- iv$validate()
    156 - 46x + 46x +
        failing_inputs <- Filter(Negate(is.null), status)
    157 - 46x + 46x +
        unique(lapply(failing_inputs, function(x) x[["message"]]))
    @@ -22018,14 +22767,16 @@

    teal coverage - 68.02%

    159 - 3x + 3x +
        warning("Validator is disabled and will be omitted.")
    160 - 3x + 3x +
        list()
    @@ -22081,21 +22832,24 @@

    teal coverage - 68.02%

    168 - 78x + 78x +
      ans <- unlist(messages)
    169 - 78x + 78x +
      if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
    170 - 31x + 31x +
        ans <- c(paste0(header, "\n"), ans, "\n")
    @@ -22109,7 +22863,8 @@

    teal coverage - 68.02%

    172 - 78x + 78x +
      ans
    @@ -22158,21 +22913,24 @@

    teal coverage - 68.02%

    179 - 103x + 103x +
      any(
    180 - 103x + 103x +
        if (is.list(x)) {
    181 - 58x + 58x +
          if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
    @@ -22186,7 +22944,8 @@

    teal coverage - 68.02%

    183 - 40x + 40x +
          FALSE
    @@ -22577,7 +23336,8 @@

    teal coverage - 68.02%

    52 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -22591,7 +23351,8 @@

    teal coverage - 68.02%

    54 - 7x + 7x +
      checkmate::assert_multi_class(splash_ui, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -22605,7 +23366,8 @@

    teal coverage - 68.02%

    56 - 7x + 7x +
      if (is.character(title)) {
    @@ -22626,7 +23388,8 @@

    teal coverage - 68.02%

    59 - 7x + 7x +
        validate_app_title_tag(title)
    @@ -22647,28 +23410,32 @@

    teal coverage - 68.02%

    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "header",
    64 - 7x + 7x +
        checkmate::check_string(header),
    65 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -22682,7 +23449,8 @@

    teal coverage - 68.02%

    67 - 7x + 7x +
      if (checkmate::test_string(header)) {
    @@ -22710,28 +23478,32 @@

    teal coverage - 68.02%

    71 - 7x + 7x +
      checkmate::assert(
    72 - 7x + 7x +
        .var.name = "footer",
    73 - 7x + 7x +
        checkmate::check_string(footer),
    74 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -22745,7 +23517,8 @@

    teal coverage - 68.02%

    76 - 7x + 7x +
      if (checkmate::test_string(footer)) {
    @@ -22773,7 +23546,8 @@

    teal coverage - 68.02%

    80 - 7x + 7x +
      ns <- NS(id)
    @@ -22794,7 +23568,8 @@

    teal coverage - 68.02%

    83 - 7x + 7x +
      splash_ui <- div(
    @@ -22808,7 +23583,8 @@

    teal coverage - 68.02%

    85 - 7x + 7x +
        id = ns("main_ui_container"),
    @@ -22829,7 +23605,8 @@

    teal coverage - 68.02%

    88 - 7x + 7x +
        div(splash_ui)
    @@ -22864,35 +23641,40 @@

    teal coverage - 68.02%

    93 - 7x + 7x +
      shiny_busy_message_panel <- conditionalPanel(
    94 - 7x + 7x +
        condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint
    95 - 7x + 7x +
        div(
    96 - 7x + 7x +
          icon("arrows-rotate", "spin fa-spin"),
    97 - 7x + 7x +
          "Computing ...",
    @@ -22906,7 +23688,8 @@

    teal coverage - 68.02%

    99 - 7x + 7x +
          class = "shinybusymessage"
    @@ -22934,98 +23717,112 @@

    teal coverage - 68.02%

    103 - 7x + 7x +
      fluidPage(
    104 - 7x + 7x +
        title = title,
    105 - 7x + 7x +
        theme = get_teal_bs_theme(),
    106 - 7x + 7x +
        include_teal_css_js(),
    107 - 7x + 7x +
        tags$header(header),
    108 - 7x + 7x +
        tags$hr(class = "my-2"),
    109 - 7x + 7x +
        shiny_busy_message_panel,
    110 - 7x + 7x +
        splash_ui,
    111 - 7x + 7x +
        tags$hr(),
    112 - 7x + 7x +
        tags$footer(
    113 - 7x + 7x +
          div(
    114 - 7x + 7x +
            footer,
    115 - 7x + 7x +
            teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
    116 - 7x + 7x +
            textOutput(ns("identifier"))
    @@ -23088,21 +23885,24 @@

    teal coverage - 68.02%

    125 - 19x + 19x +
      stopifnot(is.reactive(teal_data_rv))
    126 - 18x + 18x +
      moduleServer(id, function(input, output, session) {
    127 - 18x + 18x +
        logger::log_trace("srv_teal initializing the module.")
    @@ -23116,14 +23916,16 @@

    teal coverage - 68.02%

    129 - 18x + 18x +
        output$identifier <- renderText(
    130 - 18x + 18x +
          paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
    @@ -23144,28 +23946,32 @@

    teal coverage - 68.02%

    133 - 18x + 18x +
        teal.widgets::verbatim_popup_srv(
    134 - 18x + 18x +
          "sessionInfo",
    135 - 18x + 18x +
          verbatim_content = utils::capture.output(utils::sessionInfo()),
    136 - 18x + 18x +
          title = "SessionInfo"
    @@ -23193,7 +23999,8 @@

    teal coverage - 68.02%

    140 - 18x + 18x +
        run_js_files(files = "init.js")
    @@ -23228,35 +24035,40 @@

    teal coverage - 68.02%

    145 - 18x + 18x +
        get_client_timezone(session$ns)
    146 - 18x + 18x +
        observeEvent(
    147 - 18x + 18x +
          eventExpr = input$timezone,
    148 - 18x + 18x +
          once = TRUE,
    149 - 18x + 18x +
          handlerExpr = {
    @@ -23298,14 +24110,16 @@

    teal coverage - 68.02%

    155 - 18x + 18x +
        reporter <- teal.reporter::Reporter$new()
    156 - 18x + 18x +
        if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
    @@ -23333,28 +24147,32 @@

    teal coverage - 68.02%

    160 - 18x + 18x +
        env <- environment()
    161 - 18x + 18x +
        datasets_reactive <- eventReactive(teal_data_rv(), {
    162 - 4x + 4x +
          env$progress <- shiny::Progress$new(session)
    163 - 4x + 4x +
          env$progress$set(0.25, message = "Setting data")
    @@ -23382,7 +24200,8 @@

    teal coverage - 68.02%

    167 - 4x + 4x +
          datasets_singleton <- teal_data_to_filtered_data(teal_data_rv())
    @@ -23403,14 +24222,16 @@

    teal coverage - 68.02%

    170 - 4x + 4x +
          filter_global <- Filter(function(x) x$id %in% attr(filter, "mapping")$global_filters, filter)
    171 - 4x + 4x +
          datasets_singleton$set_filter_state(filter_global)
    @@ -23424,49 +24245,56 @@

    teal coverage - 68.02%

    173 - 4x + 4x +
          module_datasets <- function(modules) {
    174 - 18x + 18x +
            if (inherits(modules, "teal_modules")) {
    175 - 7x + 7x +
              datasets <- lapply(modules$children, module_datasets)
    176 - 7x + 7x +
              labels <- vapply(modules$children, `[[`, character(1), "label")
    177 - 7x + 7x +
              names(datasets) <- labels
    178 - 7x + 7x +
              datasets
    179 - 11x + 11x +
            } else if (isTRUE(attr(filter, "module_specific"))) {
    @@ -23487,28 +24315,32 @@

    teal coverage - 68.02%

    182 - 3x + 3x +
              datanames <- if (is.null(modules$datanames) || identical(modules$datanames, "all")) {
    183 - 3x + 3x +
                include_parent_datanames(
    184 - 3x + 3x +
                  teal_data_datanames(teal_data_rv()),
    185 - 3x + 3x +
                  teal.data::join_keys(teal_data_rv())
    @@ -23550,7 +24382,8 @@

    teal coverage - 68.02%

    191 - 3x + 3x +
              datasets_module <- teal_data_to_filtered_data(teal_data_rv(), datanames = datanames)
    @@ -23578,7 +24411,8 @@

    teal coverage - 68.02%

    195 - 3x + 3x +
              slices <- Filter(x = filter, f = function(x) {
    @@ -23606,42 +24440,48 @@

    teal coverage - 68.02%

    199 - 3x + 3x +
              include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
    200 - 3x + 3x +
              exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
    201 - 3x + 3x +
              slices$include_varnames <- include_varnames
    202 - 3x + 3x +
              slices$exclude_varnames <- exclude_varnames
    203 - 3x + 3x +
              datasets_module$set_filter_state(slices)
    204 - 3x + 3x +
              datasets_module
    @@ -23655,7 +24495,8 @@

    teal coverage - 68.02%

    206 - 8x + 8x +
              datasets_singleton
    @@ -23676,7 +24517,8 @@

    teal coverage - 68.02%

    209 - 4x + 4x +
          module_datasets(modules)
    @@ -23739,7 +24581,8 @@

    teal coverage - 68.02%

    218 - 18x + 18x +
        observeEvent(datasets_reactive(), once = TRUE, {
    @@ -24312,56 +25155,64 @@

    teal coverage - 68.02%

    46 - 17x + 17x +
      checkmate::assert_string(msg, null.ok = TRUE)
    47 - 15x + 15x +
      checkmate::assert_data_frame(x)
    48 - 15x + 15x +
      if (!is.null(min_nrow)) {
    49 - 15x + 15x +
        if (complete) {
    50 - 5x + 5x +
          complete_index <- stats::complete.cases(x)
    51 - 5x + 5x +
          validate(need(
    52 - 5x + 5x +
            sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
    53 - 5x + 5x +
            paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
    @@ -24382,35 +25233,40 @@

    teal coverage - 68.02%

    56 - 10x + 10x +
          validate(need(
    57 - 10x + 10x +
            nrow(x) >= min_nrow,
    58 - 10x + 10x +
            paste(
    59 - 10x + 10x +
              c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
    60 - 10x + 10x +
              collapse = "\n"
    @@ -24445,28 +25301,32 @@

    teal coverage - 68.02%

    65 - 10x + 10x +
        if (!allow_inf) {
    66 - 6x + 6x +
          validate(need(
    67 - 6x + 6x +
            all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
    68 - 6x + 6x +
            "Dataframe contains Inf values which is not allowed."
    @@ -26733,21 +27593,24 @@

    teal coverage - 68.02%

    12 - 7x + 7x +
      css_files <- list.files(
    13 - 7x + 7x +
        system.file("css", package = "teal", mustWork = TRUE),
    14 - 7x + 7x +
        pattern = pattern, full.names = TRUE
    @@ -26768,14 +27631,16 @@

    teal coverage - 68.02%

    17 - 7x + 7x +
      singleton(
    18 - 7x + 7x +
        tags$head(lapply(css_files, includeCSS))
    @@ -26887,21 +27752,24 @@

    teal coverage - 68.02%

    34 - 7x + 7x +
      checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
    35 - 7x + 7x +
      js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
    36 - 7x + 7x +
      js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
    @@ -26915,7 +27783,8 @@

    teal coverage - 68.02%

    38 - 7x + 7x +
      singleton(lapply(js_files, includeScript))
    @@ -27048,21 +27917,24 @@

    teal coverage - 68.02%

    57 - 18x + 18x +
      checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
    58 - 18x + 18x +
      lapply(files, function(file) {
    59 - 18x + 18x +
        shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
    @@ -27076,7 +27948,8 @@

    teal coverage - 68.02%

    61 - 18x + 18x +
      invisible(NULL)
    @@ -27181,21 +28054,24 @@

    teal coverage - 68.02%

    76 - 7x + 7x +
      tagList(
    77 - 7x + 7x +
        shinyjs::useShinyjs(),
    78 - 7x + 7x +
        include_css_files(),
    @@ -27209,14 +28085,16 @@

    teal coverage - 68.02%

    80 - 7x + 7x +
        include_js_files(except = "init.js"),
    81 - 7x + 7x +
        shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
    @@ -27432,14 +28310,16 @@

    teal coverage - 68.02%

    28 - 6x + 6x +
      expr <- substitute(expr)
    29 - 6x + 6x +
      extras <- list(...)
    @@ -27460,14 +28340,16 @@

    teal coverage - 68.02%

    32 - 6x + 6x +
      if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
    33 - 6x + 6x +
        expr <- call("{", expr)
    @@ -27488,7 +28370,8 @@

    teal coverage - 68.02%

    36 - 6x + 6x +
      calls <- as.list(expr)[-1]
    @@ -27509,7 +28392,8 @@

    teal coverage - 68.02%

    39 - 6x + 6x +
      calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
    @@ -27523,7 +28407,8 @@

    teal coverage - 68.02%

    41 - 6x + 6x +
      eval_code(object = data, code = as.expression(calls))
    @@ -27655,28 +28540,32 @@

    teal coverage - 68.02%

    17 - 49x + 49x +
      checkmate::assert_string(label)
    18 - 49x + 49x +
      module(
    19 - 49x + 49x +
        label,
    20 - 49x + 49x +
        server = function(id, data) {
    @@ -27781,7 +28670,8 @@

    teal coverage - 68.02%

    35 - 49x + 49x +
        ui = function(id) {
    @@ -27851,7 +28741,8 @@

    teal coverage - 68.02%

    45 - 49x + 49x +
        datanames = datanames
    @@ -28074,28 +28965,32 @@

    teal coverage - 68.02%

    29 - 13x + 13x +
      teal_data_module(
    30 - 13x + 13x +
        ui = function(id) {
    31 - 1x + 1x +
          ns <- NS(id)
    32 - 1x + 1x +
          object$ui(ns("mutate_inner"))
    @@ -28109,21 +29004,24 @@

    teal coverage - 68.02%

    34 - 13x + 13x +
        server = function(id) {
    35 - 11x + 11x +
          moduleServer(id, function(input, output, session) {
    36 - 11x + 11x +
            teal_data_rv <- object$server("mutate_inner")
    @@ -28137,14 +29035,16 @@

    teal coverage - 68.02%

    38 - 11x + 11x +
            if (!is.reactive(teal_data_rv)) {
    39 - 1x + 1x +
              stop("The `teal_data_module` must return a reactive expression.", call. = FALSE)
    @@ -28165,7 +29065,8 @@

    teal coverage - 68.02%

    42 - 10x + 10x +
            td <- eventReactive(teal_data_rv(),
    @@ -28179,14 +29080,16 @@

    teal coverage - 68.02%

    44 - 10x + 10x +
                if (inherits(teal_data_rv(), c("teal_data", "qenv.error"))) {
    45 - 6x + 6x +
                  eval_code(teal_data_rv(), code)
    @@ -28200,7 +29103,8 @@

    teal coverage - 68.02%

    47 - 4x + 4x +
                  teal_data_rv()
    @@ -28221,7 +29125,8 @@

    teal coverage - 68.02%

    50 - 10x + 10x +
              ignoreNULL = FALSE
    @@ -28235,7 +29140,8 @@

    teal coverage - 68.02%

    52 - 10x + 10x +
            td
    @@ -28284,7 +29190,8 @@

    teal coverage - 68.02%

    59 - 1x + 1x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -28312,7 +29219,8 @@

    teal coverage - 68.02%

    63 - 6x + 6x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -29346,35 +30254,40 @@

    teal coverage - 68.02%

    57 - 36x + 36x +
      checkmate::assert_function(ui, args = "id", nargs = 1)
    58 - 35x + 35x +
      checkmate::assert_function(server, args = "id", nargs = 1)
    59 - 34x + 34x +
      structure(
    60 - 34x + 34x +
        list(ui = ui, server = server),
    61 - 34x + 34x +
        class = "teal_data_module"
    diff --git a/v0.15.1/index.html b/v0.15.1/index.html index e9fc641ca3..66640ecf5d 100644 --- a/v0.15.1/index.html +++ b/v0.15.1/index.html @@ -1,5 +1,4 @@ - - + @@ -88,23 +87,7 @@ - - + - + + diff --git a/v0.15.1/news/index.html b/v0.15.1/news/index.html index c33ef325da..5a19e34a3e 100644 --- a/v0.15.1/news/index.html +++ b/v0.15.1/news/index.html @@ -1,8 +1,22 @@ - -Changelog • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -109,28 +129,43 @@
    -

    teal 0.15.1

    CRAN release: 2024-02-22

    -
    -

    Bug fixes

    -
    • Fixed a bug that stopped the module_specific feature when a teal module specified datanames of length more than 1.
    • -
    +

    teal 0.15.1 +

    +

    CRAN release: 2024-02-22

    +
    +

    Bug fixes +

    +
      +
    • Fixed a bug that stopped the module_specific feature when a teal module specified datanames of length more than 1.
    • +
    +
    -

    Miscellaneous

    -
    • Updated links in vignettes
    • -
    +

    Miscellaneous +

    +
      +
    • Updated links in vignettes
    • +
    +
    -

    teal 0.15.0

    CRAN release: 2024-02-08

    -
    -

    New features

    -
    • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
    • +

      teal 0.15.0 +

      +

      CRAN release: 2024-02-08

      +
      +

      New features +

      +
        +
      • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
      • Filter state snapshots can now be uploaded from file. See ?snapshot.
      • Added as_tdata function to facilitate migration of modules to the new teal_data class.
      • Added build_app_title function to facilitate adding favicons to app title.
      • -
      +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • data argument in init now accepts only teal_data and teal_data_module.
      • tdata has been deprecated and replaced with teal_data. Support for tdata passed to the data argument in module(server) will be removed in the next release.
      • @@ -139,114 +174,166 @@

        Breaking changes -

        Miscellaneous

        -
        • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
        • +

          Miscellaneous +

          +
            +
          • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
          • Added argument to teal_slices and made modifications to init to enable tagging teal_slices with an app id to safely upload snapshots from disk.
          • FilteredData no longer stores pre-processing code in specific slots. Code is now attached as attribute. Adjusted appropriately.
          • -

    + +
    -

    Bug fixes

    -
    • Removed Report previewer module from mapping matrix display in filter manager.
    • +

      Bug fixes +

      +
        +
      • Removed Report previewer module from mapping matrix display in filter manager.
      • Specified minimal version of package dependencies.
      • -
    + +
    -

    teal 0.14.0

    +

    teal 0.14.0 +

    -

    New features

    -
    • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
    • +

      New features +

      +
        +
      • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
      • Enabled capturing and resetting application filter state with snapshots. See ?snapshot.
      • Enabled reporter_previewer_module to customize default values through srv_args.
      • Enabled passing own reporter_previewer_module in a list of modules to override default one.
      • -
    + +
    -

    Breaking changes

    -
    • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
    • +

      Breaking changes +

      +
        +
      • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
      • Soft deprecated filters argument in module and replaced it with datanames. Details in documentation of teal::module
      • -
    + +
    -

    Miscellaneous

    -
    • Removed scda package dependency from examples.
    • +

      Miscellaneous +

      +
        +
      • Removed scda package dependency from examples.
      • Updated the header tag style to enhance element containment.
      • -
    + +
    -

    teal 0.13.0

    +

    teal 0.13.0 +

    -

    Breaking changes

    -
    • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
    • +

      Breaking changes +

      +
        +
      • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
      • Due to deprecation of chunks in teal.code, the teal framework now uses their replacement (qenv) instead. The documentation in teal has been updated to reflect this and custom modules written with chunks should be updated to use qenv.
      • Due to deprecation of chunks in teal.code, get_rcode, get_rcode_srv, and get_rcode_ui have been removed.
      • -
    + +
    -

    New features

    -
    • Added the validate_inputs function that transfers input validation messages to app output.
    • +

      New features +

      +
        +
      • Added the validate_inputs function that transfers input validation messages to app output.
      • modules argument of init accepts teal_module type of object. There is no need to wrap up a single module in modules() or list().
      • Updated module_nested_tabs so that only active modules are calculated in a teal app.
      • -
    + +
    -

    Miscellaneous

    -
    • Updated examples to use scda.2022.
    • +

      Miscellaneous +

      +
        +
      • Updated examples to use scda.2022.
      • Added R session information into a link in the footer of teal applications.
      • Added data hashing step using rlang instead of digest package to calculate the hash (which has been moved from teal.data and teal.slice). There is now an explicit hashing check in the reproducible code output.
      • Removed deprecated functions: root_modules, default_filter, bookmarkableShinyApp, as well as deprecated logging mechanism, including the functions log_app_usage and .log.
      • Updated the “Teal and Bootstrap Themes” vignette to provide more details customizing a teal app with bslib::run_with_themer.
      • Removed outdated diagram from srv_nested_tabs documentation.
      • Changed default values of header and footer arguments in init to empty text.
      • -
    + +
    -

    teal 0.12.0

    -
    -

    New features

    -
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • -
    +

    teal 0.12.0 +

    +
    +

    New features +

    +
      +
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • +
    +
    -

    Enhancements

    -
    • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
    • +

      Enhancements +

      +
        +
      • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
      • Updated teal_module to have data argument which receives a list of reactive filter data with "code" and "join_keys" attributes.
      • Updated teal_module to have filter_panel_api argument which receives a FilterPanelAPI object.
      • Updated the internals of module_teal to reflect changes in teal.slice.
      • -
    + +
    -

    Breaking changes

    -
    • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
    • +

      Breaking changes +

      +
        +
      • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
      • Deprecated merge_expression argument in get_rcode_srv function and removed it in get_rcode function.
      • Deprecated session argument in get_rcode function.
      • -
    + +
    -

    Miscellaneous

    -
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • -
    +

    Miscellaneous +

    +
      +
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • +
    +
    -

    teal 0.11.1

    +

    teal 0.11.1 +

    -

    Enhancements

    -
    • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
    • +

      Enhancements +

      +
        +
      • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
      • Updated teal to support modules which include reporting. If any module which supports reporting is included then a reporter_previewer_module is included.
      • Added default arguments to module() and the server argument is now a function where the second argument can be ... or datasets.
      • -
    + +
    -

    Breaking changes

    -
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • -
    +

    Breaking changes +

    +
      +
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • +
    +
    -

    Miscellaneous

    -
    • Added a template to the pkgdown configuration.
    • +

      Miscellaneous +

      +
        +
      • Added a template to the pkgdown configuration.
      • Removed unneeded shinytest app tests.
      • Updated package authors.
      • Added package vignettes.
      • -
    + +
    -

    teal 0.11.0

    -
    +

    The teal package contains the code to create apps (teal::init), to create a module (teal::module) and to group modules in the app (teal::modules). teal depends on teal.transform and teal.data which contain the functions that teal app creators are likely to need. The other package teal only imports from and therefore teal module creators should either fully specify functions from these packages when required or import them into custom packages as library(teal) will not load them.

    +
    +

    New features +

    +
      +
    • A simple new teal module named example_module has been included in the package.
    • +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • teal package has been split into multiple smaller packages, see above.
      • Deprecated root_modules function, users should use modules directly inside init.
      • Due to deprecation of root_modules any label argument to modules must be explicitly named. For example modules("lab", mod1, mod2) should be replaced with modules(label = "lab", mod1, mod2).
      • -
    + +
    -

    Miscellaneous

    -
    • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
    • +

      Miscellaneous +

      +
        +
      • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
      • MultiAssayExperiment is now suggested packages, not required. Objects dependent on MultiAssayExperiment are changed to lazy-load this now suggested package.
      • -
    + +
    -

    Bug fixes

    -
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • -
    +

    Bug fixes +

    +
      +
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • +
    +
    -

    teal 0.10.1

    +

    teal 0.10.1 +

    -

    Breaking changes

    -
    • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
    • +

      Breaking changes +

      +
        +
      • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
      • Deprecated all functions related to connectors that have been moved to their own separate packages.
      • Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational.
      • Removed rcd_connection and rcd_data; scda_dataset_connectors can be passed into cdisc_data and teal_data directly.
      • Replaced rcd_dataset_connector and rcd_cdisc_dataset_connector with scda_dataset_connector and scda_cdisc_dataset_connector respectively.
      • Renamed teal_show_js_log option into teal.show_js_log to match options naming convention.
      • Removed %is_in% and stop_shiny internal utility functions.
      • -
    + +
    -

    New features

    +

    New features +

    -
    Logging
    -
    • Added support for logging using the logger package.
    • +
      Logging +
      +
        +
      • Added support for logging using the logger package.
      • Added a new function register_logger, which registers a logger in a given namespace.
      • Added trace and info levels log messages to the teal framework.
      • Added pid and shiny session token into footnote so app developers can identify logs for apps.
      • -
    + +
    -
    Other
    -
    • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

    • +
      Other +
      +
        +
      • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

      • Added public facing constructor functions for CDISCDataConnector, RelationalDataConnector, and DataConnection classes.

      • Modified data_extract_spec to allow both the filter and select parameters to be NULL, which results in the data_extract_ui acting as if a filter_spec with all variables as possible choices had been supplied as the filter argument and a select_spec with the multiple parameter set to TRUE had been supplied as the select argument.

      • Added support of the full screen for a module when the filters argument is equal NULL.

      • @@ -313,11 +423,14 @@
        Other -

        Bug fixes

        -
    + +
    -

    teal 0.10.0

    +

    teal 0.10.0 +

    -

    New features

    -
    • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
    • +

      New features +

      +
        +
      • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
      • Refactored filter panel to use MultiAssayExperiment objects. Filters can be set on a subject level (colData of MAE object) and on a experiment level (colData and rowData of an assay).
      • Added cdse_dataset_connector to create delayed data objects from CDSE.
      • Added datasetdb_dataset_connector to create delayed data objects from DataSetDB.
      • Added ricepass_connection to create delayed data objects from entimICE via ricepass.
      • Refactor of the filter panel: -
        • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
        • +
            +
          • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
          • Dataset type determines an appearance and a functionality of related filters and filters summary.
          • Datasets are passed (by reference) from DDL to FilteredData skipping extracting data and their attributes.
          • Redesigned variable filter labels in “Active Filter Variables” panel.
          • Fully testable server functions.
          • -
          -
    + + + +
    -

    Bug fixes

    -
    • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
    • +

      Bug fixes +

      +
        +
      • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
      • Fixed a bug that caused the output of get_code function to not reproduce its raw data set.
      • Changed filter_spec to allow no variable selection upon app initialization, where the first possible value was previously selected.
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal 0.9.5

    +

    teal 0.9.5 +

    -

    Enhancements

    -
    • Added informational stop message when using mutate_data with RelationalDataConnector.
    • +

      Enhancements +

      +
        +
      • Added informational stop message when using mutate_data with RelationalDataConnector.
      • Modified as_cdisc to behave similarly to cdisc_dataset when called on a Dataset object.
      • Changed the displayed format of the data name and the column name in data_extract_spec UI elements. Both are now compressed to <data name>.<column name> if they don’t change during runtime of the app.
      • Added ADSAFTTE to the list of recognized ADaM dataset names.
      • Added another example to data_extract_spec’s doc string showcasing app users can choose a variable used for filtering in the encoding panel.
      • Added CSS styling to tool tips in teal modules.
      • -
    + +
    -

    Bug fixes

    -
    • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
    • +

      Bug fixes +

      +
        +
      • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
      • Fixed a bug that crashes app whenever a Date or datetime column is selected from a filter_spec.
      • -
    + +
    -

    teal 0.9.4

    +

    teal 0.9.4 +

    -

    Enhancements

    -
    • Released snowflake connection and connectors.
    • +

      Enhancements +

      +
        +
      • Released snowflake connection and connectors.
      • Changed ordering of datasets to be more intuitive (topologically first for CDISC datasets only and then according to input datasets order).
      • When closing a teal app (ending a user shiny session), all DataConnections will now try to close their connections.
      • Added ADHY keys to configuration file.
      • Extended the filter_spec function: the parameter choices is no longer mandatory (the function will take all possible choices by default) and the vars parameter additionally accepts the choices_selected and allows to change the variables for filtering using the UI elements in the encoding panel.
      • -
    + +
    -

    Bug fixes

    -
    • Cleaned up imports in the package.
    • -
    • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
    • +

      Bug fixes +

      +
        +
      • Cleaned up imports in the package.
      • +
      • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
        +
      • Fixed issue with cloning Callable class.
      • -
    + +
    -

    teal 0.9.3

    +

    teal 0.9.3 +

    -

    New Features

    -
    • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
    • +

      New Features +

      +
        +
      • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
      • New JoinKeys class (with join_keys() constructors and join_key() constructor for its elements) to store joining key columns between datasets.
      • Refactored the most basic dataset() constructor, added cdisc_dataset() constructor and as_cdisc() conversion function.
      • Soft-deprecate removed class constructors and obsolete functions (e.g. keys()).
      • Added get_keys() and set_keys() functions to extract and manipulate datasets primary keys respectively.
      • Unexported filtered_data_new, filtered_data_set and filtered_data_set_filters.
      • -
    + +
    -

    Bug fixes

    -
    • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
    • +

      Bug fixes +

      +
        +
      • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
      • Added ability to press “Enter” key without having to set focus to the Submit button for delayed data loading.
      • Allow variable_choices to use datasets with missing labels.
      • Fixed bug that ignores input of NULL to selected argument of select_spec function.
      • -
    + +
    -

    Enhancements

    -
    • Added button to remove all active filters from the Filter Panel.
    • -
    +

    Enhancements +

    +
      +
    • Added button to remove all active filters from the Filter Panel.
    • +
    +
    -

    teal 0.9.2

    +

    teal 0.9.2 +

    -

    New Features

    -
    • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
    • +

      New Features +

      +
        +
      • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
      • NOTE: python_dataset_connector is not yet ready to be deployed on RSConnect because it does not contain numpy and pandas, which are Python libraries used in python_dataset_connector.
      • Added support for filtering on Date and Datetime variables in the Filter Panel.
      • Added buttons for date and datetime filter widgets to reset the value to the original.
      • Added new function check_key_duplicates, which creates a short summary about rows with duplicated primary key (row numbers and the number of duplicates)
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    • Removed include_factors option in get_class_colnames in RawDataset.
    • -
    +

    Miscellaneous +

    +
      +
    • Removed include_factors option in get_class_colnames in RawDataset.
    • +
    +
    -

    teal 0.9.1

    -
    • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
    • +

      teal 0.9.1 +

      +
        +
      • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
      • Nested tabs module now has better alignment with the filter panel on the page.
      • Allow width argument in optionalSelectInput.
      • Added lifecycle badges to all exported functions.
      • @@ -494,10 +663,13 @@

        teal 0.9.1 -

        teal 0.9.0

        -
        • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

        • +

          teal 0.9.0 +

          +
            +
          • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

          • A new teal_data function to include datasets and connectors into teal application.

          • cdisc_data function to include datasets and connectors into teal application where a check argument still could be used and other consistency tests are performed.

          • get_raw_data can be used to derive raw data from R6 objects e.g. (RelationalDataset).

          • @@ -518,91 +690,133 @@

            teal 0.9.0 -

            Refactor of FilteredData (for developers)

            -
            • +
            +
            +

            Refactor of FilteredData (for developers) +

            +
              +
            • FilteredData is now fully reactive. Now filtered data is lazy evaluated as per need. This further opens the door to bookmarking teal apps (bookmarking currently works for the right filtering panel, but we will make this feature more sophisticated in a future release, each module must be reviewed and adapted if it contains reactiveValues).
            • Datasets and materialized connectors are provided to FilteredData by set_datasets_data function located in init_datasets.R file.
            • Renamed get_dataset() method to get_data().
            • Renamed get_filter_call() method to get_filter_expr(); returns an expression rather than a list.
            • Removed argument isolate from get_data() method and similar methods. You must isolate it yourself as needed. If you want to temporarily deactivate shiny errors due to missing errors, you can set options(shiny.suppressMissingContextError = TRUE). In general, avoid isolate as this breaks reactivity.
            • We added a development module to add several filters at once, e.g. safety filters. This is to be evaluated before it is converted into a proper module and made available to end-users.
            • -
            +

          +

    -

    teal 0.8.5

    -
    • UI bug fix to hide filter elements for not used datasets.
    • -
    +

    teal 0.8.5 +

    +
      +
    • UI bug fix to hide filter elements for not used datasets.
    • +
    +
    -

    teal 0.8.4

    -
    • Progress bar for UI creation in delayed loading module.
    • +

      teal 0.8.4 +

      +
        +
      • Progress bar for UI creation in delayed loading module.
      • Change output of keys function to keys object.
      • Delayed version of choices_selected.
      • Fix an error in choices_selected when selected is not in choices.
      • Fix pickerInput not to display column name as label if it’s missing.
      • -
    + +
    -

    teal 0.8.3

    -
    • Enable teal app to initialize without data. The data are then loaded from within the teal app.
    • +

      teal 0.8.3 +

      +
        +
      • Enable teal app to initialize without data. The data are then loaded from within the teal app.
      • New classes (DatasetConnector, DataConnector) to connect to various data sources, including: * connector to rice API - rice_data and rice_dataset_connector * connector to RDS files - rds_data and rds_dataset_connector
      • Message appears at bottom right of shiny app when shiny is busy to update the views.
      • Remove labels argument of cdisc_data function. Labels should now already be present in the data passed to the cdisc_data function. This can be achieved using the var_relabel function.
      • -
    + +
    -

    teal 0.8.2

    -
    • Fixed several BUGS in optionalSelectInput and improved inputs look.
    • +

      teal 0.8.2 +

      +
        +
      • Fixed several BUGS in optionalSelectInput and improved inputs look.
      • Added get_data_labels function to FilteredData class.
      • Improved sep passing within data_extract_spec.
      • -
    + +
    -

    teal 0.8.1

    -
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • -
    +

    teal 0.8.1 +

    +
      +
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • +
    +
    -

    teal 0.8.0

    -
    • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
    • +

      teal 0.8.0 +

      +
        +
      • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
      • Possibility to load custom .css and .js files.
      • Renamed columns_spec to select_spec.
      • Show number of observations on filter panel.
      • Add labeling functions variable_choices and value_choices.
      • -
    + +
    -

    teal 0.7.0

    -
    • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
    • +

      teal 0.7.0 +

      +
        +
      • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
      • Moved teal.utils functions to teal: log_app_usage, stop_shiny.
      • Added *_spec functions.
      • Improvements on usage of PickerInput and SelectInput.
      • -
    + +
    -

    teal 0.6.0

    -
    • Removed deprecated functions tab*.
    • +

      teal 0.6.0 +

      +
        +
      • Removed deprecated functions tab*.
      • Removed data generation functions including generate_sample_data.
      • Incorporate shinyjs package.
      • Added “Copy R code to clipboard” button.
      • -
    + +
    -

    teal 0.0.5

    -
    • Added limit to data_table with scrolling, preventing overlap of UI elements.
    • +

      teal 0.0.5 +

      +
        +
      • Added limit to data_table with scrolling, preventing overlap of UI elements.
      • Boolean filtering.
      • -
    + +
    -

    teal 0.0.4

    -
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • -
    +

    teal 0.0.4 +

    +
      +
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • +
    +
    -

    teal 0.0.3

    -
    • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
    • -
    -
    New features
    -
    • +

      teal 0.0.3 +

      +
        +
      • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
      • +
      +
      +
      New features +
      +
        +
      • tm_scatterplot module.
      • tm_table module.
      • -
      +
    +
    -
    Changes
    -
    • All tabs arguments were renamed to modules.
    • +
      Changes +
      +
        +
      • All tabs arguments were renamed to modules.
      • tab_item function is now called module.
      • @@ -615,30 +829,39 @@
        Changes -

        teal 0.0.2

        -
        • New ‘01_getting_started’ vignette.
        • +

          teal 0.0.2 +

          +
            +
          • New ‘01_getting_started’ vignette.
          • Datanames in FilteredData are now case sensitive.
          • -
    + +
    -

    teal 0.0.1

    -
    • March 28, 2016 - Initial Release.
    • -
    +

    teal 0.0.1 +

    +
      +
    • March 28, 2016 - Initial Release.
    • +
    + + + + + - - + + diff --git a/v0.15.1/pull_request_template.html b/v0.15.1/pull_request_template.html index c7d6e7e3bc..384a248551 100644 --- a/v0.15.1/pull_request_template.html +++ b/v0.15.1/pull_request_template.html @@ -1,8 +1,22 @@ - -Pull Request • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -114,17 +134,19 @@

    Fixes #nnn

    - + + + + - - + + diff --git a/v0.15.1/reference/TealReportCard.html b/v0.15.1/reference/TealReportCard.html index 9ba9ee9085..5ca438d79d 100644 --- a/v0.15.1/reference/TealReportCard.html +++ b/v0.15.1/reference/TealReportCard.html @@ -1,16 +1,32 @@ - - + + + + + +TealReportCard — TealReportCard • teal +TealReportCard — TealReportCard • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -127,20 +149,27 @@
    -

    Super class

    +

    Super class +

    teal.reporter::ReportCard -> TealReportCard

    +

    Inherited methods


    -

    Method append_src()

    -

    Appends the source code to the content meta data of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_src(src, ...)

    +

    +
    +
    +

    Method append_src() +

    +

    Appends the source code to the content meta data of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_src(src, ...)
    +

    +
    -

    Arguments

    -

    src
    +

    Arguments +

    +

    +
    +
    +
    src

    (character(1)) code as text.

    @@ -172,85 +214,148 @@

    Arguments -

    Returns

    +

    Returns +

    Object of class TealReportCard, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_src(
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_src(
       "plot(iris)"
     )
    -card$get_content()[[1]]$get_content()

    +card$get_content()[[1]]$get_content()
    +

    +
    -


    -

    Method append_fs()

    +
    +

    +
    +
    +

    Method append_fs() +

    Appends the filter state list to the content and metadata of this TealReportCard. If the filter state list has an attribute named formatted, it appends it to the card otherwise it uses the default yaml::as.yaml to format the list. -If the filter state list is empty, nothing is appended to the content.

    -

    Usage

    -

    TealReportCard$append_fs(fs)

    +If the filter state list is empty, nothing is appended to the content.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_fs(fs)
    +

    +
    -

    Arguments

    -

    fs
    +

    Arguments +

    +

    +
    +
    +
    fs

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method append_encodings()

    -

    Appends the encodings list to the content and metadata of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_encodings(encodings)

    +
    +

    +
    +
    +

    Method append_encodings() +

    +

    Appends the encodings list to the content and metadata of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_encodings(encodings)
    +

    +
    -

    Arguments

    -

    encodings
    +

    Arguments +

    +

    +
    +
    +
    encodings

    (list) list of encodings selections of the teal app.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
     card$get_content()[[1]]$get_content()
    -

    +
    +

    +
    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealReportCard$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -258,7 +363,8 @@

    Arguments -

    Examples

    +

    Examples +

    
     ## ------------------------------------------------
     ## Method `TealReportCard$append_src`
    @@ -281,17 +387,19 @@ 

    Examples

    + +
    + +
    - - + + diff --git a/v0.15.1/reference/TealSlicesBlock.html b/v0.15.1/reference/TealSlicesBlock.html index b77a8810a4..0365360be8 100644 --- a/v0.15.1/reference/TealSlicesBlock.html +++ b/v0.15.1/reference/TealSlicesBlock.html @@ -1,10 +1,26 @@ - -RcodeBlock — TealSlicesBlock • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,34 +140,54 @@
    -

    Super classes

    +

    Super classes +

    teal.reporter::ContentBlock -> teal.reporter::TextBlock -> TealSlicesBlock

    +

    Inherited methods


    -

    Method new()

    -

    Returns a TealSlicesBlock object.

    -

    Usage

    -

    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")

    +

    +
    +
    +

    Method new() +

    +

    Returns a TealSlicesBlock object.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    @@ -153,89 +195,154 @@

    Arguments -

    Details

    +

    Details +

    Returns a TealSlicesBlock object with no content and no parameters.

    -

    Returns

    +

    Returns +

    Object of class TealSlicesBlock, invisibly.

    -


    -

    Method set_content()

    +
    +

    +
    +
    +

    Method set_content() +

    Sets content of this TealSlicesBlock. Sets content as YAML text which represents a list generated from teal_slices. The list displays limited number of fields from teal_slice objects, but this list is sufficient to conclude which filters were applied. -When selected field in teal_slice object is a range, then it is displayed as a "min"

    -

    Usage

    -

    TealSlicesBlock$set_content(content)

    +When selected field in teal_slice object is a range, then it is displayed as a "min"

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$set_content(content)
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method from_list()

    -

    Create the RcodeBlock from a list.

    -

    Usage

    -

    TealSlicesBlock$from_list(x)

    +
    +

    +
    +
    +

    Method from_list() +

    +

    Create the RcodeBlock from a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$from_list(x)
    +

    +
    -

    Arguments

    -

    x
    +

    Arguments +

    +

    +
    +
    +
    x

    (named list) with two fields c("text", "params"). Use the get_available_params method to get all possible parameters.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method to_list()

    -

    Convert the RcodeBlock to a list.

    -

    Usage

    -

    TealSlicesBlock$to_list()

    +
    +

    +
    +
    +

    Method to_list() +

    +

    Convert the RcodeBlock to a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$to_list()
    +

    +
    -

    Returns

    +

    Returns +

    named list with a text and params.

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealSlicesBlock$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -243,17 +350,19 @@

    Arguments

    + +
    + +
    - - + + diff --git a/v0.15.1/reference/append_module.html b/v0.15.1/reference/append_module.html index 714fc86c3f..b4d32412a3 100644 --- a/v0.15.1/reference/append_module.html +++ b/v0.15.1/reference/append_module.html @@ -1,8 +1,24 @@ - -Append a teal_module to children of a teal_modules object — append_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    append_module(modules, module)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    module

    (teal_module) object to be appended onto the children of modules

    -
    + +
    -

    Value

    +

    Value +

    A teal_modules object with module appended.

    + +
    + + - - + + diff --git a/v0.15.1/reference/build_app_title.html b/v0.15.1/reference/build_app_title.html index f25d3b14f4..4a0cdd2ba5 100644 --- a/v0.15.1/reference/build_app_title.html +++ b/v0.15.1/reference/build_app_title.html @@ -1,8 +1,24 @@ - -Build app title with favicon — build_app_title • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    build_app_title(
       title = "teal app",
       favicon =
    @@ -123,8 +146,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character) The browser title for the teal app.

    @@ -132,26 +157,30 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag containing the element that adds the title and logo to the shiny app.

    + + + + - - + + diff --git a/v0.15.1/reference/calculate_hashes.html b/v0.15.1/reference/calculate_hashes.html index c9c657bf16..98d13d9929 100644 --- a/v0.15.1/reference/calculate_hashes.html +++ b/v0.15.1/reference/calculate_hashes.html @@ -1,8 +1,24 @@ - -Get the hash of a dataset — calculate_hashes • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    calculate_hashes(datanames, datasets)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets

    datasets

    (FilteredData) object holding the data

    -
    + +
    -

    Value

    +

    Value +

    A list of hashes per dataset.

    + + + + - - + + diff --git a/v0.15.1/reference/check_filter_datanames.html b/v0.15.1/reference/check_filter_datanames.html index 578f3a68ca..e0edcacb26 100644 --- a/v0.15.1/reference/check_filter_datanames.html +++ b/v0.15.1/reference/check_filter_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in filters — check_filter_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_filter_datanames(filters, datanames)
    -

    Arguments

    -
    filters
    +

    Arguments +

    +
    +
    filters

    (teal_slices) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/v0.15.1/reference/check_modules_datanames.html b/v0.15.1/reference/check_modules_datanames.html index 0d0284aa82..9b4cf85d92 100644 --- a/v0.15.1/reference/check_modules_datanames.html +++ b/v0.15.1/reference/check_modules_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in modules — check_modules_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_modules_datanames(modules, datanames)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/v0.15.1/reference/create_app_id.html b/v0.15.1/reference/create_app_id.html index 740279bdcb..d722ef6b26 100644 --- a/v0.15.1/reference/create_app_id.html +++ b/v0.15.1/reference/create_app_id.html @@ -1,8 +1,24 @@ - -Application ID — create_app_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,53 @@
    -

    Usage

    +

    Usage +

    create_app_id(data, modules)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) as accepted by init

    modules

    (teal_modules) object as accepted by init

    -
    + +
    -

    Value

    +

    Value +

    A single character string.

    -

    Details

    +

    Details +

    Calculate app ID that will be used to stamp filter state snapshots. App ID is a hash of the app's data and modules. See "transferring snapshots" section in ?snapshot.

    + + + + - - + + diff --git a/v0.15.1/reference/deep_copy_filter.html b/v0.15.1/reference/deep_copy_filter.html index b0b39f34d0..b87b09927a 100644 --- a/v0.15.1/reference/deep_copy_filter.html +++ b/v0.15.1/reference/deep_copy_filter.html @@ -1,14 +1,30 @@ - - + + + + + +Deep copy teal_slices — deep_copy_filter • teal +Deep copy teal_slices — deep_copy_filter • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + +
    @@ -123,18 +146,23 @@
    -

    Usage

    +

    Usage +

    deep_copy_filter(filter)
    -

    Arguments

    -
    filter
    +

    Arguments +

    +
    +
    filter

    (teal_slices)

    -
    + +
    -

    Value

    +

    Value +

    teal_slices

    @@ -143,17 +171,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.1/reference/dot-datasets_to_data.html b/v0.15.1/reference/dot-datasets_to_data.html index 6dcd4a12fa..02a030b733 100644 --- a/v0.15.1/reference/dot-datasets_to_data.html +++ b/v0.15.1/reference/dot-datasets_to_data.html @@ -1,12 +1,28 @@ - - + + + + + +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    .datasets_to_data(module, datasets)
    -

    Arguments

    -
    module
    +

    Arguments +

    +
    +
    module

    (teal_module) module where needed filters are taken from

    datasets

    (FilteredData) object where needed data are taken from

    -
    + +
    -

    Value

    +

    Value +

    A teal_data object.

    + + + + - - + + diff --git a/v0.15.1/reference/example_module.html b/v0.15.1/reference/example_module.html index 26f20b464d..6d6fea5071 100644 --- a/v0.15.1/reference/example_module.html +++ b/v0.15.1/reference/example_module.html @@ -1,8 +1,24 @@ - -An example teal module — example_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    example_module(label = "example teal module", datanames = "all")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -132,16 +157,19 @@

    Arguments will show filters of all datasets. datanames also determines a subset of datasets which are appended to the data argument in server function.

    -

    + +
    -

    Value

    +

    Value +

    A teal module which can be included in the modules argument to init().

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(IRIS = iris, MTCARS = mtcars),
       modules = example_module()
    @@ -152,17 +180,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/filter_manager_module_srv.html b/v0.15.1/reference/filter_manager_module_srv.html index c64b399930..1114996baa 100644 --- a/v0.15.1/reference/filter_manager_module_srv.html +++ b/v0.15.1/reference/filter_manager_module_srv.html @@ -1,8 +1,24 @@ - -Module specific filter manager — filter_manager_module_srv • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    filter_manager_module_srv(id, module_fd, slices_global)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -131,21 +156,28 @@

    Arguments -

    Value

    +

    Value +

    A reactive expression containing the slices active in this module.

    -

    Details

    +

    Details +

    This module tracks the state of a single FilteredData object and global teal_slices and updates both objects as necessary. Filter states added in different modules Filter states added any individual module are added to global teal_slices @@ -154,17 +186,19 @@

    Details

    + + + + - - + + diff --git a/v0.15.1/reference/get_client_timezone.html b/v0.15.1/reference/get_client_timezone.html index 66e58df9f3..b581c4b80e 100644 --- a/v0.15.1/reference/get_client_timezone.html +++ b/v0.15.1/reference/get_client_timezone.html @@ -1,10 +1,26 @@ - -Get client timezone — get_client_timezone • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,19 +139,24 @@
    -

    Usage

    +

    Usage +

    get_client_timezone(ns)
    -

    Arguments

    -
    ns
    +

    Arguments +

    +
    +
    ns

    (function) namespace function passed from the session object in the shiny server. For shiny modules this will allow for proper name spacing of the registered input.

    -
    + +
    -

    Value

    +

    Value +

    (shiny) input variable accessible with input$tz which is a (character) @@ -137,17 +164,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.1/reference/get_code_tdata.html b/v0.15.1/reference/get_code_tdata.html index 0583fbb756..92fd96ab2d 100644 --- a/v0.15.1/reference/get_code_tdata.html +++ b/v0.15.1/reference/get_code_tdata.html @@ -1,8 +1,24 @@ - -Wrapper for get_code.tdata — get_code_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,35 +137,42 @@
    -

    Usage

    +

    Usage +

    get_code_tdata(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    (character) code used in the tdata object.

    + + + + - - + + diff --git a/v0.15.1/reference/get_datasets_code.html b/v0.15.1/reference/get_datasets_code.html index acf3adc143..31e2f30c86 100644 --- a/v0.15.1/reference/get_datasets_code.html +++ b/v0.15.1/reference/get_datasets_code.html @@ -1,8 +1,24 @@ - -Get datasets code — get_datasets_code • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    get_datasets_code(datanames, datasets, hashes)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets to extract code from

    @@ -131,28 +156,35 @@

    Arguments -

    Value

    +

    Value +

    -

    Character string concatenated from the following elements:

    • data pre-processing code (from data argument in init)

    • +

      Character string concatenated from the following elements:

      +
        +
      • data pre-processing code (from data argument in init)

      • hash check of loaded objects

      • filter code (if any)

      • -
    + + + + + + - - + + diff --git a/v0.15.1/reference/get_metadata.html b/v0.15.1/reference/get_metadata.html index a3a20b92e6..2625832d24 100644 --- a/v0.15.1/reference/get_metadata.html +++ b/v0.15.1/reference/get_metadata.html @@ -1,8 +1,24 @@ - -Function to get metadata from a tdata object — get_metadata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    get_metadata(data, dataname)
     
     # S3 method for tdata
    @@ -125,34 +148,40 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata - object) to extract the data from

    dataname

    (character(1)) the dataset name whose metadata is requested

    -
    + +
    -

    Value

    +

    Value +

    Either list of metadata or NULL if no metadata.

    + + + + - - + + diff --git a/v0.15.1/reference/get_rcode_libraries.html b/v0.15.1/reference/get_rcode_libraries.html index b576e9fa04..8b7cca98e6 100644 --- a/v0.15.1/reference/get_rcode_libraries.html +++ b/v0.15.1/reference/get_rcode_libraries.html @@ -1,8 +1,24 @@ - -Generates library calls from current session info — get_rcode_libraries • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,29 +136,33 @@
    -

    Usage

    +

    Usage +

    get_rcode_libraries()
    -

    Value

    +

    Value +

    Character vector of library(<package>) calls.

    + + + + - - + + diff --git a/v0.15.1/reference/include_css_files.html b/v0.15.1/reference/include_css_files.html index a5ec6fe845..622851389d 100644 --- a/v0.15.1/reference/include_css_files.html +++ b/v0.15.1/reference/include_css_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,35 +142,42 @@
    -

    Usage

    +

    Usage +

    include_css_files(pattern = "*")
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes CSS files.

    + + + + - - + + diff --git a/v0.15.1/reference/include_js_files.html b/v0.15.1/reference/include_js_files.html index 759dcb48b4..b6f801fc54 100644 --- a/v0.15.1/reference/include_js_files.html +++ b/v0.15.1/reference/include_js_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include JS files from /inst/js/ package directory to application header — include_js_files • teal +Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    include_js_files(pattern = NULL, except = NULL)
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included, passed to system.file

    except

    (character) vector of basename filenames to be excluded

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes JS files.

    + + + + - - + + diff --git a/v0.15.1/reference/include_teal_css_js.html b/v0.15.1/reference/include_teal_css_js.html index b9711c14cd..69f2316877 100644 --- a/v0.15.1/reference/include_teal_css_js.html +++ b/v0.15.1/reference/include_teal_css_js.html @@ -1,16 +1,32 @@ - - + + + + + +Code to include teal CSS and JavaScript files — include_teal_css_js • teal +Code to include teal CSS and JavaScript files — include_teal_css_js • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -126,33 +148,38 @@
    -

    Usage

    +

    Usage +

    include_teal_css_js()
    -

    Value

    +

    Value +

    A shiny.tag.list.

    -

    Details

    +

    Details +

    Simply add include_teal_css_js() as one of the UI elements.

    + + + + - - + + diff --git a/v0.15.1/reference/index.html b/v0.15.1/reference/index.html index 272ff7f9d5..12662d8e79 100644 --- a/v0.15.1/reference/index.html +++ b/v0.15.1/reference/index.html @@ -1,8 +1,22 @@ - -Function reference • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -108,230 +128,312 @@
    -

    Core teal functions

    +

    Core teal functions +

    -

    Main functions needed to build a teal app

    +

    +

    Main functions needed to build a teal app

    -
    +
    +
    -
    +
    +
    init()
    Create the server and UI function for the shiny app
    -
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    module() modules() format(<teal_module>) print(<teal_module>) format(<teal_modules>) print(<teal_modules>)
    Create teal_module and teal_modules objects
    -
    +
    +
    +
    ui_teal_with_splash() srv_teal_with_splash()
    Add splash screen to teal application
    -
    +
    +
    +
    teal_slices() as.teal_slices() c(<teal_slices>)
    Filter settings for teal applications
    -
    -

    Helper Functions

    + +
    +
    +

    Helper Functions +

    -

    Helper functions for teal

    +

    +

    Helper functions for teal

    -
    +
    +
    -
    +
    +
    build_app_title()
    Build app title with favicon
    -
    -

    Example module

    + +
    +
    +

    Example module +

    -

    A simple teal module

    +

    +

    A simple teal module

    -
    +
    +
    -
    +
    +
    example_module()
    An example teal module
    -
    -

    Creating reports

    + +
    +
    +

    Creating reports +

    -
    +
    +
    -
    +
    +
    reporter_previewer_module()
    Create a teal module for previewing a report
    -
    +
    +
    +
    TealReportCard
    TealReportCard
    -
    +
    +
    +
    report_card_template()
    Template function for TealReportCard creation and customization
    -
    -

    Landing popup

    + +
    +
    +

    Landing popup +

    -
    +
    +
    -
    +
    +
    landing_popup_module()
    Landing popup module
    -
    -

    Functions for module developers

    + +
    +
    +

    Functions for module developers +

    -
    +
    +
    -
    +
    +
    as_tdata()
    Downgrade teal_data objects in modules for compatibility
    -
    +
    +
    +
    new_tdata()
    Create a tdata object
    -
    +
    +
    +
    get_code_tdata()
    -
    Wrapper for get_code.tdata
    -
    +
    Wrapper for get_code.tdata +
    +
    +
    +
    get_metadata()
    Function to get metadata from a tdata object
    -
    +
    +
    +
    tdata2env()
    -
    Function to convert a tdata object to an environment
    -
    +
    Function to convert a tdata object to an environment +
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    show_rcode_modal()
    Show R code modal
    -
    +
    +
    +
    join_keys(<tdata>)
    -
    Extract join_keys from tdata
    -
    -

    Validation functions

    +
    Extract join_keys from tdata +
    + +
    +
    +

    Validation functions +

    -
    +
    +
    -
    +
    +
    validate_has_data()
    Validate that dataset has a minimum number of observations
    -
    +
    +
    +
    validate_has_elements()
    Validates that vector has length greater than 0
    -
    +
    +
    +
    validate_has_variable()
    Validates that dataset contains specific variable
    -
    +
    +
    +
    validate_in()
    Validates that vector includes all expected values
    -
    +
    +
    +
    validate_inputs()
    Send input validation messages to output
    -
    +
    +
    +
    validate_n_levels()
    Validate that variables has expected number of levels
    -
    +
    +
    +
    validate_no_intersection()
    Validates no intersection between two vectors
    -
    +
    +
    +
    validate_one_row_per_id()
    Validate that dataset has unique rows for key variables
    -
    + + + + + + - - + + diff --git a/v0.15.1/reference/init.html b/v0.15.1/reference/init.html index ab89724f55..b3ea488e0d 100644 --- a/v0.15.1/reference/init.html +++ b/v0.15.1/reference/init.html @@ -1,12 +1,28 @@ - - + + + + + +Create the server and UI function for the shiny app — init • teal +Create the server and UI function for the shiny app — init • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    init(
       data,
       modules,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) For constructing the data object, refer to teal_data() and teal_data_module().

    @@ -174,21 +199,25 @@

    Arguments -

    Value

    +

    Value +

    Named list with server and UI functions.

    -

    Details

    +

    Details +

    When initializing the teal app, if datanames are not set for the teal_data object, defaults from the teal_data environment will be used.

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(
         new_iris = transform(iris, id = seq_len(nrow(iris))),
    @@ -242,17 +271,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/is_arg_used.html b/v0.15.1/reference/is_arg_used.html index c065c81851..7267e54f4e 100644 --- a/v0.15.1/reference/is_arg_used.html +++ b/v0.15.1/reference/is_arg_used.html @@ -1,8 +1,24 @@ - -Does the object make use of the arg — is_arg_used • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    is_arg_used(modules, arg)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_module or teal_modules) object

    arg

    (character(1)) names of the arguments to be checked against formals of teal modules.

    -
    + +
    -

    Value

    +

    Value +

    logical whether the object makes use of arg.

    + + + + - - + + diff --git a/v0.15.1/reference/join_keys.tdata.html b/v0.15.1/reference/join_keys.tdata.html index 107cb7c356..01a72fbad4 100644 --- a/v0.15.1/reference/join_keys.tdata.html +++ b/v0.15.1/reference/join_keys.tdata.html @@ -1,8 +1,24 @@ - -Extract join_keys from tdata — join_keys.tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,34 +137,40 @@
    -

    Usage

    +

    Usage +

    # S3 method for tdata
     join_keys(data, ...)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    ...

    Additional arguments (not used)

    -
    + +
    + + + + - - + + diff --git a/v0.15.1/reference/landing_popup_module.html b/v0.15.1/reference/landing_popup_module.html index b2f8fb3fd3..7d89fec36c 100644 --- a/v0.15.1/reference/landing_popup_module.html +++ b/v0.15.1/reference/landing_popup_module.html @@ -1,12 +1,28 @@ - - + + + + + +Landing popup module — landing_popup_module • teal +Landing popup module — landing_popup_module • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    landing_popup_module(
       label = "Landing Popup",
       title = NULL,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label of the module.

    @@ -147,16 +172,19 @@

    Arguments -

    Value

    +

    Value +

    A teal_module (extended with teal_landing_module class) to be used in teal applications.

    -

    Examples

    +

    Examples +

    app1 <- init(
       data = teal_data(iris = iris),
       modules = modules(
    @@ -203,17 +231,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/matrix_to_mapping.html b/v0.15.1/reference/matrix_to_mapping.html index d79a9ee379..e3aadaf780 100644 --- a/v0.15.1/reference/matrix_to_mapping.html +++ b/v0.15.1/reference/matrix_to_mapping.html @@ -1,14 +1,30 @@ - - + + + + + +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,36 +145,43 @@
    -

    Usage

    +

    Usage +

    matrix_to_mapping(mapping_matrix)
    -

    Arguments

    -
    mapping_matrix
    +

    Arguments +

    +
    +
    mapping_matrix

    (data.frame) of logical vectors where columns represent modules and row represent teal_slices

    -
    + +
    -

    Value

    +

    Value +

    Named list like that in the mapping attribute of a teal_slices object.

    + + + + - - + + diff --git a/v0.15.1/reference/module_filter_manager.html b/v0.15.1/reference/module_filter_manager.html index 1f1eb70f4a..b5a999b836 100644 --- a/v0.15.1/reference/module_filter_manager.html +++ b/v0.15.1/reference/module_filter_manager.html @@ -1,8 +1,24 @@ - -Manage multiple FilteredData objects — module_filter_manager • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_ui(id)
     
     filter_manager_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,15 +164,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    A list of reactives, each holding a teal_slices, as returned by filter_manager_module_srv.

    -

    Details

    +

    Details +

    This module observes changes in the filters of each FilteredData object and keeps track of all filters used. A mapping of filters to modules is kept in the mapping_matrix object (which is actually a data.frame) @@ -155,17 +183,19 @@

    Details

    + + + + - - + + diff --git a/v0.15.1/reference/module_filter_manager_modal.html b/v0.15.1/reference/module_filter_manager_modal.html index e9fdd0109a..1f229a8fa3 100644 --- a/v0.15.1/reference/module_filter_manager_modal.html +++ b/v0.15.1/reference/module_filter_manager_modal.html @@ -1,8 +1,24 @@ - -Filter manager modal — module_filter_manager_modal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_modal_ui(id)
     
     filter_manager_modal_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,20 +164,23 @@

    Argumentsteal_slices().

    -

    + + + + + + - - + + diff --git a/v0.15.1/reference/module_labels.html b/v0.15.1/reference/module_labels.html index 5106a40d6a..8874325d07 100644 --- a/v0.15.1/reference/module_labels.html +++ b/v0.15.1/reference/module_labels.html @@ -1,8 +1,24 @@ - -Retrieve labels from teal_modules — module_labels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,18 +137,23 @@
    -

    Usage

    +

    Usage +

    module_labels(modules)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    -
    + +
    -

    Value

    +

    Value +

    A list containing the labels of the modules. If the modules are nested, @@ -133,17 +161,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.1/reference/module_management.html b/v0.15.1/reference/module_management.html index db12b6434b..fa40e8ef81 100644 --- a/v0.15.1/reference/module_management.html +++ b/v0.15.1/reference/module_management.html @@ -1,8 +1,24 @@ - -Extract/Remove module(s) of specific class — extract_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,54 @@
    -

    Usage

    +

    Usage +

    extract_module(modules, class)
     
     drop_module(modules, class)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    class

    The class name of teal_module to be extracted or dropped.

    -
    + +
    -

    Value

    +

    Value +

    -
    • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

    • +
        +
      • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

      • For drop_module, the opposite, which is all teal_modules of class other than class.

      • -

      teal_modules

      +
    +

    teal_modules

    + + + + - - + + diff --git a/v0.15.1/reference/module_nested_tabs.html b/v0.15.1/reference/module_nested_tabs.html index e847dc99dd..4fb445f930 100644 --- a/v0.15.1/reference/module_nested_tabs.html +++ b/v0.15.1/reference/module_nested_tabs.html @@ -1,8 +1,24 @@ - -Create a UI of nested tabs of teal_modules — module_nested_tabs • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)
     
     # S3 method for default
    @@ -163,8 +187,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -197,18 +223,25 @@

    Arguments -

    Value

    +

    Value +

    -

    Depending on the class of modules, ui_nested_tabs returns:

    • teal_module: instantiated UI of the module.

    • +

      Depending on the class of modules, ui_nested_tabs returns:

      +
        +
      • teal_module: instantiated UI of the module.

      • teal_modules: tabsetPanel with each tab corresponding to recursively calling this function on it.

      • -

      srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

      +
    +

    srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

    -

    ui_nested_tabs

    +

    +ui_nested_tabs +

    Each teal_modules is translated to a tabsetPanel and each @@ -218,25 +251,32 @@

    ui_nested_tabs

    -

    srv_nested_tabs

    +

    +srv_nested_tabs +

    -

    This module recursively calls all elements of modules and returns currently active one.

    • teal_module returns self as a active module.

    • +

      This module recursively calls all elements of modules and returns currently active one.

      +
        +
      • teal_module returns self as a active module.

      • teal_modules also returns module active within self which is determined by the input$active_tab.

      • -
    + +
    + + + + - - + + diff --git a/v0.15.1/reference/module_tabs_with_filters.html b/v0.15.1/reference/module_tabs_with_filters.html index 61b0d60162..c8b3b7a585 100644 --- a/v0.15.1/reference/module_tabs_with_filters.html +++ b/v0.15.1/reference/module_tabs_with_filters.html @@ -1,12 +1,28 @@ - - + + + + + +Add right filter panel into each of the top-level teal_modules UIs — module_tabs_with_filters • teal +Add right filter panel into each of the top-level teal_modules UIs — module_tabs_with_filters • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    ui_tabs_with_filters(id, modules, datasets, filter = teal_slices())
     
     srv_tabs_with_filters(
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -161,15 +186,18 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag.list containing the main menu, placeholders for filters and placeholders for the teal modules.

    -

    Details

    +

    Details +

    The right filter panel's filter choices affect the datasets object. Therefore, all modules using the same datasets share the same filters.

    This works with nested modules of depth greater than 2, though the filter @@ -177,17 +205,19 @@

    Details

    + +
    + + - - + + diff --git a/v0.15.1/reference/module_teal.html b/v0.15.1/reference/module_teal.html index cd26c489f9..d00709e48e 100644 --- a/v0.15.1/reference/module_teal.html +++ b/v0.15.1/reference/module_teal.html @@ -1,8 +1,24 @@ - -teal main app module — module_teal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_teal(
       id,
       splash_ui = tags$h2("Starting the Teal App"),
    @@ -127,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -171,15 +197,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression which returns the currently active module.

    -

    Details

    +

    Details +

    It displays the splash UI which is used to fetch the data, possibly prompting for a password input to fetch the data. Once the data is ready, the splash screen is replaced by the actual teal UI that is tabsetted and @@ -200,17 +229,19 @@

    Details

    + +
    + + - - + + diff --git a/v0.15.1/reference/module_teal_with_splash.html b/v0.15.1/reference/module_teal_with_splash.html index e212f27b5f..854c093afb 100644 --- a/v0.15.1/reference/module_teal_with_splash.html +++ b/v0.15.1/reference/module_teal_with_splash.html @@ -1,10 +1,26 @@ - -Add splash screen to teal application — module_teal_with_splash • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    ui_teal_with_splash(
       id,
       data,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -168,15 +193,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression containing a teal_data object when data is loaded or NULL when it is not.

    -

    Details

    +

    Details +

    This module pauses app initialization pending delayed data loading. This is necessary because the filter panel and modules depend on the data to initialize.

    teal_with_splash follows the shiny module convention. @@ -186,12 +214,14 @@

    Detailsinit to create a standalone application.

    -

    See also

    +

    See also +

    -

    Examples

    +

    Examples +

    teal_modules <- modules(example_module())
     # Shiny app with modular integration of teal
     ui <- fluidPage(
    @@ -213,17 +243,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/modules_depth.html b/v0.15.1/reference/modules_depth.html index 9a2e6dbff3..6502f900c2 100644 --- a/v0.15.1/reference/modules_depth.html +++ b/v0.15.1/reference/modules_depth.html @@ -1,10 +1,26 @@ - -Get module depth — modules_depth • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    modules_depth(modules, depth = 0L)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (list or teal_modules or teal_module) nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -134,26 +159,30 @@

    Arguments -

    Value

    +

    Value +

    Depth level for given module.

    + + + + - - + + diff --git a/v0.15.1/reference/reexports.html b/v0.15.1/reference/reexports.html index ead6016f14..aa380e143b 100644 --- a/v0.15.1/reference/reexports.html +++ b/v0.15.1/reference/reexports.html @@ -1,5 +1,10 @@ - - + + + + + +Objects exported from other packages — reexports • teal +Objects exported from other packages — reexports • teal + + + + + + + + + + Skip to contents @@ -40,7 +56,8 @@ + + @@ -134,7 +156,8 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    lifecycle
    +
    +
    lifecycle

    badge

    @@ -142,21 +165,24 @@

    %>%

    -
    + + - + + + + - - + + diff --git a/v0.15.1/reference/report_card_template.html b/v0.15.1/reference/report_card_template.html index 1627bf98df..95aab2b69f 100644 --- a/v0.15.1/reference/report_card_template.html +++ b/v0.15.1/reference/report_card_template.html @@ -1,10 +1,26 @@ - -Template function for TealReportCard creation and customization — report_card_template • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    report_card_template(
       title,
       label,
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) title of the card (unless overwritten by label)

    @@ -149,26 +174,30 @@

    Arguments -

    Value

    +

    Value +

    (TealReportCard) populated with a title, description and filter state.

    + + + + - - + + diff --git a/v0.15.1/reference/reporter_previewer_module.html b/v0.15.1/reference/reporter_previewer_module.html index 60d091a2cb..22429cf221 100644 --- a/v0.15.1/reference/reporter_previewer_module.html +++ b/v0.15.1/reference/reporter_previewer_module.html @@ -1,20 +1,36 @@ - - + + + + + +Create a teal module for previewing a report — reporter_previewer_module • teal +Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + @@ -132,13 +154,16 @@
    -

    Usage

    +

    Usage +

    reporter_previewer_module(label = "Report previewer", server_args = list())
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -147,26 +172,30 @@

    Argumentsteal.reporter::reporter_previewer_srv().

    -

    + +
    -

    Value

    +

    Value +

    teal_module (extended with teal_module_previewer class) containing the teal.reporter previewer functionality.

    + + + + - - + + diff --git a/v0.15.1/reference/resolve_modules_datanames.html b/v0.15.1/reference/resolve_modules_datanames.html index b545073d31..59d9802965 100644 --- a/v0.15.1/reference/resolve_modules_datanames.html +++ b/v0.15.1/reference/resolve_modules_datanames.html @@ -1,10 +1,26 @@ - -Resolve datanames for the modules — resolve_modules_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    resolve_modules_datanames(modules, datanames, join_keys)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules) object

    @@ -134,26 +159,30 @@

    Arguments -

    Value

    +

    Value +

    teal_modules with resolved datanames.

    + + + + - - + + diff --git a/v0.15.1/reference/run_js_files.html b/v0.15.1/reference/run_js_files.html index 2ae35ae855..b4f4a734c7 100644 --- a/v0.15.1/reference/run_js_files.html +++ b/v0.15.1/reference/run_js_files.html @@ -1,14 +1,30 @@ - - + + + + + +Run JS file from /inst/js/ package directory — run_js_files • teal +Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,41 +145,49 @@
    -

    Usage

    +

    Usage +

    run_js_files(files)
    -

    Arguments

    -
    files
    +

    Arguments +

    +
    +
    files

    (character) vector of filenames.

    -
    + +
    -

    Value

    +

    Value +

    returns NULL, invisibly.

    -

    Details

    +

    Details +

    system.file should not be used to access files in other packages, it does not work with devtools. Therefore, we redefine this method in each package as needed. Thus, we do not export this method.

    + + + + - - + + diff --git a/v0.15.1/reference/show_rcode_modal.html b/v0.15.1/reference/show_rcode_modal.html index e5cc5eef3c..5adad1f46d 100644 --- a/v0.15.1/reference/show_rcode_modal.html +++ b/v0.15.1/reference/show_rcode_modal.html @@ -1,10 +1,26 @@ - -Show R code modal — show_rcode_modal • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())
    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) Title of the modal, displayed in the first comment of the R code.

    @@ -137,24 +162,28 @@

    Argumentsshiny::getDefaultReactiveDomain() is used.

    -

    + +
    -

    References

    +

    References +

    shiny::showModal()

    + + + + - - + + diff --git a/v0.15.1/reference/slices_store.html b/v0.15.1/reference/slices_store.html index 972b732090..c8384e28f9 100644 --- a/v0.15.1/reference/slices_store.html +++ b/v0.15.1/reference/slices_store.html @@ -1,10 +1,26 @@ - -Store and restore teal_slices object — slices_store • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,15 +139,18 @@
    -

    Usage

    +

    Usage +

    slices_store(tss, file)
     
     slices_restore(file)
    -

    Arguments

    -
    tss
    +

    Arguments +

    +
    +
    tss

    (teal_slices) object to be stored.

    @@ -133,9 +158,11 @@

    Arguments.

    -

    + +
    -

    Value

    +

    Value +

    slices_store returns NULL, invisibly.

    @@ -144,32 +171,39 @@

    Value

    slices_restore returns a teal_slices object restored from the file.

    -

    Details

    -

    Date and date time objects are stored in the following formats:

    • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

    • +

      Details +

      +

      Date and date time objects are stored in the following formats:

      +
        +
      • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

      • POSIX*t classes are converted to character by using format.POSIX*t(usetz = TRUE, tz = "UTC") (YYYY-MM-DD HH:MM:SS UTC, where UTC is the Coordinated Universal Time timezone short-code).

      • -

      This format is assumed during slices_restore. All POSIX*t objects in +

    +

    This format is assumed during slices_restore. All POSIX*t objects in selected or choices fields of teal_slice objects are always printed in UTC timezone as well.

    -

    See also

    +

    See also +

    + + + + - - + + diff --git a/v0.15.1/reference/snapshot_manager_module.html b/v0.15.1/reference/snapshot_manager_module.html index 490be07c86..204da6dd4e 100644 --- a/v0.15.1/reference/snapshot_manager_module.html +++ b/v0.15.1/reference/snapshot_manager_module.html @@ -1,8 +1,24 @@ - -Filter state snapshot management — snapshot_manager_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    snapshot_manager_ui(id)
     
     snapshot_manager_srv(id, slices_global, mapping_matrix, filtered_data_list)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id

    @@ -140,15 +165,18 @@

    Arguments -

    Value

    +

    Value +

    Nothing is returned.

    -

    Details

    +

    Details +

    This module introduces snapshots: stored descriptions of the filter state of the entire application. Snapshots allow the user to save the current filter state of the application for later use in the session, as well as to save it to file in order to share it with an app developer or other users, @@ -160,7 +188,8 @@

    Details

    -

    Server logic

    +

    Server logic +

    Snapshots are basically teal_slices objects, however, since each module is served by a separate instance @@ -175,7 +204,8 @@

    Server logic -

    Snapshot mechanics

    +

    Snapshot mechanics +

    When a snapshot is captured, the user is prompted to name it. @@ -205,7 +235,8 @@

    Snapshot mechanics -

    Transferring snapshots

    +

    Transferring snapshots +

    Snapshots uploaded from disk should only be used in the same application they come from, @@ -215,22 +246,25 @@

    Transferring snapshots

    -

    Author

    +

    Author +

    Aleksander Chlebowski

    + + + + - - + + diff --git a/v0.15.1/reference/tdata.html b/v0.15.1/reference/tdata.html index 0a1e671613..1179994bc8 100644 --- a/v0.15.1/reference/tdata.html +++ b/v0.15.1/reference/tdata.html @@ -1,22 +1,38 @@ - - + + + + + +Create a tdata object — tdata • teal +Create a tdata object — tdata • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + + @@ -126,19 +148,25 @@

    [Deprecated]

    Create a new object called tdata which contains data, a reactive list of data.frames -(or MultiAssayExperiment), with attributes:

    • code (reactive) containing code used to generate the data

    • +(or MultiAssayExperiment), with attributes:

      +
        +
      • code (reactive) containing code used to generate the data

      • join_keys (join_keys) containing the relationships between the data

      • metadata (named list) containing any metadata associated with the data frames

      • -
    + +
    -

    Usage

    +

    Usage +

    new_tdata(data, code = "", join_keys = NULL, metadata = NULL)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (named list) A list of data.frame or MultiAssayExperiment objects, which optionally can be reactive. Inside this object all of these items will be made reactive.

    @@ -160,20 +188,24 @@

    Arguments -

    Value

    +

    Value +

    A tdata object.

    -

    See also

    +

    See also +

    as_tdata

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars), dd = data.frame(x = 1:10)),
    @@ -354,17 +386,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/tdata2env.html b/v0.15.1/reference/tdata2env.html index 107e7ed4c7..9788e4121c 100644 --- a/v0.15.1/reference/tdata2env.html +++ b/v0.15.1/reference/tdata2env.html @@ -1,8 +1,24 @@ - -Function to convert a tdata object to an environment — tdata2env • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,25 +137,31 @@
    -

    Usage

    +

    Usage +

    tdata2env(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    An environment.

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars)),
    @@ -145,17 +174,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/tdata_deprecation.html b/v0.15.1/reference/tdata_deprecation.html index b5658e4bfe..75e577ab9b 100644 --- a/v0.15.1/reference/tdata_deprecation.html +++ b/v0.15.1/reference/tdata_deprecation.html @@ -1,8 +1,24 @@ - -Downgrade teal_data objects in modules for compatibility — as_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,24 +136,30 @@
    -

    Usage

    +

    Usage +

    as_tdata(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    data object, either tdata or teal_data, the latter possibly in a reactive expression

    -
    + +
    -

    Value

    +

    Value +

    Object of class tdata.

    -

    Details

    +

    Details +

    Recent changes in teal cause modules to fail because modules expect a tdata object to be passed to the data argument but instead they receive a teal_data object, which is additionally wrapped in a reactive expression in the server functions. @@ -140,7 +168,8 @@

    Details
    -

    Examples

    +

    Examples +

    td <- teal_data()
     td <- within(td, iris <- iris) %>% within(mtcars <- mtcars)
     td
    @@ -192,17 +221,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.15.1/reference/teal-package.html b/v0.15.1/reference/teal-package.html index 5879522bc0..ba363d5bb6 100644 --- a/v0.15.1/reference/teal-package.html +++ b/v0.15.1/reference/teal-package.html @@ -1,10 +1,26 @@ - -teal: Interactive exploration of clinical trials data — teal-package • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,21 +141,30 @@
    -

    Details

    +

    Details +

    To learn mode about the package, visit the project website or read the init() manual page.

    -

    Author

    +

    Author +

    Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID)

    -

    Authors:

    + +
    + + + + - - + + diff --git a/v0.15.1/reference/teal_data_datanames.html b/v0.15.1/reference/teal_data_datanames.html index 14d1c264d3..ef5e6164c4 100644 --- a/v0.15.1/reference/teal_data_datanames.html +++ b/v0.15.1/reference/teal_data_datanames.html @@ -1,10 +1,26 @@ - -Wrapper on teal.data::datanames — teal_data_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -117,18 +140,23 @@
    -

    Usage

    +

    Usage +

    teal_data_datanames(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data)

    -
    + +
    -

    Value

    +

    Value +

    character

    @@ -137,17 +165,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.1/reference/teal_data_module.html b/v0.15.1/reference/teal_data_module.html index 48330e31a1..72de1a67ed 100644 --- a/v0.15.1/reference/teal_data_module.html +++ b/v0.15.1/reference/teal_data_module.html @@ -1,10 +1,26 @@ - -Data module for teal applications — teal_data_module • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    teal_data_module(ui, server)
     
     # S4 method for teal_data_module,character
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    ui
    +

    Arguments +

    +
    +
    ui

    (function(id)) shiny module UI function; must only take id argument

    @@ -159,9 +184,11 @@

    Arguments -

    Value

    +

    Value +

    teal_data_module returns an object of class teal_data_module.

    @@ -173,7 +200,8 @@

    Value

    within returns a teal_data_module object with a delayed evaluation of expr when the module is run.

    -

    Details

    +

    Details +

    teal_data_module creates a shiny module to supply or modify data in a teal application. The module allows for running data pre-processing code (creation and some modification) after the app starts. The body of the server function will be run in the app rather than in the global environment. @@ -188,12 +216,14 @@

    Details... argument: as name:value pairs are passed to ..., name in expr will be replaced with value.

    -

    Examples

    +

    Examples +

    tdm <- teal_data_module(
       ui = function(id) {
         ns <- NS(id)
    @@ -326,17 +356,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/teal_data_to_filtered_data.html b/v0.15.1/reference/teal_data_to_filtered_data.html index 5c60f8ccb4..67d70a0b02 100644 --- a/v0.15.1/reference/teal_data_to_filtered_data.html +++ b/v0.15.1/reference/teal_data_to_filtered_data.html @@ -1,8 +1,24 @@ - -Create a FilteredData — teal_data_to_filtered_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    teal_data_to_filtered_data(x, datanames = teal_data_datanames(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (teal_data) object

    datanames

    (character) vector of data set names to include; must be subset of datanames(x)

    -
    + +
    -

    Value

    +

    Value +

    A FilteredData object.

    + + + + - - + + diff --git a/v0.15.1/reference/teal_modules.html b/v0.15.1/reference/teal_modules.html index 38dc1233d1..ea7c93c564 100644 --- a/v0.15.1/reference/teal_modules.html +++ b/v0.15.1/reference/teal_modules.html @@ -1,10 +1,26 @@ - -Create teal_module and teal_modules objects — teal_modules • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    module(
       label = "module",
       server = function(id, ...) {
    @@ -151,14 +174,19 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    server
    -

    (function) shiny module with following arguments:

    • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

    • +
      +

      (function) shiny module with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

      • input, output, session - (optional; not recommended) When provided, then shiny::callModule() will be used to call a module. From shiny 1.5.0, the recommended way is to use shiny::moduleServer() instead which doesn't require these arguments.

      • @@ -172,14 +200,19 @@

        Argumentsteal.slice::FilterPanelAPI).

      • ... (optional) When provided, server_args elements will be passed to the module named argument or to the ....

      • -

      +
    +
    ui
    -

    (function) shiny UI module function with following arguments:

    • id - teal will set proper shiny namespace for this module.

    • +
      +

      (function) shiny UI module function with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module.

      • ... (optional) When provided, ui_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    filters
    @@ -203,7 +236,8 @@

    Argumentsformat() and print(): Arguments passed to other methods.

    @@ -215,20 +249,26 @@

    Arguments -

    Value

    +

    Value +

    module() returns an object of class teal_module.

    -

    modules() returns a teal_modules object which contains following fields:

    • label: taken from the label argument.

    • +

      modules() returns a teal_modules object which contains following fields:

      +
        +
      • label: taken from the label argument.

      • children: a list containing objects passed in .... List elements are named after their label attribute converted to a valid shiny id.

      • -
    + +
    -

    Details

    +

    Details +

    module() creates an instance of a teal_module that can be placed in a teal application. modules() shapes the structure of a the application by organizing teal_module within the navigation panel. It wraps teal_module and teal_modules objects in a teal_modules object, @@ -241,7 +281,8 @@

    Details
    -

    Examples

    +

    Examples +

    library(shiny)
     
     module_1 <- module(
    @@ -298,17 +339,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.15.1/reference/teal_slices.html b/v0.15.1/reference/teal_slices.html index 434ffbbc26..27f9e3519a 100644 --- a/v0.15.1/reference/teal_slices.html +++ b/v0.15.1/reference/teal_slices.html @@ -1,8 +1,24 @@ - -Filter settings for teal applications — teal_slices • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    teal_slices(
       ...,
       exclude_varnames = NULL,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    any number of teal_slice objects. For print and format, additional arguments passed to other functions.

    @@ -146,15 +171,19 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal.slice's GitHub repository.

    (character(1)) string specifying how observations are tallied by these filter states. -Possible options:

    • "none" (default) to have counts of single FilterState to show unfiltered number only.

    • +Possible options:

      +
        +
      • "none" (default) to have counts of single FilterState to show unfiltered number only.

      • "all" to have counts of single FilterState to show number of observation in filtered and unfiltered dataset. Note, that issues were reported when using this option with MultiAssayExperiment. Please make sure that adding new filters doesn't fail on target platform before deploying for production.

      • -
    + +
    allow_add
    @@ -162,24 +191,32 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal's GitHub repository.

    (named list) specifies which filters will be active in which modules on app start. Elements should contain character vector of teal_slice ids (see teal.slice::teal_slice). -Names of the list should correspond to teal_module label set in module() function.

    • ids listed under "global_filters will be active in all modules.

    • +Names of the list should correspond to teal_module label set in module() function.

      +
        +
      • ids listed under "global_filters will be active in all modules.

      • If missing, all filters will be applied to all modules.

      • If empty list, all filters will be available to all modules but will start inactive.

      • If module_specific is FALSE, only global_filters will be active on start.

      • -
    + +
    app_id
    @@ -192,27 +229,32 @@

    Arguments -

    Value

    +

    Value +

    A teal_slices object.

    -

    Details

    +

    Details +

    Produces a teal_slices object. The teal_slice components will specify filter states that will be active when the app starts. Attributes (created with the named arguments) will configure the way the app applies filters. See argument descriptions for details.

    -

    Examples

    +

    Examples +

    filter <- teal_slices(
       teal_slice(dataname = "iris", varname = "Species", id = "species"),
       teal_slice(dataname = "iris", varname = "Sepal.Length", id = "sepal_length"),
    @@ -245,17 +287,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/unfold_mapping.html b/v0.15.1/reference/unfold_mapping.html index 5f8dfee691..735add3a26 100644 --- a/v0.15.1/reference/unfold_mapping.html +++ b/v0.15.1/reference/unfold_mapping.html @@ -1,8 +1,24 @@ - -Explicitly enumerate global filters. — unfold_mapping • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    unfold_mapping(mapping, module_names)
    -

    Arguments

    -
    mapping
    +

    Arguments +

    +
    +
    mapping

    (named list) as stored in mapping parameter of teal_slices

    module_names

    (character) vector containing names of all modules in the app

    -
    + +
    -

    Value

    +

    Value +

    A named_list with one element per module, each element containing all filters applied to that module.

    + + + + - - + + diff --git a/v0.15.1/reference/validate_app_title_tag.html b/v0.15.1/reference/validate_app_title_tag.html index c7f144c035..677e85de09 100644 --- a/v0.15.1/reference/validate_app_title_tag.html +++ b/v0.15.1/reference/validate_app_title_tag.html @@ -1,8 +1,24 @@ - -Function for validating the title parameter of teal::init — validate_app_title_tag • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,29 +137,35 @@
    -

    Usage

    +

    Usage +

    validate_app_title_tag(shiny_tag)
    -

    Arguments

    -
    shiny_tag
    +

    Arguments +

    +
    +
    shiny_tag

    (shiny.tag) Object to validate for a valid title.

    -
    + +
    + + + + - - + + diff --git a/v0.15.1/reference/validate_has_data.html b/v0.15.1/reference/validate_has_data.html index e821961f73..1e625cccda 100644 --- a/v0.15.1/reference/validate_has_data.html +++ b/v0.15.1/reference/validate_has_data.html @@ -1,8 +1,24 @@ - -Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    validate_has_data(
       x,
       min_nrow = NULL,
    @@ -125,8 +148,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    @@ -145,14 +170,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(teal)
     ui <- fluidPage(
       sliderInput("len", "Max Length of Sepal",
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/validate_has_elements.html b/v0.15.1/reference/validate_has_elements.html index 08ef18684e..d4cd201b80 100644 --- a/v0.15.1/reference/validate_has_elements.html +++ b/v0.15.1/reference/validate_has_elements.html @@ -1,8 +1,24 @@ - -Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_has_elements(x, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    msg

    message to display

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B"), each = 15)
    @@ -169,17 +197,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/validate_has_variable.html b/v0.15.1/reference/validate_has_variable.html index 2c49c0f142..f86a27d383 100644 --- a/v0.15.1/reference/validate_has_variable.html +++ b/v0.15.1/reference/validate_has_variable.html @@ -1,8 +1,24 @@ - -Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_has_variable(data, varname, msg)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20)
    @@ -165,17 +193,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/validate_in.html b/v0.15.1/reference/validate_in.html index edab0c5dbc..2feaa0dd3e 100644 --- a/v0.15.1/reference/validate_in.html +++ b/v0.15.1/reference/validate_in.html @@ -1,8 +1,24 @@ - -Validates that vector includes all expected values — validate_in • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_in(x, choices, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Vector of values to test.

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    ui <- fluidPage(
       selectInput(
         "species",
    @@ -163,17 +191,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/validate_inputs.html b/v0.15.1/reference/validate_inputs.html index 23ae501c12..38e39dcc2d 100644 --- a/v0.15.1/reference/validate_inputs.html +++ b/v0.15.1/reference/validate_inputs.html @@ -1,10 +1,26 @@ - -Send input validation messages to output — validate_inputs • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    validate_inputs(..., header = "Some inputs require attention")
    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    either any number of InputValidator objects or an optionally named, possibly nested list of InputValidator objects, see Details

    @@ -132,15 +157,18 @@

    Arguments -

    Value

    +

    Value +

    Returns NULL if the final validation call passes and a shiny.silent.error if it fails.

    -

    Details

    +

    Details +

    shiny::validate is used to withhold rendering of an output element until certain conditions are met and to print a validation message in place of the output element. @@ -159,12 +187,14 @@

    Detailsheader.

    -

    Examples

    +

    Examples +

    library(shiny)
     library(shinyvalidate)
     
    @@ -234,17 +264,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/validate_n_levels.html b/v0.15.1/reference/validate_n_levels.html index 25ec1f2b5c..af9c67466a 100644 --- a/v0.15.1/reference/validate_n_levels.html +++ b/v0.15.1/reference/validate_n_levels.html @@ -1,8 +1,24 @@ - -Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    variable name. If x is not a factor, the unique values are treated as levels.

    @@ -137,16 +162,19 @@

    Arguments -

    Details

    +

    Details +

    If the number of levels of x is less than min_levels or greater than max_levels the validation will fail. This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20),
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/validate_no_intersection.html b/v0.15.1/reference/validate_no_intersection.html index 85ef27a640..fda185eea4 100644 --- a/v0.15.1/reference/validate_no_intersection.html +++ b/v0.15.1/reference/validate_no_intersection.html @@ -1,8 +1,24 @@ - -Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_no_intersection(x, y, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B", "C"), each = 10)
    @@ -178,17 +206,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.1/reference/validate_one_row_per_id.html b/v0.15.1/reference/validate_one_row_per_id.html index 4c0e1d3783..60dc879c69 100644 --- a/v0.15.1/reference/validate_one_row_per_id.html +++ b/v0.15.1/reference/validate_one_row_per_id.html @@ -1,8 +1,24 @@ - -Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_one_row_per_id(x, key = c("USUBJID", "STUDYID"))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    key

    (character) Vector of ID variables from x that identify unique records.

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    iris$id <- rep(1:50, times = 3)
     ui <- fluidPage(
       selectInput(
    @@ -161,17 +189,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/404.html b/v0.15.2-rc1/404.html index c3a8f3acff..63023393ef 100644 --- a/v0.15.2-rc1/404.html +++ b/v0.15.2-rc1/404.html @@ -1,5 +1,4 @@ - - + @@ -80,23 +79,7 @@ - - + - + + diff --git a/v0.15.2-rc1/CODE_OF_CONDUCT.html b/v0.15.2-rc1/CODE_OF_CONDUCT.html index e751a842c5..dc1fc90789 100644 --- a/v0.15.2-rc1/CODE_OF_CONDUCT.html +++ b/v0.15.2-rc1/CODE_OF_CONDUCT.html @@ -1,8 +1,22 @@ - -Contributor Covenant Code of Conduct • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,65 +131,80 @@
    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    • Demonstrating empathy and kindness toward other people
    • +
        +
      • Demonstrating empathy and kindness toward other people
      • Being respectful of differing opinions, viewpoints, and experiences
      • Giving and gracefully accepting constructive feedback
      • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
      • Focusing on what is best not just for us as individuals, but for the overall community
      • -

      Examples of unacceptable behavior include:

      -
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • +
      +

      Examples of unacceptable behavior include:

      +
        +
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • Trolling, insulting or derogatory comments, and personal or political attacks
      • Public or private harassment
      • Publishing others’ private information, such as a physical or email address, without their explicit permission
      • Other conduct which could reasonably be considered inappropriate in a professional setting
      • -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -177,17 +212,19 @@

    Attribution

    + + + + - - + + diff --git a/v0.15.2-rc1/CONTRIBUTING.html b/v0.15.2-rc1/CONTRIBUTING.html index e60c9ba54a..908e7d746e 100644 --- a/v0.15.2-rc1/CONTRIBUTING.html +++ b/v0.15.2-rc1/CONTRIBUTING.html @@ -1,8 +1,22 @@ - -Contribution Guidelines • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -113,7 +133,8 @@

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -124,38 +145,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    GitHub Flow

    +

    GitHub Flow +

    This repository uses the GitHub Flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes

        Make sure your code

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR)

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -169,76 +199,93 @@

        GitHub Flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    -

    Coding guidelines

    +

    Coding guidelines +

    This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Dependency management

    +

    Dependency management +

    Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

    -

    Dependency version management

    +

    Dependency version management +

    If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    -
    • Minimum 5% of lines of code authored* (determined by git blame query) OR
    • +
        +
      • Minimum 5% of lines of code authored* (determined by git blame query) OR
      • Being at the top 5 contributors in terms of number of commits OR lines added OR lines removed*
      • -

      *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

      +
    +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + + + - - + + diff --git a/v0.15.2-rc1/LICENSE-text.html b/v0.15.2-rc1/LICENSE-text.html index 149de865b6..17ba20d136 100644 --- a/v0.15.2-rc1/LICENSE-text.html +++ b/v0.15.2-rc1/LICENSE-text.html @@ -1,8 +1,22 @@ - -License • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -123,17 +143,19 @@ limitations under the License. - + + + + - - + + diff --git a/v0.15.2-rc1/SECURITY.html b/v0.15.2-rc1/SECURITY.html index 409122c91e..0bab2fdd15 100644 --- a/v0.15.2-rc1/SECURITY.html +++ b/v0.15.2-rc1/SECURITY.html @@ -1,8 +1,22 @@ - -Security Policy • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,38 +131,44 @@
    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    -
    • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
    • +
        +
      • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
      • Full paths of source file(s) related to the manifestation of the issue
      • The location of the affected source code (tag/branch/commit or direct URL)
      • Any special configuration required to reproduce the issue
      • Step-by-step instructions to reproduce the issue
      • Proof-of-concept or exploit code (if possible)
      • Impact of the issue, including how an attacker might exploit the issue
      • -

      This information will help us triage your report more quickly.

      +
    +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + + + - - + + diff --git a/v0.15.2-rc1/articles/adding-support-for-reporting.html b/v0.15.2-rc1/articles/adding-support-for-reporting.html index 7dd83299c4..886e755f68 100644 --- a/v0.15.2-rc1/articles/adding-support-for-reporting.html +++ b/v0.15.2-rc1/articles/adding-support-for-reporting.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/blueprint/actors.html b/v0.15.2-rc1/articles/blueprint/actors.html index 84d06815f4..117dcd140e 100644 --- a/v0.15.2-rc1/articles/blueprint/actors.html +++ b/v0.15.2-rc1/articles/blueprint/actors.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/blueprint/dataflow.html b/v0.15.2-rc1/articles/blueprint/dataflow.html index 9c46bc2de8..36f5082365 100644 --- a/v0.15.2-rc1/articles/blueprint/dataflow.html +++ b/v0.15.2-rc1/articles/blueprint/dataflow.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/blueprint/filter_panel.html b/v0.15.2-rc1/articles/blueprint/filter_panel.html index b3c15e6293..ee7011595d 100644 --- a/v0.15.2-rc1/articles/blueprint/filter_panel.html +++ b/v0.15.2-rc1/articles/blueprint/filter_panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/blueprint/in_app_data.html b/v0.15.2-rc1/articles/blueprint/in_app_data.html index 3c44c395ee..9277cc5d8e 100644 --- a/v0.15.2-rc1/articles/blueprint/in_app_data.html +++ b/v0.15.2-rc1/articles/blueprint/in_app_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/blueprint/index.html b/v0.15.2-rc1/articles/blueprint/index.html index e29740786a..5e99a13233 100644 --- a/v0.15.2-rc1/articles/blueprint/index.html +++ b/v0.15.2-rc1/articles/blueprint/index.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/blueprint/input_data.html b/v0.15.2-rc1/articles/blueprint/input_data.html index 9bb316b3f1..76a10cdc87 100644 --- a/v0.15.2-rc1/articles/blueprint/input_data.html +++ b/v0.15.2-rc1/articles/blueprint/input_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/blueprint/intro.html b/v0.15.2-rc1/articles/blueprint/intro.html index 3d2936ab23..3c5250000b 100644 --- a/v0.15.2-rc1/articles/blueprint/intro.html +++ b/v0.15.2-rc1/articles/blueprint/intro.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/blueprint/module_encapsulation.html b/v0.15.2-rc1/articles/blueprint/module_encapsulation.html index 6f081619c0..5806e11ff3 100644 --- a/v0.15.2-rc1/articles/blueprint/module_encapsulation.html +++ b/v0.15.2-rc1/articles/blueprint/module_encapsulation.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/blueprint/product_map.html b/v0.15.2-rc1/articles/blueprint/product_map.html index d30b3aa113..3b993028aa 100644 --- a/v0.15.2-rc1/articles/blueprint/product_map.html +++ b/v0.15.2-rc1/articles/blueprint/product_map.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/bootstrap-themes-in-teal.html b/v0.15.2-rc1/articles/bootstrap-themes-in-teal.html index e2a2cb4ec8..7d5cac222b 100644 --- a/v0.15.2-rc1/articles/bootstrap-themes-in-teal.html +++ b/v0.15.2-rc1/articles/bootstrap-themes-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/creating-custom-modules.html b/v0.15.2-rc1/articles/creating-custom-modules.html index 2cfd76907d..c64af5fba5 100644 --- a/v0.15.2-rc1/articles/creating-custom-modules.html +++ b/v0.15.2-rc1/articles/creating-custom-modules.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/data-as-shiny-module.html b/v0.15.2-rc1/articles/data-as-shiny-module.html index 716aa387fe..11c5b7476a 100644 --- a/v0.15.2-rc1/articles/data-as-shiny-module.html +++ b/v0.15.2-rc1/articles/data-as-shiny-module.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/filter-panel.html b/v0.15.2-rc1/articles/filter-panel.html index cd7f27469d..1dead27954 100644 --- a/v0.15.2-rc1/articles/filter-panel.html +++ b/v0.15.2-rc1/articles/filter-panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/getting-started-with-teal.html b/v0.15.2-rc1/articles/getting-started-with-teal.html index 070608a63f..2e092e1ab4 100644 --- a/v0.15.2-rc1/articles/getting-started-with-teal.html +++ b/v0.15.2-rc1/articles/getting-started-with-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/including-data-in-teal-applications.html b/v0.15.2-rc1/articles/including-data-in-teal-applications.html index b2fad73449..5e0cd60105 100644 --- a/v0.15.2-rc1/articles/including-data-in-teal-applications.html +++ b/v0.15.2-rc1/articles/including-data-in-teal-applications.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/articles/index.html b/v0.15.2-rc1/articles/index.html index 9cb9ed52e5..7fa34719a6 100644 --- a/v0.15.2-rc1/articles/index.html +++ b/v0.15.2-rc1/articles/index.html @@ -1,8 +1,22 @@ - -Articles • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,78 +131,113 @@

    Get started

    -
    Getting Started with teal
    +
    +
    Getting Started with teal
    -
    + +
    + + + + + + + + + +

    📃 Technical blueprint

    -

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    +

    +

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    -
    About Technical Blueprint
    +
    +
    About Technical Blueprint
    -
    Introduction
    + +
    Introduction
    -
    Actors
    + +
    Actors
    -
    Data Flow
    + +
    Data Flow
    -
    Product Map
    + +
    Product Map
    -
    + + + + + + + + + + - - + + diff --git a/v0.15.2-rc1/articles/teal-options.html b/v0.15.2-rc1/articles/teal-options.html index 1158b3339c..fe98a8535d 100644 --- a/v0.15.2-rc1/articles/teal-options.html +++ b/v0.15.2-rc1/articles/teal-options.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2-rc1/authors.html b/v0.15.2-rc1/authors.html index edbe52093f..716a75ddc3 100644 --- a/v0.15.2-rc1/authors.html +++ b/v0.15.2-rc1/authors.html @@ -1,8 +1,22 @@ - -Authors and Citation • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -110,7 +130,8 @@

    Authors

    -
    • +
        +
      • Dawid Kaledkowski. Author, maintainer.

      • @@ -182,7 +203,8 @@

        Authors

        Maximilian Mordig. Contributor.

        -
    + +

    Citation

    @@ -203,17 +225,19 @@

    Citation

    }
    + + + + - - + + diff --git a/v0.15.2-rc1/coverage-report/index.html b/v0.15.2-rc1/coverage-report/index.html index 92d14cb919..61b942ba64 100644 --- a/v0.15.2-rc1/coverage-report/index.html +++ b/v0.15.2-rc1/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -445,42 +444,48 @@

    teal coverage - 69.63%

    48 - 34x + 34x +
      lifecycle::deprecate_soft(
    49 - 34x + 34x +
        when = "0.15.0",
    50 - 34x + 34x +
        what = "tdata()",
    51 - 34x + 34x +
        details = paste(
    52 - 34x + 34x +
          "tdata is deprecated and will be removed in the next release. Use `teal_data` instead.\n",
    53 - 34x + 34x +
          "Please follow migration instructions https://github.com/insightsengineering/teal/discussions/987."
    @@ -501,28 +506,32 @@

    teal coverage - 69.63%

    56 - 34x + 34x +
      checkmate::assert_list(
    57 - 34x + 34x +
        data,
    58 - 34x + 34x +
        any.missing = FALSE, names = "unique",
    59 - 34x + 34x +
        types = c("data.frame", "reactive", "MultiAssayExperiment")
    @@ -536,14 +545,16 @@

    teal coverage - 69.63%

    61 - 30x + 30x +
      checkmate::assert_class(join_keys, "join_keys", null.ok = TRUE)
    62 - 29x + 29x +
      checkmate::assert_multi_class(code, c("character", "reactive"))
    @@ -557,14 +568,16 @@

    teal coverage - 69.63%

    64 - 28x + 28x +
      checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
    65 - 26x + 26x +
      checkmate::assert_subset(names(metadata), names(data))
    @@ -578,14 +591,16 @@

    teal coverage - 69.63%

    67 - 25x + 25x +
      if (is.reactive(code)) {
    68 - 9x + 9x +
        isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
    @@ -613,21 +628,24 @@

    teal coverage - 69.63%

    72 - 24x + 24x +
      for (x in names(data)) {
    73 - 47x + 47x +
        if (!is.reactive(data[[x]])) {
    74 - 31x + 31x +
          data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
    @@ -662,21 +680,24 @@

    teal coverage - 69.63%

    79 - 24x + 24x +
      attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
    80 - 24x + 24x +
      attr(data, "join_keys") <- join_keys
    81 - 24x + 24x +
      attr(data, "metadata") <- metadata
    @@ -697,14 +718,16 @@

    teal coverage - 69.63%

    84 - 24x + 24x +
      class(data) <- c("tdata", class(data))
    85 - 24x + 24x +
      data
    @@ -844,14 +867,16 @@

    teal coverage - 69.63%

    105 - 2x + 2x +
      checkmate::assert_class(data, "tdata")
    106 - 1x + 1x +
      list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
    @@ -942,14 +967,16 @@

    teal coverage - 69.63%

    119 - 7x + 7x +
      checkmate::assert_class(data, "tdata")
    120 - 5x + 5x +
      attr(data, "code")()
    @@ -1005,7 +1032,8 @@

    teal coverage - 69.63%

    128 - 2x + 2x +
      attr(data, "join_keys")
    @@ -1068,14 +1096,16 @@

    teal coverage - 69.63%

    137 - 4x + 4x +
      checkmate::assert_string(dataname)
    138 - 4x + 4x +
      UseMethod("get_metadata", data)
    @@ -1117,21 +1147,24 @@

    teal coverage - 69.63%

    144 - 4x + 4x +
      metadata <- attr(data, "metadata")
    145 - 4x + 4x +
      if (is.null(metadata)) {
    146 - 1x + 1x +
        return(NULL)
    @@ -1145,7 +1178,8 @@

    teal coverage - 69.63%

    148 - 3x + 3x +
      metadata[[dataname]]
    @@ -1390,14 +1424,16 @@

    teal coverage - 69.63%

    183 - 8x + 8x +
      if (inherits(x, "tdata")) {
    184 - 2x + 2x +
        return(x)
    @@ -1411,77 +1447,88 @@

    teal coverage - 69.63%

    186 - 6x + 6x +
      if (is.reactive(x)) {
    187 - 1x + 1x +
        checkmate::assert_class(isolate(x()), "teal_data")
    188 - 1x + 1x +
        datanames <- isolate(teal_data_datanames(x()))
    189 - 1x + 1x +
        datasets <- sapply(datanames, function(dataname) reactive(x()[[dataname]]), simplify = FALSE)
    190 - 1x + 1x +
        code <- reactive(teal.code::get_code(x()))
    191 - 1x + 1x +
        join_keys <- isolate(teal.data::join_keys(x()))
    192 - 5x + 5x +
      } else if (inherits(x, "teal_data")) {
    193 - 5x + 5x +
        datanames <- teal_data_datanames(x)
    194 - 5x + 5x +
        datasets <- sapply(datanames, function(dataname) reactive(x[[dataname]]), simplify = FALSE)
    195 - 5x + 5x +
        code <- reactive(teal.code::get_code(x))
    196 - 5x + 5x +
        join_keys <- isolate(teal.data::join_keys(x))
    @@ -1502,7 +1549,8 @@

    teal coverage - 69.63%

    199 - 6x + 6x +
      new_tdata(data = datasets, code = code, join_keys = join_keys)
    @@ -1641,14 +1689,16 @@

    teal coverage - 69.63%

    18 - 2x + 2x +
      packageStartupMessage(
    19 - 2x + 2x +
        "\nYou are using teal version ",
    @@ -1669,7 +1719,8 @@

    teal coverage - 69.63%

    22 - 2x + 2x +
        read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
    @@ -1941,56 +1992,64 @@

    teal coverage - 69.63%

    25 - 4x + 4x +
          checkmate::assert_character(src, min.len = 0, max.len = 1)
    26 - 4x + 4x +
          params <- list(...)
    27 - 4x + 4x +
          params$eval <- FALSE
    28 - 4x + 4x +
          rblock <- RcodeBlock$new(src)
    29 - 4x + 4x +
          rblock$set_params(params)
    30 - 4x + 4x +
          self$append_content(rblock)
    31 - 4x + 4x +
          self$append_metadata("SRC", src)
    32 - 4x + 4x +
          invisible(self)
    @@ -2060,28 +2119,32 @@

    teal coverage - 69.63%

    42 - 5x + 5x +
          checkmate::assert_class(fs, "teal_slices")
    43 - 4x + 4x +
          self$append_text("Filter State", "header3")
    44 - 4x + 4x +
          if (length(fs)) {
    45 - 3x + 3x +
            self$append_content(TealSlicesBlock$new(fs))
    @@ -2095,7 +2158,8 @@

    teal coverage - 69.63%

    47 - 1x + 1x +
            self$append_text("No filters specified.")
    @@ -2109,7 +2173,8 @@

    teal coverage - 69.63%

    49 - 4x + 4x +
          invisible(self)
    @@ -2186,56 +2251,64 @@

    teal coverage - 69.63%

    60 - 4x + 4x +
          checkmate::assert_list(encodings)
    61 - 4x + 4x +
          self$append_text("Selected Options", "header3")
    62 - 4x + 4x +
          if (requireNamespace("yaml", quietly = TRUE)) {
    63 - 4x + 4x +
            self$append_text(yaml::as.yaml(encodings, handlers = list(
    64 - 4x + 4x +
              POSIXct = function(x) format(x, "%Y-%m-%d"),
    65 - 4x + 4x +
              POSIXlt = function(x) format(x, "%Y-%m-%d"),
    66 - 4x + 4x +
              Date = function(x) format(x, "%Y-%m-%d")
    67 - 4x + 4x +
            )), "verbatim")
    @@ -2263,14 +2336,16 @@

    teal coverage - 69.63%

    71 - 4x + 4x +
          self$append_metadata("Encodings", encodings)
    72 - 4x + 4x +
          invisible(self)
    @@ -2424,21 +2499,24 @@

    teal coverage - 69.63%

    94 - 9x + 9x +
          self$set_content(content)
    95 - 8x + 8x +
          self$set_style(style)
    96 - 8x + 8x +
          invisible(self)
    @@ -2529,56 +2607,64 @@

    teal coverage - 69.63%

    109 - 10x + 10x +
          checkmate::assert_class(content, "teal_slices")
    110 - 9x + 9x +
          if (length(content) != 0) {
    111 - 7x + 7x +
            states_list <- lapply(content, function(x) {
    112 - 7x + 7x +
              x_list <- shiny::isolate(as.list(x))
    113 - 7x + 7x +
              if (
    114 - 7x + 7x +
                inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
    115 - 7x + 7x +
                  length(x_list$choices) == 2 &&
    116 - 7x + 7x +
                  length(x_list$selected) == 2
    @@ -2613,7 +2699,8 @@

    teal coverage - 69.63%

    121 - 7x + 7x +
              if (!is.null(x_list$arg)) {
    @@ -2641,14 +2728,16 @@

    teal coverage - 69.63%

    125 - 7x + 7x +
              x_list <- x_list[
    126 - 7x + 7x +
                c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
    @@ -2662,21 +2751,24 @@

    teal coverage - 69.63%

    128 - 7x + 7x +
              names(x_list) <- c(
    129 - 7x + 7x +
                "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
    130 - 7x + 7x +
                "Selected Values", "Selected range", "Include NA values", "Include Inf values"
    @@ -2697,7 +2789,8 @@

    teal coverage - 69.63%

    133 - 7x + 7x +
              Filter(Negate(is.null), x_list)
    @@ -2718,14 +2811,16 @@

    teal coverage - 69.63%

    136 - 7x + 7x +
            if (requireNamespace("yaml", quietly = TRUE)) {
    137 - 7x + 7x +
              super$set_content(yaml::as.yaml(states_list))
    @@ -2760,14 +2855,16 @@

    teal coverage - 69.63%

    142 - 9x + 9x +
          private$teal_slices <- content
    143 - 9x + 9x +
          invisible(self)
    @@ -2816,28 +2913,32 @@

    teal coverage - 69.63%

    150 - 1x + 1x +
          checkmate::assert_list(x)
    151 - 1x + 1x +
          checkmate::assert_names(names(x), must.include = c("teal_slices"))
    152 - 1x + 1x +
          self$set_content(x$teal_slices)
    153 - 1x + 1x +
          invisible(self)
    @@ -2879,7 +2980,8 @@

    teal coverage - 69.63%

    159 - 2x + 2x +
          list(teal_slices = private$teal_slices)
    @@ -2990,28 +3092,32 @@

    teal coverage - 69.63%

    8 - 6x + 6x +
      vapply(
    9 - 6x + 6x +
        utils::sessionInfo()$otherPkgs,
    10 - 6x + 6x +
        function(x) {
    11 - 36x + 36x +
          paste0("library(", x$Package, ")")
    @@ -3025,7 +3131,8 @@

    teal coverage - 69.63%

    13 - 6x + 6x +
        character(1)
    @@ -3046,21 +3153,24 @@

    teal coverage - 69.63%

    16 - 6x + 6x +
        rev() %>%
    17 - 6x + 6x +
        paste0(sep = "\n") %>%
    18 - 6x + 6x +
        paste0(collapse = "")
    @@ -3102,21 +3212,24 @@

    teal coverage - 69.63%

    24 - 10x + 10x +
      code_string <- getOption("teal.load_nest_code")
    25 - 10x + 10x +
      if (is.character(code_string)) {
    26 - 2x + 2x +
        code_string
    @@ -3130,7 +3243,8 @@

    teal coverage - 69.63%

    28 - 8x + 8x +
        "# Add any code to install/load your NEST environment here\n"
    @@ -3270,14 +3384,16 @@

    teal coverage - 69.63%

    48 - 4x + 4x +
      str_prepro <- attr(datasets, "preprocessing_code")
    49 - 4x + 4x +
      if (length(str_prepro) == 0) {
    @@ -3298,7 +3414,8 @@

    teal coverage - 69.63%

    52 - 4x + 4x +
        str_prepro <- paste(str_prepro, collapse = "\n")
    @@ -3326,35 +3443,40 @@

    teal coverage - 69.63%

    56 - 4x + 4x +
      str_hash <- vapply(datanames, function(dataname) {
    57 - 6x + 6x +
        sprintf(
    58 - 6x + 6x +
          "stopifnot(%s == %s)",
    59 - 6x + 6x +
          deparse1(bquote(rlang::hash(.(as.name(dataname))))),
    60 - 6x + 6x +
          deparse1(hashes[[dataname]])
    @@ -3368,14 +3490,16 @@

    teal coverage - 69.63%

    62 - 4x + 4x +
      }, character(1))
    63 - 4x + 4x +
      str_hash <- paste(str_hash, collapse = "\n")
    @@ -3396,21 +3520,24 @@

    teal coverage - 69.63%

    66 - 4x + 4x +
      str_filter <- teal.slice::get_filter_expr(datasets, datanames)
    67 - 4x + 4x +
      if (str_filter == "") {
    68 - 2x + 2x +
        str_filter <- character(0)
    @@ -3438,14 +3565,16 @@

    teal coverage - 69.63%

    72 - 4x + 4x +
      str_code <- paste(c(str_prepro, str_hash, str_filter), collapse = "\n\n")
    73 - 4x + 4x +
      sprintf("%s\n", str_code)
    @@ -4424,42 +4553,48 @@

    teal coverage - 69.63%

    138 - 147x + 147x +
      checkmate::assert_string(label)
    139 - 144x + 144x +
      if (label == "global_filters") {
    140 - 1x + 1x +
        stop(
    141 - 1x + 1x +
          sprintf("module(label = \"%s\", ...\n  ", label),
    142 - 1x + 1x +
          "Label 'global_filters' is reserved in teal. Please change to something else.",
    143 - 1x + 1x +
          call. = FALSE
    @@ -4480,7 +4615,8 @@

    teal coverage - 69.63%

    146 - 143x + 143x +
      if (label == "Report previewer") {
    @@ -4543,35 +4679,40 @@

    teal coverage - 69.63%

    155 - 143x + 143x +
      checkmate::assert_function(server)
    156 - 143x + 143x +
      server_formals <- names(formals(server))
    157 - 143x + 143x +
      if (!(
    158 - 143x + 143x +
        "id" %in% server_formals ||
    159 - 143x + 143x +
          all(c("input", "output", "session") %in% server_formals)
    @@ -4585,70 +4726,80 @@

    teal coverage - 69.63%

    161 - 2x + 2x +
        stop(
    162 - 2x + 2x +
          "\nmodule() `server` argument requires a function with following arguments:",
    163 - 2x + 2x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    164 - 2x + 2x +
          "\n - input, output, session (not recommended) - then `shiny::callModule` will be used to call a module.",
    165 - 2x + 2x +
          "\n\nFollowing arguments can be used optionaly:",
    166 - 2x + 2x +
          "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
    167 - 2x + 2x +
          "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
    168 - 2x + 2x +
          "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
    169 - 2x + 2x +
          "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
    170 - 2x + 2x +
          "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
    @@ -4669,42 +4820,48 @@

    teal coverage - 69.63%

    173 - 141x + 141x +
      if ("datasets" %in% server_formals) {
    174 - 2x + 2x +
        warning(
    175 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    176 - 2x + 2x +
          "`datasets` argument in the server is deprecated and will be removed in the next release. ",
    177 - 2x + 2x +
          "Please use `data` instead.",
    178 - 2x + 2x +
          call. = FALSE
    @@ -4746,56 +4903,64 @@

    teal coverage - 69.63%

    184 - 141x + 141x +
      checkmate::assert_function(ui)
    185 - 141x + 141x +
      ui_formals <- names(formals(ui))
    186 - 141x + 141x +
      if (!"id" %in% ui_formals) {
    187 - 1x + 1x +
        stop(
    188 - 1x + 1x +
          "\nmodule() `ui` argument requires a function with following arguments:",
    189 - 1x + 1x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    190 - 1x + 1x +
          "\n\nFollowing arguments can be used optionally:",
    191 - 1x + 1x +
          "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
    @@ -4816,42 +4981,48 @@

    teal coverage - 69.63%

    194 - 140x + 140x +
      if (any(c("data", "datasets") %in% ui_formals)) {
    195 - 2x + 2x +
        stop(
    196 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    197 - 2x + 2x +
          "UI with `data` or `datasets` argument is no longer accepted.\n  ",
    198 - 2x + 2x +
          "If some UI inputs depend on data, please move the logic to your server instead.\n  ",
    199 - 2x + 2x +
          "Possible solutions are renderUI() or updateXyzInput() functions."
    @@ -4893,7 +5064,8 @@

    teal coverage - 69.63%

    205 - 138x + 138x +
      if (!missing(filters)) {
    @@ -4963,21 +5135,24 @@

    teal coverage - 69.63%

    215 - 138x + 138x +
      if (!is.element("data", server_formals) && !is.null(datanames)) {
    216 - 50x + 50x +
        message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
    217 - 50x + 50x +
        datanames <- NULL
    @@ -4991,7 +5166,8 @@

    teal coverage - 69.63%

    219 - 138x + 138x +
      checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
    @@ -5012,49 +5188,56 @@

    teal coverage - 69.63%

    222 - 137x + 137x +
      checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
    223 - 135x + 135x +
      srv_extra_args <- setdiff(names(server_args), server_formals)
    224 - 135x + 135x +
      if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
    225 - 1x + 1x +
        stop(
    226 - 1x + 1x +
          "\nFollowing `server_args` elements have no equivalent in the formals of the server:\n",
    227 - 1x + 1x +
          paste(paste(" -", srv_extra_args), collapse = "\n"),
    228 - 1x + 1x +
          "\n\nUpdate the server arguments by including above or add `...`"
    @@ -5089,49 +5272,56 @@

    teal coverage - 69.63%

    233 - 134x + 134x +
      checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
    234 - 132x + 132x +
      ui_extra_args <- setdiff(names(ui_args), ui_formals)
    235 - 132x + 132x +
      if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
    236 - 1x + 1x +
        stop(
    237 - 1x + 1x +
          "\nFollowing `ui_args` elements have no equivalent in the formals of UI:\n",
    238 - 1x + 1x +
          paste(paste(" -", ui_extra_args), collapse = "\n"),
    239 - 1x + 1x +
          "\n\nUpdate the UI arguments by including above or add `...`"
    @@ -5159,35 +5349,40 @@

    teal coverage - 69.63%

    243 - 131x + 131x +
      structure(
    244 - 131x + 131x +
        list(
    245 - 131x + 131x +
          label = label,
    246 - 131x + 131x +
          server = server, ui = ui, datanames = unique(datanames),
    247 - 131x + 131x +
          server_args = server_args, ui_args = ui_args
    @@ -5201,7 +5396,8 @@

    teal coverage - 69.63%

    249 - 131x + 131x +
        class = "teal_module"
    @@ -5257,42 +5453,48 @@

    teal coverage - 69.63%

    257 - 102x + 102x +
      checkmate::assert_string(label)
    258 - 100x + 100x +
      submodules <- list(...)
    259 - 100x + 100x +
      if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
    260 - 2x + 2x +
        stop(
    261 - 2x + 2x +
          "The only character argument to modules() must be 'label' and it must be named, ",
    262 - 2x + 2x +
          "change modules('lab', ...) to modules(label = 'lab', ...)"
    @@ -5320,7 +5522,8 @@

    teal coverage - 69.63%

    266 - 98x + 98x +
      checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -5341,42 +5544,48 @@

    teal coverage - 69.63%

    269 - 95x + 95x +
      labels <- vapply(submodules, function(submodule) submodule$label, character(1))
    270 - 95x + 95x +
      names(submodules) <- make.unique(gsub("[^[:alnum:]]+", "_", labels), sep = "_")
    271 - 95x + 95x +
      structure(
    272 - 95x + 95x +
        list(
    273 - 95x + 95x +
          label = label,
    274 - 95x + 95x +
          children = submodules
    @@ -5390,7 +5599,8 @@

    teal coverage - 69.63%

    276 - 95x + 95x +
        class = "teal_modules"
    @@ -5453,7 +5663,8 @@

    teal coverage - 69.63%

    285 - 3x + 3x +
      paste0(paste(rep(" ", indent), collapse = ""), "+ ", x$label, "\n", collapse = "")
    @@ -5558,28 +5769,32 @@

    teal coverage - 69.63%

    300 - 1x + 1x +
      paste(
    301 - 1x + 1x +
        c(
    302 - 1x + 1x +
          paste0(rep(" ", indent), "+ ", x$label, "\n"),
    303 - 1x + 1x +
          unlist(lapply(x$children, format, indent = indent + 1, ...))
    @@ -5593,7 +5808,8 @@

    teal coverage - 69.63%

    305 - 1x + 1x +
        collapse = ""
    @@ -5726,42 +5942,48 @@

    teal coverage - 69.63%

    324 - 8x + 8x +
      checkmate::assert_class(modules, "teal_modules")
    325 - 6x + 6x +
      checkmate::assert_class(module, "teal_module")
    326 - 4x + 4x +
      modules$children <- c(modules$children, list(module))
    327 - 4x + 4x +
      labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
    328 - 4x + 4x +
      names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
    329 - 4x + 4x +
      modules
    @@ -5866,7 +6088,8 @@

    teal coverage - 69.63%

    344 - 20x + 20x +
      if (inherits(modules, class)) {
    @@ -5880,28 +6103,32 @@

    teal coverage - 69.63%

    346 - 20x + 20x +
      } else if (inherits(modules, "teal_module")) {
    347 - 11x + 11x +
        NULL
    348 - 9x + 9x +
      } else if (inherits(modules, "teal_modules")) {
    349 - 9x + 9x +
        Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
    @@ -6111,49 +6338,56 @@

    teal coverage - 69.63%

    379 - 286x + 286x +
      checkmate::assert_string(arg)
    380 - 283x + 283x +
      if (inherits(modules, "teal_modules")) {
    381 - 29x + 29x +
        any(unlist(lapply(modules$children, is_arg_used, arg)))
    382 - 254x + 254x +
      } else if (inherits(modules, "teal_module")) {
    383 - 43x + 43x +
        is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
    384 - 211x + 211x +
      } else if (is.function(modules)) {
    385 - 209x + 209x +
        isTRUE(arg %in% names(formals(modules)))
    @@ -6167,7 +6401,8 @@

    teal coverage - 69.63%

    387 - 2x + 2x +
        stop("is_arg_used function not implemented for this object")
    @@ -6279,28 +6514,32 @@

    teal coverage - 69.63%

    403 - 12x + 12x +
      checkmate::assert_multi_class(modules, c("teal_module", "teal_modules"))
    404 - 12x + 12x +
      checkmate::assert_int(depth, lower = 0)
    405 - 11x + 11x +
      if (inherits(modules, "teal_modules")) {
    406 - 4x + 4x +
        max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
    @@ -6314,7 +6553,8 @@

    teal coverage - 69.63%

    408 - 7x + 7x +
        depth
    @@ -6768,14 +7008,16 @@

    teal coverage - 69.63%

    48 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    49 - 3x + 3x +
        observeEvent(input$show, {
    @@ -6859,7 +7101,8 @@

    teal coverage - 69.63%

    61 - 3x + 3x +
        filter_manager_srv("filter_manager", filtered_data_list, filter)
    @@ -6971,14 +7214,16 @@

    teal coverage - 69.63%

    77 - 5x + 5x +
      moduleServer(id, function(input, output, session) {
    78 - 5x + 5x +
        logger::log_trace("filter_manager_srv initializing for: { paste(names(filtered_data_list), collapse = ', ')}.")
    @@ -6992,7 +7237,8 @@

    teal coverage - 69.63%

    80 - 5x + 5x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    @@ -7034,7 +7280,8 @@

    teal coverage - 69.63%

    86 - 5x + 5x +
        slices_global <- reactiveVal(filter)
    @@ -7048,14 +7295,16 @@

    teal coverage - 69.63%

    88 - 5x + 5x +
        filtered_data_list <-
    89 - 5x + 5x +
          if (!is_module_specific) {
    @@ -7076,7 +7325,8 @@

    teal coverage - 69.63%

    92 - 4x + 4x +
            list(global_filters = unlist(filtered_data_list)[[1]])
    @@ -7104,21 +7354,24 @@

    teal coverage - 69.63%

    96 - 1x + 1x +
            flatten_nested <- function(x, name = NULL) {
    97 - 5x + 5x +
              if (inherits(x, "FilteredData")) {
    98 - 3x + 3x +
                setNames(list(x), name)
    @@ -7132,7 +7385,8 @@

    teal coverage - 69.63%

    100 - 2x + 2x +
                unlist(lapply(names(x), function(name) flatten_nested(x[[name]], name)))
    @@ -7153,7 +7407,8 @@

    teal coverage - 69.63%

    103 - 1x + 1x +
            flatten_nested(filtered_data_list)
    @@ -7188,49 +7443,56 @@

    teal coverage - 69.63%

    108 - 5x + 5x +
        mapping_matrix <- reactive({
    109 - 5x + 5x +
          state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
    110 - 5x + 5x +
          mapping_smooth <- lapply(filtered_data_list, function(x) {
    111 - 7x + 7x +
            state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
    112 - 7x + 7x +
            state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
    113 - 7x + 7x +
            states_active <- state_ids_global %in% state_ids_local
    114 - 7x + 7x +
            ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
    @@ -7251,7 +7513,8 @@

    teal coverage - 69.63%

    117 - 5x + 5x +
          as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
    @@ -7272,14 +7535,16 @@

    teal coverage - 69.63%

    120 - 5x + 5x +
        output$slices_table <- renderTable(
    121 - 5x + 5x +
          expr = {
    @@ -7293,28 +7558,32 @@

    teal coverage - 69.63%

    123 - 2x + 2x +
            mm <- mapping_matrix()
    124 - 2x + 2x +
            mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
    125 - 2x + 2x +
            mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
    126 - 2x + 2x +
            if (!is_module_specific) colnames(mm) <- "Global Filters"
    @@ -7335,21 +7604,24 @@

    teal coverage - 69.63%

    129 - 2x + 2x +
            if (nrow(mm) == 0L) {
    130 - 2x + 2x +
              mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
    131 - 2x + 2x +
              rownames(mm) <- ""
    @@ -7377,7 +7649,8 @@

    teal coverage - 69.63%

    135 - 2x + 2x +
            mm[names(mm) != "Report previewer"]
    @@ -7391,14 +7664,16 @@

    teal coverage - 69.63%

    137 - 5x + 5x +
          align = paste(c("l", rep("c", sum(names(filtered_data_list) != "Report previewer"))), collapse = ""),
    138 - 5x + 5x +
          rownames = TRUE
    @@ -7426,35 +7701,40 @@

    teal coverage - 69.63%

    142 - 5x + 5x +
        modules_out <- lapply(names(filtered_data_list), function(module_name) {
    143 - 7x + 7x +
          filter_manager_module_srv(
    144 - 7x + 7x +
            id = module_name,
    145 - 7x + 7x +
            module_fd = filtered_data_list[[module_name]],
    146 - 7x + 7x +
            slices_global = slices_global
    @@ -7489,7 +7769,8 @@

    teal coverage - 69.63%

    151 - 5x + 5x +
        snapshot_manager_srv("snapshot_manager", slices_global, mapping_matrix, filtered_data_list)
    @@ -7503,7 +7784,8 @@

    teal coverage - 69.63%

    153 - 5x + 5x +
        modules_out # returned for testing purpose
    @@ -7692,7 +7974,8 @@

    teal coverage - 69.63%

    180 - 7x + 7x +
      moduleServer(id, function(input, output, session) {
    @@ -7706,7 +7989,8 @@

    teal coverage - 69.63%

    182 - 7x + 7x +
        module_fd$set_available_teal_slices(reactive(slices_global()))
    @@ -7727,7 +8011,8 @@

    teal coverage - 69.63%

    185 - 7x + 7x +
        slices_module <- reactive(module_fd$get_filter_state())
    @@ -7748,14 +8033,16 @@

    teal coverage - 69.63%

    188 - 7x + 7x +
        previous_slices <- reactiveVal(isolate(slices_module()))
    189 - 7x + 7x +
        slices_added <- reactiveVal(NULL)
    @@ -7776,21 +8063,24 @@

    teal coverage - 69.63%

    192 - 7x + 7x +
        observeEvent(slices_module(), ignoreNULL = FALSE, {
    193 - 2x + 2x +
          logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
    194 - 2x + 2x +
          added <- setdiff_teal_slices(slices_module(), slices_global())
    @@ -7804,7 +8094,8 @@

    teal coverage - 69.63%

    196 - 2x + 2x +
          previous_slices(slices_module())
    @@ -7825,7 +8116,8 @@

    teal coverage - 69.63%

    199 - 7x + 7x +
        observeEvent(slices_added(), ignoreNULL = TRUE, {
    @@ -7944,7 +8236,8 @@

    teal coverage - 69.63%

    216 - 7x + 7x +
        slices_module # returned for testing purpose
    @@ -8503,35 +8796,40 @@

    teal coverage - 69.63%

    77 - 79x + 79x +
      shiny::isolate({
    78 - 79x + 79x +
        checkmate::assert_flag(allow_add)
    79 - 79x + 79x +
        checkmate::assert_flag(module_specific)
    80 - 33x + 33x +
        if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
    81 - 76x + 76x +
        checkmate::assert_string(app_id, null.ok = TRUE)
    @@ -8545,14 +8843,16 @@

    teal coverage - 69.63%

    83 - 76x + 76x +
        slices <- list(...)
    84 - 76x + 76x +
        all_slice_id <- vapply(slices, `[[`, character(1L), "id")
    @@ -8566,14 +8866,16 @@

    teal coverage - 69.63%

    86 - 76x + 76x +
        if (missing(mapping)) {
    87 - 46x + 46x +
          mapping <- list(global_filters = all_slice_id)
    @@ -8587,14 +8889,16 @@

    teal coverage - 69.63%

    89 - 76x + 76x +
        if (!module_specific) {
    90 - 71x + 71x +
          mapping[setdiff(names(mapping), "global_filters")] <- NULL
    @@ -8615,42 +8919,48 @@

    teal coverage - 69.63%

    93 - 76x + 76x +
        failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
    94 - 76x + 76x +
        if (length(failed_slice_id)) {
    95 - 1x + 1x +
          stop(sprintf(
    96 - 1x + 1x +
            "Filters in mapping don't match any available filter.\n %s not in %s",
    97 - 1x + 1x +
            toString(failed_slice_id),
    98 - 1x + 1x +
            toString(all_slice_id)
    @@ -8678,7 +8988,8 @@

    teal coverage - 69.63%

    102 - 75x + 75x +
        tss <- teal.slice::teal_slices(
    @@ -8692,28 +9003,32 @@

    teal coverage - 69.63%

    104 - 75x + 75x +
          exclude_varnames = exclude_varnames,
    105 - 75x + 75x +
          include_varnames = include_varnames,
    106 - 75x + 75x +
          count_type = count_type,
    107 - 75x + 75x +
          allow_add = allow_add
    @@ -8727,35 +9042,40 @@

    teal coverage - 69.63%

    109 - 75x + 75x +
        attr(tss, "mapping") <- mapping
    110 - 75x + 75x +
        attr(tss, "module_specific") <- module_specific
    111 - 75x + 75x +
        attr(tss, "app_id") <- app_id
    112 - 75x + 75x +
        class(tss) <- c("modules_teal_slices", class(tss))
    113 - 75x + 75x +
        tss
    @@ -8825,14 +9145,16 @@

    teal coverage - 69.63%

    123 - 10x + 10x +
      checkmate::assert_list(x)
    124 - 10x + 10x +
      lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
    @@ -8846,21 +9168,24 @@

    teal coverage - 69.63%

    126 - 10x + 10x +
      attrs <- attributes(unclass(x))
    127 - 10x + 10x +
      ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
    128 - 10x + 10x +
      do.call(teal_slices, c(ans, attrs))
    @@ -9112,28 +9437,32 @@

    teal coverage - 69.63%

    164 - 1x + 1x +
      checkmate::assert_class(filter, "teal_slices")
    165 - 1x + 1x +
      shiny::isolate({
    166 - 1x + 1x +
        filter_copy <- lapply(filter, function(slice) {
    167 - 2x + 2x +
          teal.slice::as.teal_slice(as.list(slice))
    @@ -9147,14 +9476,16 @@

    teal coverage - 69.63%

    169 - 1x + 1x +
        attributes(filter_copy) <- attributes(filter)
    170 - 1x + 1x +
        filter_copy
    @@ -9930,14 +10261,16 @@

    teal coverage - 69.63%

    108 - 36x + 36x +
      dots <- list(...)
    109 - 2x + 2x +
      if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
    @@ -9951,21 +10284,24 @@

    teal coverage - 69.63%

    111 - 34x + 34x +
      messages <- extract_validator(dots, header)
    112 - 34x + 34x +
      failings <- if (!any_names(dots)) {
    113 - 29x + 29x +
        add_header(messages, header)
    @@ -9979,7 +10315,8 @@

    teal coverage - 69.63%

    115 - 5x + 5x +
        unlist(messages)
    @@ -10000,7 +10337,8 @@

    teal coverage - 69.63%

    118 - 34x + 34x +
      shiny::validate(shiny::need(is.null(failings), failings))
    @@ -10070,7 +10408,8 @@

    teal coverage - 69.63%

    128 - 118x + 118x +
      all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
    @@ -10133,7 +10472,8 @@

    teal coverage - 69.63%

    137 - 49x + 49x +
      x$.__enclos_env__$private$enabled
    @@ -10189,14 +10529,16 @@

    teal coverage - 69.63%

    145 - 113x + 113x +
      if (inherits(iv, "InputValidator")) {
    146 - 49x + 49x +
        add_header(gather_messages(iv), header)
    @@ -10210,14 +10552,16 @@

    teal coverage - 69.63%

    148 - 58x + 58x +
        if (is.null(names(iv))) names(iv) <- rep("", length(iv))
    149 - 64x + 64x +
        mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
    @@ -10280,28 +10624,32 @@

    teal coverage - 69.63%

    158 - 49x + 49x +
      if (validator_enabled(iv)) {
    159 - 46x + 46x +
        status <- iv$validate()
    160 - 46x + 46x +
        failing_inputs <- Filter(Negate(is.null), status)
    161 - 46x + 46x +
        unique(lapply(failing_inputs, function(x) x[["message"]]))
    @@ -10315,14 +10663,16 @@

    teal coverage - 69.63%

    163 - 3x + 3x +
        warning("Validator is disabled and will be omitted.")
    164 - 3x + 3x +
        list()
    @@ -10378,21 +10728,24 @@

    teal coverage - 69.63%

    172 - 78x + 78x +
      ans <- unlist(messages)
    173 - 78x + 78x +
      if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
    174 - 31x + 31x +
        ans <- c(paste0(header, "\n"), ans, "\n")
    @@ -10406,7 +10759,8 @@

    teal coverage - 69.63%

    176 - 78x + 78x +
      ans
    @@ -10455,21 +10809,24 @@

    teal coverage - 69.63%

    183 - 103x + 103x +
      any(
    184 - 103x + 103x +
        if (is.list(x)) {
    185 - 58x + 58x +
          if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
    @@ -10483,7 +10840,8 @@

    teal coverage - 69.63%

    187 - 40x + 40x +
          FALSE
    @@ -11252,42 +11610,48 @@

    teal coverage - 69.63%

    106 - 6x + 6x +
      checkmate::assert_character(id)
    107 - 6x + 6x +
      checkmate::assert_true(is.reactive(slices_global))
    108 - 6x + 6x +
      checkmate::assert_class(isolate(slices_global()), "teal_slices")
    109 - 6x + 6x +
      checkmate::assert_true(is.reactive(mapping_matrix))
    110 - 6x + 6x +
      checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
    111 - 6x + 6x +
      checkmate::assert_list(filtered_data_list, types = "FilteredData", any.missing = FALSE, names = "named")
    @@ -11301,14 +11665,16 @@

    teal coverage - 69.63%

    113 - 6x + 6x +
      moduleServer(id, function(input, output, session) {
    114 - 6x + 6x +
        ns <- session$ns
    @@ -11329,28 +11695,32 @@

    teal coverage - 69.63%

    117 - 6x + 6x +
        filter <- isolate(slices_global())
    118 - 6x + 6x +
        snapshot_history <- reactiveVal({
    119 - 6x + 6x +
          list(
    120 - 6x + 6x +
            "Initial application state" = as.list(filter, recursive = TRUE)
    @@ -11392,7 +11762,8 @@

    teal coverage - 69.63%

    126 - 6x + 6x +
        observeEvent(input$snapshot_add, {
    @@ -11483,7 +11854,8 @@

    teal coverage - 69.63%

    139 - 6x + 6x +
        observeEvent(input$snapshot_name_accept, {
    @@ -11679,7 +12051,8 @@

    teal coverage - 69.63%

    167 - 6x + 6x +
        observeEvent(input$snapshot_load, {
    @@ -11805,7 +12178,8 @@

    teal coverage - 69.63%

    185 - 6x + 6x +
        observeEvent(input$snaphot_file_accept, {
    @@ -12155,7 +12529,8 @@

    teal coverage - 69.63%

    235 - 6x + 6x +
        observeEvent(input$snapshot_reset, {
    @@ -12323,21 +12698,24 @@

    teal coverage - 69.63%

    259 - 6x + 6x +
        observers <- reactiveValues()
    260 - 6x + 6x +
        handlers <- reactiveValues()
    261 - 6x + 6x +
        divs <- reactiveValues()
    @@ -12351,14 +12729,16 @@

    teal coverage - 69.63%

    263 - 6x + 6x +
        observeEvent(snapshot_history(), {
    264 - 2x + 2x +
          lapply(names(snapshot_history())[-1L], function(s) {
    @@ -12729,42 +13109,48 @@

    teal coverage - 69.63%

    317 - 6x + 6x +
        output$snapshot_list <- renderUI({
    318 - 2x + 2x +
          rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
    319 - 2x + 2x +
          if (length(rows) == 0L) {
    320 - 2x + 2x +
            div(
    321 - 2x + 2x +
              class = "snapshot_manager_placeholder",
    322 - 2x + 2x +
              "Snapshots will appear here."
    @@ -13449,7 +13835,8 @@

    teal coverage - 69.63%

    52 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -13463,7 +13850,8 @@

    teal coverage - 69.63%

    54 - 7x + 7x +
      checkmate::assert_multi_class(splash_ui, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -13477,7 +13865,8 @@

    teal coverage - 69.63%

    56 - 7x + 7x +
      if (is.character(title)) {
    @@ -13498,7 +13887,8 @@

    teal coverage - 69.63%

    59 - 7x + 7x +
        validate_app_title_tag(title)
    @@ -13519,28 +13909,32 @@

    teal coverage - 69.63%

    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "header",
    64 - 7x + 7x +
        checkmate::check_string(header),
    65 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -13554,7 +13948,8 @@

    teal coverage - 69.63%

    67 - 7x + 7x +
      if (checkmate::test_string(header)) {
    @@ -13582,28 +13977,32 @@

    teal coverage - 69.63%

    71 - 7x + 7x +
      checkmate::assert(
    72 - 7x + 7x +
        .var.name = "footer",
    73 - 7x + 7x +
        checkmate::check_string(footer),
    74 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -13617,7 +14016,8 @@

    teal coverage - 69.63%

    76 - 7x + 7x +
      if (checkmate::test_string(footer)) {
    @@ -13645,7 +14045,8 @@

    teal coverage - 69.63%

    80 - 7x + 7x +
      ns <- NS(id)
    @@ -13666,7 +14067,8 @@

    teal coverage - 69.63%

    83 - 7x + 7x +
      splash_ui <- div(
    @@ -13680,7 +14082,8 @@

    teal coverage - 69.63%

    85 - 7x + 7x +
        id = ns("main_ui_container"),
    @@ -13701,7 +14104,8 @@

    teal coverage - 69.63%

    88 - 7x + 7x +
        div(splash_ui)
    @@ -13736,35 +14140,40 @@

    teal coverage - 69.63%

    93 - 7x + 7x +
      shiny_busy_message_panel <- conditionalPanel(
    94 - 7x + 7x +
        condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint: line_length.
    95 - 7x + 7x +
        div(
    96 - 7x + 7x +
          icon("arrows-rotate", "spin fa-spin"),
    97 - 7x + 7x +
          "Computing ...",
    @@ -13778,7 +14187,8 @@

    teal coverage - 69.63%

    99 - 7x + 7x +
          class = "shinybusymessage"
    @@ -13806,98 +14216,112 @@

    teal coverage - 69.63%

    103 - 7x + 7x +
      fluidPage(
    104 - 7x + 7x +
        title = title,
    105 - 7x + 7x +
        theme = get_teal_bs_theme(),
    106 - 7x + 7x +
        include_teal_css_js(),
    107 - 7x + 7x +
        tags$header(header),
    108 - 7x + 7x +
        tags$hr(class = "my-2"),
    109 - 7x + 7x +
        shiny_busy_message_panel,
    110 - 7x + 7x +
        splash_ui,
    111 - 7x + 7x +
        tags$hr(),
    112 - 7x + 7x +
        tags$footer(
    113 - 7x + 7x +
          div(
    114 - 7x + 7x +
            footer,
    115 - 7x + 7x +
            teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
    116 - 7x + 7x +
            textOutput(ns("identifier"))
    @@ -13960,21 +14384,24 @@

    teal coverage - 69.63%

    125 - 19x + 19x +
      stopifnot(is.reactive(teal_data_rv))
    126 - 18x + 18x +
      moduleServer(id, function(input, output, session) {
    127 - 18x + 18x +
        logger::log_trace("srv_teal initializing the module.")
    @@ -13988,14 +14415,16 @@

    teal coverage - 69.63%

    129 - 18x + 18x +
        output$identifier <- renderText(
    130 - 18x + 18x +
          paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
    @@ -14016,28 +14445,32 @@

    teal coverage - 69.63%

    133 - 18x + 18x +
        teal.widgets::verbatim_popup_srv(
    134 - 18x + 18x +
          "sessionInfo",
    135 - 18x + 18x +
          verbatim_content = utils::capture.output(utils::sessionInfo()),
    136 - 18x + 18x +
          title = "SessionInfo"
    @@ -14065,7 +14498,8 @@

    teal coverage - 69.63%

    140 - 18x + 18x +
        run_js_files(files = "init.js")
    @@ -14100,35 +14534,40 @@

    teal coverage - 69.63%

    145 - 18x + 18x +
        get_client_timezone(session$ns)
    146 - 18x + 18x +
        observeEvent(
    147 - 18x + 18x +
          eventExpr = input$timezone,
    148 - 18x + 18x +
          once = TRUE,
    149 - 18x + 18x +
          handlerExpr = {
    @@ -14170,14 +14609,16 @@

    teal coverage - 69.63%

    155 - 18x + 18x +
        reporter <- teal.reporter::Reporter$new()
    156 - 18x + 18x +
        if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
    @@ -14205,28 +14646,32 @@

    teal coverage - 69.63%

    160 - 18x + 18x +
        env <- environment()
    161 - 18x + 18x +
        datasets_reactive <- eventReactive(teal_data_rv(), {
    162 - 4x + 4x +
          env$progress <- shiny::Progress$new(session)
    163 - 4x + 4x +
          env$progress$set(0.25, message = "Setting data")
    @@ -14247,7 +14692,8 @@

    teal coverage - 69.63%

    166 - 4x + 4x +
          modules_datasets(teal_data_rv(), modules, filter, teal_data_to_filtered_data(teal_data_rv()))
    @@ -14310,7 +14756,8 @@

    teal coverage - 69.63%

    175 - 18x + 18x +
        observeEvent(datasets_reactive(), once = TRUE, {
    @@ -15394,21 +15841,24 @@

    teal coverage - 69.63%

    119 - 50x + 50x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    120 - 50x + 50x +
      checkmate::assert_class(reporter, "Reporter")
    121 - 49x + 49x +
      UseMethod("srv_nested_tabs", modules)
    @@ -15506,7 +15956,8 @@

    teal coverage - 69.63%

    135 - 22x + 22x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    @@ -15520,14 +15971,16 @@

    teal coverage - 69.63%

    137 - 22x + 22x +
      moduleServer(id = id, module = function(input, output, session) {
    138 - 22x + 22x +
        logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
    @@ -15541,70 +15994,80 @@

    teal coverage - 69.63%

    140 - 22x + 22x +
        labels <- vapply(modules$children, `[[`, character(1), "label")
    141 - 22x + 22x +
        modules_reactive <- sapply(
    142 - 22x + 22x +
          names(modules$children),
    143 - 22x + 22x +
          function(module_id) {
    144 - 33x + 33x +
            srv_nested_tabs(
    145 - 33x + 33x +
              id = module_id,
    146 - 33x + 33x +
              datasets = datasets[[labels[module_id]]],
    147 - 33x + 33x +
              modules = modules$children[[module_id]],
    148 - 33x + 33x +
              is_module_specific = is_module_specific,
    149 - 33x + 33x +
              reporter = reporter
    @@ -15625,7 +16088,8 @@

    teal coverage - 69.63%

    152 - 22x + 22x +
          simplify = FALSE
    @@ -15653,21 +16117,24 @@

    teal coverage - 69.63%

    156 - 22x + 22x +
        input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
    157 - 22x + 22x +
        get_active_module <- reactive({
    158 - 12x + 12x +
          if (length(modules$children) == 1L) {
    @@ -15681,7 +16148,8 @@

    teal coverage - 69.63%

    160 - 1x + 1x +
            modules_reactive[[1]]()
    @@ -15702,7 +16170,8 @@

    teal coverage - 69.63%

    163 - 11x + 11x +
            modules_reactive[[input_validated()]]()
    @@ -15730,7 +16199,8 @@

    teal coverage - 69.63%

    167 - 22x + 22x +
        get_active_module
    @@ -15786,14 +16256,16 @@

    teal coverage - 69.63%

    175 - 27x + 27x +
      checkmate::assert_class(datasets, "FilteredData")
    176 - 27x + 27x +
      logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
    @@ -15807,14 +16279,16 @@

    teal coverage - 69.63%

    178 - 27x + 27x +
      moduleServer(id = id, module = function(input, output, session) {
    179 - 27x + 27x +
        if (!is.null(modules$datanames) && is_module_specific) {
    @@ -15870,35 +16344,40 @@

    teal coverage - 69.63%

    187 - 27x + 27x +
        trigger_data <- reactiveVal(1L)
    188 - 27x + 27x +
        trigger_module <- reactiveVal(NULL)
    189 - 27x + 27x +
        output$data_reactive <- renderUI({
    190 - 17x + 17x +
          lapply(datasets$datanames(), function(x) {
    191 - 21x + 21x +
            datasets$get_data(x, filtered = TRUE)
    @@ -15912,14 +16391,16 @@

    teal coverage - 69.63%

    193 - 17x + 17x +
          isolate(trigger_data(trigger_data() + 1))
    194 - 17x + 17x +
          isolate(trigger_module(TRUE))
    @@ -15933,7 +16414,8 @@

    teal coverage - 69.63%

    196 - 17x + 17x +
          NULL
    @@ -15961,14 +16443,16 @@

    teal coverage - 69.63%

    200 - 27x + 27x +
        args <- c(list(id = "module"), modules$server_args)
    201 - 27x + 27x +
        if (is_arg_used(modules$server, "reporter")) {
    @@ -15996,14 +16480,16 @@

    teal coverage - 69.63%

    205 - 27x + 27x +
        if (is_arg_used(modules$server, "datasets")) {
    206 - 1x + 1x +
          args <- c(args, datasets = datasets)
    @@ -16024,21 +16510,24 @@

    teal coverage - 69.63%

    209 - 27x + 27x +
        if (is_arg_used(modules$server, "data")) {
    210 - 7x + 7x +
          data <- eventReactive(trigger_data(), .datasets_to_data(modules, datasets))
    211 - 7x + 7x +
          args <- c(args, data = list(data))
    @@ -16059,21 +16548,24 @@

    teal coverage - 69.63%

    214 - 27x + 27x +
        if (is_arg_used(modules$server, "filter_panel_api")) {
    215 - 2x + 2x +
          filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
    216 - 2x + 2x +
          args <- c(args, filter_panel_api = filter_panel_api)
    @@ -16101,49 +16593,56 @@

    teal coverage - 69.63%

    220 - 27x + 27x +
        observeEvent(
    221 - 27x + 27x +
          ignoreNULL = TRUE,
    222 - 27x + 27x +
          once = TRUE,
    223 - 27x + 27x +
          eventExpr = trigger_module(),
    224 - 27x + 27x +
          handlerExpr = {
    225 - 17x + 17x +
            module_output <- if (is_arg_used(modules$server, "id")) {
    226 - 17x + 17x +
              do.call(modules$server, args)
    @@ -16192,7 +16691,8 @@

    teal coverage - 69.63%

    233 - 27x + 27x +
        reactive(modules)
    @@ -16311,14 +16811,16 @@

    teal coverage - 69.63%

    250 - 4x + 4x +
      checkmate::assert_class(module, "teal_module")
    251 - 4x + 4x +
      checkmate::assert_class(datasets, "FilteredData")
    @@ -16332,14 +16834,16 @@

    teal coverage - 69.63%

    253 - 4x + 4x +
      datanames <- if (is.null(module$datanames) || identical(module$datanames, "all")) {
    254 - 1x + 1x +
        datasets$datanames()
    @@ -16353,21 +16857,24 @@

    teal coverage - 69.63%

    256 - 3x + 3x +
        include_parent_datanames(
    257 - 3x + 3x +
          module$datanames,
    258 - 3x + 3x +
          datasets$get_join_keys()
    @@ -16402,7 +16909,8 @@

    teal coverage - 69.63%

    263 - 4x + 4x +
      data <- sapply(datanames, function(x) datasets$get_data(x, filtered = TRUE), simplify = FALSE)
    @@ -16416,7 +16924,8 @@

    teal coverage - 69.63%

    265 - 4x + 4x +
      hashes <- calculate_hashes(datanames, datasets)
    @@ -16430,28 +16939,32 @@

    teal coverage - 69.63%

    267 - 4x + 4x +
      code <- c(
    268 - 4x + 4x +
        get_rcode_str_install(),
    269 - 4x + 4x +
        get_rcode_libraries(),
    270 - 4x + 4x +
        get_datasets_code(datanames, datasets, hashes)
    @@ -16479,21 +16992,24 @@

    teal coverage - 69.63%

    274 - 4x + 4x +
      data <- do.call(
    275 - 4x + 4x +
        teal.data::teal_data,
    276 - 4x + 4x +
        args = c(data, code = list(code), join_keys = list(datasets$get_join_keys()[datanames]))
    @@ -16514,14 +17030,16 @@

    teal coverage - 69.63%

    279 - 4x + 4x +
      data@verified <- attr(datasets, "verification_status")
    280 - 4x + 4x +
      data
    @@ -16605,7 +17123,8 @@

    teal coverage - 69.63%

    292 - 7x + 7x +
      sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
    @@ -17164,28 +17683,32 @@

    teal coverage - 69.63%

    78 - 5x + 5x +
      checkmate::assert_class(modules, "teal_modules")
    79 - 5x + 5x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    80 - 5x + 5x +
      checkmate::assert_class(reporter, "Reporter")
    81 - 3x + 3x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -17199,14 +17722,16 @@

    teal coverage - 69.63%

    83 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    84 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initializing the module.")
    @@ -17220,14 +17745,16 @@

    teal coverage - 69.63%

    86 - 3x + 3x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    87 - 3x + 3x +
        manager_out <- filter_manager_modal_srv("filter_manager", filtered_data_list = datasets, filter = filter)
    @@ -17241,42 +17768,48 @@

    teal coverage - 69.63%

    89 - 3x + 3x +
        active_module <- srv_nested_tabs(
    90 - 3x + 3x +
          id = "root",
    91 - 3x + 3x +
          datasets = datasets,
    92 - 3x + 3x +
          modules = modules,
    93 - 3x + 3x +
          reporter = reporter,
    94 - 3x + 3x +
          is_module_specific = is_module_specific
    @@ -17297,21 +17830,24 @@

    teal coverage - 69.63%

    97 - 3x + 3x +
        if (!is_module_specific) {
    98 - 3x + 3x +
          active_datanames <- reactive({
    99 - 6x + 6x +
            if (identical(active_module()$datanames, "all")) {
    @@ -17332,21 +17868,24 @@

    teal coverage - 69.63%

    102 - 5x + 5x +
              include_parent_datanames(
    103 - 5x + 5x +
                active_module()$datanames,
    104 - 5x + 5x +
                singleton$get_join_keys()
    @@ -17374,14 +17913,16 @@

    teal coverage - 69.63%

    108 - 3x + 3x +
          singleton <- unlist(datasets)[[1]]
    109 - 3x + 3x +
          singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
    @@ -17395,28 +17936,32 @@

    teal coverage - 69.63%

    111 - 3x + 3x +
          observeEvent(
    112 - 3x + 3x +
            eventExpr = active_datanames(),
    113 - 3x + 3x +
            handlerExpr = {
    114 - 4x + 4x +
              script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
    @@ -17451,7 +17996,8 @@

    teal coverage - 69.63%

    119 - 4x + 4x +
                "handleActiveDatasetsPresent();"
    @@ -17465,7 +18011,8 @@

    teal coverage - 69.63%

    121 - 4x + 4x +
              shinyjs::runjs(script)
    @@ -17479,7 +18026,8 @@

    teal coverage - 69.63%

    123 - 3x + 3x +
            ignoreNULL = FALSE
    @@ -17507,14 +18055,16 @@

    teal coverage - 69.63%

    127 - 3x + 3x +
        showNotification("Data loaded - App fully started up")
    128 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initialized the module")
    @@ -17528,7 +18078,8 @@

    teal coverage - 69.63%

    130 - 3x + 3x +
        active_module
    @@ -17968,42 +18519,48 @@

    teal coverage - 69.63%

    60 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    61 - 7x + 7x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "title",
    64 - 7x + 7x +
        checkmate::check_string(title),
    65 - 7x + 7x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18017,28 +18574,32 @@

    teal coverage - 69.63%

    67 - 7x + 7x +
      checkmate::assert(
    68 - 7x + 7x +
        .var.name = "header",
    69 - 7x + 7x +
        checkmate::check_string(header),
    70 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18052,28 +18613,32 @@

    teal coverage - 69.63%

    72 - 7x + 7x +
      checkmate::assert(
    73 - 7x + 7x +
        .var.name = "footer",
    74 - 7x + 7x +
        checkmate::check_string(footer),
    75 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18094,7 +18659,8 @@

    teal coverage - 69.63%

    78 - 7x + 7x +
      ns <- NS(id)
    @@ -18136,28 +18702,32 @@

    teal coverage - 69.63%

    84 - 7x + 7x +
      splash_ui <- if (inherits(data, "teal_data_module")) {
    85 - 1x + 1x +
        data$ui(ns("teal_data_module"))
    86 - 7x + 7x +
      } else if (inherits(data, "teal_data")) {
    87 - 6x + 6x +
        div()
    @@ -18171,42 +18741,48 @@

    teal coverage - 69.63%

    89 - 7x + 7x +
      ui_teal(
    90 - 7x + 7x +
        id = ns("teal"),
    91 - 7x + 7x +
        splash_ui = div(splash_ui, uiOutput(ns("error"))),
    92 - 7x + 7x +
        title = title,
    93 - 7x + 7x +
        header = header,
    94 - 7x + 7x +
        footer = footer
    @@ -18255,28 +18831,32 @@

    teal coverage - 69.63%

    101 - 15x + 15x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    102 - 15x + 15x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    103 - 15x + 15x +
      checkmate::assert_class(modules, "teal_modules")
    104 - 15x + 15x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -18290,14 +18870,16 @@

    teal coverage - 69.63%

    106 - 15x + 15x +
      moduleServer(id, function(input, output, session) {
    107 - 15x + 15x +
        logger::log_trace("srv_teal_with_splash initializing module with data.")
    @@ -18311,7 +18893,8 @@

    teal coverage - 69.63%

    109 - 15x + 15x +
        if (getOption("teal.show_js_log", default = FALSE)) {
    @@ -18353,28 +18936,32 @@

    teal coverage - 69.63%

    115 - 15x + 15x +
        teal_data_rv <- if (inherits(data, "teal_data_module")) {
    116 - 10x + 10x +
          data <- data$server(id = "teal_data_module")
    117 - 10x + 10x +
          if (!is.reactive(data)) {
    118 - 1x + 1x +
            stop("The `teal_data_module` passed to `data` must return a reactive expression.", call. = FALSE)
    @@ -18388,21 +18975,24 @@

    teal coverage - 69.63%

    120 - 9x + 9x +
          data
    121 - 15x + 15x +
        } else if (inherits(data, "teal_data")) {
    122 - 5x + 5x +
          reactiveVal(data)
    @@ -18423,7 +19013,8 @@

    teal coverage - 69.63%

    125 - 14x + 14x +
        teal_data_rv_validate <- reactive({
    @@ -18437,7 +19028,8 @@

    teal coverage - 69.63%

    127 - 11x + 11x +
          data <- tryCatch(teal_data_rv(), error = function(e) e)
    @@ -18458,7 +19050,8 @@

    teal coverage - 69.63%

    130 - 11x + 11x +
          if (inherits(data, "shiny.silent.error") && identical(data$message, "")) {
    @@ -18493,56 +19086,64 @@

    teal coverage - 69.63%

    135 - 11x + 11x +
          if (inherits(data, "qenv.error")) {
    136 - 2x + 2x +
            validate(
    137 - 2x + 2x +
              need(
    138 - 2x + 2x +
                FALSE,
    139 - 2x + 2x +
                paste(
    140 - 2x + 2x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    141 - 2x + 2x +
                  paste(data$message, collapse = "\n"),
    142 - 2x + 2x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -18591,56 +19192,64 @@

    teal coverage - 69.63%

    149 - 9x + 9x +
          if (inherits(data, "error")) {
    150 - 1x + 1x +
            validate(
    151 - 1x + 1x +
              need(
    152 - 1x + 1x +
                FALSE,
    153 - 1x + 1x +
                paste(
    154 - 1x + 1x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    155 - 1x + 1x +
                  paste(data$message, collpase = "\n"),
    156 - 1x + 1x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -18682,56 +19291,64 @@

    teal coverage - 69.63%

    162 - 8x + 8x +
          validate(
    163 - 8x + 8x +
            need(
    164 - 8x + 8x +
              inherits(data, "teal_data"),
    165 - 8x + 8x +
              paste(
    166 - 8x + 8x +
                "Error: `teal_data_module` passed to `data` failed to return `teal_data` object, returned",
    167 - 8x + 8x +
                toString(sQuote(class(data))),
    168 - 8x + 8x +
                "instead.",
    169 - 8x + 8x +
                "\n Check your inputs or contact app developer if error persists."
    @@ -18766,14 +19383,16 @@

    teal coverage - 69.63%

    174 - 5x + 5x +
          if (!length(teal.data::datanames(data))) {
    175 - 1x + 1x +
            warning("`data` object has no datanames. Default datanames are set using `teal_data`'s environment.")
    @@ -18794,21 +19413,24 @@

    teal coverage - 69.63%

    178 - 5x + 5x +
          is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    179 - 5x + 5x +
          if (!isTRUE(is_modules_ok)) {
    180 - 1x + 1x +
            validate(need(isTRUE(is_modules_ok), sprintf("%s. Contact app developer.", is_modules_ok)))
    @@ -18829,42 +19451,48 @@

    teal coverage - 69.63%

    183 - 4x + 4x +
          is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    184 - 4x + 4x +
          if (!isTRUE(is_filter_ok)) {
    185 - 1x + 1x +
            showNotification(
    186 - 1x + 1x +
              "Some filters were not applied because of incompatibility with data. Contact app developer.",
    187 - 1x + 1x +
              type = "warning",
    188 - 1x + 1x +
              duration = 10
    @@ -18878,7 +19506,8 @@

    teal coverage - 69.63%

    190 - 1x + 1x +
            warning(is_filter_ok)
    @@ -18899,7 +19528,8 @@

    teal coverage - 69.63%

    193 - 4x + 4x +
          teal_data_rv()
    @@ -18920,7 +19550,8 @@

    teal coverage - 69.63%

    196 - 14x + 14x +
        output$error <- renderUI({
    @@ -18962,14 +19593,16 @@

    teal coverage - 69.63%

    202 - 14x + 14x +
        res <- srv_teal(id = "teal", modules = modules, teal_data_rv = teal_data_rv_validate, filter = filter)
    203 - 14x + 14x +
        logger::log_trace("srv_teal_with_splash initialized module with data.")
    @@ -18983,7 +19616,8 @@

    teal coverage - 69.63%

    205 - 14x + 14x +
        res
    @@ -19108,21 +19742,24 @@

    teal coverage - 69.63%

    15 - 18x + 18x +
      script <- sprintf(
    16 - 18x + 18x +
        "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
    17 - 18x + 18x +
        ns("timezone")
    @@ -19136,14 +19773,16 @@

    teal coverage - 69.63%

    19 - 18x + 18x +
      shinyjs::runjs(script) # function does not return anything
    20 - 18x + 18x +
      invisible(NULL)
    @@ -19192,42 +19831,48 @@

    teal coverage - 69.63%

    27 - 11x + 11x +
      bs_theme <- getOption("teal.bs_theme")
    28 - 11x + 11x +
      if (is.null(bs_theme)) {
    29 - 8x + 8x +
        NULL
    30 - 3x + 3x +
      } else if (!inherits(bs_theme, "bs_theme")) {
    31 - 2x + 2x +
        warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
    32 - 2x + 2x +
        NULL
    @@ -19241,7 +19886,8 @@

    teal coverage - 69.63%

    34 - 1x + 1x +
        bs_theme
    @@ -19297,42 +19943,48 @@

    teal coverage - 69.63%

    42 - 15x + 15x +
      parents <- character(0)
    43 - 15x + 15x +
      for (i in dataname) {
    44 - 22x + 22x +
        while (length(i) > 0) {
    45 - 24x + 24x +
          parent_i <- teal.data::parent(join_keys, i)
    46 - 24x + 24x +
          parents <- c(parent_i, parents)
    47 - 24x + 24x +
          i <- parent_i
    @@ -19360,7 +20012,8 @@

    teal coverage - 69.63%

    51 - 15x + 15x +
      unique(c(parents, dataname))
    @@ -19444,14 +20097,16 @@

    teal coverage - 69.63%

    63 - 18x + 18x +
      checkmate::assert_class(x, "teal_data")
    64 - 18x + 18x +
      checkmate::assert_character(datanames, min.chars = 1L, any.missing = FALSE)
    @@ -19465,21 +20120,24 @@

    teal coverage - 69.63%

    66 - 18x + 18x +
      ans <- teal.slice::init_filtered_data(
    67 - 18x + 18x +
        x = sapply(datanames, function(dn) x[[dn]], simplify = FALSE),
    68 - 18x + 18x +
        join_keys = teal.data::join_keys(x)
    @@ -19500,21 +20158,24 @@

    teal coverage - 69.63%

    71 - 18x + 18x +
      attr(ans, "preprocessing_code") <- teal.data::get_code(x, datanames = datanames, check_names = FALSE)
    72 - 18x + 18x +
      attr(ans, "verification_status") <- x@verified
    73 - 18x + 18x +
      ans
    @@ -19647,35 +20308,40 @@

    teal coverage - 69.63%

    92 - 2x + 2x +
      checkmate::assert_string(title)
    93 - 2x + 2x +
      checkmate::assert_string(label)
    94 - 2x + 2x +
      checkmate::assert_string(description, null.ok = TRUE)
    95 - 2x + 2x +
      checkmate::assert_flag(with_filter)
    96 - 2x + 2x +
      checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
    @@ -19689,49 +20355,56 @@

    teal coverage - 69.63%

    98 - 2x + 2x +
      card <- teal::TealReportCard$new()
    99 - 2x + 2x +
      title <- if (label == "") title else label
    100 - 2x + 2x +
      card$set_name(title)
    101 - 2x + 2x +
      card$append_text(title, "header2")
    102 - 1x + 1x +
      if (!is.null(description)) card$append_text(description, "header3")
    103 - 1x + 1x +
      if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
    104 - 2x + 2x +
      card
    @@ -19836,14 +20509,16 @@

    teal coverage - 69.63%

    119 - 12x + 12x +
      checkmate::assert_class(modules, "teal_modules")
    120 - 12x + 12x +
      checkmate::assert_character(datanames)
    @@ -19857,7 +20532,8 @@

    teal coverage - 69.63%

    122 - 12x + 12x +
      recursive_check_datanames <- function(modules, datanames) {
    @@ -19871,14 +20547,16 @@

    teal coverage - 69.63%

    124 - 26x + 26x +
        if (inherits(modules, "teal_modules")) {
    125 - 12x + 12x +
          sapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
    @@ -19892,49 +20570,56 @@

    teal coverage - 69.63%

    127 - 14x + 14x +
          extra_datanames <- setdiff(modules$datanames, c("all", datanames))
    128 - 14x + 14x +
          if (length(extra_datanames)) {
    129 - 2x + 2x +
            sprintf(
    130 - 2x + 2x +
              "- Module '%s' uses datanames not available in 'data': (%s) not in (%s)",
    131 - 2x + 2x +
              modules$label,
    132 - 2x + 2x +
              toString(dQuote(extra_datanames, q = FALSE)),
    133 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -19969,21 +20654,24 @@

    teal coverage - 69.63%

    138 - 12x + 12x +
      check_datanames <- unlist(recursive_check_datanames(modules, datanames))
    139 - 12x + 12x +
      if (length(check_datanames)) {
    140 - 2x + 2x +
        paste(check_datanames, collapse = "\n")
    @@ -19997,7 +20685,8 @@

    teal coverage - 69.63%

    142 - 10x + 10x +
        TRUE
    @@ -20102,14 +20791,16 @@

    teal coverage - 69.63%

    157 - 10x + 10x +
      checkmate::assert_class(filters, "teal_slices")
    158 - 10x + 10x +
      checkmate::assert_character(datanames)
    @@ -20130,63 +20821,72 @@

    teal coverage - 69.63%

    161 - 10x + 10x +
      out <- unlist(sapply(
    162 - 10x + 10x +
        filters, function(filter) {
    163 - 3x + 3x +
          dataname <- shiny::isolate(filter$dataname)
    164 - 3x + 3x +
          if (!dataname %in% datanames) {
    165 - 2x + 2x +
            sprintf(
    166 - 2x + 2x +
              "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
    167 - 2x + 2x +
              shiny::isolate(filter$id),
    168 - 2x + 2x +
              dQuote(dataname, q = FALSE),
    169 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -20235,14 +20935,16 @@

    teal coverage - 69.63%

    176 - 10x + 10x +
      if (length(out)) {
    177 - 2x + 2x +
        paste(out, collapse = "\n")
    @@ -20256,7 +20958,8 @@

    teal coverage - 69.63%

    179 - 8x + 8x +
        TRUE
    @@ -20375,28 +21078,32 @@

    teal coverage - 69.63%

    196 - 15x + 15x +
      checkmate::assert_class(data, "teal_data")
    197 - 15x + 15x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    198 - 15x + 15x +
      checkmate::assert_class(filters, "modules_teal_slices")
    199 - 15x + 15x +
      checkmate::assert_r6(filtered_data_singleton, "FilteredData")
    @@ -20410,7 +21117,8 @@

    teal coverage - 69.63%

    201 - 15x + 15x +
      if (!isTRUE(attr(filters, "module_specific"))) {
    @@ -20424,14 +21132,16 @@

    teal coverage - 69.63%

    203 - 3x + 3x +
        slices <- shiny::isolate({
    204 - 3x + 3x +
          Filter(function(x) x$id %in% attr(filters, "mapping")$global_filters, filters)
    @@ -20445,14 +21155,16 @@

    teal coverage - 69.63%

    206 - 3x + 3x +
        filtered_data_singleton$set_filter_state(slices)
    207 - 3x + 3x +
        return(modules_structure(modules, filtered_data_singleton))
    @@ -20473,7 +21185,8 @@

    teal coverage - 69.63%

    210 - 12x + 12x +
      if (inherits(modules, "teal_module")) {
    @@ -20487,35 +21200,40 @@

    teal coverage - 69.63%

    212 - 7x + 7x +
        datanames <-
    213 - 7x + 7x +
          if (is.null(modules$datanames) || identical(modules$datanames, "all")) {
    214 - 4x + 4x +
            include_parent_datanames(
    215 - 4x + 4x +
              teal_data_datanames(data),
    216 - 4x + 4x +
              teal.data::join_keys(data)
    @@ -20536,21 +21254,24 @@

    teal coverage - 69.63%

    219 - 3x + 3x +
            include_parent_datanames(
    220 - 3x + 3x +
              modules$datanames,
    221 - 3x + 3x +
              teal.data::join_keys(data)
    @@ -20578,35 +21299,40 @@

    teal coverage - 69.63%

    225 - 7x + 7x +
        slices <- shiny::isolate({
    226 - 7x + 7x +
          Filter(x = filters, f = function(x) {
    227 - 20x + 20x +
            x$dataname %in% datanames &&
    228 - 20x + 20x +
              (x$id %in% attr(filters, "mapping")$global_filters ||
    229 - 20x + 20x +
                x$id %in% unique(unlist(attr(filters, "mapping")[modules$label]))) # nolint: indentation_linter.
    @@ -20634,14 +21360,16 @@

    teal coverage - 69.63%

    233 - 7x + 7x +
        slices$include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
    234 - 7x + 7x +
        slices$exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
    @@ -20662,7 +21390,8 @@

    teal coverage - 69.63%

    237 - 7x + 7x +
        filtered_data <- teal_data_to_filtered_data(data, datanames)
    @@ -20676,7 +21405,8 @@

    teal coverage - 69.63%

    239 - 7x + 7x +
        filtered_data$set_filter_state(slices)
    @@ -20690,56 +21420,64 @@

    teal coverage - 69.63%

    241 - 7x + 7x +
        return(filtered_data)
    242 - 5x + 5x +
      } else if (inherits(modules, "teal_modules")) {
    243 - 5x + 5x +
        ans <- lapply(
    244 - 5x + 5x +
          modules$children,
    245 - 5x + 5x +
          modules_datasets,
    246 - 5x + 5x +
          data = data,
    247 - 5x + 5x +
          filters = filters,
    248 - 5x + 5x +
          filtered_data_singleton = filtered_data_singleton
    @@ -20753,7 +21491,8 @@

    teal coverage - 69.63%

    250 - 5x + 5x +
        names(ans) <- vapply(modules$children, `[[`, character(1), "label")
    @@ -20767,7 +21506,8 @@

    teal coverage - 69.63%

    252 - 5x + 5x +
        return(ans)
    @@ -20823,14 +21563,16 @@

    teal coverage - 69.63%

    260 - 13x + 13x +
      if (inherits(modules, "teal_module")) {
    261 - 8x + 8x +
        return(value)
    @@ -20844,21 +21586,24 @@

    teal coverage - 69.63%

    263 - 5x + 5x +
        stats::setNames(
    264 - 5x + 5x +
          lapply(modules$children, modules_structure, value),
    265 - 5x + 5x +
          vapply(modules$children, `[[`, character(1), "label")
    @@ -20949,21 +21694,24 @@

    teal coverage - 69.63%

    278 - 53x + 53x +
      checkmate::assert_class(data, "teal_data")
    279 - 53x + 53x +
      if (length(teal.data::datanames(data))) {
    280 - 47x + 47x +
        teal.data::datanames(data)
    @@ -20977,7 +21725,8 @@

    teal coverage - 69.63%

    282 - 6x + 6x +
        ls(teal.code::get_env(data), all.names = TRUE)
    @@ -21047,70 +21796,80 @@

    teal coverage - 69.63%

    292 - 14x + 14x +
      checkmate::assert_class(shiny_tag, "shiny.tag")
    293 - 14x + 14x +
      checkmate::assert_true(shiny_tag$name == "head")
    294 - 13x + 13x +
      child_names <- vapply(shiny_tag$children, `[[`, character(1L), "name")
    295 - 13x + 13x +
      checkmate::assert_subset(c("title", "link"), child_names, .var.name = "child tags")
    296 - 11x + 11x +
      rel_attr <- shiny_tag$children[[which(child_names == "link")]]$attribs$rel
    297 - 11x + 11x +
      checkmate::assert_subset(
    298 - 11x + 11x +
        rel_attr,
    299 - 11x + 11x +
        c("icon", "shortcut icon"),
    300 - 11x + 11x +
        .var.name = "Link tag's rel attribute",
    301 - 11x + 11x +
        empty.ok = FALSE
    @@ -21229,56 +21988,64 @@

    teal coverage - 69.63%

    318 - 11x + 11x +
      checkmate::assert_string(title, null.ok = TRUE)
    319 - 11x + 11x +
      checkmate::assert_string(favicon, null.ok = TRUE)
    320 - 11x + 11x +
      tags$head(
    321 - 11x + 11x +
        tags$title(title),
    322 - 11x + 11x +
        tags$link(
    323 - 11x + 11x +
          rel = "icon",
    324 - 11x + 11x +
          href = favicon,
    325 - 11x + 11x +
          sizes = "any"
    @@ -21418,14 +22185,16 @@

    teal coverage - 69.63%

    345 - 19x + 19x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    346 - 18x + 18x +
      checkmate::assert_class(modules, "teal_modules")
    @@ -21439,28 +22208,32 @@

    teal coverage - 69.63%

    348 - 17x + 17x +
      data <- if (inherits(data, "teal_data")) {
    349 - 15x + 15x +
        as.list(data@env)
    350 - 17x + 17x +
      } else if (inherits(data, "teal_data_module")) {
    351 - 2x + 2x +
        deparse1(body(data$server))
    @@ -21474,7 +22247,8 @@

    teal coverage - 69.63%

    353 - 17x + 17x +
      modules <- lapply(modules, defunction)
    @@ -21488,7 +22262,8 @@

    teal coverage - 69.63%

    355 - 17x + 17x +
      rlang::hash(list(data = data, modules = modules))
    @@ -21537,28 +22312,32 @@

    teal coverage - 69.63%

    362 - 186x + 186x +
      if (is.list(x)) {
    363 - 40x + 40x +
        lapply(x, defunction)
    364 - 146x + 146x +
      } else if (is.function(x)) {
    365 - 44x + 44x +
        deparse1(body(x))
    @@ -21572,7 +22351,8 @@

    teal coverage - 69.63%

    367 - 102x + 102x +
        x
    @@ -21788,14 +22568,16 @@

    teal coverage - 69.63%

    28 - 9x + 9x +
      checkmate::assert_class(tss, "teal_slices")
    29 - 9x + 9x +
      checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
    @@ -21809,7 +22591,8 @@

    teal coverage - 69.63%

    31 - 9x + 9x +
      cat(format(tss, trim_lines = FALSE), "\n", file = file)
    @@ -21858,7 +22641,8 @@

    teal coverage - 69.63%

    38 - 9x + 9x +
      checkmate::assert_file_exists(file, access = "r", extension = "json")
    @@ -21872,56 +22656,64 @@

    teal coverage - 69.63%

    40 - 9x + 9x +
      tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
    41 - 9x + 9x +
      tss_json$slices <-
    42 - 9x + 9x +
        lapply(tss_json$slices, function(slice) {
    43 - 9x + 9x +
          for (field in c("selected", "choices")) {
    44 - 18x + 18x +
            if (!is.null(slice[[field]])) {
    45 - 12x + 12x +
              if (length(slice[[field]]) > 0) {
    46 - 9x + 9x +
                date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
    47 - 9x + 9x +
                time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
    @@ -21935,35 +22727,40 @@

    teal coverage - 69.63%

    49 - 9x + 9x +
                slice[[field]] <-
    50 - 9x + 9x +
                  if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
    51 - 3x + 3x +
                    as.Date(slice[[field]])
    52 - 9x + 9x +
                  } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
    53 - 3x + 3x +
                    as.POSIXct(slice[[field]], tz = "UTC")
    @@ -21977,7 +22774,8 @@

    teal coverage - 69.63%

    55 - 3x + 3x +
                    slice[[field]]
    @@ -21998,7 +22796,8 @@

    teal coverage - 69.63%

    58 - 3x + 3x +
                slice[[field]] <- character(0)
    @@ -22026,7 +22825,8 @@

    teal coverage - 69.63%

    62 - 9x + 9x +
          slice
    @@ -22047,7 +22847,8 @@

    teal coverage - 69.63%

    65 - 9x + 9x +
      tss_elements <- lapply(tss_json$slices, as.teal_slice)
    @@ -22061,7 +22862,8 @@

    teal coverage - 69.63%

    67 - 9x + 9x +
      do.call(teal_slices, c(tss_elements, tss_json$attributes))
    @@ -22396,56 +23198,64 @@

    teal coverage - 69.63%

    46 - 17x + 17x +
      checkmate::assert_string(msg, null.ok = TRUE)
    47 - 15x + 15x +
      checkmate::assert_data_frame(x)
    48 - 15x + 15x +
      if (!is.null(min_nrow)) {
    49 - 15x + 15x +
        if (complete) {
    50 - 5x + 5x +
          complete_index <- stats::complete.cases(x)
    51 - 5x + 5x +
          validate(need(
    52 - 5x + 5x +
            sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
    53 - 5x + 5x +
            paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
    @@ -22466,35 +23276,40 @@

    teal coverage - 69.63%

    56 - 10x + 10x +
          validate(need(
    57 - 10x + 10x +
            nrow(x) >= min_nrow,
    58 - 10x + 10x +
            paste(
    59 - 10x + 10x +
              c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
    60 - 10x + 10x +
              collapse = "\n"
    @@ -22529,28 +23344,32 @@

    teal coverage - 69.63%

    65 - 10x + 10x +
        if (!allow_inf) {
    66 - 6x + 6x +
          validate(need(
    67 - 6x + 6x +
            all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
    68 - 6x + 6x +
            "Dataframe contains Inf values which is not allowed."
    @@ -25454,7 +26273,8 @@

    teal coverage - 69.63%

    103 - 10x + 10x +
      logger::log_trace("init initializing teal app with: data ('{ class(data) }').")
    @@ -25482,7 +26302,8 @@

    teal coverage - 69.63%

    107 - 10x + 10x +
      if (inherits(data, "TealData")) {
    @@ -25552,7 +26373,8 @@

    teal coverage - 69.63%

    117 - 10x + 10x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    @@ -25573,28 +26395,32 @@

    teal coverage - 69.63%

    120 - 10x + 10x +
      checkmate::assert(
    121 - 10x + 10x +
        .var.name = "modules",
    122 - 10x + 10x +
        checkmate::check_multi_class(modules, c("teal_modules", "teal_module")),
    123 - 10x + 10x +
        checkmate::check_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -25608,14 +26434,16 @@

    teal coverage - 69.63%

    125 - 10x + 10x +
      if (inherits(modules, "teal_module")) {
    126 - 1x + 1x +
        modules <- list(modules)
    @@ -25629,14 +26457,16 @@

    teal coverage - 69.63%

    128 - 10x + 10x +
      if (checkmate::test_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))) {
    129 - 4x + 4x +
        modules <- do.call(teal::modules, modules)
    @@ -25664,7 +26494,8 @@

    teal coverage - 69.63%

    133 - 10x + 10x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -25685,28 +26516,32 @@

    teal coverage - 69.63%

    136 - 9x + 9x +
      checkmate::assert(
    137 - 9x + 9x +
        .var.name = "title",
    138 - 9x + 9x +
        checkmate::check_string(title),
    139 - 9x + 9x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25720,28 +26555,32 @@

    teal coverage - 69.63%

    141 - 9x + 9x +
      checkmate::assert(
    142 - 9x + 9x +
        .var.name = "header",
    143 - 9x + 9x +
        checkmate::check_string(header),
    144 - 9x + 9x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25755,28 +26594,32 @@

    teal coverage - 69.63%

    146 - 9x + 9x +
      checkmate::assert(
    147 - 9x + 9x +
        .var.name = "footer",
    148 - 9x + 9x +
        checkmate::check_string(footer),
    149 - 9x + 9x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25790,7 +26633,8 @@

    teal coverage - 69.63%

    151 - 9x + 9x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -25811,7 +26655,8 @@

    teal coverage - 69.63%

    154 - 9x + 9x +
      teal.logger::log_system_info()
    @@ -25839,21 +26684,24 @@

    teal coverage - 69.63%

    158 - 9x + 9x +
      landing <- extract_module(modules, "teal_module_landing")
    159 - 9x + 9x +
      landing_module <- NULL
    160 - 9x + 9x +
      if (length(landing) == 1L) {
    @@ -25874,7 +26722,8 @@

    teal coverage - 69.63%

    163 - 9x + 9x +
      } else if (length(landing) > 1L) {
    @@ -25909,7 +26758,8 @@

    teal coverage - 69.63%

    168 - 9x + 9x +
      attr(filter, "app_id") <- create_app_id(data, modules)
    @@ -25930,7 +26780,8 @@

    teal coverage - 69.63%

    171 - 9x + 9x +
      filter <- as.teal_slices(as.list(filter))
    @@ -25958,7 +26809,8 @@

    teal coverage - 69.63%

    175 - 9x + 9x +
      if (isTRUE(attr(filter, "module_specific"))) {
    @@ -26147,21 +26999,24 @@

    teal coverage - 69.63%

    202 - 9x + 9x +
      if (inherits(data, "teal_data")) {
    203 - 8x + 8x +
        if (length(teal_data_datanames(data)) == 0) {
    204 - 1x + 1x +
          stop("The environment of `data` is empty.")
    @@ -26182,28 +27037,32 @@

    teal coverage - 69.63%

    207 - 7x + 7x +
        is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    208 - 7x + 7x +
        if (!isTRUE(is_modules_ok)) {
    209 - 1x + 1x +
          logger::log_error(is_modules_ok)
    210 - 1x + 1x +
          checkmate::assert(is_modules_ok, .var.name = "modules")
    @@ -26224,21 +27083,24 @@

    teal coverage - 69.63%

    213 - 6x + 6x +
        is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    214 - 6x + 6x +
        if (!isTRUE(is_filter_ok)) {
    215 - 1x + 1x +
          warning(is_filter_ok)
    @@ -26301,21 +27163,24 @@

    teal coverage - 69.63%

    224 - 7x + 7x +
      res <- list(
    225 - 7x + 7x +
        ui = ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
    226 - 7x + 7x +
        server = function(input, output, session) {
    @@ -26371,7 +27236,8 @@

    teal coverage - 69.63%

    234 - 7x + 7x +
      logger::log_trace("init teal app has been initialized.")
    @@ -26385,7 +27251,8 @@

    teal coverage - 69.63%

    236 - 7x + 7x +
      res
    @@ -26594,14 +27461,16 @@

    teal coverage - 69.63%

    28 - 6x + 6x +
      expr <- substitute(expr)
    29 - 6x + 6x +
      extras <- list(...)
    @@ -26622,14 +27491,16 @@

    teal coverage - 69.63%

    32 - 6x + 6x +
      if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
    33 - 6x + 6x +
        expr <- call("{", expr)
    @@ -26650,7 +27521,8 @@

    teal coverage - 69.63%

    36 - 6x + 6x +
      calls <- as.list(expr)[-1]
    @@ -26671,7 +27543,8 @@

    teal coverage - 69.63%

    39 - 6x + 6x +
      calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
    @@ -26685,7 +27558,8 @@

    teal coverage - 69.63%

    41 - 6x + 6x +
      eval_code(object = data, code = as.expression(calls))
    @@ -26782,21 +27656,24 @@

    teal coverage - 69.63%

    12 - 7x + 7x +
      css_files <- list.files(
    13 - 7x + 7x +
        system.file("css", package = "teal", mustWork = TRUE),
    14 - 7x + 7x +
        pattern = pattern, full.names = TRUE
    @@ -26817,14 +27694,16 @@

    teal coverage - 69.63%

    17 - 7x + 7x +
      singleton(
    18 - 7x + 7x +
        tags$head(lapply(css_files, includeCSS))
    @@ -26936,21 +27815,24 @@

    teal coverage - 69.63%

    34 - 7x + 7x +
      checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
    35 - 7x + 7x +
      js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
    36 - 7x + 7x +
      js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
    @@ -26964,7 +27846,8 @@

    teal coverage - 69.63%

    38 - 7x + 7x +
      singleton(lapply(js_files, includeScript))
    @@ -27097,21 +27980,24 @@

    teal coverage - 69.63%

    57 - 18x + 18x +
      checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
    58 - 18x + 18x +
      lapply(files, function(file) {
    59 - 18x + 18x +
        shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
    @@ -27125,7 +28011,8 @@

    teal coverage - 69.63%

    61 - 18x + 18x +
      invisible(NULL)
    @@ -27230,21 +28117,24 @@

    teal coverage - 69.63%

    76 - 7x + 7x +
      tagList(
    77 - 7x + 7x +
        shinyjs::useShinyjs(),
    78 - 7x + 7x +
        include_css_files(),
    @@ -27258,14 +28148,16 @@

    teal coverage - 69.63%

    80 - 7x + 7x +
        include_js_files(except = "init.js"),
    81 - 7x + 7x +
        shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
    @@ -27404,28 +28296,32 @@

    teal coverage - 69.63%

    17 - 53x + 53x +
      checkmate::assert_string(label)
    18 - 53x + 53x +
      module(
    19 - 53x + 53x +
        label,
    20 - 53x + 53x +
        server = function(id, data) {
    @@ -27530,7 +28426,8 @@

    teal coverage - 69.63%

    35 - 53x + 53x +
        ui = function(id) {
    @@ -27600,7 +28497,8 @@

    teal coverage - 69.63%

    45 - 53x + 53x +
        datanames = datanames
    @@ -27823,28 +28721,32 @@

    teal coverage - 69.63%

    29 - 13x + 13x +
      teal_data_module(
    30 - 13x + 13x +
        ui = function(id) {
    31 - 1x + 1x +
          ns <- NS(id)
    32 - 1x + 1x +
          object$ui(ns("mutate_inner"))
    @@ -27858,21 +28760,24 @@

    teal coverage - 69.63%

    34 - 13x + 13x +
        server = function(id) {
    35 - 11x + 11x +
          moduleServer(id, function(input, output, session) {
    36 - 11x + 11x +
            teal_data_rv <- object$server("mutate_inner")
    @@ -27886,14 +28791,16 @@

    teal coverage - 69.63%

    38 - 11x + 11x +
            if (!is.reactive(teal_data_rv)) {
    39 - 1x + 1x +
              stop("The `teal_data_module` must return a reactive expression.", call. = FALSE)
    @@ -27914,7 +28821,8 @@

    teal coverage - 69.63%

    42 - 10x + 10x +
            td <- eventReactive(teal_data_rv(),
    @@ -27928,14 +28836,16 @@

    teal coverage - 69.63%

    44 - 10x + 10x +
                if (inherits(teal_data_rv(), c("teal_data", "qenv.error"))) {
    45 - 6x + 6x +
                  eval_code(teal_data_rv(), code)
    @@ -27949,7 +28859,8 @@

    teal coverage - 69.63%

    47 - 4x + 4x +
                  teal_data_rv()
    @@ -27970,7 +28881,8 @@

    teal coverage - 69.63%

    50 - 10x + 10x +
              ignoreNULL = FALSE
    @@ -27984,7 +28896,8 @@

    teal coverage - 69.63%

    52 - 10x + 10x +
            td
    @@ -28033,7 +28946,8 @@

    teal coverage - 69.63%

    59 - 1x + 1x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -28061,7 +28975,8 @@

    teal coverage - 69.63%

    63 - 6x + 6x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -28857,21 +29772,24 @@

    teal coverage - 69.63%

    23 - 4x + 4x +
      checkmate::assert_string(label)
    24 - 2x + 2x +
      checkmate::assert_list(server_args, names = "named")
    25 - 2x + 2x +
      checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
    @@ -28885,7 +29803,8 @@

    teal coverage - 69.63%

    27 - 2x + 2x +
      logger::log_info("Initializing reporter_previewer_module")
    @@ -28899,7 +29818,8 @@

    teal coverage - 69.63%

    29 - 2x + 2x +
      srv <- function(id, reporter, ...) {
    @@ -28927,7 +29847,8 @@

    teal coverage - 69.63%

    33 - 2x + 2x +
      ui <- function(id, ...) {
    @@ -28955,28 +29876,32 @@

    teal coverage - 69.63%

    37 - 2x + 2x +
      module <- module(
    38 - 2x + 2x +
        label = "temporary label",
    39 - 2x + 2x +
        server = srv, ui = ui,
    40 - 2x + 2x +
        server_args = server_args, ui_args = list(), datanames = NULL
    @@ -29004,21 +29929,24 @@

    teal coverage - 69.63%

    44 - 2x + 2x +
      class(module) <- c("teal_module_previewer", class(module))
    45 - 2x + 2x +
      module$label <- label
    46 - 2x + 2x +
      module
    @@ -29430,35 +30358,40 @@

    teal coverage - 69.63%

    57 - 36x + 36x +
      checkmate::assert_function(ui, args = "id", nargs = 1)
    58 - 35x + 35x +
      checkmate::assert_function(server, args = "id", nargs = 1)
    59 - 34x + 34x +
      structure(
    60 - 34x + 34x +
        list(ui = ui, server = server),
    61 - 34x + 34x +
        class = "teal_data_module"
    diff --git a/v0.15.2-rc1/index.html b/v0.15.2-rc1/index.html index f1e5827450..fccc573a2a 100644 --- a/v0.15.2-rc1/index.html +++ b/v0.15.2-rc1/index.html @@ -1,5 +1,4 @@ - - + @@ -88,23 +87,7 @@ - - + - + + diff --git a/v0.15.2-rc1/news/index.html b/v0.15.2-rc1/news/index.html index 4420e7b718..7be7b3fa0f 100644 --- a/v0.15.2-rc1/news/index.html +++ b/v0.15.2-rc1/news/index.html @@ -1,8 +1,22 @@ - -Changelog • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -109,35 +129,54 @@
    -

    teal 0.15.2

    -
    -

    Bug fixes

    -
    • Fixed a bug in handling datanames of modules that crashed module-specific applications when filtering child datasets.
    • -
    +

    teal 0.15.2 +

    +
    +

    Bug fixes +

    +
      +
    • Fixed a bug in handling datanames of modules that crashed module-specific applications when filtering child datasets.
    • +
    +
    -

    teal 0.15.1

    CRAN release: 2024-02-22

    -
    -

    Bug fixes

    -
    • Fixed a bug that stopped the module_specific feature when a teal module specified datanames of length more than 1.
    • -
    +

    teal 0.15.1 +

    +

    CRAN release: 2024-02-22

    +
    +

    Bug fixes +

    +
      +
    • Fixed a bug that stopped the module_specific feature when a teal module specified datanames of length more than 1.
    • +
    +
    -

    Miscellaneous

    -
    • Updated links in vignettes
    • -
    +

    Miscellaneous +

    +
      +
    • Updated links in vignettes
    • +
    +
    -

    teal 0.15.0

    CRAN release: 2024-02-08

    -
    -

    New features

    -
    • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
    • +

      teal 0.15.0 +

      +

      CRAN release: 2024-02-08

      +
      +

      New features +

      +
        +
      • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
      • Filter state snapshots can now be uploaded from file. See ?snapshot.
      • Added as_tdata function to facilitate migration of modules to the new teal_data class.
      • Added build_app_title function to facilitate adding favicons to app title.
      • -
      +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • data argument in init now accepts only teal_data and teal_data_module.
      • tdata has been deprecated and replaced with teal_data. Support for tdata passed to the data argument in module(server) will be removed in the next release.
      • @@ -146,114 +185,166 @@

        Breaking changes -

        Miscellaneous

        -
        • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
        • +

          Miscellaneous +

          +
            +
          • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
          • Added argument to teal_slices and made modifications to init to enable tagging teal_slices with an app id to safely upload snapshots from disk.
          • FilteredData no longer stores pre-processing code in specific slots. Code is now attached as attribute. Adjusted appropriately.
          • -

    + +
    -

    Bug fixes

    -
    • Removed Report previewer module from mapping matrix display in filter manager.
    • +

      Bug fixes +

      +
        +
      • Removed Report previewer module from mapping matrix display in filter manager.
      • Specified minimal version of package dependencies.
      • -
    + +
    -

    teal 0.14.0

    +

    teal 0.14.0 +

    -

    New features

    -
    • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
    • +

      New features +

      +
        +
      • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
      • Enabled capturing and resetting application filter state with snapshots. See ?snapshot.
      • Enabled reporter_previewer_module to customize default values through srv_args.
      • Enabled passing own reporter_previewer_module in a list of modules to override default one.
      • -
    + +
    -

    Breaking changes

    -
    • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
    • +

      Breaking changes +

      +
        +
      • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
      • Soft deprecated filters argument in module and replaced it with datanames. Details in documentation of teal::module
      • -
    + +
    -

    Miscellaneous

    -
    • Removed scda package dependency from examples.
    • +

      Miscellaneous +

      +
        +
      • Removed scda package dependency from examples.
      • Updated the header tag style to enhance element containment.
      • -
    + +
    -

    teal 0.13.0

    +

    teal 0.13.0 +

    -

    Breaking changes

    -
    • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
    • +

      Breaking changes +

      +
        +
      • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
      • Due to deprecation of chunks in teal.code, the teal framework now uses their replacement (qenv) instead. The documentation in teal has been updated to reflect this and custom modules written with chunks should be updated to use qenv.
      • Due to deprecation of chunks in teal.code, get_rcode, get_rcode_srv, and get_rcode_ui have been removed.
      • -
    + +
    -

    New features

    -
    • Added the validate_inputs function that transfers input validation messages to app output.
    • +

      New features +

      +
        +
      • Added the validate_inputs function that transfers input validation messages to app output.
      • modules argument of init accepts teal_module type of object. There is no need to wrap up a single module in modules() or list().
      • Updated module_nested_tabs so that only active modules are calculated in a teal app.
      • -
    + +
    -

    Miscellaneous

    -
    • Updated examples to use scda.2022.
    • +

      Miscellaneous +

      +
        +
      • Updated examples to use scda.2022.
      • Added R session information into a link in the footer of teal applications.
      • Added data hashing step using rlang instead of digest package to calculate the hash (which has been moved from teal.data and teal.slice). There is now an explicit hashing check in the reproducible code output.
      • Removed deprecated functions: root_modules, default_filter, bookmarkableShinyApp, as well as deprecated logging mechanism, including the functions log_app_usage and .log.
      • Updated the “Teal and Bootstrap Themes” vignette to provide more details customizing a teal app with bslib::run_with_themer.
      • Removed outdated diagram from srv_nested_tabs documentation.
      • Changed default values of header and footer arguments in init to empty text.
      • -
    + +
    -

    teal 0.12.0

    -
    -

    New features

    -
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • -
    +

    teal 0.12.0 +

    +
    +

    New features +

    +
      +
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • +
    +
    -

    Enhancements

    -
    • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
    • +

      Enhancements +

      +
        +
      • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
      • Updated teal_module to have data argument which receives a list of reactive filter data with "code" and "join_keys" attributes.
      • Updated teal_module to have filter_panel_api argument which receives a FilterPanelAPI object.
      • Updated the internals of module_teal to reflect changes in teal.slice.
      • -
    + +
    -

    Breaking changes

    -
    • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
    • +

      Breaking changes +

      +
        +
      • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
      • Deprecated merge_expression argument in get_rcode_srv function and removed it in get_rcode function.
      • Deprecated session argument in get_rcode function.
      • -
    + +
    -

    Miscellaneous

    -
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • -
    +

    Miscellaneous +

    +
      +
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • +
    +
    -

    teal 0.11.1

    +

    teal 0.11.1 +

    -

    Enhancements

    -
    • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
    • +

      Enhancements +

      +
        +
      • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
      • Updated teal to support modules which include reporting. If any module which supports reporting is included then a reporter_previewer_module is included.
      • Added default arguments to module() and the server argument is now a function where the second argument can be ... or datasets.
      • -
    + +
    -

    Breaking changes

    -
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • -
    +

    Breaking changes +

    +
      +
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • +
    +
    -

    Miscellaneous

    -
    • Added a template to the pkgdown configuration.
    • +

      Miscellaneous +

      +
        +
      • Added a template to the pkgdown configuration.
      • Removed unneeded shinytest app tests.
      • Updated package authors.
      • Added package vignettes.
      • -
    + +
    -

    teal 0.11.0

    -
    +

    The teal package contains the code to create apps (teal::init), to create a module (teal::module) and to group modules in the app (teal::modules). teal depends on teal.transform and teal.data which contain the functions that teal app creators are likely to need. The other package teal only imports from and therefore teal module creators should either fully specify functions from these packages when required or import them into custom packages as library(teal) will not load them.

    +
    +

    New features +

    +
      +
    • A simple new teal module named example_module has been included in the package.
    • +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • teal package has been split into multiple smaller packages, see above.
      • Deprecated root_modules function, users should use modules directly inside init.
      • Due to deprecation of root_modules any label argument to modules must be explicitly named. For example modules("lab", mod1, mod2) should be replaced with modules(label = "lab", mod1, mod2).
      • -
    + +
    -

    Miscellaneous

    -
    • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
    • +

      Miscellaneous +

      +
        +
      • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
      • MultiAssayExperiment is now suggested packages, not required. Objects dependent on MultiAssayExperiment are changed to lazy-load this now suggested package.
      • -
    + +
    -

    Bug fixes

    -
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • -
    +

    Bug fixes +

    +
      +
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • +
    +
    -

    teal 0.10.1

    +

    teal 0.10.1 +

    -

    Breaking changes

    -
    • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
    • +

      Breaking changes +

      +
        +
      • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
      • Deprecated all functions related to connectors that have been moved to their own separate packages.
      • Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational.
      • Removed rcd_connection and rcd_data; scda_dataset_connectors can be passed into cdisc_data and teal_data directly.
      • Replaced rcd_dataset_connector and rcd_cdisc_dataset_connector with scda_dataset_connector and scda_cdisc_dataset_connector respectively.
      • Renamed teal_show_js_log option into teal.show_js_log to match options naming convention.
      • Removed %is_in% and stop_shiny internal utility functions.
      • -
    + +
    -

    New features

    +

    New features +

    -
    Logging
    -
    • Added support for logging using the logger package.
    • +
      Logging +
      +
        +
      • Added support for logging using the logger package.
      • Added a new function register_logger, which registers a logger in a given namespace.
      • Added trace and info levels log messages to the teal framework.
      • Added pid and shiny session token into footnote so app developers can identify logs for apps.
      • -
    + +
    -
    Other
    -
    • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

    • +
      Other +
      +
        +
      • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

      • Added public facing constructor functions for CDISCDataConnector, RelationalDataConnector, and DataConnection classes.

      • Modified data_extract_spec to allow both the filter and select parameters to be NULL, which results in the data_extract_ui acting as if a filter_spec with all variables as possible choices had been supplied as the filter argument and a select_spec with the multiple parameter set to TRUE had been supplied as the select argument.

      • Added support of the full screen for a module when the filters argument is equal NULL.

      • @@ -320,11 +434,14 @@
        Other -

        Bug fixes

        -
    + +
    -

    teal 0.10.0

    +

    teal 0.10.0 +

    -

    New features

    -
    • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
    • +

      New features +

      +
        +
      • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
      • Refactored filter panel to use MultiAssayExperiment objects. Filters can be set on a subject level (colData of MAE object) and on a experiment level (colData and rowData of an assay).
      • Added cdse_dataset_connector to create delayed data objects from CDSE.
      • Added datasetdb_dataset_connector to create delayed data objects from DataSetDB.
      • Added ricepass_connection to create delayed data objects from entimICE via ricepass.
      • Refactor of the filter panel: -
        • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
        • +
            +
          • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
          • Dataset type determines an appearance and a functionality of related filters and filters summary.
          • Datasets are passed (by reference) from DDL to FilteredData skipping extracting data and their attributes.
          • Redesigned variable filter labels in “Active Filter Variables” panel.
          • Fully testable server functions.
          • -
          -
    + + + +
    -

    Bug fixes

    -
    • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
    • +

      Bug fixes +

      +
        +
      • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
      • Fixed a bug that caused the output of get_code function to not reproduce its raw data set.
      • Changed filter_spec to allow no variable selection upon app initialization, where the first possible value was previously selected.
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal 0.9.5

    +

    teal 0.9.5 +

    -

    Enhancements

    -
    • Added informational stop message when using mutate_data with RelationalDataConnector.
    • +

      Enhancements +

      +
        +
      • Added informational stop message when using mutate_data with RelationalDataConnector.
      • Modified as_cdisc to behave similarly to cdisc_dataset when called on a Dataset object.
      • Changed the displayed format of the data name and the column name in data_extract_spec UI elements. Both are now compressed to <data name>.<column name> if they don’t change during runtime of the app.
      • Added ADSAFTTE to the list of recognized ADaM dataset names.
      • Added another example to data_extract_spec’s doc string showcasing app users can choose a variable used for filtering in the encoding panel.
      • Added CSS styling to tool tips in teal modules.
      • -
    + +
    -

    Bug fixes

    -
    • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
    • +

      Bug fixes +

      +
        +
      • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
      • Fixed a bug that crashes app whenever a Date or datetime column is selected from a filter_spec.
      • -
    + +
    -

    teal 0.9.4

    +

    teal 0.9.4 +

    -

    Enhancements

    -
    • Released snowflake connection and connectors.
    • +

      Enhancements +

      +
        +
      • Released snowflake connection and connectors.
      • Changed ordering of datasets to be more intuitive (topologically first for CDISC datasets only and then according to input datasets order).
      • When closing a teal app (ending a user shiny session), all DataConnections will now try to close their connections.
      • Added ADHY keys to configuration file.
      • Extended the filter_spec function: the parameter choices is no longer mandatory (the function will take all possible choices by default) and the vars parameter additionally accepts the choices_selected and allows to change the variables for filtering using the UI elements in the encoding panel.
      • -
    + +
    -

    Bug fixes

    -
    • Cleaned up imports in the package.
    • -
    • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
    • +

      Bug fixes +

      +
        +
      • Cleaned up imports in the package.
      • +
      • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
        +
      • Fixed issue with cloning Callable class.
      • -
    + +
    -

    teal 0.9.3

    +

    teal 0.9.3 +

    -

    New Features

    -
    • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
    • +

      New Features +

      +
        +
      • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
      • New JoinKeys class (with join_keys() constructors and join_key() constructor for its elements) to store joining key columns between datasets.
      • Refactored the most basic dataset() constructor, added cdisc_dataset() constructor and as_cdisc() conversion function.
      • Soft-deprecate removed class constructors and obsolete functions (e.g. keys()).
      • Added get_keys() and set_keys() functions to extract and manipulate datasets primary keys respectively.
      • Unexported filtered_data_new, filtered_data_set and filtered_data_set_filters.
      • -
    + +
    -

    Bug fixes

    -
    • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
    • +

      Bug fixes +

      +
        +
      • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
      • Added ability to press “Enter” key without having to set focus to the Submit button for delayed data loading.
      • Allow variable_choices to use datasets with missing labels.
      • Fixed bug that ignores input of NULL to selected argument of select_spec function.
      • -
    + +
    -

    Enhancements

    -
    • Added button to remove all active filters from the Filter Panel.
    • -
    +

    Enhancements +

    +
      +
    • Added button to remove all active filters from the Filter Panel.
    • +
    +
    -

    teal 0.9.2

    +

    teal 0.9.2 +

    -

    New Features

    -
    • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
    • +

      New Features +

      +
        +
      • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
      • NOTE: python_dataset_connector is not yet ready to be deployed on RSConnect because it does not contain numpy and pandas, which are Python libraries used in python_dataset_connector.
      • Added support for filtering on Date and Datetime variables in the Filter Panel.
      • Added buttons for date and datetime filter widgets to reset the value to the original.
      • Added new function check_key_duplicates, which creates a short summary about rows with duplicated primary key (row numbers and the number of duplicates)
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    • Removed include_factors option in get_class_colnames in RawDataset.
    • -
    +

    Miscellaneous +

    +
      +
    • Removed include_factors option in get_class_colnames in RawDataset.
    • +
    +
    -

    teal 0.9.1

    -
    • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
    • +

      teal 0.9.1 +

      +
        +
      • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
      • Nested tabs module now has better alignment with the filter panel on the page.
      • Allow width argument in optionalSelectInput.
      • Added lifecycle badges to all exported functions.
      • @@ -501,10 +674,13 @@

        teal 0.9.1 -

        teal 0.9.0

        -
        • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

        • +

          teal 0.9.0 +

          +
            +
          • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

          • A new teal_data function to include datasets and connectors into teal application.

          • cdisc_data function to include datasets and connectors into teal application where a check argument still could be used and other consistency tests are performed.

          • get_raw_data can be used to derive raw data from R6 objects e.g. (RelationalDataset).

          • @@ -525,91 +701,133 @@

            teal 0.9.0 -

            Refactor of FilteredData (for developers)

            -
            • +
            +
            +

            Refactor of FilteredData (for developers) +

            +
              +
            • FilteredData is now fully reactive. Now filtered data is lazy evaluated as per need. This further opens the door to bookmarking teal apps (bookmarking currently works for the right filtering panel, but we will make this feature more sophisticated in a future release, each module must be reviewed and adapted if it contains reactiveValues).
            • Datasets and materialized connectors are provided to FilteredData by set_datasets_data function located in init_datasets.R file.
            • Renamed get_dataset() method to get_data().
            • Renamed get_filter_call() method to get_filter_expr(); returns an expression rather than a list.
            • Removed argument isolate from get_data() method and similar methods. You must isolate it yourself as needed. If you want to temporarily deactivate shiny errors due to missing errors, you can set options(shiny.suppressMissingContextError = TRUE). In general, avoid isolate as this breaks reactivity.
            • We added a development module to add several filters at once, e.g. safety filters. This is to be evaluated before it is converted into a proper module and made available to end-users.
            • -
            +

          +

    -

    teal 0.8.5

    -
    • UI bug fix to hide filter elements for not used datasets.
    • -
    +

    teal 0.8.5 +

    +
      +
    • UI bug fix to hide filter elements for not used datasets.
    • +
    +
    -

    teal 0.8.4

    -
    • Progress bar for UI creation in delayed loading module.
    • +

      teal 0.8.4 +

      +
        +
      • Progress bar for UI creation in delayed loading module.
      • Change output of keys function to keys object.
      • Delayed version of choices_selected.
      • Fix an error in choices_selected when selected is not in choices.
      • Fix pickerInput not to display column name as label if it’s missing.
      • -
    + +
    -

    teal 0.8.3

    -
    • Enable teal app to initialize without data. The data are then loaded from within the teal app.
    • +

      teal 0.8.3 +

      +
        +
      • Enable teal app to initialize without data. The data are then loaded from within the teal app.
      • New classes (DatasetConnector, DataConnector) to connect to various data sources, including: * connector to rice API - rice_data and rice_dataset_connector * connector to RDS files - rds_data and rds_dataset_connector
      • Message appears at bottom right of shiny app when shiny is busy to update the views.
      • Remove labels argument of cdisc_data function. Labels should now already be present in the data passed to the cdisc_data function. This can be achieved using the var_relabel function.
      • -
    + +
    -

    teal 0.8.2

    -
    • Fixed several BUGS in optionalSelectInput and improved inputs look.
    • +

      teal 0.8.2 +

      +
        +
      • Fixed several BUGS in optionalSelectInput and improved inputs look.
      • Added get_data_labels function to FilteredData class.
      • Improved sep passing within data_extract_spec.
      • -
    + +
    -

    teal 0.8.1

    -
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • -
    +

    teal 0.8.1 +

    +
      +
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • +
    +
    -

    teal 0.8.0

    -
    • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
    • +

      teal 0.8.0 +

      +
        +
      • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
      • Possibility to load custom .css and .js files.
      • Renamed columns_spec to select_spec.
      • Show number of observations on filter panel.
      • Add labeling functions variable_choices and value_choices.
      • -
    + +
    -

    teal 0.7.0

    -
    • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
    • +

      teal 0.7.0 +

      +
        +
      • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
      • Moved teal.utils functions to teal: log_app_usage, stop_shiny.
      • Added *_spec functions.
      • Improvements on usage of PickerInput and SelectInput.
      • -
    + +
    -

    teal 0.6.0

    -
    • Removed deprecated functions tab*.
    • +

      teal 0.6.0 +

      +
        +
      • Removed deprecated functions tab*.
      • Removed data generation functions including generate_sample_data.
      • Incorporate shinyjs package.
      • Added “Copy R code to clipboard” button.
      • -
    + +
    -

    teal 0.0.5

    -
    • Added limit to data_table with scrolling, preventing overlap of UI elements.
    • +

      teal 0.0.5 +

      +
        +
      • Added limit to data_table with scrolling, preventing overlap of UI elements.
      • Boolean filtering.
      • -
    + +
    -

    teal 0.0.4

    -
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • -
    +

    teal 0.0.4 +

    +
      +
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • +
    +
    -

    teal 0.0.3

    -
    • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
    • -
    -
    New features
    -
    • +

      teal 0.0.3 +

      +
        +
      • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
      • +
      +
      +
      New features +
      +
        +
      • tm_scatterplot module.
      • tm_table module.
      • -
      +
    +
    -
    Changes
    -
    • All tabs arguments were renamed to modules.
    • +
      Changes +
      +
        +
      • All tabs arguments were renamed to modules.
      • tab_item function is now called module.
      • @@ -622,30 +840,39 @@
        Changes -

        teal 0.0.2

        -
        • New ‘01_getting_started’ vignette.
        • +

          teal 0.0.2 +

          +
            +
          • New ‘01_getting_started’ vignette.
          • Datanames in FilteredData are now case sensitive.
          • -
    + +
    -

    teal 0.0.1

    -
    • March 28, 2016 - Initial Release.
    • -
    +

    teal 0.0.1 +

    +
      +
    • March 28, 2016 - Initial Release.
    • +
    + + + + + - - + + diff --git a/v0.15.2-rc1/pull_request_template.html b/v0.15.2-rc1/pull_request_template.html index 0eca9930a5..202314d428 100644 --- a/v0.15.2-rc1/pull_request_template.html +++ b/v0.15.2-rc1/pull_request_template.html @@ -1,8 +1,22 @@ - -Pull Request • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -114,17 +134,19 @@

    Fixes #nnn

    - + + + + - - + + diff --git a/v0.15.2-rc1/reference/TealReportCard.html b/v0.15.2-rc1/reference/TealReportCard.html index e777febcf4..7016c1b1b4 100644 --- a/v0.15.2-rc1/reference/TealReportCard.html +++ b/v0.15.2-rc1/reference/TealReportCard.html @@ -1,16 +1,32 @@ - - + + + + + +TealReportCard — TealReportCard • teal +TealReportCard — TealReportCard • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -127,20 +149,27 @@
    -

    Super class

    +

    Super class +

    teal.reporter::ReportCard -> TealReportCard

    +

    Inherited methods


    -

    Method append_src()

    -

    Appends the source code to the content meta data of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_src(src, ...)

    +

    +
    +
    +

    Method append_src() +

    +

    Appends the source code to the content meta data of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_src(src, ...)
    +

    +
    -

    Arguments

    -

    src
    +

    Arguments +

    +

    +
    +
    +
    src

    (character(1)) code as text.

    @@ -172,85 +214,148 @@

    Arguments -

    Returns

    +

    Returns +

    Object of class TealReportCard, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_src(
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_src(
       "plot(iris)"
     )
    -card$get_content()[[1]]$get_content()

    +card$get_content()[[1]]$get_content()
    +

    +
    -


    -

    Method append_fs()

    +
    +

    +
    +
    +

    Method append_fs() +

    Appends the filter state list to the content and metadata of this TealReportCard. If the filter state list has an attribute named formatted, it appends it to the card otherwise it uses the default yaml::as.yaml to format the list. -If the filter state list is empty, nothing is appended to the content.

    -

    Usage

    -

    TealReportCard$append_fs(fs)

    +If the filter state list is empty, nothing is appended to the content.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_fs(fs)
    +

    +
    -

    Arguments

    -

    fs
    +

    Arguments +

    +

    +
    +
    +
    fs

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method append_encodings()

    -

    Appends the encodings list to the content and metadata of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_encodings(encodings)

    +
    +

    +
    +
    +

    Method append_encodings() +

    +

    Appends the encodings list to the content and metadata of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_encodings(encodings)
    +

    +
    -

    Arguments

    -

    encodings
    +

    Arguments +

    +

    +
    +
    +
    encodings

    (list) list of encodings selections of the teal app.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
     card$get_content()[[1]]$get_content()
    -

    +
    +

    +
    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealReportCard$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -258,7 +363,8 @@

    Arguments -

    Examples

    +

    Examples +

    
     ## ------------------------------------------------
     ## Method `TealReportCard$append_src`
    @@ -281,17 +387,19 @@ 

    Examples

    + +
    + +
    - - + + diff --git a/v0.15.2-rc1/reference/TealSlicesBlock.html b/v0.15.2-rc1/reference/TealSlicesBlock.html index c22c73b587..21920ac9ba 100644 --- a/v0.15.2-rc1/reference/TealSlicesBlock.html +++ b/v0.15.2-rc1/reference/TealSlicesBlock.html @@ -1,10 +1,26 @@ - -RcodeBlock — TealSlicesBlock • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,34 +140,54 @@
    -

    Super classes

    +

    Super classes +

    teal.reporter::ContentBlock -> teal.reporter::TextBlock -> TealSlicesBlock

    +

    Inherited methods


    -

    Method new()

    -

    Returns a TealSlicesBlock object.

    -

    Usage

    -

    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")

    +

    +
    +
    +

    Method new() +

    +

    Returns a TealSlicesBlock object.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    @@ -153,89 +195,154 @@

    Arguments -

    Details

    +

    Details +

    Returns a TealSlicesBlock object with no content and no parameters.

    -

    Returns

    +

    Returns +

    Object of class TealSlicesBlock, invisibly.

    -


    -

    Method set_content()

    +
    +

    +
    +
    +

    Method set_content() +

    Sets content of this TealSlicesBlock. Sets content as YAML text which represents a list generated from teal_slices. The list displays limited number of fields from teal_slice objects, but this list is sufficient to conclude which filters were applied. -When selected field in teal_slice object is a range, then it is displayed as a "min"

    -

    Usage

    -

    TealSlicesBlock$set_content(content)

    +When selected field in teal_slice object is a range, then it is displayed as a "min"

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$set_content(content)
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method from_list()

    -

    Create the RcodeBlock from a list.

    -

    Usage

    -

    TealSlicesBlock$from_list(x)

    +
    +

    +
    +
    +

    Method from_list() +

    +

    Create the RcodeBlock from a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$from_list(x)
    +

    +
    -

    Arguments

    -

    x
    +

    Arguments +

    +

    +
    +
    +
    x

    (named list) with two fields c("text", "params"). Use the get_available_params method to get all possible parameters.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method to_list()

    -

    Convert the RcodeBlock to a list.

    -

    Usage

    -

    TealSlicesBlock$to_list()

    +
    +

    +
    +
    +

    Method to_list() +

    +

    Convert the RcodeBlock to a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$to_list()
    +

    +
    -

    Returns

    +

    Returns +

    named list with a text and params.

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealSlicesBlock$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -243,17 +350,19 @@

    Arguments

    + +
    + +
    - - + + diff --git a/v0.15.2-rc1/reference/append_module.html b/v0.15.2-rc1/reference/append_module.html index 33504fe229..2fbe33ad08 100644 --- a/v0.15.2-rc1/reference/append_module.html +++ b/v0.15.2-rc1/reference/append_module.html @@ -1,8 +1,24 @@ - -Append a teal_module to children of a teal_modules object — append_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    append_module(modules, module)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    module

    (teal_module) object to be appended onto the children of modules

    -
    + +
    -

    Value

    +

    Value +

    A teal_modules object with module appended.

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/build_app_title.html b/v0.15.2-rc1/reference/build_app_title.html index 73d2404bb4..80c939a2da 100644 --- a/v0.15.2-rc1/reference/build_app_title.html +++ b/v0.15.2-rc1/reference/build_app_title.html @@ -1,8 +1,24 @@ - -Build app title with favicon — build_app_title • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    build_app_title(
       title = "teal app",
       favicon =
    @@ -123,8 +146,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character) The browser title for the teal app.

    @@ -132,26 +157,30 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag containing the element that adds the title and logo to the shiny app.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/calculate_hashes.html b/v0.15.2-rc1/reference/calculate_hashes.html index caf806a2bf..cd34af01bd 100644 --- a/v0.15.2-rc1/reference/calculate_hashes.html +++ b/v0.15.2-rc1/reference/calculate_hashes.html @@ -1,8 +1,24 @@ - -Get the hash of a dataset — calculate_hashes • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    calculate_hashes(datanames, datasets)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets

    datasets

    (FilteredData) object holding the data

    -
    + +
    -

    Value

    +

    Value +

    A list of hashes per dataset.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/check_filter_datanames.html b/v0.15.2-rc1/reference/check_filter_datanames.html index 91742dd993..c207b62171 100644 --- a/v0.15.2-rc1/reference/check_filter_datanames.html +++ b/v0.15.2-rc1/reference/check_filter_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in filters — check_filter_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_filter_datanames(filters, datanames)
    -

    Arguments

    -
    filters
    +

    Arguments +

    +
    +
    filters

    (teal_slices) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/check_modules_datanames.html b/v0.15.2-rc1/reference/check_modules_datanames.html index ebfed97190..7dad186f57 100644 --- a/v0.15.2-rc1/reference/check_modules_datanames.html +++ b/v0.15.2-rc1/reference/check_modules_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in modules — check_modules_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_modules_datanames(modules, datanames)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/create_app_id.html b/v0.15.2-rc1/reference/create_app_id.html index a47d15c56f..eadeaec5ce 100644 --- a/v0.15.2-rc1/reference/create_app_id.html +++ b/v0.15.2-rc1/reference/create_app_id.html @@ -1,8 +1,24 @@ - -Application ID — create_app_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,53 @@
    -

    Usage

    +

    Usage +

    create_app_id(data, modules)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) as accepted by init

    modules

    (teal_modules) object as accepted by init

    -
    + +
    -

    Value

    +

    Value +

    A single character string.

    -

    Details

    +

    Details +

    Calculate app ID that will be used to stamp filter state snapshots. App ID is a hash of the app's data and modules. See "transferring snapshots" section in ?snapshot.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/deep_copy_filter.html b/v0.15.2-rc1/reference/deep_copy_filter.html index fd1cb830a1..6cb01af3d0 100644 --- a/v0.15.2-rc1/reference/deep_copy_filter.html +++ b/v0.15.2-rc1/reference/deep_copy_filter.html @@ -1,14 +1,30 @@ - - + + + + + +Deep copy teal_slices — deep_copy_filter • teal +Deep copy teal_slices — deep_copy_filter • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + +
    @@ -123,18 +146,23 @@
    -

    Usage

    +

    Usage +

    deep_copy_filter(filter)
    -

    Arguments

    -
    filter
    +

    Arguments +

    +
    +
    filter

    (teal_slices)

    -
    + +
    -

    Value

    +

    Value +

    teal_slices

    @@ -143,17 +171,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/dot-datasets_to_data.html b/v0.15.2-rc1/reference/dot-datasets_to_data.html index edc63b5e61..7761232260 100644 --- a/v0.15.2-rc1/reference/dot-datasets_to_data.html +++ b/v0.15.2-rc1/reference/dot-datasets_to_data.html @@ -1,12 +1,28 @@ - - + + + + + +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    .datasets_to_data(module, datasets)
    -

    Arguments

    -
    module
    +

    Arguments +

    +
    +
    module

    (teal_module) module where needed filters are taken from

    datasets

    (FilteredData) object where needed data are taken from

    -
    + +
    -

    Value

    +

    Value +

    A teal_data object.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/example_module.html b/v0.15.2-rc1/reference/example_module.html index 32d6294243..16164d8d22 100644 --- a/v0.15.2-rc1/reference/example_module.html +++ b/v0.15.2-rc1/reference/example_module.html @@ -1,8 +1,24 @@ - -An example teal module — example_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    example_module(label = "example teal module", datanames = "all")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -132,16 +157,19 @@

    Arguments will show filters of all datasets. datanames also determines a subset of datasets which are appended to the data argument in server function.

    -

    + +
    -

    Value

    +

    Value +

    A teal module which can be included in the modules argument to init().

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(IRIS = iris, MTCARS = mtcars),
       modules = example_module()
    @@ -152,17 +180,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/filter_manager_module_srv.html b/v0.15.2-rc1/reference/filter_manager_module_srv.html index a6505b172a..6481d214b8 100644 --- a/v0.15.2-rc1/reference/filter_manager_module_srv.html +++ b/v0.15.2-rc1/reference/filter_manager_module_srv.html @@ -1,8 +1,24 @@ - -Module specific filter manager — filter_manager_module_srv • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    filter_manager_module_srv(id, module_fd, slices_global)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -131,21 +156,28 @@

    Arguments -

    Value

    +

    Value +

    A reactive expression containing the slices active in this module.

    -

    Details

    +

    Details +

    This module tracks the state of a single FilteredData object and global teal_slices and updates both objects as necessary. Filter states added in different modules Filter states added any individual module are added to global teal_slices @@ -154,17 +186,19 @@

    Details

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/get_client_timezone.html b/v0.15.2-rc1/reference/get_client_timezone.html index 788cb5f944..d4c0542565 100644 --- a/v0.15.2-rc1/reference/get_client_timezone.html +++ b/v0.15.2-rc1/reference/get_client_timezone.html @@ -1,10 +1,26 @@ - -Get client timezone — get_client_timezone • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,19 +139,24 @@
    -

    Usage

    +

    Usage +

    get_client_timezone(ns)
    -

    Arguments

    -
    ns
    +

    Arguments +

    +
    +
    ns

    (function) namespace function passed from the session object in the shiny server. For shiny modules this will allow for proper name spacing of the registered input.

    -
    + +
    -

    Value

    +

    Value +

    (shiny) input variable accessible with input$tz which is a (character) @@ -137,17 +164,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/get_code_tdata.html b/v0.15.2-rc1/reference/get_code_tdata.html index d9f154864b..a085b98cac 100644 --- a/v0.15.2-rc1/reference/get_code_tdata.html +++ b/v0.15.2-rc1/reference/get_code_tdata.html @@ -1,8 +1,24 @@ - -Wrapper for get_code.tdata — get_code_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,35 +137,42 @@
    -

    Usage

    +

    Usage +

    get_code_tdata(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    (character) code used in the tdata object.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/get_datasets_code.html b/v0.15.2-rc1/reference/get_datasets_code.html index 14adab55eb..08b81c4950 100644 --- a/v0.15.2-rc1/reference/get_datasets_code.html +++ b/v0.15.2-rc1/reference/get_datasets_code.html @@ -1,8 +1,24 @@ - -Get datasets code — get_datasets_code • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    get_datasets_code(datanames, datasets, hashes)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets to extract code from

    @@ -131,28 +156,35 @@

    Arguments -

    Value

    +

    Value +

    -

    Character string concatenated from the following elements:

    • data pre-processing code (from data argument in init)

    • +

      Character string concatenated from the following elements:

      +
        +
      • data pre-processing code (from data argument in init)

      • hash check of loaded objects

      • filter code (if any)

      • -
    + + + + + + - - + + diff --git a/v0.15.2-rc1/reference/get_metadata.html b/v0.15.2-rc1/reference/get_metadata.html index 48dc07e590..2284d4e6d8 100644 --- a/v0.15.2-rc1/reference/get_metadata.html +++ b/v0.15.2-rc1/reference/get_metadata.html @@ -1,8 +1,24 @@ - -Function to get metadata from a tdata object — get_metadata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    get_metadata(data, dataname)
     
     # S3 method for tdata
    @@ -125,34 +148,40 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata - object) to extract the data from

    dataname

    (character(1)) the dataset name whose metadata is requested

    -
    + +
    -

    Value

    +

    Value +

    Either list of metadata or NULL if no metadata.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/get_rcode_libraries.html b/v0.15.2-rc1/reference/get_rcode_libraries.html index 1c92cce2f5..3e9a985d39 100644 --- a/v0.15.2-rc1/reference/get_rcode_libraries.html +++ b/v0.15.2-rc1/reference/get_rcode_libraries.html @@ -1,8 +1,24 @@ - -Generates library calls from current session info — get_rcode_libraries • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,29 +136,33 @@
    -

    Usage

    +

    Usage +

    get_rcode_libraries()
    -

    Value

    +

    Value +

    Character vector of library(<package>) calls.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/include_css_files.html b/v0.15.2-rc1/reference/include_css_files.html index ddb9781288..aac05699d6 100644 --- a/v0.15.2-rc1/reference/include_css_files.html +++ b/v0.15.2-rc1/reference/include_css_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,35 +142,42 @@
    -

    Usage

    +

    Usage +

    include_css_files(pattern = "*")
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes CSS files.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/include_js_files.html b/v0.15.2-rc1/reference/include_js_files.html index 05c010eaa8..fa89841321 100644 --- a/v0.15.2-rc1/reference/include_js_files.html +++ b/v0.15.2-rc1/reference/include_js_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include JS files from /inst/js/ package directory to application header — include_js_files • teal +Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    include_js_files(pattern = NULL, except = NULL)
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included, passed to system.file

    except

    (character) vector of basename filenames to be excluded

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes JS files.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/include_teal_css_js.html b/v0.15.2-rc1/reference/include_teal_css_js.html index 837f0f9637..f1fede65a9 100644 --- a/v0.15.2-rc1/reference/include_teal_css_js.html +++ b/v0.15.2-rc1/reference/include_teal_css_js.html @@ -1,16 +1,32 @@ - - + + + + + +Code to include teal CSS and JavaScript files — include_teal_css_js • teal +Code to include teal CSS and JavaScript files — include_teal_css_js • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -126,33 +148,38 @@
    -

    Usage

    +

    Usage +

    include_teal_css_js()
    -

    Value

    +

    Value +

    A shiny.tag.list.

    -

    Details

    +

    Details +

    Simply add include_teal_css_js() as one of the UI elements.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/index.html b/v0.15.2-rc1/reference/index.html index f3e4856292..94603d8d14 100644 --- a/v0.15.2-rc1/reference/index.html +++ b/v0.15.2-rc1/reference/index.html @@ -1,8 +1,22 @@ - -Function reference • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -108,230 +128,312 @@
    -

    Core teal functions

    +

    Core teal functions +

    -

    Main functions needed to build a teal app

    +

    +

    Main functions needed to build a teal app

    -
    +
    +
    -
    +
    +
    init()
    Create the server and UI function for the shiny app
    -
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    module() modules() format(<teal_module>) print(<teal_module>) format(<teal_modules>) print(<teal_modules>)
    Create teal_module and teal_modules objects
    -
    +
    +
    +
    ui_teal_with_splash() srv_teal_with_splash()
    Add splash screen to teal application
    -
    +
    +
    +
    teal_slices() as.teal_slices() c(<teal_slices>)
    Filter settings for teal applications
    -
    -

    Helper Functions

    + +
    +
    +

    Helper Functions +

    -

    Helper functions for teal

    +

    +

    Helper functions for teal

    -
    +
    +
    -
    +
    +
    build_app_title()
    Build app title with favicon
    -
    -

    Example module

    + +
    +
    +

    Example module +

    -

    A simple teal module

    +

    +

    A simple teal module

    -
    +
    +
    -
    +
    +
    example_module()
    An example teal module
    -
    -

    Creating reports

    + +
    +
    +

    Creating reports +

    -
    +
    +
    -
    +
    +
    reporter_previewer_module()
    Create a teal module for previewing a report
    -
    +
    +
    +
    TealReportCard
    TealReportCard
    -
    +
    +
    +
    report_card_template()
    Template function for TealReportCard creation and customization
    -
    -

    Landing popup

    + +
    +
    +

    Landing popup +

    -
    +
    +
    -
    +
    +
    landing_popup_module()
    Landing popup module
    -
    -

    Functions for module developers

    + +
    +
    +

    Functions for module developers +

    -
    +
    +
    -
    +
    +
    as_tdata()
    Downgrade teal_data objects in modules for compatibility
    -
    +
    +
    +
    new_tdata()
    Create a tdata object
    -
    +
    +
    +
    get_code_tdata()
    -
    Wrapper for get_code.tdata
    -
    +
    Wrapper for get_code.tdata +
    +
    +
    +
    get_metadata()
    Function to get metadata from a tdata object
    -
    +
    +
    +
    tdata2env()
    -
    Function to convert a tdata object to an environment
    -
    +
    Function to convert a tdata object to an environment +
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    show_rcode_modal()
    Show R code modal
    -
    +
    +
    +
    join_keys(<tdata>)
    -
    Extract join_keys from tdata
    -
    -

    Validation functions

    +
    Extract join_keys from tdata +
    + +
    +
    +

    Validation functions +

    -
    +
    +
    -
    +
    +
    validate_has_data()
    Validate that dataset has a minimum number of observations
    -
    +
    +
    +
    validate_has_elements()
    Validates that vector has length greater than 0
    -
    +
    +
    +
    validate_has_variable()
    Validates that dataset contains specific variable
    -
    +
    +
    +
    validate_in()
    Validates that vector includes all expected values
    -
    +
    +
    +
    validate_inputs()
    Send input validation messages to output
    -
    +
    +
    +
    validate_n_levels()
    Validate that variables has expected number of levels
    -
    +
    +
    +
    validate_no_intersection()
    Validates no intersection between two vectors
    -
    +
    +
    +
    validate_one_row_per_id()
    Validate that dataset has unique rows for key variables
    -
    + + + + + + - - + + diff --git a/v0.15.2-rc1/reference/init.html b/v0.15.2-rc1/reference/init.html index 263abcb8f2..7434539dbd 100644 --- a/v0.15.2-rc1/reference/init.html +++ b/v0.15.2-rc1/reference/init.html @@ -1,12 +1,28 @@ - - + + + + + +Create the server and UI function for the shiny app — init • teal +Create the server and UI function for the shiny app — init • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    init(
       data,
       modules,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) For constructing the data object, refer to teal_data() and teal_data_module().

    @@ -174,21 +199,25 @@

    Arguments -

    Value

    +

    Value +

    Named list with server and UI functions.

    -

    Details

    +

    Details +

    When initializing the teal app, if datanames are not set for the teal_data object, defaults from the teal_data environment will be used.

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(
         new_iris = transform(iris, id = seq_len(nrow(iris))),
    @@ -243,17 +272,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/is_arg_used.html b/v0.15.2-rc1/reference/is_arg_used.html index 6e6376230d..95416c4fbc 100644 --- a/v0.15.2-rc1/reference/is_arg_used.html +++ b/v0.15.2-rc1/reference/is_arg_used.html @@ -1,8 +1,24 @@ - -Does the object make use of the arg — is_arg_used • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    is_arg_used(modules, arg)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_module or teal_modules) object

    arg

    (character(1)) names of the arguments to be checked against formals of teal modules.

    -
    + +
    -

    Value

    +

    Value +

    logical whether the object makes use of arg.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/join_keys.tdata.html b/v0.15.2-rc1/reference/join_keys.tdata.html index 0050234c5a..abb57484a9 100644 --- a/v0.15.2-rc1/reference/join_keys.tdata.html +++ b/v0.15.2-rc1/reference/join_keys.tdata.html @@ -1,8 +1,24 @@ - -Extract join_keys from tdata — join_keys.tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,34 +137,40 @@
    -

    Usage

    +

    Usage +

    # S3 method for tdata
     join_keys(data, ...)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    ...

    Additional arguments (not used)

    -
    + +
    + + + + - - + + diff --git a/v0.15.2-rc1/reference/landing_popup_module.html b/v0.15.2-rc1/reference/landing_popup_module.html index d5d8c90626..10422f9aee 100644 --- a/v0.15.2-rc1/reference/landing_popup_module.html +++ b/v0.15.2-rc1/reference/landing_popup_module.html @@ -1,12 +1,28 @@ - - + + + + + +Landing popup module — landing_popup_module • teal +Landing popup module — landing_popup_module • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    landing_popup_module(
       label = "Landing Popup",
       title = NULL,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label of the module.

    @@ -147,16 +172,19 @@

    Arguments -

    Value

    +

    Value +

    A teal_module (extended with teal_landing_module class) to be used in teal applications.

    -

    Examples

    +

    Examples +

    app1 <- init(
       data = teal_data(iris = iris),
       modules = modules(
    @@ -203,17 +231,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/matrix_to_mapping.html b/v0.15.2-rc1/reference/matrix_to_mapping.html index d613f76b3e..fb9946f029 100644 --- a/v0.15.2-rc1/reference/matrix_to_mapping.html +++ b/v0.15.2-rc1/reference/matrix_to_mapping.html @@ -1,14 +1,30 @@ - - + + + + + +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,36 +145,43 @@
    -

    Usage

    +

    Usage +

    matrix_to_mapping(mapping_matrix)
    -

    Arguments

    -
    mapping_matrix
    +

    Arguments +

    +
    +
    mapping_matrix

    (data.frame) of logical vectors where columns represent modules and row represent teal_slices

    -
    + +
    -

    Value

    +

    Value +

    Named list like that in the mapping attribute of a teal_slices object.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/module_filter_manager.html b/v0.15.2-rc1/reference/module_filter_manager.html index 5c64b9dbe2..d8ecf12a0c 100644 --- a/v0.15.2-rc1/reference/module_filter_manager.html +++ b/v0.15.2-rc1/reference/module_filter_manager.html @@ -1,8 +1,24 @@ - -Manage multiple FilteredData objects — module_filter_manager • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_ui(id)
     
     filter_manager_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,15 +164,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    A list of reactives, each holding a teal_slices, as returned by filter_manager_module_srv.

    -

    Details

    +

    Details +

    This module observes changes in the filters of each FilteredData object and keeps track of all filters used. A mapping of filters to modules is kept in the mapping_matrix object (which is actually a data.frame) @@ -155,17 +183,19 @@

    Details

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/module_filter_manager_modal.html b/v0.15.2-rc1/reference/module_filter_manager_modal.html index 2516f2a86b..1689793ca4 100644 --- a/v0.15.2-rc1/reference/module_filter_manager_modal.html +++ b/v0.15.2-rc1/reference/module_filter_manager_modal.html @@ -1,8 +1,24 @@ - -Filter manager modal — module_filter_manager_modal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_modal_ui(id)
     
     filter_manager_modal_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,20 +164,23 @@

    Argumentsteal_slices().

    -

    + + + + + + - - + + diff --git a/v0.15.2-rc1/reference/module_labels.html b/v0.15.2-rc1/reference/module_labels.html index 3481947b5d..4cd2cce0d0 100644 --- a/v0.15.2-rc1/reference/module_labels.html +++ b/v0.15.2-rc1/reference/module_labels.html @@ -1,8 +1,24 @@ - -Retrieve labels from teal_modules — module_labels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,18 +137,23 @@
    -

    Usage

    +

    Usage +

    module_labels(modules)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    -
    + +
    -

    Value

    +

    Value +

    A list containing the labels of the modules. If the modules are nested, @@ -133,17 +161,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/module_management.html b/v0.15.2-rc1/reference/module_management.html index 5bb9f35bab..d0fe766999 100644 --- a/v0.15.2-rc1/reference/module_management.html +++ b/v0.15.2-rc1/reference/module_management.html @@ -1,8 +1,24 @@ - -Extract/Remove module(s) of specific class — extract_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,54 @@
    -

    Usage

    +

    Usage +

    extract_module(modules, class)
     
     drop_module(modules, class)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    class

    The class name of teal_module to be extracted or dropped.

    -
    + +
    -

    Value

    +

    Value +

    -
    • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

    • +
        +
      • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

      • For drop_module, the opposite, which is all teal_modules of class other than class.

      • -

      teal_modules

      +
    +

    teal_modules

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/module_nested_tabs.html b/v0.15.2-rc1/reference/module_nested_tabs.html index aa466c5fe2..7608ddb632 100644 --- a/v0.15.2-rc1/reference/module_nested_tabs.html +++ b/v0.15.2-rc1/reference/module_nested_tabs.html @@ -1,8 +1,24 @@ - -Create a UI of nested tabs of teal_modules — module_nested_tabs • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)
     
     # S3 method for default
    @@ -163,8 +187,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -197,18 +223,25 @@

    Arguments -

    Value

    +

    Value +

    -

    Depending on the class of modules, ui_nested_tabs returns:

    • teal_module: instantiated UI of the module.

    • +

      Depending on the class of modules, ui_nested_tabs returns:

      +
        +
      • teal_module: instantiated UI of the module.

      • teal_modules: tabsetPanel with each tab corresponding to recursively calling this function on it.

      • -

      srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

      +
    +

    srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

    -

    ui_nested_tabs

    +

    +ui_nested_tabs +

    Each teal_modules is translated to a tabsetPanel and each @@ -218,25 +251,32 @@

    ui_nested_tabs

    -

    srv_nested_tabs

    +

    +srv_nested_tabs +

    -

    This module recursively calls all elements of modules and returns currently active one.

    • teal_module returns self as a active module.

    • +

      This module recursively calls all elements of modules and returns currently active one.

      +
        +
      • teal_module returns self as a active module.

      • teal_modules also returns module active within self which is determined by the input$active_tab.

      • -
    + +
    + + + + - - + + diff --git a/v0.15.2-rc1/reference/module_tabs_with_filters.html b/v0.15.2-rc1/reference/module_tabs_with_filters.html index 5b078ae2fa..77e288b508 100644 --- a/v0.15.2-rc1/reference/module_tabs_with_filters.html +++ b/v0.15.2-rc1/reference/module_tabs_with_filters.html @@ -1,12 +1,28 @@ - - + + + + + +Add right filter panel into each of the top-level teal_modules UIs — module_tabs_with_filters • teal +Add right filter panel into each of the top-level teal_modules UIs — module_tabs_with_filters • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    ui_tabs_with_filters(id, modules, datasets, filter = teal_slices())
     
     srv_tabs_with_filters(
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -161,15 +186,18 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag.list containing the main menu, placeholders for filters and placeholders for the teal modules.

    -

    Details

    +

    Details +

    The right filter panel's filter choices affect the datasets object. Therefore, all modules using the same datasets share the same filters.

    This works with nested modules of depth greater than 2, though the filter @@ -177,17 +205,19 @@

    Details

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/module_teal.html b/v0.15.2-rc1/reference/module_teal.html index 78a55153af..6d0d716340 100644 --- a/v0.15.2-rc1/reference/module_teal.html +++ b/v0.15.2-rc1/reference/module_teal.html @@ -1,8 +1,24 @@ - -teal main app module — module_teal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_teal(
       id,
       splash_ui = tags$h2("Starting the Teal App"),
    @@ -127,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -171,15 +197,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression which returns the currently active module.

    -

    Details

    +

    Details +

    It displays the splash UI which is used to fetch the data, possibly prompting for a password input to fetch the data. Once the data is ready, the splash screen is replaced by the actual teal UI that is tabsetted and @@ -200,17 +229,19 @@

    Details

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/module_teal_with_splash.html b/v0.15.2-rc1/reference/module_teal_with_splash.html index cbb398bf0f..ae213f7eae 100644 --- a/v0.15.2-rc1/reference/module_teal_with_splash.html +++ b/v0.15.2-rc1/reference/module_teal_with_splash.html @@ -1,10 +1,26 @@ - -Add splash screen to teal application — module_teal_with_splash • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    ui_teal_with_splash(
       id,
       data,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -168,15 +193,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression containing a teal_data object when data is loaded or NULL when it is not.

    -

    Details

    +

    Details +

    This module pauses app initialization pending delayed data loading. This is necessary because the filter panel and modules depend on the data to initialize.

    teal_with_splash follows the shiny module convention. @@ -186,12 +214,14 @@

    Detailsinit to create a standalone application.

    -

    See also

    +

    See also +

    -

    Examples

    +

    Examples +

    teal_modules <- modules(example_module())
     # Shiny app with modular integration of teal
     ui <- fluidPage(
    @@ -213,17 +243,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/modules_datasets.html b/v0.15.2-rc1/reference/modules_datasets.html index 6ff9cbac30..88cd9a5f09 100644 --- a/v0.15.2-rc1/reference/modules_datasets.html +++ b/v0.15.2-rc1/reference/modules_datasets.html @@ -1,8 +1,24 @@ - -Create filterable data for modules — modules_datasets • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    modules_datasets(
       data,
       modules,
    @@ -124,8 +147,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data)

    @@ -140,9 +165,11 @@

    Arguments -

    Value

    +

    Value +

    Returns list of same shape as modules, containing FilteredData at every leaf. @@ -150,17 +177,19 @@

    Value

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/modules_depth.html b/v0.15.2-rc1/reference/modules_depth.html index cb78fdfe3c..f7c93abe3c 100644 --- a/v0.15.2-rc1/reference/modules_depth.html +++ b/v0.15.2-rc1/reference/modules_depth.html @@ -1,10 +1,26 @@ - -Get module depth — modules_depth • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    modules_depth(modules, depth = 0L)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (list or teal_modules or teal_module) nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -134,26 +159,30 @@

    Arguments -

    Value

    +

    Value +

    Depth level for given module.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/reexports.html b/v0.15.2-rc1/reference/reexports.html index 7563220a24..155a10b89d 100644 --- a/v0.15.2-rc1/reference/reexports.html +++ b/v0.15.2-rc1/reference/reexports.html @@ -1,5 +1,10 @@ - - + + + + + +Objects exported from other packages — reexports • teal +Objects exported from other packages — reexports • teal + + + + + + + + + + Skip to contents @@ -40,7 +56,8 @@ + + @@ -134,7 +156,8 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    lifecycle
    +
    +
    lifecycle

    badge

    @@ -142,21 +165,24 @@

    %>%

    -
    + + - + + + + - - + + diff --git a/v0.15.2-rc1/reference/report_card_template.html b/v0.15.2-rc1/reference/report_card_template.html index 4c0de52f75..6fa5ed937f 100644 --- a/v0.15.2-rc1/reference/report_card_template.html +++ b/v0.15.2-rc1/reference/report_card_template.html @@ -1,10 +1,26 @@ - -Template function for TealReportCard creation and customization — report_card_template • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    report_card_template(
       title,
       label,
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) title of the card (unless overwritten by label)

    @@ -149,26 +174,30 @@

    Arguments -

    Value

    +

    Value +

    (TealReportCard) populated with a title, description and filter state.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/reporter_previewer_module.html b/v0.15.2-rc1/reference/reporter_previewer_module.html index e398feb1dc..ebf6594de5 100644 --- a/v0.15.2-rc1/reference/reporter_previewer_module.html +++ b/v0.15.2-rc1/reference/reporter_previewer_module.html @@ -1,20 +1,36 @@ - - + + + + + +Create a teal module for previewing a report — reporter_previewer_module • teal +Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + @@ -132,13 +154,16 @@
    -

    Usage

    +

    Usage +

    reporter_previewer_module(label = "Report previewer", server_args = list())
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -147,26 +172,30 @@

    Argumentsteal.reporter::reporter_previewer_srv().

    -

    + +
    -

    Value

    +

    Value +

    teal_module (extended with teal_module_previewer class) containing the teal.reporter previewer functionality.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/run_js_files.html b/v0.15.2-rc1/reference/run_js_files.html index 322364b8c3..63bd9ad75d 100644 --- a/v0.15.2-rc1/reference/run_js_files.html +++ b/v0.15.2-rc1/reference/run_js_files.html @@ -1,14 +1,30 @@ - - + + + + + +Run JS file from /inst/js/ package directory — run_js_files • teal +Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,41 +145,49 @@
    -

    Usage

    +

    Usage +

    run_js_files(files)
    -

    Arguments

    -
    files
    +

    Arguments +

    +
    +
    files

    (character) vector of filenames.

    -
    + +
    -

    Value

    +

    Value +

    returns NULL, invisibly.

    -

    Details

    +

    Details +

    system.file should not be used to access files in other packages, it does not work with devtools. Therefore, we redefine this method in each package as needed. Thus, we do not export this method.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/show_rcode_modal.html b/v0.15.2-rc1/reference/show_rcode_modal.html index e5a0bfe14c..c74fd03f67 100644 --- a/v0.15.2-rc1/reference/show_rcode_modal.html +++ b/v0.15.2-rc1/reference/show_rcode_modal.html @@ -1,10 +1,26 @@ - -Show R code modal — show_rcode_modal • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())
    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) Title of the modal, displayed in the first comment of the R code.

    @@ -137,24 +162,28 @@

    Argumentsshiny::getDefaultReactiveDomain() is used.

    -

    + +
    -

    References

    +

    References +

    shiny::showModal()

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/slices_store.html b/v0.15.2-rc1/reference/slices_store.html index 0c757a7263..4ae609ced8 100644 --- a/v0.15.2-rc1/reference/slices_store.html +++ b/v0.15.2-rc1/reference/slices_store.html @@ -1,10 +1,26 @@ - -Store and restore teal_slices object — slices_store • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,15 +139,18 @@
    -

    Usage

    +

    Usage +

    slices_store(tss, file)
     
     slices_restore(file)
    -

    Arguments

    -
    tss
    +

    Arguments +

    +
    +
    tss

    (teal_slices) object to be stored.

    @@ -133,9 +158,11 @@

    Arguments.

    -

    + +
    -

    Value

    +

    Value +

    slices_store returns NULL, invisibly.

    @@ -144,32 +171,39 @@

    Value

    slices_restore returns a teal_slices object restored from the file.

    -

    Details

    -

    Date and date time objects are stored in the following formats:

    • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

    • +

      Details +

      +

      Date and date time objects are stored in the following formats:

      +
        +
      • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

      • POSIX*t classes are converted to character by using format.POSIX*t(usetz = TRUE, tz = "UTC") (YYYY-MM-DD HH:MM:SS UTC, where UTC is the Coordinated Universal Time timezone short-code).

      • -

      This format is assumed during slices_restore. All POSIX*t objects in +

    +

    This format is assumed during slices_restore. All POSIX*t objects in selected or choices fields of teal_slice objects are always printed in UTC timezone as well.

    -

    See also

    +

    See also +

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/snapshot_manager_module.html b/v0.15.2-rc1/reference/snapshot_manager_module.html index 0e796660f9..a8c1a14bc1 100644 --- a/v0.15.2-rc1/reference/snapshot_manager_module.html +++ b/v0.15.2-rc1/reference/snapshot_manager_module.html @@ -1,8 +1,24 @@ - -Filter state snapshot management — snapshot_manager_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    snapshot_manager_ui(id)
     
     snapshot_manager_srv(id, slices_global, mapping_matrix, filtered_data_list)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id

    @@ -140,15 +165,18 @@

    Arguments -

    Value

    +

    Value +

    Nothing is returned.

    -

    Details

    +

    Details +

    This module introduces snapshots: stored descriptions of the filter state of the entire application. Snapshots allow the user to save the current filter state of the application for later use in the session, as well as to save it to file in order to share it with an app developer or other users, @@ -160,7 +188,8 @@

    Details

    -

    Server logic

    +

    Server logic +

    Snapshots are basically teal_slices objects, however, since each module is served by a separate instance @@ -175,7 +204,8 @@

    Server logic -

    Snapshot mechanics

    +

    Snapshot mechanics +

    When a snapshot is captured, the user is prompted to name it. @@ -205,7 +235,8 @@

    Snapshot mechanics -

    Transferring snapshots

    +

    Transferring snapshots +

    Snapshots uploaded from disk should only be used in the same application they come from, @@ -215,22 +246,25 @@

    Transferring snapshots

    -

    Author

    +

    Author +

    Aleksander Chlebowski

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/tdata.html b/v0.15.2-rc1/reference/tdata.html index 7342093efd..21e1cde217 100644 --- a/v0.15.2-rc1/reference/tdata.html +++ b/v0.15.2-rc1/reference/tdata.html @@ -1,22 +1,38 @@ - - + + + + + +Create a tdata object — tdata • teal +Create a tdata object — tdata • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + + @@ -126,19 +148,25 @@

    [Deprecated]

    Create a new object called tdata which contains data, a reactive list of data.frames -(or MultiAssayExperiment), with attributes:

    • code (reactive) containing code used to generate the data

    • +(or MultiAssayExperiment), with attributes:

      +
        +
      • code (reactive) containing code used to generate the data

      • join_keys (join_keys) containing the relationships between the data

      • metadata (named list) containing any metadata associated with the data frames

      • -
    + +
    -

    Usage

    +

    Usage +

    new_tdata(data, code = "", join_keys = NULL, metadata = NULL)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (named list) A list of data.frame or MultiAssayExperiment objects, which optionally can be reactive. Inside this object all of these items will be made reactive.

    @@ -160,20 +188,24 @@

    Arguments -

    Value

    +

    Value +

    A tdata object.

    -

    See also

    +

    See also +

    as_tdata

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars), dd = data.frame(x = 1:10)),
    @@ -354,17 +386,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/tdata2env.html b/v0.15.2-rc1/reference/tdata2env.html index c72dad4bba..06febce645 100644 --- a/v0.15.2-rc1/reference/tdata2env.html +++ b/v0.15.2-rc1/reference/tdata2env.html @@ -1,8 +1,24 @@ - -Function to convert a tdata object to an environment — tdata2env • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,25 +137,31 @@
    -

    Usage

    +

    Usage +

    tdata2env(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    An environment.

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars)),
    @@ -145,17 +174,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/tdata_deprecation.html b/v0.15.2-rc1/reference/tdata_deprecation.html index ed1fb5f00c..a2c0fbae2e 100644 --- a/v0.15.2-rc1/reference/tdata_deprecation.html +++ b/v0.15.2-rc1/reference/tdata_deprecation.html @@ -1,8 +1,24 @@ - -Downgrade teal_data objects in modules for compatibility — as_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,24 +136,30 @@
    -

    Usage

    +

    Usage +

    as_tdata(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    data object, either tdata or teal_data, the latter possibly in a reactive expression

    -
    + +
    -

    Value

    +

    Value +

    Object of class tdata.

    -

    Details

    +

    Details +

    Recent changes in teal cause modules to fail because modules expect a tdata object to be passed to the data argument but instead they receive a teal_data object, which is additionally wrapped in a reactive expression in the server functions. @@ -140,7 +168,8 @@

    Details
    -

    Examples

    +

    Examples +

    td <- teal_data()
     td <- within(td, iris <- iris) %>% within(mtcars <- mtcars)
     td
    @@ -192,17 +221,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.15.2-rc1/reference/teal-package.html b/v0.15.2-rc1/reference/teal-package.html index c155214b25..e4d7102cae 100644 --- a/v0.15.2-rc1/reference/teal-package.html +++ b/v0.15.2-rc1/reference/teal-package.html @@ -1,10 +1,26 @@ - -teal: Interactive exploration of clinical trials data — teal-package • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,21 +141,30 @@
    -

    Details

    +

    Details +

    To learn mode about the package, visit the project website or read the init() manual page.

    -

    Author

    +

    Author +

    Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID)

    -

    Authors:

    + +
    + + + + - - + + diff --git a/v0.15.2-rc1/reference/teal_data_datanames.html b/v0.15.2-rc1/reference/teal_data_datanames.html index a0c08f7852..158b9149c0 100644 --- a/v0.15.2-rc1/reference/teal_data_datanames.html +++ b/v0.15.2-rc1/reference/teal_data_datanames.html @@ -1,10 +1,26 @@ - -Wrapper on teal.data::datanames — teal_data_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -117,18 +140,23 @@
    -

    Usage

    +

    Usage +

    teal_data_datanames(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data)

    -
    + +
    -

    Value

    +

    Value +

    character

    @@ -137,17 +165,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/teal_data_module.html b/v0.15.2-rc1/reference/teal_data_module.html index 673c516aad..ceaaeb4b5e 100644 --- a/v0.15.2-rc1/reference/teal_data_module.html +++ b/v0.15.2-rc1/reference/teal_data_module.html @@ -1,10 +1,26 @@ - -Data module for teal applications — teal_data_module • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    teal_data_module(ui, server)
     
     # S4 method for teal_data_module,character
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    ui
    +

    Arguments +

    +
    +
    ui

    (function(id)) shiny module UI function; must only take id argument

    @@ -159,9 +184,11 @@

    Arguments -

    Value

    +

    Value +

    teal_data_module returns an object of class teal_data_module.

    @@ -173,7 +200,8 @@

    Value

    within returns a teal_data_module object with a delayed evaluation of expr when the module is run.

    -

    Details

    +

    Details +

    teal_data_module creates a shiny module to supply or modify data in a teal application. The module allows for running data pre-processing code (creation and some modification) after the app starts. The body of the server function will be run in the app rather than in the global environment. @@ -188,12 +216,14 @@

    Details... argument: as name:value pairs are passed to ..., name in expr will be replaced with value.

    -

    Examples

    +

    Examples +

    tdm <- teal_data_module(
       ui = function(id) {
         ns <- NS(id)
    @@ -326,17 +356,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/teal_data_to_filtered_data.html b/v0.15.2-rc1/reference/teal_data_to_filtered_data.html index 495458d944..36154860d7 100644 --- a/v0.15.2-rc1/reference/teal_data_to_filtered_data.html +++ b/v0.15.2-rc1/reference/teal_data_to_filtered_data.html @@ -1,8 +1,24 @@ - -Create a FilteredData — teal_data_to_filtered_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    teal_data_to_filtered_data(x, datanames = teal_data_datanames(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (teal_data) object

    datanames

    (character) vector of data set names to include; must be subset of datanames(x)

    -
    + +
    -

    Value

    +

    Value +

    A FilteredData object.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/teal_modules.html b/v0.15.2-rc1/reference/teal_modules.html index cb0f323d76..891b8d42d5 100644 --- a/v0.15.2-rc1/reference/teal_modules.html +++ b/v0.15.2-rc1/reference/teal_modules.html @@ -1,10 +1,26 @@ - -Create teal_module and teal_modules objects — teal_modules • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    module(
       label = "module",
       server = function(id, ...) {
    @@ -151,14 +174,19 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    server
    -

    (function) shiny module with following arguments:

    • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

    • +
      +

      (function) shiny module with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

      • input, output, session - (optional; not recommended) When provided, then shiny::callModule() will be used to call a module. From shiny 1.5.0, the recommended way is to use shiny::moduleServer() instead which doesn't require these arguments.

      • @@ -172,14 +200,19 @@

        Argumentsteal.slice::FilterPanelAPI).

      • ... (optional) When provided, server_args elements will be passed to the module named argument or to the ....

      • -

      +
    +
    ui
    -

    (function) shiny UI module function with following arguments:

    • id - teal will set proper shiny namespace for this module.

    • +
      +

      (function) shiny UI module function with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module.

      • ... (optional) When provided, ui_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    filters
    @@ -203,7 +236,8 @@

    Argumentsformat() and print(): Arguments passed to other methods.

    @@ -215,20 +249,26 @@

    Arguments -

    Value

    +

    Value +

    module() returns an object of class teal_module.

    -

    modules() returns a teal_modules object which contains following fields:

    • label: taken from the label argument.

    • +

      modules() returns a teal_modules object which contains following fields:

      +
        +
      • label: taken from the label argument.

      • children: a list containing objects passed in .... List elements are named after their label attribute converted to a valid shiny id.

      • -
    + +
    -

    Details

    +

    Details +

    module() creates an instance of a teal_module that can be placed in a teal application. modules() shapes the structure of a the application by organizing teal_module within the navigation panel. It wraps teal_module and teal_modules objects in a teal_modules object, @@ -241,7 +281,8 @@

    Details
    -

    Examples

    +

    Examples +

    library(shiny)
     
     module_1 <- module(
    @@ -298,17 +339,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.15.2-rc1/reference/teal_slices.html b/v0.15.2-rc1/reference/teal_slices.html index 3d9cf92f1a..7c3c3231cf 100644 --- a/v0.15.2-rc1/reference/teal_slices.html +++ b/v0.15.2-rc1/reference/teal_slices.html @@ -1,8 +1,24 @@ - -Filter settings for teal applications — teal_slices • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    teal_slices(
       ...,
       exclude_varnames = NULL,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    any number of teal_slice objects. For print and format, additional arguments passed to other functions.

    @@ -146,15 +171,19 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal.slice's GitHub repository.

    (character(1)) string specifying how observations are tallied by these filter states. -Possible options:

    • "none" (default) to have counts of single FilterState to show unfiltered number only.

    • +Possible options:

      +
        +
      • "none" (default) to have counts of single FilterState to show unfiltered number only.

      • "all" to have counts of single FilterState to show number of observation in filtered and unfiltered dataset. Note, that issues were reported when using this option with MultiAssayExperiment. Please make sure that adding new filters doesn't fail on target platform before deploying for production.

      • -
    + +
    allow_add
    @@ -162,24 +191,32 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal's GitHub repository.

    (named list) specifies which filters will be active in which modules on app start. Elements should contain character vector of teal_slice ids (see teal.slice::teal_slice). -Names of the list should correspond to teal_module label set in module() function.

    • ids listed under "global_filters will be active in all modules.

    • +Names of the list should correspond to teal_module label set in module() function.

      +
        +
      • ids listed under "global_filters will be active in all modules.

      • If missing, all filters will be applied to all modules.

      • If empty list, all filters will be available to all modules but will start inactive.

      • If module_specific is FALSE, only global_filters will be active on start.

      • -
    + +
    app_id
    @@ -192,27 +229,32 @@

    Arguments -

    Value

    +

    Value +

    A teal_slices object.

    -

    Details

    +

    Details +

    Produces a teal_slices object. The teal_slice components will specify filter states that will be active when the app starts. Attributes (created with the named arguments) will configure the way the app applies filters. See argument descriptions for details.

    -

    Examples

    +

    Examples +

    filter <- teal_slices(
       teal_slice(dataname = "iris", varname = "Species", id = "species"),
       teal_slice(dataname = "iris", varname = "Sepal.Length", id = "sepal_length"),
    @@ -245,17 +287,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/unfold_mapping.html b/v0.15.2-rc1/reference/unfold_mapping.html index fefc8785ad..1d3354c4b8 100644 --- a/v0.15.2-rc1/reference/unfold_mapping.html +++ b/v0.15.2-rc1/reference/unfold_mapping.html @@ -1,8 +1,24 @@ - -Explicitly enumerate global filters. — unfold_mapping • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    unfold_mapping(mapping, module_names)
    -

    Arguments

    -
    mapping
    +

    Arguments +

    +
    +
    mapping

    (named list) as stored in mapping parameter of teal_slices

    module_names

    (character) vector containing names of all modules in the app

    -
    + +
    -

    Value

    +

    Value +

    A named_list with one element per module, each element containing all filters applied to that module.

    + + + + - - + + diff --git a/v0.15.2-rc1/reference/validate_app_title_tag.html b/v0.15.2-rc1/reference/validate_app_title_tag.html index c1a7d8c5dd..ecba517221 100644 --- a/v0.15.2-rc1/reference/validate_app_title_tag.html +++ b/v0.15.2-rc1/reference/validate_app_title_tag.html @@ -1,8 +1,24 @@ - -Function for validating the title parameter of teal::init — validate_app_title_tag • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,29 +137,35 @@
    -

    Usage

    +

    Usage +

    validate_app_title_tag(shiny_tag)
    -

    Arguments

    -
    shiny_tag
    +

    Arguments +

    +
    +
    shiny_tag

    (shiny.tag) Object to validate for a valid title.

    -
    + +
    + + + + - - + + diff --git a/v0.15.2-rc1/reference/validate_has_data.html b/v0.15.2-rc1/reference/validate_has_data.html index f63d174b66..41be8e36df 100644 --- a/v0.15.2-rc1/reference/validate_has_data.html +++ b/v0.15.2-rc1/reference/validate_has_data.html @@ -1,8 +1,24 @@ - -Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    validate_has_data(
       x,
       min_nrow = NULL,
    @@ -125,8 +148,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    @@ -145,14 +170,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(teal)
     ui <- fluidPage(
       sliderInput("len", "Max Length of Sepal",
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/validate_has_elements.html b/v0.15.2-rc1/reference/validate_has_elements.html index bbbbbb76c2..1fa0b9936f 100644 --- a/v0.15.2-rc1/reference/validate_has_elements.html +++ b/v0.15.2-rc1/reference/validate_has_elements.html @@ -1,8 +1,24 @@ - -Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_has_elements(x, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    msg

    message to display

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B"), each = 15)
    @@ -169,17 +197,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/validate_has_variable.html b/v0.15.2-rc1/reference/validate_has_variable.html index cfd25d1a0b..6739c20696 100644 --- a/v0.15.2-rc1/reference/validate_has_variable.html +++ b/v0.15.2-rc1/reference/validate_has_variable.html @@ -1,8 +1,24 @@ - -Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_has_variable(data, varname, msg)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20)
    @@ -165,17 +193,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/validate_in.html b/v0.15.2-rc1/reference/validate_in.html index d6d95db3ee..ab653781da 100644 --- a/v0.15.2-rc1/reference/validate_in.html +++ b/v0.15.2-rc1/reference/validate_in.html @@ -1,8 +1,24 @@ - -Validates that vector includes all expected values — validate_in • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_in(x, choices, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Vector of values to test.

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    ui <- fluidPage(
       selectInput(
         "species",
    @@ -163,17 +191,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/validate_inputs.html b/v0.15.2-rc1/reference/validate_inputs.html index 86059f2f9c..2e9ac2f514 100644 --- a/v0.15.2-rc1/reference/validate_inputs.html +++ b/v0.15.2-rc1/reference/validate_inputs.html @@ -1,10 +1,26 @@ - -Send input validation messages to output — validate_inputs • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    validate_inputs(..., header = "Some inputs require attention")
    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    either any number of InputValidator objects or an optionally named, possibly nested list of InputValidator objects, see Details

    @@ -132,15 +157,18 @@

    Arguments -

    Value

    +

    Value +

    Returns NULL if the final validation call passes and a shiny.silent.error if it fails.

    -

    Details

    +

    Details +

    shiny::validate is used to withhold rendering of an output element until certain conditions are met and to print a validation message in place of the output element. @@ -159,12 +187,14 @@

    Detailsheader.

    -

    Examples

    +

    Examples +

    library(shiny)
     library(shinyvalidate)
     
    @@ -238,17 +268,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/validate_n_levels.html b/v0.15.2-rc1/reference/validate_n_levels.html index 10b89d4741..851e80147f 100644 --- a/v0.15.2-rc1/reference/validate_n_levels.html +++ b/v0.15.2-rc1/reference/validate_n_levels.html @@ -1,8 +1,24 @@ - -Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    variable name. If x is not a factor, the unique values are treated as levels.

    @@ -137,16 +162,19 @@

    Arguments -

    Details

    +

    Details +

    If the number of levels of x is less than min_levels or greater than max_levels the validation will fail. This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20),
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/validate_no_intersection.html b/v0.15.2-rc1/reference/validate_no_intersection.html index 8350682688..31fccbc460 100644 --- a/v0.15.2-rc1/reference/validate_no_intersection.html +++ b/v0.15.2-rc1/reference/validate_no_intersection.html @@ -1,8 +1,24 @@ - -Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_no_intersection(x, y, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B", "C"), each = 10)
    @@ -178,17 +206,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2-rc1/reference/validate_one_row_per_id.html b/v0.15.2-rc1/reference/validate_one_row_per_id.html index 3fbad3eec2..095ac6b44d 100644 --- a/v0.15.2-rc1/reference/validate_one_row_per_id.html +++ b/v0.15.2-rc1/reference/validate_one_row_per_id.html @@ -1,8 +1,24 @@ - -Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_one_row_per_id(x, key = c("USUBJID", "STUDYID"))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    key

    (character) Vector of ID variables from x that identify unique records.

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    iris$id <- rep(1:50, times = 3)
     ui <- fluidPage(
       selectInput(
    @@ -161,17 +189,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/404.html b/v0.15.2/404.html index c3a8f3acff..63023393ef 100644 --- a/v0.15.2/404.html +++ b/v0.15.2/404.html @@ -1,5 +1,4 @@ - - + @@ -80,23 +79,7 @@ - - + - + + diff --git a/v0.15.2/CODE_OF_CONDUCT.html b/v0.15.2/CODE_OF_CONDUCT.html index e751a842c5..dc1fc90789 100644 --- a/v0.15.2/CODE_OF_CONDUCT.html +++ b/v0.15.2/CODE_OF_CONDUCT.html @@ -1,8 +1,22 @@ - -Contributor Covenant Code of Conduct • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,65 +131,80 @@
    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    • Demonstrating empathy and kindness toward other people
    • +
        +
      • Demonstrating empathy and kindness toward other people
      • Being respectful of differing opinions, viewpoints, and experiences
      • Giving and gracefully accepting constructive feedback
      • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
      • Focusing on what is best not just for us as individuals, but for the overall community
      • -

      Examples of unacceptable behavior include:

      -
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • +
      +

      Examples of unacceptable behavior include:

      +
        +
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • Trolling, insulting or derogatory comments, and personal or political attacks
      • Public or private harassment
      • Publishing others’ private information, such as a physical or email address, without their explicit permission
      • Other conduct which could reasonably be considered inappropriate in a professional setting
      • -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -177,17 +212,19 @@

    Attribution

    + + + + - - + + diff --git a/v0.15.2/CONTRIBUTING.html b/v0.15.2/CONTRIBUTING.html index e60c9ba54a..908e7d746e 100644 --- a/v0.15.2/CONTRIBUTING.html +++ b/v0.15.2/CONTRIBUTING.html @@ -1,8 +1,22 @@ - -Contribution Guidelines • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -113,7 +133,8 @@

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -124,38 +145,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    GitHub Flow

    +

    GitHub Flow +

    This repository uses the GitHub Flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes

        Make sure your code

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR)

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -169,76 +199,93 @@

        GitHub Flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    -

    Coding guidelines

    +

    Coding guidelines +

    This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Dependency management

    +

    Dependency management +

    Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

    -

    Dependency version management

    +

    Dependency version management +

    If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    -
    • Minimum 5% of lines of code authored* (determined by git blame query) OR
    • +
        +
      • Minimum 5% of lines of code authored* (determined by git blame query) OR
      • Being at the top 5 contributors in terms of number of commits OR lines added OR lines removed*
      • -

      *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

      +
    +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + + + - - + + diff --git a/v0.15.2/LICENSE-text.html b/v0.15.2/LICENSE-text.html index 149de865b6..17ba20d136 100644 --- a/v0.15.2/LICENSE-text.html +++ b/v0.15.2/LICENSE-text.html @@ -1,8 +1,22 @@ - -License • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -123,17 +143,19 @@ limitations under the License. - + + + + - - + + diff --git a/v0.15.2/SECURITY.html b/v0.15.2/SECURITY.html index 409122c91e..0bab2fdd15 100644 --- a/v0.15.2/SECURITY.html +++ b/v0.15.2/SECURITY.html @@ -1,8 +1,22 @@ - -Security Policy • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,38 +131,44 @@
    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    -
    • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
    • +
        +
      • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
      • Full paths of source file(s) related to the manifestation of the issue
      • The location of the affected source code (tag/branch/commit or direct URL)
      • Any special configuration required to reproduce the issue
      • Step-by-step instructions to reproduce the issue
      • Proof-of-concept or exploit code (if possible)
      • Impact of the issue, including how an attacker might exploit the issue
      • -

      This information will help us triage your report more quickly.

      +
    +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + + + - - + + diff --git a/v0.15.2/articles/adding-support-for-reporting.html b/v0.15.2/articles/adding-support-for-reporting.html index 7dd83299c4..886e755f68 100644 --- a/v0.15.2/articles/adding-support-for-reporting.html +++ b/v0.15.2/articles/adding-support-for-reporting.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/blueprint/actors.html b/v0.15.2/articles/blueprint/actors.html index 84d06815f4..117dcd140e 100644 --- a/v0.15.2/articles/blueprint/actors.html +++ b/v0.15.2/articles/blueprint/actors.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/blueprint/dataflow.html b/v0.15.2/articles/blueprint/dataflow.html index 9c46bc2de8..36f5082365 100644 --- a/v0.15.2/articles/blueprint/dataflow.html +++ b/v0.15.2/articles/blueprint/dataflow.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/blueprint/filter_panel.html b/v0.15.2/articles/blueprint/filter_panel.html index b3c15e6293..ee7011595d 100644 --- a/v0.15.2/articles/blueprint/filter_panel.html +++ b/v0.15.2/articles/blueprint/filter_panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/blueprint/in_app_data.html b/v0.15.2/articles/blueprint/in_app_data.html index 3c44c395ee..9277cc5d8e 100644 --- a/v0.15.2/articles/blueprint/in_app_data.html +++ b/v0.15.2/articles/blueprint/in_app_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/blueprint/index.html b/v0.15.2/articles/blueprint/index.html index e29740786a..5e99a13233 100644 --- a/v0.15.2/articles/blueprint/index.html +++ b/v0.15.2/articles/blueprint/index.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/blueprint/input_data.html b/v0.15.2/articles/blueprint/input_data.html index 9bb316b3f1..76a10cdc87 100644 --- a/v0.15.2/articles/blueprint/input_data.html +++ b/v0.15.2/articles/blueprint/input_data.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/blueprint/intro.html b/v0.15.2/articles/blueprint/intro.html index 3d2936ab23..3c5250000b 100644 --- a/v0.15.2/articles/blueprint/intro.html +++ b/v0.15.2/articles/blueprint/intro.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/blueprint/module_encapsulation.html b/v0.15.2/articles/blueprint/module_encapsulation.html index 6f081619c0..5806e11ff3 100644 --- a/v0.15.2/articles/blueprint/module_encapsulation.html +++ b/v0.15.2/articles/blueprint/module_encapsulation.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/blueprint/product_map.html b/v0.15.2/articles/blueprint/product_map.html index d30b3aa113..3b993028aa 100644 --- a/v0.15.2/articles/blueprint/product_map.html +++ b/v0.15.2/articles/blueprint/product_map.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/bootstrap-themes-in-teal.html b/v0.15.2/articles/bootstrap-themes-in-teal.html index e2a2cb4ec8..7d5cac222b 100644 --- a/v0.15.2/articles/bootstrap-themes-in-teal.html +++ b/v0.15.2/articles/bootstrap-themes-in-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/creating-custom-modules.html b/v0.15.2/articles/creating-custom-modules.html index 2cfd76907d..c64af5fba5 100644 --- a/v0.15.2/articles/creating-custom-modules.html +++ b/v0.15.2/articles/creating-custom-modules.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/data-as-shiny-module.html b/v0.15.2/articles/data-as-shiny-module.html index 716aa387fe..11c5b7476a 100644 --- a/v0.15.2/articles/data-as-shiny-module.html +++ b/v0.15.2/articles/data-as-shiny-module.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/filter-panel.html b/v0.15.2/articles/filter-panel.html index cd7f27469d..1dead27954 100644 --- a/v0.15.2/articles/filter-panel.html +++ b/v0.15.2/articles/filter-panel.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/getting-started-with-teal.html b/v0.15.2/articles/getting-started-with-teal.html index 070608a63f..2e092e1ab4 100644 --- a/v0.15.2/articles/getting-started-with-teal.html +++ b/v0.15.2/articles/getting-started-with-teal.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/including-data-in-teal-applications.html b/v0.15.2/articles/including-data-in-teal-applications.html index 580c913f35..d41f4f7a88 100644 --- a/v0.15.2/articles/including-data-in-teal-applications.html +++ b/v0.15.2/articles/including-data-in-teal-applications.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/articles/index.html b/v0.15.2/articles/index.html index 9cb9ed52e5..7fa34719a6 100644 --- a/v0.15.2/articles/index.html +++ b/v0.15.2/articles/index.html @@ -1,8 +1,22 @@ - -Articles • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -111,78 +131,113 @@

    Get started

    -
    Getting Started with teal
    +
    +
    Getting Started with teal
    -
    + +
    + + + + + + + + + +

    📃 Technical blueprint

    -

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    +

    +

    The purpose of the blueprint is to aid new developer’s comprehension of the fundamental principles of the teal framework. We will explore crucial teal concepts such as data flow, actors, and filter panel, among others.

    -
    About Technical Blueprint
    +
    +
    About Technical Blueprint
    -
    Introduction
    + +
    Introduction
    -
    Actors
    + +
    Actors
    -
    Data Flow
    + +
    Data Flow
    -
    Product Map
    + +
    Product Map
    -
    + + + + + + + + + + - - + + diff --git a/v0.15.2/articles/teal-options.html b/v0.15.2/articles/teal-options.html index 1158b3339c..fe98a8535d 100644 --- a/v0.15.2/articles/teal-options.html +++ b/v0.15.2/articles/teal-options.html @@ -1,5 +1,4 @@ - - + @@ -82,23 +81,7 @@ - - + - + + diff --git a/v0.15.2/authors.html b/v0.15.2/authors.html index edbe52093f..716a75ddc3 100644 --- a/v0.15.2/authors.html +++ b/v0.15.2/authors.html @@ -1,8 +1,22 @@ - -Authors and Citation • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -110,7 +130,8 @@

    Authors

    -
    • +
        +
      • Dawid Kaledkowski. Author, maintainer.

      • @@ -182,7 +203,8 @@

        Authors

        Maximilian Mordig. Contributor.

        -
    + +

    Citation

    @@ -203,17 +225,19 @@

    Citation

    }
    + + + + - - + + diff --git a/v0.15.2/coverage-report/index.html b/v0.15.2/coverage-report/index.html index 0d3937952e..91b47fe15e 100644 --- a/v0.15.2/coverage-report/index.html +++ b/v0.15.2/coverage-report/index.html @@ -1,22 +1,21 @@ - - + - + - - + + - + - + - - - + + + @@ -445,42 +444,48 @@

    teal coverage - 69.63%

    48 - 34x + 34x +
      lifecycle::deprecate_soft(
    49 - 34x + 34x +
        when = "0.15.0",
    50 - 34x + 34x +
        what = "tdata()",
    51 - 34x + 34x +
        details = paste(
    52 - 34x + 34x +
          "tdata is deprecated and will be removed in the next release. Use `teal_data` instead.\n",
    53 - 34x + 34x +
          "Please follow migration instructions https://github.com/insightsengineering/teal/discussions/987."
    @@ -501,28 +506,32 @@

    teal coverage - 69.63%

    56 - 34x + 34x +
      checkmate::assert_list(
    57 - 34x + 34x +
        data,
    58 - 34x + 34x +
        any.missing = FALSE, names = "unique",
    59 - 34x + 34x +
        types = c("data.frame", "reactive", "MultiAssayExperiment")
    @@ -536,14 +545,16 @@

    teal coverage - 69.63%

    61 - 30x + 30x +
      checkmate::assert_class(join_keys, "join_keys", null.ok = TRUE)
    62 - 29x + 29x +
      checkmate::assert_multi_class(code, c("character", "reactive"))
    @@ -557,14 +568,16 @@

    teal coverage - 69.63%

    64 - 28x + 28x +
      checkmate::assert_list(metadata, names = "unique", null.ok = TRUE)
    65 - 26x + 26x +
      checkmate::assert_subset(names(metadata), names(data))
    @@ -578,14 +591,16 @@

    teal coverage - 69.63%

    67 - 25x + 25x +
      if (is.reactive(code)) {
    68 - 9x + 9x +
        isolate(checkmate::assert_class(code(), "character", .var.name = "code"))
    @@ -613,21 +628,24 @@

    teal coverage - 69.63%

    72 - 24x + 24x +
      for (x in names(data)) {
    73 - 47x + 47x +
        if (!is.reactive(data[[x]])) {
    74 - 31x + 31x +
          data[[x]] <- do.call(reactive, list(as.name(x)), envir = list2env(data[x]))
    @@ -662,21 +680,24 @@

    teal coverage - 69.63%

    79 - 24x + 24x +
      attr(data, "code") <- if (is.reactive(code)) code else reactive(code)
    80 - 24x + 24x +
      attr(data, "join_keys") <- join_keys
    81 - 24x + 24x +
      attr(data, "metadata") <- metadata
    @@ -697,14 +718,16 @@

    teal coverage - 69.63%

    84 - 24x + 24x +
      class(data) <- c("tdata", class(data))
    85 - 24x + 24x +
      data
    @@ -844,14 +867,16 @@

    teal coverage - 69.63%

    105 - 2x + 2x +
      checkmate::assert_class(data, "tdata")
    106 - 1x + 1x +
      list2env(lapply(data, function(x) if (is.reactive(x)) x() else x))
    @@ -942,14 +967,16 @@

    teal coverage - 69.63%

    119 - 7x + 7x +
      checkmate::assert_class(data, "tdata")
    120 - 5x + 5x +
      attr(data, "code")()
    @@ -1005,7 +1032,8 @@

    teal coverage - 69.63%

    128 - 2x + 2x +
      attr(data, "join_keys")
    @@ -1068,14 +1096,16 @@

    teal coverage - 69.63%

    137 - 4x + 4x +
      checkmate::assert_string(dataname)
    138 - 4x + 4x +
      UseMethod("get_metadata", data)
    @@ -1117,21 +1147,24 @@

    teal coverage - 69.63%

    144 - 4x + 4x +
      metadata <- attr(data, "metadata")
    145 - 4x + 4x +
      if (is.null(metadata)) {
    146 - 1x + 1x +
        return(NULL)
    @@ -1145,7 +1178,8 @@

    teal coverage - 69.63%

    148 - 3x + 3x +
      metadata[[dataname]]
    @@ -1390,14 +1424,16 @@

    teal coverage - 69.63%

    183 - 8x + 8x +
      if (inherits(x, "tdata")) {
    184 - 2x + 2x +
        return(x)
    @@ -1411,77 +1447,88 @@

    teal coverage - 69.63%

    186 - 6x + 6x +
      if (is.reactive(x)) {
    187 - 1x + 1x +
        checkmate::assert_class(isolate(x()), "teal_data")
    188 - 1x + 1x +
        datanames <- isolate(teal_data_datanames(x()))
    189 - 1x + 1x +
        datasets <- sapply(datanames, function(dataname) reactive(x()[[dataname]]), simplify = FALSE)
    190 - 1x + 1x +
        code <- reactive(teal.code::get_code(x()))
    191 - 1x + 1x +
        join_keys <- isolate(teal.data::join_keys(x()))
    192 - 5x + 5x +
      } else if (inherits(x, "teal_data")) {
    193 - 5x + 5x +
        datanames <- teal_data_datanames(x)
    194 - 5x + 5x +
        datasets <- sapply(datanames, function(dataname) reactive(x[[dataname]]), simplify = FALSE)
    195 - 5x + 5x +
        code <- reactive(teal.code::get_code(x))
    196 - 5x + 5x +
        join_keys <- isolate(teal.data::join_keys(x))
    @@ -1502,7 +1549,8 @@

    teal coverage - 69.63%

    199 - 6x + 6x +
      new_tdata(data = datasets, code = code, join_keys = join_keys)
    @@ -1641,14 +1689,16 @@

    teal coverage - 69.63%

    18 - 2x + 2x +
      packageStartupMessage(
    19 - 2x + 2x +
        "\nYou are using teal version ",
    @@ -1669,7 +1719,8 @@

    teal coverage - 69.63%

    22 - 2x + 2x +
        read.dcf(system.file("DESCRIPTION", package = "teal"))[, "Version"]
    @@ -1941,56 +1992,64 @@

    teal coverage - 69.63%

    25 - 4x + 4x +
          checkmate::assert_character(src, min.len = 0, max.len = 1)
    26 - 4x + 4x +
          params <- list(...)
    27 - 4x + 4x +
          params$eval <- FALSE
    28 - 4x + 4x +
          rblock <- RcodeBlock$new(src)
    29 - 4x + 4x +
          rblock$set_params(params)
    30 - 4x + 4x +
          self$append_content(rblock)
    31 - 4x + 4x +
          self$append_metadata("SRC", src)
    32 - 4x + 4x +
          invisible(self)
    @@ -2060,28 +2119,32 @@

    teal coverage - 69.63%

    42 - 5x + 5x +
          checkmate::assert_class(fs, "teal_slices")
    43 - 4x + 4x +
          self$append_text("Filter State", "header3")
    44 - 4x + 4x +
          if (length(fs)) {
    45 - 3x + 3x +
            self$append_content(TealSlicesBlock$new(fs))
    @@ -2095,7 +2158,8 @@

    teal coverage - 69.63%

    47 - 1x + 1x +
            self$append_text("No filters specified.")
    @@ -2109,7 +2173,8 @@

    teal coverage - 69.63%

    49 - 4x + 4x +
          invisible(self)
    @@ -2186,56 +2251,64 @@

    teal coverage - 69.63%

    60 - 4x + 4x +
          checkmate::assert_list(encodings)
    61 - 4x + 4x +
          self$append_text("Selected Options", "header3")
    62 - 4x + 4x +
          if (requireNamespace("yaml", quietly = TRUE)) {
    63 - 4x + 4x +
            self$append_text(yaml::as.yaml(encodings, handlers = list(
    64 - 4x + 4x +
              POSIXct = function(x) format(x, "%Y-%m-%d"),
    65 - 4x + 4x +
              POSIXlt = function(x) format(x, "%Y-%m-%d"),
    66 - 4x + 4x +
              Date = function(x) format(x, "%Y-%m-%d")
    67 - 4x + 4x +
            )), "verbatim")
    @@ -2263,14 +2336,16 @@

    teal coverage - 69.63%

    71 - 4x + 4x +
          self$append_metadata("Encodings", encodings)
    72 - 4x + 4x +
          invisible(self)
    @@ -2424,21 +2499,24 @@

    teal coverage - 69.63%

    94 - 9x + 9x +
          self$set_content(content)
    95 - 8x + 8x +
          self$set_style(style)
    96 - 8x + 8x +
          invisible(self)
    @@ -2529,56 +2607,64 @@

    teal coverage - 69.63%

    109 - 10x + 10x +
          checkmate::assert_class(content, "teal_slices")
    110 - 9x + 9x +
          if (length(content) != 0) {
    111 - 7x + 7x +
            states_list <- lapply(content, function(x) {
    112 - 7x + 7x +
              x_list <- shiny::isolate(as.list(x))
    113 - 7x + 7x +
              if (
    114 - 7x + 7x +
                inherits(x_list$choices, c("integer", "numeric", "Date", "POSIXct", "POSIXlt")) &&
    115 - 7x + 7x +
                  length(x_list$choices) == 2 &&
    116 - 7x + 7x +
                  length(x_list$selected) == 2
    @@ -2613,7 +2699,8 @@

    teal coverage - 69.63%

    121 - 7x + 7x +
              if (!is.null(x_list$arg)) {
    @@ -2641,14 +2728,16 @@

    teal coverage - 69.63%

    125 - 7x + 7x +
              x_list <- x_list[
    126 - 7x + 7x +
                c("dataname", "varname", "experiment", "arg", "expr", "selected", "range", "keep_na", "keep_inf")
    @@ -2662,21 +2751,24 @@

    teal coverage - 69.63%

    128 - 7x + 7x +
              names(x_list) <- c(
    129 - 7x + 7x +
                "Dataset name", "Variable name", "Experiment", "Filtering by", "Applied expression",
    130 - 7x + 7x +
                "Selected Values", "Selected range", "Include NA values", "Include Inf values"
    @@ -2697,7 +2789,8 @@

    teal coverage - 69.63%

    133 - 7x + 7x +
              Filter(Negate(is.null), x_list)
    @@ -2718,14 +2811,16 @@

    teal coverage - 69.63%

    136 - 7x + 7x +
            if (requireNamespace("yaml", quietly = TRUE)) {
    137 - 7x + 7x +
              super$set_content(yaml::as.yaml(states_list))
    @@ -2760,14 +2855,16 @@

    teal coverage - 69.63%

    142 - 9x + 9x +
          private$teal_slices <- content
    143 - 9x + 9x +
          invisible(self)
    @@ -2816,28 +2913,32 @@

    teal coverage - 69.63%

    150 - 1x + 1x +
          checkmate::assert_list(x)
    151 - 1x + 1x +
          checkmate::assert_names(names(x), must.include = c("teal_slices"))
    152 - 1x + 1x +
          self$set_content(x$teal_slices)
    153 - 1x + 1x +
          invisible(self)
    @@ -2879,7 +2980,8 @@

    teal coverage - 69.63%

    159 - 2x + 2x +
          list(teal_slices = private$teal_slices)
    @@ -2990,28 +3092,32 @@

    teal coverage - 69.63%

    8 - 6x + 6x +
      vapply(
    9 - 6x + 6x +
        utils::sessionInfo()$otherPkgs,
    10 - 6x + 6x +
        function(x) {
    11 - 36x + 36x +
          paste0("library(", x$Package, ")")
    @@ -3025,7 +3131,8 @@

    teal coverage - 69.63%

    13 - 6x + 6x +
        character(1)
    @@ -3046,21 +3153,24 @@

    teal coverage - 69.63%

    16 - 6x + 6x +
        rev() %>%
    17 - 6x + 6x +
        paste0(sep = "\n") %>%
    18 - 6x + 6x +
        paste0(collapse = "")
    @@ -3102,21 +3212,24 @@

    teal coverage - 69.63%

    24 - 10x + 10x +
      code_string <- getOption("teal.load_nest_code")
    25 - 10x + 10x +
      if (is.character(code_string)) {
    26 - 2x + 2x +
        code_string
    @@ -3130,7 +3243,8 @@

    teal coverage - 69.63%

    28 - 8x + 8x +
        "# Add any code to install/load your NEST environment here\n"
    @@ -3270,14 +3384,16 @@

    teal coverage - 69.63%

    48 - 4x + 4x +
      str_prepro <- attr(datasets, "preprocessing_code")
    49 - 4x + 4x +
      if (length(str_prepro) == 0) {
    @@ -3298,7 +3414,8 @@

    teal coverage - 69.63%

    52 - 4x + 4x +
        str_prepro <- paste(str_prepro, collapse = "\n")
    @@ -3326,35 +3443,40 @@

    teal coverage - 69.63%

    56 - 4x + 4x +
      str_hash <- vapply(datanames, function(dataname) {
    57 - 6x + 6x +
        sprintf(
    58 - 6x + 6x +
          "stopifnot(%s == %s)",
    59 - 6x + 6x +
          deparse1(bquote(rlang::hash(.(as.name(dataname))))),
    60 - 6x + 6x +
          deparse1(hashes[[dataname]])
    @@ -3368,14 +3490,16 @@

    teal coverage - 69.63%

    62 - 4x + 4x +
      }, character(1))
    63 - 4x + 4x +
      str_hash <- paste(str_hash, collapse = "\n")
    @@ -3396,21 +3520,24 @@

    teal coverage - 69.63%

    66 - 4x + 4x +
      str_filter <- teal.slice::get_filter_expr(datasets, datanames)
    67 - 4x + 4x +
      if (str_filter == "") {
    68 - 2x + 2x +
        str_filter <- character(0)
    @@ -3438,14 +3565,16 @@

    teal coverage - 69.63%

    72 - 4x + 4x +
      str_code <- paste(c(str_prepro, str_hash, str_filter), collapse = "\n\n")
    73 - 4x + 4x +
      sprintf("%s\n", str_code)
    @@ -4424,42 +4553,48 @@

    teal coverage - 69.63%

    138 - 147x + 147x +
      checkmate::assert_string(label)
    139 - 144x + 144x +
      if (label == "global_filters") {
    140 - 1x + 1x +
        stop(
    141 - 1x + 1x +
          sprintf("module(label = \"%s\", ...\n  ", label),
    142 - 1x + 1x +
          "Label 'global_filters' is reserved in teal. Please change to something else.",
    143 - 1x + 1x +
          call. = FALSE
    @@ -4480,7 +4615,8 @@

    teal coverage - 69.63%

    146 - 143x + 143x +
      if (label == "Report previewer") {
    @@ -4543,35 +4679,40 @@

    teal coverage - 69.63%

    155 - 143x + 143x +
      checkmate::assert_function(server)
    156 - 143x + 143x +
      server_formals <- names(formals(server))
    157 - 143x + 143x +
      if (!(
    158 - 143x + 143x +
        "id" %in% server_formals ||
    159 - 143x + 143x +
          all(c("input", "output", "session") %in% server_formals)
    @@ -4585,70 +4726,80 @@

    teal coverage - 69.63%

    161 - 2x + 2x +
        stop(
    162 - 2x + 2x +
          "\nmodule() `server` argument requires a function with following arguments:",
    163 - 2x + 2x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    164 - 2x + 2x +
          "\n - input, output, session (not recommended) - then `shiny::callModule` will be used to call a module.",
    165 - 2x + 2x +
          "\n\nFollowing arguments can be used optionaly:",
    166 - 2x + 2x +
          "\n - `data` - module will receive list of reactive (filtered) data specified in the `filters` argument",
    167 - 2x + 2x +
          "\n - `datasets` - module will receive `FilteredData`. See `help(teal.slice::FilteredData)`",
    168 - 2x + 2x +
          "\n - `reporter` - module will receive `Reporter`. See `help(teal.reporter::Reporter)`",
    169 - 2x + 2x +
          "\n - `filter_panel_api` - module will receive `FilterPanelAPI`. (See [teal.slice::FilterPanelAPI]).",
    170 - 2x + 2x +
          "\n - `...` server_args elements will be passed to the module named argument or to the `...`"
    @@ -4669,42 +4820,48 @@

    teal coverage - 69.63%

    173 - 141x + 141x +
      if ("datasets" %in% server_formals) {
    174 - 2x + 2x +
        warning(
    175 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    176 - 2x + 2x +
          "`datasets` argument in the server is deprecated and will be removed in the next release. ",
    177 - 2x + 2x +
          "Please use `data` instead.",
    178 - 2x + 2x +
          call. = FALSE
    @@ -4746,56 +4903,64 @@

    teal coverage - 69.63%

    184 - 141x + 141x +
      checkmate::assert_function(ui)
    185 - 141x + 141x +
      ui_formals <- names(formals(ui))
    186 - 141x + 141x +
      if (!"id" %in% ui_formals) {
    187 - 1x + 1x +
        stop(
    188 - 1x + 1x +
          "\nmodule() `ui` argument requires a function with following arguments:",
    189 - 1x + 1x +
          "\n - id - `teal` will set proper `shiny` namespace for this module.",
    190 - 1x + 1x +
          "\n\nFollowing arguments can be used optionally:",
    191 - 1x + 1x +
          "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`"
    @@ -4816,42 +4981,48 @@

    teal coverage - 69.63%

    194 - 140x + 140x +
      if (any(c("data", "datasets") %in% ui_formals)) {
    195 - 2x + 2x +
        stop(
    196 - 2x + 2x +
          sprintf("Called from module(label = \"%s\", ...)\n  ", label),
    197 - 2x + 2x +
          "UI with `data` or `datasets` argument is no longer accepted.\n  ",
    198 - 2x + 2x +
          "If some UI inputs depend on data, please move the logic to your server instead.\n  ",
    199 - 2x + 2x +
          "Possible solutions are renderUI() or updateXyzInput() functions."
    @@ -4893,7 +5064,8 @@

    teal coverage - 69.63%

    205 - 138x + 138x +
      if (!missing(filters)) {
    @@ -4963,21 +5135,24 @@

    teal coverage - 69.63%

    215 - 138x + 138x +
      if (!is.element("data", server_formals) && !is.null(datanames)) {
    216 - 50x + 50x +
        message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
    217 - 50x + 50x +
        datanames <- NULL
    @@ -4991,7 +5166,8 @@

    teal coverage - 69.63%

    219 - 138x + 138x +
      checkmate::assert_character(datanames, min.len = 1, null.ok = TRUE, any.missing = FALSE)
    @@ -5012,49 +5188,56 @@

    teal coverage - 69.63%

    222 - 137x + 137x +
      checkmate::assert_list(server_args, null.ok = TRUE, names = "named")
    223 - 135x + 135x +
      srv_extra_args <- setdiff(names(server_args), server_formals)
    224 - 135x + 135x +
      if (length(srv_extra_args) > 0 && !"..." %in% server_formals) {
    225 - 1x + 1x +
        stop(
    226 - 1x + 1x +
          "\nFollowing `server_args` elements have no equivalent in the formals of the server:\n",
    227 - 1x + 1x +
          paste(paste(" -", srv_extra_args), collapse = "\n"),
    228 - 1x + 1x +
          "\n\nUpdate the server arguments by including above or add `...`"
    @@ -5089,49 +5272,56 @@

    teal coverage - 69.63%

    233 - 134x + 134x +
      checkmate::assert_list(ui_args, null.ok = TRUE, names = "named")
    234 - 132x + 132x +
      ui_extra_args <- setdiff(names(ui_args), ui_formals)
    235 - 132x + 132x +
      if (length(ui_extra_args) > 0 && !"..." %in% ui_formals) {
    236 - 1x + 1x +
        stop(
    237 - 1x + 1x +
          "\nFollowing `ui_args` elements have no equivalent in the formals of UI:\n",
    238 - 1x + 1x +
          paste(paste(" -", ui_extra_args), collapse = "\n"),
    239 - 1x + 1x +
          "\n\nUpdate the UI arguments by including above or add `...`"
    @@ -5159,35 +5349,40 @@

    teal coverage - 69.63%

    243 - 131x + 131x +
      structure(
    244 - 131x + 131x +
        list(
    245 - 131x + 131x +
          label = label,
    246 - 131x + 131x +
          server = server, ui = ui, datanames = unique(datanames),
    247 - 131x + 131x +
          server_args = server_args, ui_args = ui_args
    @@ -5201,7 +5396,8 @@

    teal coverage - 69.63%

    249 - 131x + 131x +
        class = "teal_module"
    @@ -5257,42 +5453,48 @@

    teal coverage - 69.63%

    257 - 102x + 102x +
      checkmate::assert_string(label)
    258 - 100x + 100x +
      submodules <- list(...)
    259 - 100x + 100x +
      if (any(vapply(submodules, is.character, FUN.VALUE = logical(1)))) {
    260 - 2x + 2x +
        stop(
    261 - 2x + 2x +
          "The only character argument to modules() must be 'label' and it must be named, ",
    262 - 2x + 2x +
          "change modules('lab', ...) to modules(label = 'lab', ...)"
    @@ -5320,7 +5522,8 @@

    teal coverage - 69.63%

    266 - 98x + 98x +
      checkmate::assert_list(submodules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -5341,42 +5544,48 @@

    teal coverage - 69.63%

    269 - 95x + 95x +
      labels <- vapply(submodules, function(submodule) submodule$label, character(1))
    270 - 95x + 95x +
      names(submodules) <- make.unique(gsub("[^[:alnum:]]+", "_", labels), sep = "_")
    271 - 95x + 95x +
      structure(
    272 - 95x + 95x +
        list(
    273 - 95x + 95x +
          label = label,
    274 - 95x + 95x +
          children = submodules
    @@ -5390,7 +5599,8 @@

    teal coverage - 69.63%

    276 - 95x + 95x +
        class = "teal_modules"
    @@ -5453,7 +5663,8 @@

    teal coverage - 69.63%

    285 - 3x + 3x +
      paste0(paste(rep(" ", indent), collapse = ""), "+ ", x$label, "\n", collapse = "")
    @@ -5558,28 +5769,32 @@

    teal coverage - 69.63%

    300 - 1x + 1x +
      paste(
    301 - 1x + 1x +
        c(
    302 - 1x + 1x +
          paste0(rep(" ", indent), "+ ", x$label, "\n"),
    303 - 1x + 1x +
          unlist(lapply(x$children, format, indent = indent + 1, ...))
    @@ -5593,7 +5808,8 @@

    teal coverage - 69.63%

    305 - 1x + 1x +
        collapse = ""
    @@ -5726,42 +5942,48 @@

    teal coverage - 69.63%

    324 - 8x + 8x +
      checkmate::assert_class(modules, "teal_modules")
    325 - 6x + 6x +
      checkmate::assert_class(module, "teal_module")
    326 - 4x + 4x +
      modules$children <- c(modules$children, list(module))
    327 - 4x + 4x +
      labels <- vapply(modules$children, function(submodule) submodule$label, character(1))
    328 - 4x + 4x +
      names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_")
    329 - 4x + 4x +
      modules
    @@ -5866,7 +6088,8 @@

    teal coverage - 69.63%

    344 - 20x + 20x +
      if (inherits(modules, class)) {
    @@ -5880,28 +6103,32 @@

    teal coverage - 69.63%

    346 - 20x + 20x +
      } else if (inherits(modules, "teal_module")) {
    347 - 11x + 11x +
        NULL
    348 - 9x + 9x +
      } else if (inherits(modules, "teal_modules")) {
    349 - 9x + 9x +
        Filter(function(x) length(x) > 0L, lapply(modules$children, extract_module, class))
    @@ -6111,49 +6338,56 @@

    teal coverage - 69.63%

    379 - 286x + 286x +
      checkmate::assert_string(arg)
    380 - 283x + 283x +
      if (inherits(modules, "teal_modules")) {
    381 - 29x + 29x +
        any(unlist(lapply(modules$children, is_arg_used, arg)))
    382 - 254x + 254x +
      } else if (inherits(modules, "teal_module")) {
    383 - 43x + 43x +
        is_arg_used(modules$server, arg) || is_arg_used(modules$ui, arg)
    384 - 211x + 211x +
      } else if (is.function(modules)) {
    385 - 209x + 209x +
        isTRUE(arg %in% names(formals(modules)))
    @@ -6167,7 +6401,8 @@

    teal coverage - 69.63%

    387 - 2x + 2x +
        stop("is_arg_used function not implemented for this object")
    @@ -6279,28 +6514,32 @@

    teal coverage - 69.63%

    403 - 12x + 12x +
      checkmate::assert_multi_class(modules, c("teal_module", "teal_modules"))
    404 - 12x + 12x +
      checkmate::assert_int(depth, lower = 0)
    405 - 11x + 11x +
      if (inherits(modules, "teal_modules")) {
    406 - 4x + 4x +
        max(vapply(modules$children, modules_depth, integer(1), depth = depth + 1L))
    @@ -6314,7 +6553,8 @@

    teal coverage - 69.63%

    408 - 7x + 7x +
        depth
    @@ -6768,14 +7008,16 @@

    teal coverage - 69.63%

    48 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    49 - 3x + 3x +
        observeEvent(input$show, {
    @@ -6859,7 +7101,8 @@

    teal coverage - 69.63%

    61 - 3x + 3x +
        filter_manager_srv("filter_manager", filtered_data_list, filter)
    @@ -6971,14 +7214,16 @@

    teal coverage - 69.63%

    77 - 5x + 5x +
      moduleServer(id, function(input, output, session) {
    78 - 5x + 5x +
        logger::log_trace("filter_manager_srv initializing for: { paste(names(filtered_data_list), collapse = ', ')}.")
    @@ -6992,7 +7237,8 @@

    teal coverage - 69.63%

    80 - 5x + 5x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    @@ -7034,7 +7280,8 @@

    teal coverage - 69.63%

    86 - 5x + 5x +
        slices_global <- reactiveVal(filter)
    @@ -7048,14 +7295,16 @@

    teal coverage - 69.63%

    88 - 5x + 5x +
        filtered_data_list <-
    89 - 5x + 5x +
          if (!is_module_specific) {
    @@ -7076,7 +7325,8 @@

    teal coverage - 69.63%

    92 - 4x + 4x +
            list(global_filters = unlist(filtered_data_list)[[1]])
    @@ -7104,21 +7354,24 @@

    teal coverage - 69.63%

    96 - 1x + 1x +
            flatten_nested <- function(x, name = NULL) {
    97 - 5x + 5x +
              if (inherits(x, "FilteredData")) {
    98 - 3x + 3x +
                setNames(list(x), name)
    @@ -7132,7 +7385,8 @@

    teal coverage - 69.63%

    100 - 2x + 2x +
                unlist(lapply(names(x), function(name) flatten_nested(x[[name]], name)))
    @@ -7153,7 +7407,8 @@

    teal coverage - 69.63%

    103 - 1x + 1x +
            flatten_nested(filtered_data_list)
    @@ -7188,49 +7443,56 @@

    teal coverage - 69.63%

    108 - 5x + 5x +
        mapping_matrix <- reactive({
    109 - 5x + 5x +
          state_ids_global <- vapply(slices_global(), `[[`, character(1L), "id")
    110 - 5x + 5x +
          mapping_smooth <- lapply(filtered_data_list, function(x) {
    111 - 7x + 7x +
            state_ids_local <- vapply(x$get_filter_state(), `[[`, character(1L), "id")
    112 - 7x + 7x +
            state_ids_allowed <- vapply(x$get_available_teal_slices()(), `[[`, character(1L), "id")
    113 - 7x + 7x +
            states_active <- state_ids_global %in% state_ids_local
    114 - 7x + 7x +
            ifelse(state_ids_global %in% state_ids_allowed, states_active, NA)
    @@ -7251,7 +7513,8 @@

    teal coverage - 69.63%

    117 - 5x + 5x +
          as.data.frame(mapping_smooth, row.names = state_ids_global, check.names = FALSE)
    @@ -7272,14 +7535,16 @@

    teal coverage - 69.63%

    120 - 5x + 5x +
        output$slices_table <- renderTable(
    121 - 5x + 5x +
          expr = {
    @@ -7293,28 +7558,32 @@

    teal coverage - 69.63%

    123 - 2x + 2x +
            mm <- mapping_matrix()
    124 - 2x + 2x +
            mm[] <- lapply(mm, ifelse, yes = intToUtf8(9989), no = intToUtf8(10060))
    125 - 2x + 2x +
            mm[] <- lapply(mm, function(x) ifelse(is.na(x), intToUtf8(128306), x))
    126 - 2x + 2x +
            if (!is_module_specific) colnames(mm) <- "Global Filters"
    @@ -7335,21 +7604,24 @@

    teal coverage - 69.63%

    129 - 2x + 2x +
            if (nrow(mm) == 0L) {
    130 - 2x + 2x +
              mm <- data.frame(`Filter manager` = "No filters specified.", check.names = FALSE)
    131 - 2x + 2x +
              rownames(mm) <- ""
    @@ -7377,7 +7649,8 @@

    teal coverage - 69.63%

    135 - 2x + 2x +
            mm[names(mm) != "Report previewer"]
    @@ -7391,14 +7664,16 @@

    teal coverage - 69.63%

    137 - 5x + 5x +
          align = paste(c("l", rep("c", sum(names(filtered_data_list) != "Report previewer"))), collapse = ""),
    138 - 5x + 5x +
          rownames = TRUE
    @@ -7426,35 +7701,40 @@

    teal coverage - 69.63%

    142 - 5x + 5x +
        modules_out <- lapply(names(filtered_data_list), function(module_name) {
    143 - 7x + 7x +
          filter_manager_module_srv(
    144 - 7x + 7x +
            id = module_name,
    145 - 7x + 7x +
            module_fd = filtered_data_list[[module_name]],
    146 - 7x + 7x +
            slices_global = slices_global
    @@ -7489,7 +7769,8 @@

    teal coverage - 69.63%

    151 - 5x + 5x +
        snapshot_manager_srv("snapshot_manager", slices_global, mapping_matrix, filtered_data_list)
    @@ -7503,7 +7784,8 @@

    teal coverage - 69.63%

    153 - 5x + 5x +
        modules_out # returned for testing purpose
    @@ -7692,7 +7974,8 @@

    teal coverage - 69.63%

    180 - 7x + 7x +
      moduleServer(id, function(input, output, session) {
    @@ -7706,7 +7989,8 @@

    teal coverage - 69.63%

    182 - 7x + 7x +
        module_fd$set_available_teal_slices(reactive(slices_global()))
    @@ -7727,7 +8011,8 @@

    teal coverage - 69.63%

    185 - 7x + 7x +
        slices_module <- reactive(module_fd$get_filter_state())
    @@ -7748,14 +8033,16 @@

    teal coverage - 69.63%

    188 - 7x + 7x +
        previous_slices <- reactiveVal(isolate(slices_module()))
    189 - 7x + 7x +
        slices_added <- reactiveVal(NULL)
    @@ -7776,21 +8063,24 @@

    teal coverage - 69.63%

    192 - 7x + 7x +
        observeEvent(slices_module(), ignoreNULL = FALSE, {
    193 - 2x + 2x +
          logger::log_trace("filter_manager_srv@1 detecting states deltas in module: { id }.")
    194 - 2x + 2x +
          added <- setdiff_teal_slices(slices_module(), slices_global())
    @@ -7804,7 +8094,8 @@

    teal coverage - 69.63%

    196 - 2x + 2x +
          previous_slices(slices_module())
    @@ -7825,7 +8116,8 @@

    teal coverage - 69.63%

    199 - 7x + 7x +
        observeEvent(slices_added(), ignoreNULL = TRUE, {
    @@ -7944,7 +8236,8 @@

    teal coverage - 69.63%

    216 - 7x + 7x +
        slices_module # returned for testing purpose
    @@ -8503,35 +8796,40 @@

    teal coverage - 69.63%

    77 - 79x + 79x +
      shiny::isolate({
    78 - 79x + 79x +
        checkmate::assert_flag(allow_add)
    79 - 79x + 79x +
        checkmate::assert_flag(module_specific)
    80 - 33x + 33x +
        if (!missing(mapping)) checkmate::assert_list(mapping, types = c("character", "NULL"), names = "named")
    81 - 76x + 76x +
        checkmate::assert_string(app_id, null.ok = TRUE)
    @@ -8545,14 +8843,16 @@

    teal coverage - 69.63%

    83 - 76x + 76x +
        slices <- list(...)
    84 - 76x + 76x +
        all_slice_id <- vapply(slices, `[[`, character(1L), "id")
    @@ -8566,14 +8866,16 @@

    teal coverage - 69.63%

    86 - 76x + 76x +
        if (missing(mapping)) {
    87 - 46x + 46x +
          mapping <- list(global_filters = all_slice_id)
    @@ -8587,14 +8889,16 @@

    teal coverage - 69.63%

    89 - 76x + 76x +
        if (!module_specific) {
    90 - 71x + 71x +
          mapping[setdiff(names(mapping), "global_filters")] <- NULL
    @@ -8615,42 +8919,48 @@

    teal coverage - 69.63%

    93 - 76x + 76x +
        failed_slice_id <- setdiff(unlist(mapping), all_slice_id)
    94 - 76x + 76x +
        if (length(failed_slice_id)) {
    95 - 1x + 1x +
          stop(sprintf(
    96 - 1x + 1x +
            "Filters in mapping don't match any available filter.\n %s not in %s",
    97 - 1x + 1x +
            toString(failed_slice_id),
    98 - 1x + 1x +
            toString(all_slice_id)
    @@ -8678,7 +8988,8 @@

    teal coverage - 69.63%

    102 - 75x + 75x +
        tss <- teal.slice::teal_slices(
    @@ -8692,28 +9003,32 @@

    teal coverage - 69.63%

    104 - 75x + 75x +
          exclude_varnames = exclude_varnames,
    105 - 75x + 75x +
          include_varnames = include_varnames,
    106 - 75x + 75x +
          count_type = count_type,
    107 - 75x + 75x +
          allow_add = allow_add
    @@ -8727,35 +9042,40 @@

    teal coverage - 69.63%

    109 - 75x + 75x +
        attr(tss, "mapping") <- mapping
    110 - 75x + 75x +
        attr(tss, "module_specific") <- module_specific
    111 - 75x + 75x +
        attr(tss, "app_id") <- app_id
    112 - 75x + 75x +
        class(tss) <- c("modules_teal_slices", class(tss))
    113 - 75x + 75x +
        tss
    @@ -8825,14 +9145,16 @@

    teal coverage - 69.63%

    123 - 10x + 10x +
      checkmate::assert_list(x)
    124 - 10x + 10x +
      lapply(x, checkmate::assert_list, names = "named", .var.name = "list element")
    @@ -8846,21 +9168,24 @@

    teal coverage - 69.63%

    126 - 10x + 10x +
      attrs <- attributes(unclass(x))
    127 - 10x + 10x +
      ans <- lapply(x, function(x) if (is.teal_slice(x)) x else as.teal_slice(x))
    128 - 10x + 10x +
      do.call(teal_slices, c(ans, attrs))
    @@ -9112,28 +9437,32 @@

    teal coverage - 69.63%

    164 - 1x + 1x +
      checkmate::assert_class(filter, "teal_slices")
    165 - 1x + 1x +
      shiny::isolate({
    166 - 1x + 1x +
        filter_copy <- lapply(filter, function(slice) {
    167 - 2x + 2x +
          teal.slice::as.teal_slice(as.list(slice))
    @@ -9147,14 +9476,16 @@

    teal coverage - 69.63%

    169 - 1x + 1x +
        attributes(filter_copy) <- attributes(filter)
    170 - 1x + 1x +
        filter_copy
    @@ -9930,14 +10261,16 @@

    teal coverage - 69.63%

    108 - 36x + 36x +
      dots <- list(...)
    109 - 2x + 2x +
      if (!is_validators(dots)) stop("validate_inputs accepts validators or a list thereof")
    @@ -9951,21 +10284,24 @@

    teal coverage - 69.63%

    111 - 34x + 34x +
      messages <- extract_validator(dots, header)
    112 - 34x + 34x +
      failings <- if (!any_names(dots)) {
    113 - 29x + 29x +
        add_header(messages, header)
    @@ -9979,7 +10315,8 @@

    teal coverage - 69.63%

    115 - 5x + 5x +
        unlist(messages)
    @@ -10000,7 +10337,8 @@

    teal coverage - 69.63%

    118 - 34x + 34x +
      shiny::validate(shiny::need(is.null(failings), failings))
    @@ -10070,7 +10408,8 @@

    teal coverage - 69.63%

    128 - 118x + 118x +
      all(if (is.list(x)) unlist(lapply(x, is_validators)) else inherits(x, "InputValidator"))
    @@ -10133,7 +10472,8 @@

    teal coverage - 69.63%

    137 - 49x + 49x +
      x$.__enclos_env__$private$enabled
    @@ -10189,14 +10529,16 @@

    teal coverage - 69.63%

    145 - 113x + 113x +
      if (inherits(iv, "InputValidator")) {
    146 - 49x + 49x +
        add_header(gather_messages(iv), header)
    @@ -10210,14 +10552,16 @@

    teal coverage - 69.63%

    148 - 58x + 58x +
        if (is.null(names(iv))) names(iv) <- rep("", length(iv))
    149 - 64x + 64x +
        mapply(extract_validator, iv = iv, header = names(iv), SIMPLIFY = FALSE)
    @@ -10280,28 +10624,32 @@

    teal coverage - 69.63%

    158 - 49x + 49x +
      if (validator_enabled(iv)) {
    159 - 46x + 46x +
        status <- iv$validate()
    160 - 46x + 46x +
        failing_inputs <- Filter(Negate(is.null), status)
    161 - 46x + 46x +
        unique(lapply(failing_inputs, function(x) x[["message"]]))
    @@ -10315,14 +10663,16 @@

    teal coverage - 69.63%

    163 - 3x + 3x +
        warning("Validator is disabled and will be omitted.")
    164 - 3x + 3x +
        list()
    @@ -10378,21 +10728,24 @@

    teal coverage - 69.63%

    172 - 78x + 78x +
      ans <- unlist(messages)
    173 - 78x + 78x +
      if (length(ans) != 0L && isTRUE(nchar(header) > 0L)) {
    174 - 31x + 31x +
        ans <- c(paste0(header, "\n"), ans, "\n")
    @@ -10406,7 +10759,8 @@

    teal coverage - 69.63%

    176 - 78x + 78x +
      ans
    @@ -10455,21 +10809,24 @@

    teal coverage - 69.63%

    183 - 103x + 103x +
      any(
    184 - 103x + 103x +
        if (is.list(x)) {
    185 - 58x + 58x +
          if (!is.null(names(x)) && any(names(x) != "")) TRUE else unlist(lapply(x, any_names))
    @@ -10483,7 +10840,8 @@

    teal coverage - 69.63%

    187 - 40x + 40x +
          FALSE
    @@ -11252,42 +11610,48 @@

    teal coverage - 69.63%

    106 - 6x + 6x +
      checkmate::assert_character(id)
    107 - 6x + 6x +
      checkmate::assert_true(is.reactive(slices_global))
    108 - 6x + 6x +
      checkmate::assert_class(isolate(slices_global()), "teal_slices")
    109 - 6x + 6x +
      checkmate::assert_true(is.reactive(mapping_matrix))
    110 - 6x + 6x +
      checkmate::assert_data_frame(isolate(mapping_matrix()), null.ok = TRUE)
    111 - 6x + 6x +
      checkmate::assert_list(filtered_data_list, types = "FilteredData", any.missing = FALSE, names = "named")
    @@ -11301,14 +11665,16 @@

    teal coverage - 69.63%

    113 - 6x + 6x +
      moduleServer(id, function(input, output, session) {
    114 - 6x + 6x +
        ns <- session$ns
    @@ -11329,28 +11695,32 @@

    teal coverage - 69.63%

    117 - 6x + 6x +
        filter <- isolate(slices_global())
    118 - 6x + 6x +
        snapshot_history <- reactiveVal({
    119 - 6x + 6x +
          list(
    120 - 6x + 6x +
            "Initial application state" = as.list(filter, recursive = TRUE)
    @@ -11392,7 +11762,8 @@

    teal coverage - 69.63%

    126 - 6x + 6x +
        observeEvent(input$snapshot_add, {
    @@ -11483,7 +11854,8 @@

    teal coverage - 69.63%

    139 - 6x + 6x +
        observeEvent(input$snapshot_name_accept, {
    @@ -11679,7 +12051,8 @@

    teal coverage - 69.63%

    167 - 6x + 6x +
        observeEvent(input$snapshot_load, {
    @@ -11805,7 +12178,8 @@

    teal coverage - 69.63%

    185 - 6x + 6x +
        observeEvent(input$snaphot_file_accept, {
    @@ -12155,7 +12529,8 @@

    teal coverage - 69.63%

    235 - 6x + 6x +
        observeEvent(input$snapshot_reset, {
    @@ -12323,21 +12698,24 @@

    teal coverage - 69.63%

    259 - 6x + 6x +
        observers <- reactiveValues()
    260 - 6x + 6x +
        handlers <- reactiveValues()
    261 - 6x + 6x +
        divs <- reactiveValues()
    @@ -12351,14 +12729,16 @@

    teal coverage - 69.63%

    263 - 6x + 6x +
        observeEvent(snapshot_history(), {
    264 - 2x + 2x +
          lapply(names(snapshot_history())[-1L], function(s) {
    @@ -12729,42 +13109,48 @@

    teal coverage - 69.63%

    317 - 6x + 6x +
        output$snapshot_list <- renderUI({
    318 - 2x + 2x +
          rows <- lapply(rev(reactiveValuesToList(divs)), function(d) d)
    319 - 2x + 2x +
          if (length(rows) == 0L) {
    320 - 2x + 2x +
            div(
    321 - 2x + 2x +
              class = "snapshot_manager_placeholder",
    322 - 2x + 2x +
              "Snapshots will appear here."
    @@ -13449,7 +13835,8 @@

    teal coverage - 69.63%

    52 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -13463,7 +13850,8 @@

    teal coverage - 69.63%

    54 - 7x + 7x +
      checkmate::assert_multi_class(splash_ui, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -13477,7 +13865,8 @@

    teal coverage - 69.63%

    56 - 7x + 7x +
      if (is.character(title)) {
    @@ -13498,7 +13887,8 @@

    teal coverage - 69.63%

    59 - 7x + 7x +
        validate_app_title_tag(title)
    @@ -13519,28 +13909,32 @@

    teal coverage - 69.63%

    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "header",
    64 - 7x + 7x +
        checkmate::check_string(header),
    65 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -13554,7 +13948,8 @@

    teal coverage - 69.63%

    67 - 7x + 7x +
      if (checkmate::test_string(header)) {
    @@ -13582,28 +13977,32 @@

    teal coverage - 69.63%

    71 - 7x + 7x +
      checkmate::assert(
    72 - 7x + 7x +
        .var.name = "footer",
    73 - 7x + 7x +
        checkmate::check_string(footer),
    74 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -13617,7 +14016,8 @@

    teal coverage - 69.63%

    76 - 7x + 7x +
      if (checkmate::test_string(footer)) {
    @@ -13645,7 +14045,8 @@

    teal coverage - 69.63%

    80 - 7x + 7x +
      ns <- NS(id)
    @@ -13666,7 +14067,8 @@

    teal coverage - 69.63%

    83 - 7x + 7x +
      splash_ui <- div(
    @@ -13680,7 +14082,8 @@

    teal coverage - 69.63%

    85 - 7x + 7x +
        id = ns("main_ui_container"),
    @@ -13701,7 +14104,8 @@

    teal coverage - 69.63%

    88 - 7x + 7x +
        div(splash_ui)
    @@ -13736,35 +14140,40 @@

    teal coverage - 69.63%

    93 - 7x + 7x +
      shiny_busy_message_panel <- conditionalPanel(
    94 - 7x + 7x +
        condition = "(($('html').hasClass('shiny-busy')) && (document.getElementById('shiny-notification-panel') == null))", # nolint: line_length.
    95 - 7x + 7x +
        div(
    96 - 7x + 7x +
          icon("arrows-rotate", "spin fa-spin"),
    97 - 7x + 7x +
          "Computing ...",
    @@ -13778,7 +14187,8 @@

    teal coverage - 69.63%

    99 - 7x + 7x +
          class = "shinybusymessage"
    @@ -13806,98 +14216,112 @@

    teal coverage - 69.63%

    103 - 7x + 7x +
      fluidPage(
    104 - 7x + 7x +
        title = title,
    105 - 7x + 7x +
        theme = get_teal_bs_theme(),
    106 - 7x + 7x +
        include_teal_css_js(),
    107 - 7x + 7x +
        tags$header(header),
    108 - 7x + 7x +
        tags$hr(class = "my-2"),
    109 - 7x + 7x +
        shiny_busy_message_panel,
    110 - 7x + 7x +
        splash_ui,
    111 - 7x + 7x +
        tags$hr(),
    112 - 7x + 7x +
        tags$footer(
    113 - 7x + 7x +
          div(
    114 - 7x + 7x +
            footer,
    115 - 7x + 7x +
            teal.widgets::verbatim_popup_ui(ns("sessionInfo"), "Session Info", type = "link"),
    116 - 7x + 7x +
            textOutput(ns("identifier"))
    @@ -13960,21 +14384,24 @@

    teal coverage - 69.63%

    125 - 19x + 19x +
      stopifnot(is.reactive(teal_data_rv))
    126 - 18x + 18x +
      moduleServer(id, function(input, output, session) {
    127 - 18x + 18x +
        logger::log_trace("srv_teal initializing the module.")
    @@ -13988,14 +14415,16 @@

    teal coverage - 69.63%

    129 - 18x + 18x +
        output$identifier <- renderText(
    130 - 18x + 18x +
          paste0("Pid:", Sys.getpid(), " Token:", substr(session$token, 25, 32))
    @@ -14016,28 +14445,32 @@

    teal coverage - 69.63%

    133 - 18x + 18x +
        teal.widgets::verbatim_popup_srv(
    134 - 18x + 18x +
          "sessionInfo",
    135 - 18x + 18x +
          verbatim_content = utils::capture.output(utils::sessionInfo()),
    136 - 18x + 18x +
          title = "SessionInfo"
    @@ -14065,7 +14498,8 @@

    teal coverage - 69.63%

    140 - 18x + 18x +
        run_js_files(files = "init.js")
    @@ -14100,35 +14534,40 @@

    teal coverage - 69.63%

    145 - 18x + 18x +
        get_client_timezone(session$ns)
    146 - 18x + 18x +
        observeEvent(
    147 - 18x + 18x +
          eventExpr = input$timezone,
    148 - 18x + 18x +
          once = TRUE,
    149 - 18x + 18x +
          handlerExpr = {
    @@ -14170,14 +14609,16 @@

    teal coverage - 69.63%

    155 - 18x + 18x +
        reporter <- teal.reporter::Reporter$new()
    156 - 18x + 18x +
        if (is_arg_used(modules, "reporter") && length(extract_module(modules, "teal_module_previewer")) == 0) {
    @@ -14205,28 +14646,32 @@

    teal coverage - 69.63%

    160 - 18x + 18x +
        env <- environment()
    161 - 18x + 18x +
        datasets_reactive <- eventReactive(teal_data_rv(), {
    162 - 4x + 4x +
          env$progress <- shiny::Progress$new(session)
    163 - 4x + 4x +
          env$progress$set(0.25, message = "Setting data")
    @@ -14247,7 +14692,8 @@

    teal coverage - 69.63%

    166 - 4x + 4x +
          modules_datasets(teal_data_rv(), modules, filter, teal_data_to_filtered_data(teal_data_rv()))
    @@ -14310,7 +14756,8 @@

    teal coverage - 69.63%

    175 - 18x + 18x +
        observeEvent(datasets_reactive(), once = TRUE, {
    @@ -15394,21 +15841,24 @@

    teal coverage - 69.63%

    119 - 50x + 50x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    120 - 50x + 50x +
      checkmate::assert_class(reporter, "Reporter")
    121 - 49x + 49x +
      UseMethod("srv_nested_tabs", modules)
    @@ -15506,7 +15956,8 @@

    teal coverage - 69.63%

    135 - 22x + 22x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    @@ -15520,14 +15971,16 @@

    teal coverage - 69.63%

    137 - 22x + 22x +
      moduleServer(id = id, module = function(input, output, session) {
    138 - 22x + 22x +
        logger::log_trace("srv_nested_tabs.teal_modules initializing the module { deparse1(modules$label) }.")
    @@ -15541,70 +15994,80 @@

    teal coverage - 69.63%

    140 - 22x + 22x +
        labels <- vapply(modules$children, `[[`, character(1), "label")
    141 - 22x + 22x +
        modules_reactive <- sapply(
    142 - 22x + 22x +
          names(modules$children),
    143 - 22x + 22x +
          function(module_id) {
    144 - 33x + 33x +
            srv_nested_tabs(
    145 - 33x + 33x +
              id = module_id,
    146 - 33x + 33x +
              datasets = datasets[[labels[module_id]]],
    147 - 33x + 33x +
              modules = modules$children[[module_id]],
    148 - 33x + 33x +
              is_module_specific = is_module_specific,
    149 - 33x + 33x +
              reporter = reporter
    @@ -15625,7 +16088,8 @@

    teal coverage - 69.63%

    152 - 22x + 22x +
          simplify = FALSE
    @@ -15653,21 +16117,24 @@

    teal coverage - 69.63%

    156 - 22x + 22x +
        input_validated <- eventReactive(input$active_tab, input$active_tab, ignoreNULL = TRUE)
    157 - 22x + 22x +
        get_active_module <- reactive({
    158 - 12x + 12x +
          if (length(modules$children) == 1L) {
    @@ -15681,7 +16148,8 @@

    teal coverage - 69.63%

    160 - 1x + 1x +
            modules_reactive[[1]]()
    @@ -15702,7 +16170,8 @@

    teal coverage - 69.63%

    163 - 11x + 11x +
            modules_reactive[[input_validated()]]()
    @@ -15730,7 +16199,8 @@

    teal coverage - 69.63%

    167 - 22x + 22x +
        get_active_module
    @@ -15786,14 +16256,16 @@

    teal coverage - 69.63%

    175 - 27x + 27x +
      checkmate::assert_class(datasets, "FilteredData")
    176 - 27x + 27x +
      logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.")
    @@ -15807,14 +16279,16 @@

    teal coverage - 69.63%

    178 - 27x + 27x +
      moduleServer(id = id, module = function(input, output, session) {
    179 - 27x + 27x +
        if (!is.null(modules$datanames) && is_module_specific) {
    @@ -15870,35 +16344,40 @@

    teal coverage - 69.63%

    187 - 27x + 27x +
        trigger_data <- reactiveVal(1L)
    188 - 27x + 27x +
        trigger_module <- reactiveVal(NULL)
    189 - 27x + 27x +
        output$data_reactive <- renderUI({
    190 - 17x + 17x +
          lapply(datasets$datanames(), function(x) {
    191 - 21x + 21x +
            datasets$get_data(x, filtered = TRUE)
    @@ -15912,14 +16391,16 @@

    teal coverage - 69.63%

    193 - 17x + 17x +
          isolate(trigger_data(trigger_data() + 1))
    194 - 17x + 17x +
          isolate(trigger_module(TRUE))
    @@ -15933,7 +16414,8 @@

    teal coverage - 69.63%

    196 - 17x + 17x +
          NULL
    @@ -15961,14 +16443,16 @@

    teal coverage - 69.63%

    200 - 27x + 27x +
        args <- c(list(id = "module"), modules$server_args)
    201 - 27x + 27x +
        if (is_arg_used(modules$server, "reporter")) {
    @@ -15996,14 +16480,16 @@

    teal coverage - 69.63%

    205 - 27x + 27x +
        if (is_arg_used(modules$server, "datasets")) {
    206 - 1x + 1x +
          args <- c(args, datasets = datasets)
    @@ -16024,21 +16510,24 @@

    teal coverage - 69.63%

    209 - 27x + 27x +
        if (is_arg_used(modules$server, "data")) {
    210 - 7x + 7x +
          data <- eventReactive(trigger_data(), .datasets_to_data(modules, datasets))
    211 - 7x + 7x +
          args <- c(args, data = list(data))
    @@ -16059,21 +16548,24 @@

    teal coverage - 69.63%

    214 - 27x + 27x +
        if (is_arg_used(modules$server, "filter_panel_api")) {
    215 - 2x + 2x +
          filter_panel_api <- teal.slice::FilterPanelAPI$new(datasets)
    216 - 2x + 2x +
          args <- c(args, filter_panel_api = filter_panel_api)
    @@ -16101,49 +16593,56 @@

    teal coverage - 69.63%

    220 - 27x + 27x +
        observeEvent(
    221 - 27x + 27x +
          ignoreNULL = TRUE,
    222 - 27x + 27x +
          once = TRUE,
    223 - 27x + 27x +
          eventExpr = trigger_module(),
    224 - 27x + 27x +
          handlerExpr = {
    225 - 17x + 17x +
            module_output <- if (is_arg_used(modules$server, "id")) {
    226 - 17x + 17x +
              do.call(modules$server, args)
    @@ -16192,7 +16691,8 @@

    teal coverage - 69.63%

    233 - 27x + 27x +
        reactive(modules)
    @@ -16311,14 +16811,16 @@

    teal coverage - 69.63%

    250 - 4x + 4x +
      checkmate::assert_class(module, "teal_module")
    251 - 4x + 4x +
      checkmate::assert_class(datasets, "FilteredData")
    @@ -16332,14 +16834,16 @@

    teal coverage - 69.63%

    253 - 4x + 4x +
      datanames <- if (is.null(module$datanames) || identical(module$datanames, "all")) {
    254 - 1x + 1x +
        datasets$datanames()
    @@ -16353,21 +16857,24 @@

    teal coverage - 69.63%

    256 - 3x + 3x +
        include_parent_datanames(
    257 - 3x + 3x +
          module$datanames,
    258 - 3x + 3x +
          datasets$get_join_keys()
    @@ -16402,7 +16909,8 @@

    teal coverage - 69.63%

    263 - 4x + 4x +
      data <- sapply(datanames, function(x) datasets$get_data(x, filtered = TRUE), simplify = FALSE)
    @@ -16416,7 +16924,8 @@

    teal coverage - 69.63%

    265 - 4x + 4x +
      hashes <- calculate_hashes(datanames, datasets)
    @@ -16430,28 +16939,32 @@

    teal coverage - 69.63%

    267 - 4x + 4x +
      code <- c(
    268 - 4x + 4x +
        get_rcode_str_install(),
    269 - 4x + 4x +
        get_rcode_libraries(),
    270 - 4x + 4x +
        get_datasets_code(datanames, datasets, hashes)
    @@ -16479,21 +16992,24 @@

    teal coverage - 69.63%

    274 - 4x + 4x +
      data <- do.call(
    275 - 4x + 4x +
        teal.data::teal_data,
    276 - 4x + 4x +
        args = c(data, code = list(code), join_keys = list(datasets$get_join_keys()[datanames]))
    @@ -16514,14 +17030,16 @@

    teal coverage - 69.63%

    279 - 4x + 4x +
      data@verified <- attr(datasets, "verification_status")
    280 - 4x + 4x +
      data
    @@ -16605,7 +17123,8 @@

    teal coverage - 69.63%

    292 - 7x + 7x +
      sapply(datanames, function(x) rlang::hash(datasets$get_data(x, filtered = FALSE)), simplify = FALSE)
    @@ -17164,28 +17683,32 @@

    teal coverage - 69.63%

    78 - 5x + 5x +
      checkmate::assert_class(modules, "teal_modules")
    79 - 5x + 5x +
      checkmate::assert_list(datasets, types = c("list", "FilteredData"))
    80 - 5x + 5x +
      checkmate::assert_class(reporter, "Reporter")
    81 - 3x + 3x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -17199,14 +17722,16 @@

    teal coverage - 69.63%

    83 - 3x + 3x +
      moduleServer(id, function(input, output, session) {
    84 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initializing the module.")
    @@ -17220,14 +17745,16 @@

    teal coverage - 69.63%

    86 - 3x + 3x +
        is_module_specific <- isTRUE(attr(filter, "module_specific"))
    87 - 3x + 3x +
        manager_out <- filter_manager_modal_srv("filter_manager", filtered_data_list = datasets, filter = filter)
    @@ -17241,42 +17768,48 @@

    teal coverage - 69.63%

    89 - 3x + 3x +
        active_module <- srv_nested_tabs(
    90 - 3x + 3x +
          id = "root",
    91 - 3x + 3x +
          datasets = datasets,
    92 - 3x + 3x +
          modules = modules,
    93 - 3x + 3x +
          reporter = reporter,
    94 - 3x + 3x +
          is_module_specific = is_module_specific
    @@ -17297,21 +17830,24 @@

    teal coverage - 69.63%

    97 - 3x + 3x +
        if (!is_module_specific) {
    98 - 3x + 3x +
          active_datanames <- reactive({
    99 - 6x + 6x +
            if (identical(active_module()$datanames, "all")) {
    @@ -17332,21 +17868,24 @@

    teal coverage - 69.63%

    102 - 5x + 5x +
              include_parent_datanames(
    103 - 5x + 5x +
                active_module()$datanames,
    104 - 5x + 5x +
                singleton$get_join_keys()
    @@ -17374,14 +17913,16 @@

    teal coverage - 69.63%

    108 - 3x + 3x +
          singleton <- unlist(datasets)[[1]]
    109 - 3x + 3x +
          singleton$srv_filter_panel("filter_panel", active_datanames = active_datanames)
    @@ -17395,28 +17936,32 @@

    teal coverage - 69.63%

    111 - 3x + 3x +
          observeEvent(
    112 - 3x + 3x +
            eventExpr = active_datanames(),
    113 - 3x + 3x +
            handlerExpr = {
    114 - 4x + 4x +
              script <- if (length(active_datanames()) == 0 || is.null(active_datanames())) {
    @@ -17451,7 +17996,8 @@

    teal coverage - 69.63%

    119 - 4x + 4x +
                "handleActiveDatasetsPresent();"
    @@ -17465,7 +18011,8 @@

    teal coverage - 69.63%

    121 - 4x + 4x +
              shinyjs::runjs(script)
    @@ -17479,7 +18026,8 @@

    teal coverage - 69.63%

    123 - 3x + 3x +
            ignoreNULL = FALSE
    @@ -17507,14 +18055,16 @@

    teal coverage - 69.63%

    127 - 3x + 3x +
        showNotification("Data loaded - App fully started up")
    128 - 3x + 3x +
        logger::log_trace("srv_tabs_with_filters initialized the module")
    @@ -17528,7 +18078,8 @@

    teal coverage - 69.63%

    130 - 3x + 3x +
        active_module
    @@ -17968,42 +18519,48 @@

    teal coverage - 69.63%

    60 - 7x + 7x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    61 - 7x + 7x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    62 - 7x + 7x +
      checkmate::assert(
    63 - 7x + 7x +
        .var.name = "title",
    64 - 7x + 7x +
        checkmate::check_string(title),
    65 - 7x + 7x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18017,28 +18574,32 @@

    teal coverage - 69.63%

    67 - 7x + 7x +
      checkmate::assert(
    68 - 7x + 7x +
        .var.name = "header",
    69 - 7x + 7x +
        checkmate::check_string(header),
    70 - 7x + 7x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18052,28 +18613,32 @@

    teal coverage - 69.63%

    72 - 7x + 7x +
      checkmate::assert(
    73 - 7x + 7x +
        .var.name = "footer",
    74 - 7x + 7x +
        checkmate::check_string(footer),
    75 - 7x + 7x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -18094,7 +18659,8 @@

    teal coverage - 69.63%

    78 - 7x + 7x +
      ns <- NS(id)
    @@ -18136,28 +18702,32 @@

    teal coverage - 69.63%

    84 - 7x + 7x +
      splash_ui <- if (inherits(data, "teal_data_module")) {
    85 - 1x + 1x +
        data$ui(ns("teal_data_module"))
    86 - 7x + 7x +
      } else if (inherits(data, "teal_data")) {
    87 - 6x + 6x +
        div()
    @@ -18171,42 +18741,48 @@

    teal coverage - 69.63%

    89 - 7x + 7x +
      ui_teal(
    90 - 7x + 7x +
        id = ns("teal"),
    91 - 7x + 7x +
        splash_ui = div(splash_ui, uiOutput(ns("error"))),
    92 - 7x + 7x +
        title = title,
    93 - 7x + 7x +
        header = header,
    94 - 7x + 7x +
        footer = footer
    @@ -18255,28 +18831,32 @@

    teal coverage - 69.63%

    101 - 15x + 15x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    102 - 15x + 15x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    103 - 15x + 15x +
      checkmate::assert_class(modules, "teal_modules")
    104 - 15x + 15x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -18290,14 +18870,16 @@

    teal coverage - 69.63%

    106 - 15x + 15x +
      moduleServer(id, function(input, output, session) {
    107 - 15x + 15x +
        logger::log_trace("srv_teal_with_splash initializing module with data.")
    @@ -18311,7 +18893,8 @@

    teal coverage - 69.63%

    109 - 15x + 15x +
        if (getOption("teal.show_js_log", default = FALSE)) {
    @@ -18353,28 +18936,32 @@

    teal coverage - 69.63%

    115 - 15x + 15x +
        teal_data_rv <- if (inherits(data, "teal_data_module")) {
    116 - 10x + 10x +
          data <- data$server(id = "teal_data_module")
    117 - 10x + 10x +
          if (!is.reactive(data)) {
    118 - 1x + 1x +
            stop("The `teal_data_module` passed to `data` must return a reactive expression.", call. = FALSE)
    @@ -18388,21 +18975,24 @@

    teal coverage - 69.63%

    120 - 9x + 9x +
          data
    121 - 15x + 15x +
        } else if (inherits(data, "teal_data")) {
    122 - 5x + 5x +
          reactiveVal(data)
    @@ -18423,7 +19013,8 @@

    teal coverage - 69.63%

    125 - 14x + 14x +
        teal_data_rv_validate <- reactive({
    @@ -18437,7 +19028,8 @@

    teal coverage - 69.63%

    127 - 11x + 11x +
          data <- tryCatch(teal_data_rv(), error = function(e) e)
    @@ -18458,7 +19050,8 @@

    teal coverage - 69.63%

    130 - 11x + 11x +
          if (inherits(data, "shiny.silent.error") && identical(data$message, "")) {
    @@ -18493,56 +19086,64 @@

    teal coverage - 69.63%

    135 - 11x + 11x +
          if (inherits(data, "qenv.error")) {
    136 - 2x + 2x +
            validate(
    137 - 2x + 2x +
              need(
    138 - 2x + 2x +
                FALSE,
    139 - 2x + 2x +
                paste(
    140 - 2x + 2x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    141 - 2x + 2x +
                  paste(data$message, collapse = "\n"),
    142 - 2x + 2x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -18591,56 +19192,64 @@

    teal coverage - 69.63%

    149 - 9x + 9x +
          if (inherits(data, "error")) {
    150 - 1x + 1x +
            validate(
    151 - 1x + 1x +
              need(
    152 - 1x + 1x +
                FALSE,
    153 - 1x + 1x +
                paste(
    154 - 1x + 1x +
                  "Error when executing `teal_data_module` passed to `data`:\n ",
    155 - 1x + 1x +
                  paste(data$message, collpase = "\n"),
    156 - 1x + 1x +
                  "\n Check your inputs or contact app developer if error persists."
    @@ -18682,56 +19291,64 @@

    teal coverage - 69.63%

    162 - 8x + 8x +
          validate(
    163 - 8x + 8x +
            need(
    164 - 8x + 8x +
              inherits(data, "teal_data"),
    165 - 8x + 8x +
              paste(
    166 - 8x + 8x +
                "Error: `teal_data_module` passed to `data` failed to return `teal_data` object, returned",
    167 - 8x + 8x +
                toString(sQuote(class(data))),
    168 - 8x + 8x +
                "instead.",
    169 - 8x + 8x +
                "\n Check your inputs or contact app developer if error persists."
    @@ -18766,14 +19383,16 @@

    teal coverage - 69.63%

    174 - 5x + 5x +
          if (!length(teal.data::datanames(data))) {
    175 - 1x + 1x +
            warning("`data` object has no datanames. Default datanames are set using `teal_data`'s environment.")
    @@ -18794,21 +19413,24 @@

    teal coverage - 69.63%

    178 - 5x + 5x +
          is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    179 - 5x + 5x +
          if (!isTRUE(is_modules_ok)) {
    180 - 1x + 1x +
            validate(need(isTRUE(is_modules_ok), sprintf("%s. Contact app developer.", is_modules_ok)))
    @@ -18829,42 +19451,48 @@

    teal coverage - 69.63%

    183 - 4x + 4x +
          is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    184 - 4x + 4x +
          if (!isTRUE(is_filter_ok)) {
    185 - 1x + 1x +
            showNotification(
    186 - 1x + 1x +
              "Some filters were not applied because of incompatibility with data. Contact app developer.",
    187 - 1x + 1x +
              type = "warning",
    188 - 1x + 1x +
              duration = 10
    @@ -18878,7 +19506,8 @@

    teal coverage - 69.63%

    190 - 1x + 1x +
            warning(is_filter_ok)
    @@ -18899,7 +19528,8 @@

    teal coverage - 69.63%

    193 - 4x + 4x +
          teal_data_rv()
    @@ -18920,7 +19550,8 @@

    teal coverage - 69.63%

    196 - 14x + 14x +
        output$error <- renderUI({
    @@ -18962,14 +19593,16 @@

    teal coverage - 69.63%

    202 - 14x + 14x +
        res <- srv_teal(id = "teal", modules = modules, teal_data_rv = teal_data_rv_validate, filter = filter)
    203 - 14x + 14x +
        logger::log_trace("srv_teal_with_splash initialized module with data.")
    @@ -18983,7 +19616,8 @@

    teal coverage - 69.63%

    205 - 14x + 14x +
        res
    @@ -19108,21 +19742,24 @@

    teal coverage - 69.63%

    15 - 18x + 18x +
      script <- sprintf(
    16 - 18x + 18x +
        "Shiny.setInputValue(`%s`, Intl.DateTimeFormat().resolvedOptions().timeZone)",
    17 - 18x + 18x +
        ns("timezone")
    @@ -19136,14 +19773,16 @@

    teal coverage - 69.63%

    19 - 18x + 18x +
      shinyjs::runjs(script) # function does not return anything
    20 - 18x + 18x +
      invisible(NULL)
    @@ -19192,42 +19831,48 @@

    teal coverage - 69.63%

    27 - 11x + 11x +
      bs_theme <- getOption("teal.bs_theme")
    28 - 11x + 11x +
      if (is.null(bs_theme)) {
    29 - 8x + 8x +
        NULL
    30 - 3x + 3x +
      } else if (!inherits(bs_theme, "bs_theme")) {
    31 - 2x + 2x +
        warning("teal.bs_theme has to be of a bslib::bs_theme class, the default shiny bootstrap is used.")
    32 - 2x + 2x +
        NULL
    @@ -19241,7 +19886,8 @@

    teal coverage - 69.63%

    34 - 1x + 1x +
        bs_theme
    @@ -19297,42 +19943,48 @@

    teal coverage - 69.63%

    42 - 15x + 15x +
      parents <- character(0)
    43 - 15x + 15x +
      for (i in dataname) {
    44 - 22x + 22x +
        while (length(i) > 0) {
    45 - 24x + 24x +
          parent_i <- teal.data::parent(join_keys, i)
    46 - 24x + 24x +
          parents <- c(parent_i, parents)
    47 - 24x + 24x +
          i <- parent_i
    @@ -19360,7 +20012,8 @@

    teal coverage - 69.63%

    51 - 15x + 15x +
      unique(c(parents, dataname))
    @@ -19444,14 +20097,16 @@

    teal coverage - 69.63%

    63 - 18x + 18x +
      checkmate::assert_class(x, "teal_data")
    64 - 18x + 18x +
      checkmate::assert_character(datanames, min.chars = 1L, any.missing = FALSE)
    @@ -19465,21 +20120,24 @@

    teal coverage - 69.63%

    66 - 18x + 18x +
      ans <- teal.slice::init_filtered_data(
    67 - 18x + 18x +
        x = sapply(datanames, function(dn) x[[dn]], simplify = FALSE),
    68 - 18x + 18x +
        join_keys = teal.data::join_keys(x)
    @@ -19500,21 +20158,24 @@

    teal coverage - 69.63%

    71 - 18x + 18x +
      attr(ans, "preprocessing_code") <- teal.data::get_code(x, datanames = datanames, check_names = FALSE)
    72 - 18x + 18x +
      attr(ans, "verification_status") <- x@verified
    73 - 18x + 18x +
      ans
    @@ -19647,35 +20308,40 @@

    teal coverage - 69.63%

    92 - 2x + 2x +
      checkmate::assert_string(title)
    93 - 2x + 2x +
      checkmate::assert_string(label)
    94 - 2x + 2x +
      checkmate::assert_string(description, null.ok = TRUE)
    95 - 2x + 2x +
      checkmate::assert_flag(with_filter)
    96 - 2x + 2x +
      checkmate::assert_class(filter_panel_api, classes = "FilterPanelAPI")
    @@ -19689,49 +20355,56 @@

    teal coverage - 69.63%

    98 - 2x + 2x +
      card <- teal::TealReportCard$new()
    99 - 2x + 2x +
      title <- if (label == "") title else label
    100 - 2x + 2x +
      card$set_name(title)
    101 - 2x + 2x +
      card$append_text(title, "header2")
    102 - 1x + 1x +
      if (!is.null(description)) card$append_text(description, "header3")
    103 - 1x + 1x +
      if (with_filter) card$append_fs(filter_panel_api$get_filter_state())
    104 - 2x + 2x +
      card
    @@ -19836,14 +20509,16 @@

    teal coverage - 69.63%

    119 - 12x + 12x +
      checkmate::assert_class(modules, "teal_modules")
    120 - 12x + 12x +
      checkmate::assert_character(datanames)
    @@ -19857,7 +20532,8 @@

    teal coverage - 69.63%

    122 - 12x + 12x +
      recursive_check_datanames <- function(modules, datanames) {
    @@ -19871,14 +20547,16 @@

    teal coverage - 69.63%

    124 - 26x + 26x +
        if (inherits(modules, "teal_modules")) {
    125 - 12x + 12x +
          sapply(modules$children, function(module) recursive_check_datanames(module, datanames = datanames))
    @@ -19892,49 +20570,56 @@

    teal coverage - 69.63%

    127 - 14x + 14x +
          extra_datanames <- setdiff(modules$datanames, c("all", datanames))
    128 - 14x + 14x +
          if (length(extra_datanames)) {
    129 - 2x + 2x +
            sprintf(
    130 - 2x + 2x +
              "- Module '%s' uses datanames not available in 'data': (%s) not in (%s)",
    131 - 2x + 2x +
              modules$label,
    132 - 2x + 2x +
              toString(dQuote(extra_datanames, q = FALSE)),
    133 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -19969,21 +20654,24 @@

    teal coverage - 69.63%

    138 - 12x + 12x +
      check_datanames <- unlist(recursive_check_datanames(modules, datanames))
    139 - 12x + 12x +
      if (length(check_datanames)) {
    140 - 2x + 2x +
        paste(check_datanames, collapse = "\n")
    @@ -19997,7 +20685,8 @@

    teal coverage - 69.63%

    142 - 10x + 10x +
        TRUE
    @@ -20102,14 +20791,16 @@

    teal coverage - 69.63%

    157 - 10x + 10x +
      checkmate::assert_class(filters, "teal_slices")
    158 - 10x + 10x +
      checkmate::assert_character(datanames)
    @@ -20130,63 +20821,72 @@

    teal coverage - 69.63%

    161 - 10x + 10x +
      out <- unlist(sapply(
    162 - 10x + 10x +
        filters, function(filter) {
    163 - 3x + 3x +
          dataname <- shiny::isolate(filter$dataname)
    164 - 3x + 3x +
          if (!dataname %in% datanames) {
    165 - 2x + 2x +
            sprintf(
    166 - 2x + 2x +
              "- Filter '%s' refers to dataname not available in 'data':\n %s not in (%s)",
    167 - 2x + 2x +
              shiny::isolate(filter$id),
    168 - 2x + 2x +
              dQuote(dataname, q = FALSE),
    169 - 2x + 2x +
              toString(dQuote(datanames, q = FALSE))
    @@ -20235,14 +20935,16 @@

    teal coverage - 69.63%

    176 - 10x + 10x +
      if (length(out)) {
    177 - 2x + 2x +
        paste(out, collapse = "\n")
    @@ -20256,7 +20958,8 @@

    teal coverage - 69.63%

    179 - 8x + 8x +
        TRUE
    @@ -20375,28 +21078,32 @@

    teal coverage - 69.63%

    196 - 15x + 15x +
      checkmate::assert_class(data, "teal_data")
    197 - 15x + 15x +
      checkmate::assert_multi_class(modules, c("teal_modules", "teal_module"))
    198 - 15x + 15x +
      checkmate::assert_class(filters, "modules_teal_slices")
    199 - 15x + 15x +
      checkmate::assert_r6(filtered_data_singleton, "FilteredData")
    @@ -20410,7 +21117,8 @@

    teal coverage - 69.63%

    201 - 15x + 15x +
      if (!isTRUE(attr(filters, "module_specific"))) {
    @@ -20424,14 +21132,16 @@

    teal coverage - 69.63%

    203 - 3x + 3x +
        slices <- shiny::isolate({
    204 - 3x + 3x +
          Filter(function(x) x$id %in% attr(filters, "mapping")$global_filters, filters)
    @@ -20445,14 +21155,16 @@

    teal coverage - 69.63%

    206 - 3x + 3x +
        filtered_data_singleton$set_filter_state(slices)
    207 - 3x + 3x +
        return(modules_structure(modules, filtered_data_singleton))
    @@ -20473,7 +21185,8 @@

    teal coverage - 69.63%

    210 - 12x + 12x +
      if (inherits(modules, "teal_module")) {
    @@ -20487,35 +21200,40 @@

    teal coverage - 69.63%

    212 - 7x + 7x +
        datanames <-
    213 - 7x + 7x +
          if (is.null(modules$datanames) || identical(modules$datanames, "all")) {
    214 - 4x + 4x +
            include_parent_datanames(
    215 - 4x + 4x +
              teal_data_datanames(data),
    216 - 4x + 4x +
              teal.data::join_keys(data)
    @@ -20536,21 +21254,24 @@

    teal coverage - 69.63%

    219 - 3x + 3x +
            include_parent_datanames(
    220 - 3x + 3x +
              modules$datanames,
    221 - 3x + 3x +
              teal.data::join_keys(data)
    @@ -20578,35 +21299,40 @@

    teal coverage - 69.63%

    225 - 7x + 7x +
        slices <- shiny::isolate({
    226 - 7x + 7x +
          Filter(x = filters, f = function(x) {
    227 - 20x + 20x +
            x$dataname %in% datanames &&
    228 - 20x + 20x +
              (x$id %in% attr(filters, "mapping")$global_filters ||
    229 - 20x + 20x +
                x$id %in% unique(unlist(attr(filters, "mapping")[modules$label]))) # nolint: indentation_linter.
    @@ -20634,14 +21360,16 @@

    teal coverage - 69.63%

    233 - 7x + 7x +
        slices$include_varnames <- attr(slices, "include_varnames")[names(attr(slices, "include_varnames")) %in% datanames]
    234 - 7x + 7x +
        slices$exclude_varnames <- attr(slices, "exclude_varnames")[names(attr(slices, "exclude_varnames")) %in% datanames]
    @@ -20662,7 +21390,8 @@

    teal coverage - 69.63%

    237 - 7x + 7x +
        filtered_data <- teal_data_to_filtered_data(data, datanames)
    @@ -20676,7 +21405,8 @@

    teal coverage - 69.63%

    239 - 7x + 7x +
        filtered_data$set_filter_state(slices)
    @@ -20690,56 +21420,64 @@

    teal coverage - 69.63%

    241 - 7x + 7x +
        return(filtered_data)
    242 - 5x + 5x +
      } else if (inherits(modules, "teal_modules")) {
    243 - 5x + 5x +
        ans <- lapply(
    244 - 5x + 5x +
          modules$children,
    245 - 5x + 5x +
          modules_datasets,
    246 - 5x + 5x +
          data = data,
    247 - 5x + 5x +
          filters = filters,
    248 - 5x + 5x +
          filtered_data_singleton = filtered_data_singleton
    @@ -20753,7 +21491,8 @@

    teal coverage - 69.63%

    250 - 5x + 5x +
        names(ans) <- vapply(modules$children, `[[`, character(1), "label")
    @@ -20767,7 +21506,8 @@

    teal coverage - 69.63%

    252 - 5x + 5x +
        return(ans)
    @@ -20823,14 +21563,16 @@

    teal coverage - 69.63%

    260 - 13x + 13x +
      if (inherits(modules, "teal_module")) {
    261 - 8x + 8x +
        return(value)
    @@ -20844,21 +21586,24 @@

    teal coverage - 69.63%

    263 - 5x + 5x +
        stats::setNames(
    264 - 5x + 5x +
          lapply(modules$children, modules_structure, value),
    265 - 5x + 5x +
          vapply(modules$children, `[[`, character(1), "label")
    @@ -20949,21 +21694,24 @@

    teal coverage - 69.63%

    278 - 53x + 53x +
      checkmate::assert_class(data, "teal_data")
    279 - 53x + 53x +
      if (length(teal.data::datanames(data))) {
    280 - 47x + 47x +
        teal.data::datanames(data)
    @@ -20977,7 +21725,8 @@

    teal coverage - 69.63%

    282 - 6x + 6x +
        ls(teal.code::get_env(data), all.names = TRUE)
    @@ -21047,70 +21796,80 @@

    teal coverage - 69.63%

    292 - 14x + 14x +
      checkmate::assert_class(shiny_tag, "shiny.tag")
    293 - 14x + 14x +
      checkmate::assert_true(shiny_tag$name == "head")
    294 - 13x + 13x +
      child_names <- vapply(shiny_tag$children, `[[`, character(1L), "name")
    295 - 13x + 13x +
      checkmate::assert_subset(c("title", "link"), child_names, .var.name = "child tags")
    296 - 11x + 11x +
      rel_attr <- shiny_tag$children[[which(child_names == "link")]]$attribs$rel
    297 - 11x + 11x +
      checkmate::assert_subset(
    298 - 11x + 11x +
        rel_attr,
    299 - 11x + 11x +
        c("icon", "shortcut icon"),
    300 - 11x + 11x +
        .var.name = "Link tag's rel attribute",
    301 - 11x + 11x +
        empty.ok = FALSE
    @@ -21229,56 +21988,64 @@

    teal coverage - 69.63%

    318 - 11x + 11x +
      checkmate::assert_string(title, null.ok = TRUE)
    319 - 11x + 11x +
      checkmate::assert_string(favicon, null.ok = TRUE)
    320 - 11x + 11x +
      tags$head(
    321 - 11x + 11x +
        tags$title(title),
    322 - 11x + 11x +
        tags$link(
    323 - 11x + 11x +
          rel = "icon",
    324 - 11x + 11x +
          href = favicon,
    325 - 11x + 11x +
          sizes = "any"
    @@ -21418,14 +22185,16 @@

    teal coverage - 69.63%

    345 - 19x + 19x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    346 - 18x + 18x +
      checkmate::assert_class(modules, "teal_modules")
    @@ -21439,28 +22208,32 @@

    teal coverage - 69.63%

    348 - 17x + 17x +
      data <- if (inherits(data, "teal_data")) {
    349 - 15x + 15x +
        as.list(data@env)
    350 - 17x + 17x +
      } else if (inherits(data, "teal_data_module")) {
    351 - 2x + 2x +
        deparse1(body(data$server))
    @@ -21474,7 +22247,8 @@

    teal coverage - 69.63%

    353 - 17x + 17x +
      modules <- lapply(modules, defunction)
    @@ -21488,7 +22262,8 @@

    teal coverage - 69.63%

    355 - 17x + 17x +
      rlang::hash(list(data = data, modules = modules))
    @@ -21537,28 +22312,32 @@

    teal coverage - 69.63%

    362 - 186x + 186x +
      if (is.list(x)) {
    363 - 40x + 40x +
        lapply(x, defunction)
    364 - 146x + 146x +
      } else if (is.function(x)) {
    365 - 44x + 44x +
        deparse1(body(x))
    @@ -21572,7 +22351,8 @@

    teal coverage - 69.63%

    367 - 102x + 102x +
        x
    @@ -21788,14 +22568,16 @@

    teal coverage - 69.63%

    28 - 9x + 9x +
      checkmate::assert_class(tss, "teal_slices")
    29 - 9x + 9x +
      checkmate::assert_path_for_output(file, overwrite = TRUE, extension = "json")
    @@ -21809,7 +22591,8 @@

    teal coverage - 69.63%

    31 - 9x + 9x +
      cat(format(tss, trim_lines = FALSE), "\n", file = file)
    @@ -21858,7 +22641,8 @@

    teal coverage - 69.63%

    38 - 9x + 9x +
      checkmate::assert_file_exists(file, access = "r", extension = "json")
    @@ -21872,56 +22656,64 @@

    teal coverage - 69.63%

    40 - 9x + 9x +
      tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)
    41 - 9x + 9x +
      tss_json$slices <-
    42 - 9x + 9x +
        lapply(tss_json$slices, function(slice) {
    43 - 9x + 9x +
          for (field in c("selected", "choices")) {
    44 - 18x + 18x +
            if (!is.null(slice[[field]])) {
    45 - 12x + 12x +
              if (length(slice[[field]]) > 0) {
    46 - 9x + 9x +
                date_partial_regex <- "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
    47 - 9x + 9x +
                time_stamp_regex <- paste0(date_partial_regex, "\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\sUTC$")
    @@ -21935,35 +22727,40 @@

    teal coverage - 69.63%

    49 - 9x + 9x +
                slice[[field]] <-
    50 - 9x + 9x +
                  if (all(grepl(paste0(date_partial_regex, "$"), slice[[field]]))) {
    51 - 3x + 3x +
                    as.Date(slice[[field]])
    52 - 9x + 9x +
                  } else if (all(grepl(time_stamp_regex, slice[[field]]))) {
    53 - 3x + 3x +
                    as.POSIXct(slice[[field]], tz = "UTC")
    @@ -21977,7 +22774,8 @@

    teal coverage - 69.63%

    55 - 3x + 3x +
                    slice[[field]]
    @@ -21998,7 +22796,8 @@

    teal coverage - 69.63%

    58 - 3x + 3x +
                slice[[field]] <- character(0)
    @@ -22026,7 +22825,8 @@

    teal coverage - 69.63%

    62 - 9x + 9x +
          slice
    @@ -22047,7 +22847,8 @@

    teal coverage - 69.63%

    65 - 9x + 9x +
      tss_elements <- lapply(tss_json$slices, as.teal_slice)
    @@ -22061,7 +22862,8 @@

    teal coverage - 69.63%

    67 - 9x + 9x +
      do.call(teal_slices, c(tss_elements, tss_json$attributes))
    @@ -22396,56 +23198,64 @@

    teal coverage - 69.63%

    46 - 17x + 17x +
      checkmate::assert_string(msg, null.ok = TRUE)
    47 - 15x + 15x +
      checkmate::assert_data_frame(x)
    48 - 15x + 15x +
      if (!is.null(min_nrow)) {
    49 - 15x + 15x +
        if (complete) {
    50 - 5x + 5x +
          complete_index <- stats::complete.cases(x)
    51 - 5x + 5x +
          validate(need(
    52 - 5x + 5x +
            sum(complete_index) > 0 && nrow(x[complete_index, , drop = FALSE]) >= min_nrow,
    53 - 5x + 5x +
            paste(c(paste("Number of complete cases is less than:", min_nrow), msg), collapse = "\n")
    @@ -22466,35 +23276,40 @@

    teal coverage - 69.63%

    56 - 10x + 10x +
          validate(need(
    57 - 10x + 10x +
            nrow(x) >= min_nrow,
    58 - 10x + 10x +
            paste(
    59 - 10x + 10x +
              c(paste("Minimum number of records not met: >=", min_nrow, "records required."), msg),
    60 - 10x + 10x +
              collapse = "\n"
    @@ -22529,28 +23344,32 @@

    teal coverage - 69.63%

    65 - 10x + 10x +
        if (!allow_inf) {
    66 - 6x + 6x +
          validate(need(
    67 - 6x + 6x +
            all(vapply(x, function(col) !is.numeric(col) || !any(is.infinite(col)), logical(1))),
    68 - 6x + 6x +
            "Dataframe contains Inf values which is not allowed."
    @@ -25454,7 +26273,8 @@

    teal coverage - 69.63%

    103 - 10x + 10x +
      logger::log_trace("init initializing teal app with: data ('{ class(data) }').")
    @@ -25482,7 +26302,8 @@

    teal coverage - 69.63%

    107 - 10x + 10x +
      if (inherits(data, "TealData")) {
    @@ -25552,7 +26373,8 @@

    teal coverage - 69.63%

    117 - 10x + 10x +
      checkmate::assert_multi_class(data, c("teal_data", "teal_data_module"))
    @@ -25573,28 +26395,32 @@

    teal coverage - 69.63%

    120 - 10x + 10x +
      checkmate::assert(
    121 - 10x + 10x +
        .var.name = "modules",
    122 - 10x + 10x +
        checkmate::check_multi_class(modules, c("teal_modules", "teal_module")),
    123 - 10x + 10x +
        checkmate::check_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))
    @@ -25608,14 +26434,16 @@

    teal coverage - 69.63%

    125 - 10x + 10x +
      if (inherits(modules, "teal_module")) {
    126 - 1x + 1x +
        modules <- list(modules)
    @@ -25629,14 +26457,16 @@

    teal coverage - 69.63%

    128 - 10x + 10x +
      if (checkmate::test_list(modules, min.len = 1, any.missing = FALSE, types = c("teal_module", "teal_modules"))) {
    129 - 4x + 4x +
        modules <- do.call(teal::modules, modules)
    @@ -25664,7 +26494,8 @@

    teal coverage - 69.63%

    133 - 10x + 10x +
      checkmate::assert_class(filter, "teal_slices")
    @@ -25685,28 +26516,32 @@

    teal coverage - 69.63%

    136 - 9x + 9x +
      checkmate::assert(
    137 - 9x + 9x +
        .var.name = "title",
    138 - 9x + 9x +
        checkmate::check_string(title),
    139 - 9x + 9x +
        checkmate::check_multi_class(title, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25720,28 +26555,32 @@

    teal coverage - 69.63%

    141 - 9x + 9x +
      checkmate::assert(
    142 - 9x + 9x +
        .var.name = "header",
    143 - 9x + 9x +
        checkmate::check_string(header),
    144 - 9x + 9x +
        checkmate::check_multi_class(header, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25755,28 +26594,32 @@

    teal coverage - 69.63%

    146 - 9x + 9x +
      checkmate::assert(
    147 - 9x + 9x +
        .var.name = "footer",
    148 - 9x + 9x +
        checkmate::check_string(footer),
    149 - 9x + 9x +
        checkmate::check_multi_class(footer, c("shiny.tag", "shiny.tag.list", "html"))
    @@ -25790,7 +26633,8 @@

    teal coverage - 69.63%

    151 - 9x + 9x +
      checkmate::assert_character(id, max.len = 1, any.missing = FALSE)
    @@ -25811,7 +26655,8 @@

    teal coverage - 69.63%

    154 - 9x + 9x +
      teal.logger::log_system_info()
    @@ -25839,21 +26684,24 @@

    teal coverage - 69.63%

    158 - 9x + 9x +
      landing <- extract_module(modules, "teal_module_landing")
    159 - 9x + 9x +
      landing_module <- NULL
    160 - 9x + 9x +
      if (length(landing) == 1L) {
    @@ -25874,7 +26722,8 @@

    teal coverage - 69.63%

    163 - 9x + 9x +
      } else if (length(landing) > 1L) {
    @@ -25909,7 +26758,8 @@

    teal coverage - 69.63%

    168 - 9x + 9x +
      attr(filter, "app_id") <- create_app_id(data, modules)
    @@ -25930,7 +26780,8 @@

    teal coverage - 69.63%

    171 - 9x + 9x +
      filter <- as.teal_slices(as.list(filter))
    @@ -25958,7 +26809,8 @@

    teal coverage - 69.63%

    175 - 9x + 9x +
      if (isTRUE(attr(filter, "module_specific"))) {
    @@ -26147,21 +26999,24 @@

    teal coverage - 69.63%

    202 - 9x + 9x +
      if (inherits(data, "teal_data")) {
    203 - 8x + 8x +
        if (length(teal_data_datanames(data)) == 0) {
    204 - 1x + 1x +
          stop("The environment of `data` is empty.")
    @@ -26182,28 +27037,32 @@

    teal coverage - 69.63%

    207 - 7x + 7x +
        is_modules_ok <- check_modules_datanames(modules, teal_data_datanames(data))
    208 - 7x + 7x +
        if (!isTRUE(is_modules_ok)) {
    209 - 1x + 1x +
          logger::log_error(is_modules_ok)
    210 - 1x + 1x +
          checkmate::assert(is_modules_ok, .var.name = "modules")
    @@ -26224,21 +27083,24 @@

    teal coverage - 69.63%

    213 - 6x + 6x +
        is_filter_ok <- check_filter_datanames(filter, teal_data_datanames(data))
    214 - 6x + 6x +
        if (!isTRUE(is_filter_ok)) {
    215 - 1x + 1x +
          warning(is_filter_ok)
    @@ -26301,21 +27163,24 @@

    teal coverage - 69.63%

    224 - 7x + 7x +
      res <- list(
    225 - 7x + 7x +
        ui = ui_teal_with_splash(id = id, data = data, title = title, header = header, footer = footer),
    226 - 7x + 7x +
        server = function(input, output, session) {
    @@ -26371,7 +27236,8 @@

    teal coverage - 69.63%

    234 - 7x + 7x +
      logger::log_trace("init teal app has been initialized.")
    @@ -26385,7 +27251,8 @@

    teal coverage - 69.63%

    236 - 7x + 7x +
      res
    @@ -26594,14 +27461,16 @@

    teal coverage - 69.63%

    28 - 6x + 6x +
      expr <- substitute(expr)
    29 - 6x + 6x +
      extras <- list(...)
    @@ -26622,14 +27491,16 @@

    teal coverage - 69.63%

    32 - 6x + 6x +
      if (!identical(as.list(expr)[[1L]], as.symbol("{"))) {
    33 - 6x + 6x +
        expr <- call("{", expr)
    @@ -26650,7 +27521,8 @@

    teal coverage - 69.63%

    36 - 6x + 6x +
      calls <- as.list(expr)[-1]
    @@ -26671,7 +27543,8 @@

    teal coverage - 69.63%

    39 - 6x + 6x +
      calls <- lapply(calls, function(x) do.call(substitute, list(x, env = extras)))
    @@ -26685,7 +27558,8 @@

    teal coverage - 69.63%

    41 - 6x + 6x +
      eval_code(object = data, code = as.expression(calls))
    @@ -26782,21 +27656,24 @@

    teal coverage - 69.63%

    12 - 7x + 7x +
      css_files <- list.files(
    13 - 7x + 7x +
        system.file("css", package = "teal", mustWork = TRUE),
    14 - 7x + 7x +
        pattern = pattern, full.names = TRUE
    @@ -26817,14 +27694,16 @@

    teal coverage - 69.63%

    17 - 7x + 7x +
      singleton(
    18 - 7x + 7x +
        tags$head(lapply(css_files, includeCSS))
    @@ -26936,21 +27815,24 @@

    teal coverage - 69.63%

    34 - 7x + 7x +
      checkmate::assert_character(except, min.len = 1, any.missing = FALSE, null.ok = TRUE)
    35 - 7x + 7x +
      js_files <- list.files(system.file("js", package = "teal", mustWork = TRUE), pattern = pattern, full.names = TRUE)
    36 - 7x + 7x +
      js_files <- js_files[!(basename(js_files) %in% except)] # no-op if except is NULL
    @@ -26964,7 +27846,8 @@

    teal coverage - 69.63%

    38 - 7x + 7x +
      singleton(lapply(js_files, includeScript))
    @@ -27097,21 +27980,24 @@

    teal coverage - 69.63%

    57 - 18x + 18x +
      checkmate::assert_character(files, min.len = 1, any.missing = FALSE)
    58 - 18x + 18x +
      lapply(files, function(file) {
    59 - 18x + 18x +
        shinyjs::runjs(paste0(readLines(system.file("js", file, package = "teal", mustWork = TRUE)), collapse = "\n"))
    @@ -27125,7 +28011,8 @@

    teal coverage - 69.63%

    61 - 18x + 18x +
      invisible(NULL)
    @@ -27230,21 +28117,24 @@

    teal coverage - 69.63%

    76 - 7x + 7x +
      tagList(
    77 - 7x + 7x +
        shinyjs::useShinyjs(),
    78 - 7x + 7x +
        include_css_files(),
    @@ -27258,14 +28148,16 @@

    teal coverage - 69.63%

    80 - 7x + 7x +
        include_js_files(except = "init.js"),
    81 - 7x + 7x +
        shinyjs::hidden(icon("gear")), # add hidden icon to load font-awesome css for icons
    @@ -27404,28 +28296,32 @@

    teal coverage - 69.63%

    17 - 53x + 53x +
      checkmate::assert_string(label)
    18 - 53x + 53x +
      module(
    19 - 53x + 53x +
        label,
    20 - 53x + 53x +
        server = function(id, data) {
    @@ -27530,7 +28426,8 @@

    teal coverage - 69.63%

    35 - 53x + 53x +
        ui = function(id) {
    @@ -27600,7 +28497,8 @@

    teal coverage - 69.63%

    45 - 53x + 53x +
        datanames = datanames
    @@ -27823,28 +28721,32 @@

    teal coverage - 69.63%

    29 - 13x + 13x +
      teal_data_module(
    30 - 13x + 13x +
        ui = function(id) {
    31 - 1x + 1x +
          ns <- NS(id)
    32 - 1x + 1x +
          object$ui(ns("mutate_inner"))
    @@ -27858,21 +28760,24 @@

    teal coverage - 69.63%

    34 - 13x + 13x +
        server = function(id) {
    35 - 11x + 11x +
          moduleServer(id, function(input, output, session) {
    36 - 11x + 11x +
            teal_data_rv <- object$server("mutate_inner")
    @@ -27886,14 +28791,16 @@

    teal coverage - 69.63%

    38 - 11x + 11x +
            if (!is.reactive(teal_data_rv)) {
    39 - 1x + 1x +
              stop("The `teal_data_module` must return a reactive expression.", call. = FALSE)
    @@ -27914,7 +28821,8 @@

    teal coverage - 69.63%

    42 - 10x + 10x +
            td <- eventReactive(teal_data_rv(),
    @@ -27928,14 +28836,16 @@

    teal coverage - 69.63%

    44 - 10x + 10x +
                if (inherits(teal_data_rv(), c("teal_data", "qenv.error"))) {
    45 - 6x + 6x +
                  eval_code(teal_data_rv(), code)
    @@ -27949,7 +28859,8 @@

    teal coverage - 69.63%

    47 - 4x + 4x +
                  teal_data_rv()
    @@ -27970,7 +28881,8 @@

    teal coverage - 69.63%

    50 - 10x + 10x +
              ignoreNULL = FALSE
    @@ -27984,7 +28896,8 @@

    teal coverage - 69.63%

    52 - 10x + 10x +
            td
    @@ -28033,7 +28946,8 @@

    teal coverage - 69.63%

    59 - 1x + 1x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -28061,7 +28975,8 @@

    teal coverage - 69.63%

    63 - 6x + 6x +
      eval_code(object, code = paste(lang2calls(code), collapse = "\n"))
    @@ -28857,21 +29772,24 @@

    teal coverage - 69.63%

    23 - 4x + 4x +
      checkmate::assert_string(label)
    24 - 2x + 2x +
      checkmate::assert_list(server_args, names = "named")
    25 - 2x + 2x +
      checkmate::assert_true(all(names(server_args) %in% names(formals(teal.reporter::reporter_previewer_srv))))
    @@ -28885,7 +29803,8 @@

    teal coverage - 69.63%

    27 - 2x + 2x +
      logger::log_info("Initializing reporter_previewer_module")
    @@ -28899,7 +29818,8 @@

    teal coverage - 69.63%

    29 - 2x + 2x +
      srv <- function(id, reporter, ...) {
    @@ -28927,7 +29847,8 @@

    teal coverage - 69.63%

    33 - 2x + 2x +
      ui <- function(id, ...) {
    @@ -28955,28 +29876,32 @@

    teal coverage - 69.63%

    37 - 2x + 2x +
      module <- module(
    38 - 2x + 2x +
        label = "temporary label",
    39 - 2x + 2x +
        server = srv, ui = ui,
    40 - 2x + 2x +
        server_args = server_args, ui_args = list(), datanames = NULL
    @@ -29004,21 +29929,24 @@

    teal coverage - 69.63%

    44 - 2x + 2x +
      class(module) <- c("teal_module_previewer", class(module))
    45 - 2x + 2x +
      module$label <- label
    46 - 2x + 2x +
      module
    @@ -29430,35 +30358,40 @@

    teal coverage - 69.63%

    57 - 36x + 36x +
      checkmate::assert_function(ui, args = "id", nargs = 1)
    58 - 35x + 35x +
      checkmate::assert_function(server, args = "id", nargs = 1)
    59 - 34x + 34x +
      structure(
    60 - 34x + 34x +
        list(ui = ui, server = server),
    61 - 34x + 34x +
        class = "teal_data_module"
    diff --git a/v0.15.2/index.html b/v0.15.2/index.html index f1e5827450..fccc573a2a 100644 --- a/v0.15.2/index.html +++ b/v0.15.2/index.html @@ -1,5 +1,4 @@ - - + @@ -88,23 +87,7 @@ - - + - + + diff --git a/v0.15.2/news/index.html b/v0.15.2/news/index.html index a90394fb5a..3aea2486e2 100644 --- a/v0.15.2/news/index.html +++ b/v0.15.2/news/index.html @@ -1,8 +1,22 @@ - -Changelog • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -109,35 +129,55 @@
    -

    teal 0.15.2

    CRAN release: 2024-03-07

    -
    -

    Bug fixes

    -
    • Fixed a bug in handling datanames of modules that crashed module-specific applications when filtering child datasets.
    • -
    +

    teal 0.15.2 +

    +

    CRAN release: 2024-03-07

    +
    +

    Bug fixes +

    +
      +
    • Fixed a bug in handling datanames of modules that crashed module-specific applications when filtering child datasets.
    • +
    +
    -

    teal 0.15.1

    CRAN release: 2024-02-22

    -
    -

    Bug fixes

    -
    • Fixed a bug that stopped the module_specific feature when a teal module specified datanames of length more than 1.
    • -
    +

    teal 0.15.1 +

    +

    CRAN release: 2024-02-22

    +
    +

    Bug fixes +

    +
      +
    • Fixed a bug that stopped the module_specific feature when a teal module specified datanames of length more than 1.
    • +
    +
    -

    Miscellaneous

    -
    • Updated links in vignettes
    • -
    +

    Miscellaneous +

    +
      +
    • Updated links in vignettes
    • +
    +
    -

    teal 0.15.0

    CRAN release: 2024-02-08

    -
    -

    New features

    -
    • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
    • +

      teal 0.15.0 +

      +

      CRAN release: 2024-02-08

      +
      +

      New features +

      +
        +
      • Added landing_popup_module function which creates a module that will display a popup when the app starts. The popup will block access to the app until it is dismissed.
      • Filter state snapshots can now be uploaded from file. See ?snapshot.
      • Added as_tdata function to facilitate migration of modules to the new teal_data class.
      • Added build_app_title function to facilitate adding favicons to app title.
      • -
      +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • data argument in init now accepts only teal_data and teal_data_module.
      • tdata has been deprecated and replaced with teal_data. Support for tdata passed to the data argument in module(server) will be removed in the next release.
      • @@ -146,114 +186,166 @@

        Breaking changes -

        Miscellaneous

        -
        • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
        • +

          Miscellaneous +

          +
            +
          • Enhanced a module validation checks so that it won’t throw messages about data argument unnecessarily.
          • Added argument to teal_slices and made modifications to init to enable tagging teal_slices with an app id to safely upload snapshots from disk.
          • FilteredData no longer stores pre-processing code in specific slots. Code is now attached as attribute. Adjusted appropriately.
          • -

    + +
    -

    Bug fixes

    -
    • Removed Report previewer module from mapping matrix display in filter manager.
    • +

      Bug fixes +

      +
        +
      • Removed Report previewer module from mapping matrix display in filter manager.
      • Specified minimal version of package dependencies.
      • -
    + +
    -

    teal 0.14.0

    +

    teal 0.14.0 +

    -

    New features

    -
    • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
    • +

      New features +

      +
        +
      • Enabled module specific filter panel. See module_specific in teal::teal_slices documentation.
      • Enabled capturing and resetting application filter state with snapshots. See ?snapshot.
      • Enabled reporter_previewer_module to customize default values through srv_args.
      • Enabled passing own reporter_previewer_module in a list of modules to override default one.
      • -
    + +
    -

    Breaking changes

    -
    • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
    • +

      Breaking changes +

      +
        +
      • Specifying filter argument in teal::init requires teal_slices object now. Details in documentation of teal::init.
      • Soft deprecated filters argument in module and replaced it with datanames. Details in documentation of teal::module
      • -
    + +
    -

    Miscellaneous

    -
    • Removed scda package dependency from examples.
    • +

      Miscellaneous +

      +
        +
      • Removed scda package dependency from examples.
      • Updated the header tag style to enhance element containment.
      • -
    + +
    -

    teal 0.13.0

    +

    teal 0.13.0 +

    -

    Breaking changes

    -
    • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
    • +

      Breaking changes +

      +
        +
      • The use of datasets argument in modules has been deprecated and will be removed in a future release. Please use data argument instead. data is of type tdata; see “Creating custom modules” vignettes and function documentation of teal::new_tdata for further details.
      • Due to deprecation of chunks in teal.code, the teal framework now uses their replacement (qenv) instead. The documentation in teal has been updated to reflect this and custom modules written with chunks should be updated to use qenv.
      • Due to deprecation of chunks in teal.code, get_rcode, get_rcode_srv, and get_rcode_ui have been removed.
      • -
    + +
    -

    New features

    -
    • Added the validate_inputs function that transfers input validation messages to app output.
    • +

      New features +

      +
        +
      • Added the validate_inputs function that transfers input validation messages to app output.
      • modules argument of init accepts teal_module type of object. There is no need to wrap up a single module in modules() or list().
      • Updated module_nested_tabs so that only active modules are calculated in a teal app.
      • -
    + +
    -

    Miscellaneous

    -
    • Updated examples to use scda.2022.
    • +

      Miscellaneous +

      +
        +
      • Updated examples to use scda.2022.
      • Added R session information into a link in the footer of teal applications.
      • Added data hashing step using rlang instead of digest package to calculate the hash (which has been moved from teal.data and teal.slice). There is now an explicit hashing check in the reproducible code output.
      • Removed deprecated functions: root_modules, default_filter, bookmarkableShinyApp, as well as deprecated logging mechanism, including the functions log_app_usage and .log.
      • Updated the “Teal and Bootstrap Themes” vignette to provide more details customizing a teal app with bslib::run_with_themer.
      • Removed outdated diagram from srv_nested_tabs documentation.
      • Changed default values of header and footer arguments in init to empty text.
      • -
    + +
    -

    teal 0.12.0

    -
    -

    New features

    -
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • -
    +

    teal 0.12.0 +

    +
    +

    New features +

    +
      +
    • Added the support for custom bslib bootstrap themes in teal::init apps, please read more in the new teal-bs-themes vignette.
    • +
    +
    -

    Enhancements

    -
    • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
    • +

      Enhancements +

      +
        +
      • Added the option to choose which variables can be filtered in the filter panel by using the filterable attributes for the per-dataset lists in the filter argument of init.
      • Updated teal_module to have data argument which receives a list of reactive filter data with "code" and "join_keys" attributes.
      • Updated teal_module to have filter_panel_api argument which receives a FilterPanelAPI object.
      • Updated the internals of module_teal to reflect changes in teal.slice.
      • -
    + +
    -

    Breaking changes

    -
    • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
    • +

      Breaking changes +

      +
        +
      • Updated teal_module to no longer receive datasets object in the ... argument. In order to use datasets in the teal_module please specify datasets explicitly.
      • Deprecated merge_expression argument in get_rcode_srv function and removed it in get_rcode function.
      • Deprecated session argument in get_rcode function.
      • -
    + +
    -

    Miscellaneous

    -
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • -
    +

    Miscellaneous +

    +
      +
    • Enhanced the burger button so it is disabled when the filter panel is not used.
    • +
    +
    -

    teal 0.11.1

    +

    teal 0.11.1 +

    -

    Enhancements

    -
    • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
    • +

      Enhancements +

      +
        +
      • Added new function reporter_previewer_module to wrap the teal.reporter package previewer functionality as a teal module.
      • Updated teal to support modules which include reporting. If any module which supports reporting is included then a reporter_previewer_module is included.
      • Added default arguments to module() and the server argument is now a function where the second argument can be ... or datasets.
      • -
    + +
    -

    Breaking changes

    -
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • -
    +

    Breaking changes +

    +
      +
    • Deprecated bookmarkableShinyApp. In future releases the teal framework will stop supporting shiny bookmarking (which has not officially been supported); it may be officially supported in the future. Note the filter panel in teal.slice retains its ability to save and restore its state if used in a standalone shiny app with bookmarking.
    • +
    +
    -

    Miscellaneous

    -
    • Added a template to the pkgdown configuration.
    • +

      Miscellaneous +

      +
        +
      • Added a template to the pkgdown configuration.
      • Removed unneeded shinytest app tests.
      • Updated package authors.
      • Added package vignettes.
      • -
    + +
    -

    teal 0.11.0

    -
    +

    The teal package contains the code to create apps (teal::init), to create a module (teal::module) and to group modules in the app (teal::modules). teal depends on teal.transform and teal.data which contain the functions that teal app creators are likely to need. The other package teal only imports from and therefore teal module creators should either fully specify functions from these packages when required or import them into custom packages as library(teal) will not load them.

    +
    +

    New features +

    +
      +
    • A simple new teal module named example_module has been included in the package.
    • +
    +
    -

    Breaking changes

    -
    • +

      Breaking changes +

      +
        +
      • teal package has been split into multiple smaller packages, see above.
      • Deprecated root_modules function, users should use modules directly inside init.
      • Due to deprecation of root_modules any label argument to modules must be explicitly named. For example modules("lab", mod1, mod2) should be replaced with modules(label = "lab", mod1, mod2).
      • -
    + +
    -

    Miscellaneous

    -
    • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
    • +

      Miscellaneous +

      +
        +
      • Minor changes to internals of teal: main module panel now has fixed shiny name root and the active tab is named active_tab not Active_tab.
      • MultiAssayExperiment is now suggested packages, not required. Objects dependent on MultiAssayExperiment are changed to lazy-load this now suggested package.
      • -
    + +
    -

    Bug fixes

    -
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • -
    +

    Bug fixes +

    +
      +
    • Showing R Code no longer shows reproducibility warning message if reproducibility check has passed.
    • +
    +
    -

    teal 0.10.1

    +

    teal 0.10.1 +

    -

    Breaking changes

    -
    • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
    • +

      Breaking changes +

      +
        +
      • Changed the HTML identifiers of teal modules - now each nested module receives its own shiny namespace.
      • Deprecated all functions related to connectors that have been moved to their own separate packages.
      • Removed raw_dataset, raw_dataset_connector, named_dataset, named_dataset_file, named_dataset_connector, relational_dataset, relational_dataset_file, relational_dataset_connector, key, as_cdisc, as_cdisc_relational.
      • Removed rcd_connection and rcd_data; scda_dataset_connectors can be passed into cdisc_data and teal_data directly.
      • Replaced rcd_dataset_connector and rcd_cdisc_dataset_connector with scda_dataset_connector and scda_cdisc_dataset_connector respectively.
      • Renamed teal_show_js_log option into teal.show_js_log to match options naming convention.
      • Removed %is_in% and stop_shiny internal utility functions.
      • -
    + +
    -

    New features

    +

    New features +

    -
    Logging
    -
    • Added support for logging using the logger package.
    • +
      Logging +
      +
        +
      • Added support for logging using the logger package.
      • Added a new function register_logger, which registers a logger in a given namespace.
      • Added trace and info levels log messages to the teal framework.
      • Added pid and shiny session token into footnote so app developers can identify logs for apps.
      • -
    + +
    -
    Other
    -
    • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

    • +
      Other +
      +
        +
      • Added print methods to the DatasetConnector, RelationalData, RelationalDataconnector and JoinKeys classes and added input validation to the implementation of the print method that was already in the Dataset object.

      • Added public facing constructor functions for CDISCDataConnector, RelationalDataConnector, and DataConnection classes.

      • Modified data_extract_spec to allow both the filter and select parameters to be NULL, which results in the data_extract_ui acting as if a filter_spec with all variables as possible choices had been supplied as the filter argument and a select_spec with the multiple parameter set to TRUE had been supplied as the select argument.

      • Added support of the full screen for a module when the filters argument is equal NULL.

      • @@ -320,11 +435,14 @@
        Other -

        Bug fixes

        -
    + +
    -

    teal 0.10.0

    +

    teal 0.10.0 +

    -

    New features

    -
    • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
    • +

      New features +

      +
        +
      • Allow passing MultiAssayExperiment to the teal::init using mae_dataset function or through the connectors.
      • Refactored filter panel to use MultiAssayExperiment objects. Filters can be set on a subject level (colData of MAE object) and on a experiment level (colData and rowData of an assay).
      • Added cdse_dataset_connector to create delayed data objects from CDSE.
      • Added datasetdb_dataset_connector to create delayed data objects from DataSetDB.
      • Added ricepass_connection to create delayed data objects from entimICE via ricepass.
      • Refactor of the filter panel: -
        • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
        • +
            +
          • Simplified setting of initial filter state without need to specify “choices” or “range” named list element depending on the variable class.
          • Dataset type determines an appearance and a functionality of related filters and filters summary.
          • Datasets are passed (by reference) from DDL to FilteredData skipping extracting data and their attributes.
          • Redesigned variable filter labels in “Active Filter Variables” panel.
          • Fully testable server functions.
          • -
          -
    + + + +
    -

    Bug fixes

    -
    • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
    • +

      Bug fixes +

      +
        +
      • Fixed the bug caused by calling mutate_dataset multiple times on the same DatasetConnector or Dataset object.
      • Fixed a bug that caused the output of get_code function to not reproduce its raw data set.
      • Changed filter_spec to allow no variable selection upon app initialization, where the first possible value was previously selected.
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal 0.9.5

    +

    teal 0.9.5 +

    -

    Enhancements

    -
    • Added informational stop message when using mutate_data with RelationalDataConnector.
    • +

      Enhancements +

      +
        +
      • Added informational stop message when using mutate_data with RelationalDataConnector.
      • Modified as_cdisc to behave similarly to cdisc_dataset when called on a Dataset object.
      • Changed the displayed format of the data name and the column name in data_extract_spec UI elements. Both are now compressed to <data name>.<column name> if they don’t change during runtime of the app.
      • Added ADSAFTTE to the list of recognized ADaM dataset names.
      • Added another example to data_extract_spec’s doc string showcasing app users can choose a variable used for filtering in the encoding panel.
      • Added CSS styling to tool tips in teal modules.
      • -
    + +
    -

    Bug fixes

    -
    • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
    • +

      Bug fixes +

      +
        +
      • Fixed an edge case error when creating a filter on variable with all missing values crashed the app.
      • Fixed a bug that crashes app whenever a Date or datetime column is selected from a filter_spec.
      • -
    + +
    -

    teal 0.9.4

    +

    teal 0.9.4 +

    -

    Enhancements

    -
    • Released snowflake connection and connectors.
    • +

      Enhancements +

      +
        +
      • Released snowflake connection and connectors.
      • Changed ordering of datasets to be more intuitive (topologically first for CDISC datasets only and then according to input datasets order).
      • When closing a teal app (ending a user shiny session), all DataConnections will now try to close their connections.
      • Added ADHY keys to configuration file.
      • Extended the filter_spec function: the parameter choices is no longer mandatory (the function will take all possible choices by default) and the vars parameter additionally accepts the choices_selected and allows to change the variables for filtering using the UI elements in the encoding panel.
      • -
    + +
    -

    Bug fixes

    -
    • Cleaned up imports in the package.
    • -
    • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
    • +

      Bug fixes +

      +
        +
      • Cleaned up imports in the package.
      • +
      • Modified value_choices function to handle edge case when "NA" and NA values exist in the character column that choices are derived from.
        +
      • Fixed issue with cloning Callable class.
      • -
    + +
    -

    teal 0.9.3

    +

    teal 0.9.3 +

    -

    New Features

    -
    • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
    • +

      New Features +

      +
        +
      • Support for data-standard independent input and filtering. That includes refactor of the all data and dataset structures together with refactor of FilteredData class.
      • New JoinKeys class (with join_keys() constructors and join_key() constructor for its elements) to store joining key columns between datasets.
      • Refactored the most basic dataset() constructor, added cdisc_dataset() constructor and as_cdisc() conversion function.
      • Soft-deprecate removed class constructors and obsolete functions (e.g. keys()).
      • Added get_keys() and set_keys() functions to extract and manipulate datasets primary keys respectively.
      • Unexported filtered_data_new, filtered_data_set and filtered_data_set_filters.
      • -
    + +
    -

    Bug fixes

    -
    • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
    • +

      Bug fixes +

      +
        +
      • Duplicated lines of code passed to teal::cdisc_dataset and other teal::RelationalDataset constructors should now be shown when getting the code from teal::cdisc_data objects and other teal::RelationalData objects.
      • Added ability to press “Enter” key without having to set focus to the Submit button for delayed data loading.
      • Allow variable_choices to use datasets with missing labels.
      • Fixed bug that ignores input of NULL to selected argument of select_spec function.
      • -
    + +
    -

    Enhancements

    -
    • Added button to remove all active filters from the Filter Panel.
    • -
    +

    Enhancements +

    +
      +
    • Added button to remove all active filters from the Filter Panel.
    • +
    +
    -

    teal 0.9.2

    +

    teal 0.9.2 +

    -

    New Features

    -
    • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
    • +

      New Features +

      +
        +
      • Added python_dataset_connector to create delayed data objects from python scripts or directly from python code.
      • NOTE: python_dataset_connector is not yet ready to be deployed on RSConnect because it does not contain numpy and pandas, which are Python libraries used in python_dataset_connector.
      • Added support for filtering on Date and Datetime variables in the Filter Panel.
      • Added buttons for date and datetime filter widgets to reset the value to the original.
      • Added new function check_key_duplicates, which creates a short summary about rows with duplicated primary key (row numbers and the number of duplicates)
      • -
    + +
    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    • Removed include_factors option in get_class_colnames in RawDataset.
    • -
    +

    Miscellaneous +

    +
      +
    • Removed include_factors option in get_class_colnames in RawDataset.
    • +
    +
    -

    teal 0.9.1

    -
    • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
    • +

      teal 0.9.1 +

      +
        +
      • Adds method to resolve nested lists containing delayed data objects, which can be used for arm_ref_comp objects.
      • Nested tabs module now has better alignment with the filter panel on the page.
      • Allow width argument in optionalSelectInput.
      • Added lifecycle badges to all exported functions.
      • @@ -501,10 +675,13 @@

        teal 0.9.1 -

        teal 0.9.0

        -
        • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

        • +

          teal 0.9.0 +

          +
            +
          • cdisc_dataset and dataset now return R6 class objects (RelationalDataset).

          • A new teal_data function to include datasets and connectors into teal application.

          • cdisc_data function to include datasets and connectors into teal application where a check argument still could be used and other consistency tests are performed.

          • get_raw_data can be used to derive raw data from R6 objects e.g. (RelationalDataset).

          • @@ -525,91 +702,133 @@

            teal 0.9.0 -

            Refactor of FilteredData (for developers)

            -
            • +
            +
            +

            Refactor of FilteredData (for developers) +

            +
              +
            • FilteredData is now fully reactive. Now filtered data is lazy evaluated as per need. This further opens the door to bookmarking teal apps (bookmarking currently works for the right filtering panel, but we will make this feature more sophisticated in a future release, each module must be reviewed and adapted if it contains reactiveValues).
            • Datasets and materialized connectors are provided to FilteredData by set_datasets_data function located in init_datasets.R file.
            • Renamed get_dataset() method to get_data().
            • Renamed get_filter_call() method to get_filter_expr(); returns an expression rather than a list.
            • Removed argument isolate from get_data() method and similar methods. You must isolate it yourself as needed. If you want to temporarily deactivate shiny errors due to missing errors, you can set options(shiny.suppressMissingContextError = TRUE). In general, avoid isolate as this breaks reactivity.
            • We added a development module to add several filters at once, e.g. safety filters. This is to be evaluated before it is converted into a proper module and made available to end-users.
            • -
            +

          +

    -

    teal 0.8.5

    -
    • UI bug fix to hide filter elements for not used datasets.
    • -
    +

    teal 0.8.5 +

    +
      +
    • UI bug fix to hide filter elements for not used datasets.
    • +
    +
    -

    teal 0.8.4

    -
    • Progress bar for UI creation in delayed loading module.
    • +

      teal 0.8.4 +

      +
        +
      • Progress bar for UI creation in delayed loading module.
      • Change output of keys function to keys object.
      • Delayed version of choices_selected.
      • Fix an error in choices_selected when selected is not in choices.
      • Fix pickerInput not to display column name as label if it’s missing.
      • -
    + +
    -

    teal 0.8.3

    -
    • Enable teal app to initialize without data. The data are then loaded from within the teal app.
    • +

      teal 0.8.3 +

      +
        +
      • Enable teal app to initialize without data. The data are then loaded from within the teal app.
      • New classes (DatasetConnector, DataConnector) to connect to various data sources, including: * connector to rice API - rice_data and rice_dataset_connector * connector to RDS files - rds_data and rds_dataset_connector
      • Message appears at bottom right of shiny app when shiny is busy to update the views.
      • Remove labels argument of cdisc_data function. Labels should now already be present in the data passed to the cdisc_data function. This can be achieved using the var_relabel function.
      • -
    + +
    -

    teal 0.8.2

    -
    • Fixed several BUGS in optionalSelectInput and improved inputs look.
    • +

      teal 0.8.2 +

      +
        +
      • Fixed several BUGS in optionalSelectInput and improved inputs look.
      • Added get_data_labels function to FilteredData class.
      • Improved sep passing within data_extract_spec.
      • -
    + +
    -

    teal 0.8.1

    -
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • -
    +

    teal 0.8.1 +

    +
      +
    • Refactor choices_labeled and fix bug of not showing column name in data_extract_spec.
    • +
    +
    -

    teal 0.8.0

    -
    • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
    • +

      teal 0.8.0 +

      +
        +
      • Added cdisc_dataset (and more general dataset) functions to properly handle dataset keys while merging.
      • Possibility to load custom .css and .js files.
      • Renamed columns_spec to select_spec.
      • Show number of observations on filter panel.
      • Add labeling functions variable_choices and value_choices.
      • -
    + +
    -

    teal 0.7.0

    -
    • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
    • +

      teal 0.7.0 +

      +
        +
      • Added functions cdisc_data and get_code to deal with preprocessing and moving a step towards data standard independent teal.
      • Moved teal.utils functions to teal: log_app_usage, stop_shiny.
      • Added *_spec functions.
      • Improvements on usage of PickerInput and SelectInput.
      • -
    + +
    -

    teal 0.6.0

    -
    • Removed deprecated functions tab*.
    • +

      teal 0.6.0 +

      +
        +
      • Removed deprecated functions tab*.
      • Removed data generation functions including generate_sample_data.
      • Incorporate shinyjs package.
      • Added “Copy R code to clipboard” button.
      • -
    + +
    -

    teal 0.0.5

    -
    • Added limit to data_table with scrolling, preventing overlap of UI elements.
    • +

      teal 0.0.5 +

      +
        +
      • Added limit to data_table with scrolling, preventing overlap of UI elements.
      • Boolean filtering.
      • -
    + +
    -

    teal 0.0.4

    -
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • -
    +

    teal 0.0.4 +

    +
      +
    • Bug fix where teal crashes when a filter variable gets added that has many decimal places.
    • +
    +
    -

    teal 0.0.3

    -
    • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
    • -
    -
    New features
    -
    • +

      teal 0.0.3 +

      +
        +
      • Note version 0.0.3 is not backwards compatible. Reading the changes and studying the example app should, however, clarify most the changes.
      • +
      +
      +
      New features +
      +
        +
      • tm_scatterplot module.
      • tm_table module.
      • -
      +
    +
    -
    Changes
    -
    • All tabs arguments were renamed to modules.
    • +
      Changes +
      +
        +
      • All tabs arguments were renamed to modules.
      • tab_item function is now called module.
      • @@ -622,30 +841,39 @@
        Changes -

        teal 0.0.2

        -
        • New ‘01_getting_started’ vignette.
        • +

          teal 0.0.2 +

          +
            +
          • New ‘01_getting_started’ vignette.
          • Datanames in FilteredData are now case sensitive.
          • -
    + +
    -

    teal 0.0.1

    -
    • March 28, 2016 - Initial Release.
    • -
    +

    teal 0.0.1 +

    +
      +
    • March 28, 2016 - Initial Release.
    • +
    + + + + + - - + + diff --git a/v0.15.2/pull_request_template.html b/v0.15.2/pull_request_template.html index 0eca9930a5..202314d428 100644 --- a/v0.15.2/pull_request_template.html +++ b/v0.15.2/pull_request_template.html @@ -1,8 +1,22 @@ - -Pull Request • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -114,17 +134,19 @@

    Fixes #nnn

    - + + + + - - + + diff --git a/v0.15.2/reference/TealReportCard.html b/v0.15.2/reference/TealReportCard.html index e777febcf4..7016c1b1b4 100644 --- a/v0.15.2/reference/TealReportCard.html +++ b/v0.15.2/reference/TealReportCard.html @@ -1,16 +1,32 @@ - - + + + + + +TealReportCard — TealReportCard • teal +TealReportCard — TealReportCard • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -127,20 +149,27 @@
    -

    Super class

    +

    Super class +

    teal.reporter::ReportCard -> TealReportCard

    +

    Inherited methods


    -

    Method append_src()

    -

    Appends the source code to the content meta data of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_src(src, ...)

    +

    +
    +
    +

    Method append_src() +

    +

    Appends the source code to the content meta data of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_src(src, ...)
    +

    +
    -

    Arguments

    -

    src
    +

    Arguments +

    +

    +
    +
    +
    src

    (character(1)) code as text.

    @@ -172,85 +214,148 @@

    Arguments -

    Returns

    +

    Returns +

    Object of class TealReportCard, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_src(
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_src(
       "plot(iris)"
     )
    -card$get_content()[[1]]$get_content()

    +card$get_content()[[1]]$get_content()
    +

    +
    -


    -

    Method append_fs()

    +
    +

    +
    +
    +

    Method append_fs() +

    Appends the filter state list to the content and metadata of this TealReportCard. If the filter state list has an attribute named formatted, it appends it to the card otherwise it uses the default yaml::as.yaml to format the list. -If the filter state list is empty, nothing is appended to the content.

    -

    Usage

    -

    TealReportCard$append_fs(fs)

    +If the filter state list is empty, nothing is appended to the content.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_fs(fs)
    +

    +
    -

    Arguments

    -

    fs
    +

    Arguments +

    +

    +
    +
    +
    fs

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method append_encodings()

    -

    Appends the encodings list to the content and metadata of this TealReportCard.

    -

    Usage

    -

    TealReportCard$append_encodings(encodings)

    +
    +

    +
    +
    +

    Method append_encodings() +

    +

    Appends the encodings list to the content and metadata of this TealReportCard.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$append_encodings(encodings)
    +

    +
    -

    Arguments

    -

    encodings
    +

    Arguments +

    +

    +
    +
    +
    encodings

    (list) list of encodings selections of the teal app.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -

    Examples

    -

    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
    +

    Examples +

    +

    +
    +
    card <- TealReportCard$new()$append_encodings(list(variable1 = "X"))
     card$get_content()[[1]]$get_content()
    -

    +
    +

    +
    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealReportCard$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealReportCard$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -258,7 +363,8 @@

    Arguments -

    Examples

    +

    Examples +

    
     ## ------------------------------------------------
     ## Method `TealReportCard$append_src`
    @@ -281,17 +387,19 @@ 

    Examples

    + +
    + +
    - - + + diff --git a/v0.15.2/reference/TealSlicesBlock.html b/v0.15.2/reference/TealSlicesBlock.html index c22c73b587..21920ac9ba 100644 --- a/v0.15.2/reference/TealSlicesBlock.html +++ b/v0.15.2/reference/TealSlicesBlock.html @@ -1,10 +1,26 @@ - -RcodeBlock — TealSlicesBlock • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,34 +140,54 @@
    -

    Super classes

    +

    Super classes +

    teal.reporter::ContentBlock -> teal.reporter::TextBlock -> TealSlicesBlock

    +

    Inherited methods


    -

    Method new()

    -

    Returns a TealSlicesBlock object.

    -

    Usage

    -

    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")

    +

    +
    +
    +

    Method new() +

    +

    Returns a TealSlicesBlock object.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$new(content = teal_slices(), style = "verbatim")
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    @@ -153,89 +195,154 @@

    Arguments -

    Details

    +

    Details +

    Returns a TealSlicesBlock object with no content and no parameters.

    -

    Returns

    +

    Returns +

    Object of class TealSlicesBlock, invisibly.

    -


    -

    Method set_content()

    +
    +

    +
    +
    +

    Method set_content() +

    Sets content of this TealSlicesBlock. Sets content as YAML text which represents a list generated from teal_slices. The list displays limited number of fields from teal_slice objects, but this list is sufficient to conclude which filters were applied. -When selected field in teal_slice object is a range, then it is displayed as a "min"

    -

    Usage

    -

    TealSlicesBlock$set_content(content)

    +When selected field in teal_slice object is a range, then it is displayed as a "min"

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$set_content(content)
    +

    +
    -

    Arguments

    -

    content
    +

    Arguments +

    +

    +
    +
    +
    content

    (teal_slices) object returned from teal_slices() function.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method from_list()

    -

    Create the RcodeBlock from a list.

    -

    Usage

    -

    TealSlicesBlock$from_list(x)

    +
    +

    +
    +
    +

    Method from_list() +

    +

    Create the RcodeBlock from a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$from_list(x)
    +

    +
    -

    Arguments

    -

    x
    +

    Arguments +

    +

    +
    +
    +
    x

    (named list) with two fields c("text", "params"). Use the get_available_params method to get all possible parameters.

    -

    +
    +

    +
    -

    Returns

    +

    Returns +

    self, invisibly.

    -


    -

    Method to_list()

    -

    Convert the RcodeBlock to a list.

    -

    Usage

    -

    TealSlicesBlock$to_list()

    +
    +

    +
    +
    +

    Method to_list() +

    +

    Convert the RcodeBlock to a list.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$to_list()
    +

    +
    -

    Returns

    +

    Returns +

    named list with a text and params.

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    -

    Usage

    -

    TealSlicesBlock$clone(deep = FALSE)

    +
    +

    +
    +
    +

    Method clone() +

    +

    The objects of this class are cloneable with this method.

    +
    +

    Usage +

    +

    +
    +
    TealSlicesBlock$clone(deep = FALSE)
    +

    +
    -

    Arguments

    -

    deep
    +

    Arguments +

    +

    +
    +
    +
    deep

    Whether to make a deep clone.

    -

    +
    +

    +
    @@ -243,17 +350,19 @@

    Arguments

    + +
    + +
    - - + + diff --git a/v0.15.2/reference/append_module.html b/v0.15.2/reference/append_module.html index 33504fe229..2fbe33ad08 100644 --- a/v0.15.2/reference/append_module.html +++ b/v0.15.2/reference/append_module.html @@ -1,8 +1,24 @@ - -Append a teal_module to children of a teal_modules object — append_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    append_module(modules, module)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    module

    (teal_module) object to be appended onto the children of modules

    -
    + +
    -

    Value

    +

    Value +

    A teal_modules object with module appended.

    + +
    + + - - + + diff --git a/v0.15.2/reference/build_app_title.html b/v0.15.2/reference/build_app_title.html index 73d2404bb4..80c939a2da 100644 --- a/v0.15.2/reference/build_app_title.html +++ b/v0.15.2/reference/build_app_title.html @@ -1,8 +1,24 @@ - -Build app title with favicon — build_app_title • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    build_app_title(
       title = "teal app",
       favicon =
    @@ -123,8 +146,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character) The browser title for the teal app.

    @@ -132,26 +157,30 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag containing the element that adds the title and logo to the shiny app.

    + + + + - - + + diff --git a/v0.15.2/reference/calculate_hashes.html b/v0.15.2/reference/calculate_hashes.html index caf806a2bf..cd34af01bd 100644 --- a/v0.15.2/reference/calculate_hashes.html +++ b/v0.15.2/reference/calculate_hashes.html @@ -1,8 +1,24 @@ - -Get the hash of a dataset — calculate_hashes • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    calculate_hashes(datanames, datasets)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets

    datasets

    (FilteredData) object holding the data

    -
    + +
    -

    Value

    +

    Value +

    A list of hashes per dataset.

    + + + + - - + + diff --git a/v0.15.2/reference/check_filter_datanames.html b/v0.15.2/reference/check_filter_datanames.html index 91742dd993..c207b62171 100644 --- a/v0.15.2/reference/check_filter_datanames.html +++ b/v0.15.2/reference/check_filter_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in filters — check_filter_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_filter_datanames(filters, datanames)
    -

    Arguments

    -
    filters
    +

    Arguments +

    +
    +
    filters

    (teal_slices) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/v0.15.2/reference/check_modules_datanames.html b/v0.15.2/reference/check_modules_datanames.html index ebfed97190..7dad186f57 100644 --- a/v0.15.2/reference/check_modules_datanames.html +++ b/v0.15.2/reference/check_modules_datanames.html @@ -1,10 +1,26 @@ - -Check datanames in modules — check_modules_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,39 +139,46 @@
    -

    Usage

    +

    Usage +

    check_modules_datanames(modules, datanames)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules) object

    datanames

    (character) names of datasets available in the data object

    -
    + +
    -

    Value

    +

    Value +

    A character(1) containing error message or TRUE if validation passes.

    + + + + - - + + diff --git a/v0.15.2/reference/create_app_id.html b/v0.15.2/reference/create_app_id.html index a47d15c56f..eadeaec5ce 100644 --- a/v0.15.2/reference/create_app_id.html +++ b/v0.15.2/reference/create_app_id.html @@ -1,8 +1,24 @@ - -Application ID — create_app_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,53 @@
    -

    Usage

    +

    Usage +

    create_app_id(data, modules)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) as accepted by init

    modules

    (teal_modules) object as accepted by init

    -
    + +
    -

    Value

    +

    Value +

    A single character string.

    -

    Details

    +

    Details +

    Calculate app ID that will be used to stamp filter state snapshots. App ID is a hash of the app's data and modules. See "transferring snapshots" section in ?snapshot.

    + + + + - - + + diff --git a/v0.15.2/reference/deep_copy_filter.html b/v0.15.2/reference/deep_copy_filter.html index fd1cb830a1..6cb01af3d0 100644 --- a/v0.15.2/reference/deep_copy_filter.html +++ b/v0.15.2/reference/deep_copy_filter.html @@ -1,14 +1,30 @@ - - + + + + + +Deep copy teal_slices — deep_copy_filter • teal +Deep copy teal_slices — deep_copy_filter • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + +
    @@ -123,18 +146,23 @@
    -

    Usage

    +

    Usage +

    deep_copy_filter(filter)
    -

    Arguments

    -
    filter
    +

    Arguments +

    +
    +
    filter

    (teal_slices)

    -
    + +
    -

    Value

    +

    Value +

    teal_slices

    @@ -143,17 +171,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.2/reference/dot-datasets_to_data.html b/v0.15.2/reference/dot-datasets_to_data.html index edc63b5e61..7761232260 100644 --- a/v0.15.2/reference/dot-datasets_to_data.html +++ b/v0.15.2/reference/dot-datasets_to_data.html @@ -1,12 +1,28 @@ - - + + + + + +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal +Convert FilteredData to reactive list of datasets of the teal_data type. — .datasets_to_data • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    .datasets_to_data(module, datasets)
    -

    Arguments

    -
    module
    +

    Arguments +

    +
    +
    module

    (teal_module) module where needed filters are taken from

    datasets

    (FilteredData) object where needed data are taken from

    -
    + +
    -

    Value

    +

    Value +

    A teal_data object.

    + + + + - - + + diff --git a/v0.15.2/reference/example_module.html b/v0.15.2/reference/example_module.html index 32d6294243..16164d8d22 100644 --- a/v0.15.2/reference/example_module.html +++ b/v0.15.2/reference/example_module.html @@ -1,8 +1,24 @@ - -An example teal module — example_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    example_module(label = "example teal module", datanames = "all")
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -132,16 +157,19 @@

    Arguments will show filters of all datasets. datanames also determines a subset of datasets which are appended to the data argument in server function.

    -

    + +
    -

    Value

    +

    Value +

    A teal module which can be included in the modules argument to init().

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(IRIS = iris, MTCARS = mtcars),
       modules = example_module()
    @@ -152,17 +180,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/filter_manager_module_srv.html b/v0.15.2/reference/filter_manager_module_srv.html index a6505b172a..6481d214b8 100644 --- a/v0.15.2/reference/filter_manager_module_srv.html +++ b/v0.15.2/reference/filter_manager_module_srv.html @@ -1,8 +1,24 @@ - -Module specific filter manager — filter_manager_module_srv • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    filter_manager_module_srv(id, module_fd, slices_global)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -131,21 +156,28 @@

    Arguments -

    Value

    +

    Value +

    A reactive expression containing the slices active in this module.

    -

    Details

    +

    Details +

    This module tracks the state of a single FilteredData object and global teal_slices and updates both objects as necessary. Filter states added in different modules Filter states added any individual module are added to global teal_slices @@ -154,17 +186,19 @@

    Details

    + + + + - - + + diff --git a/v0.15.2/reference/get_client_timezone.html b/v0.15.2/reference/get_client_timezone.html index 788cb5f944..d4c0542565 100644 --- a/v0.15.2/reference/get_client_timezone.html +++ b/v0.15.2/reference/get_client_timezone.html @@ -1,10 +1,26 @@ - -Get client timezone — get_client_timezone • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,19 +139,24 @@
    -

    Usage

    +

    Usage +

    get_client_timezone(ns)
    -

    Arguments

    -
    ns
    +

    Arguments +

    +
    +
    ns

    (function) namespace function passed from the session object in the shiny server. For shiny modules this will allow for proper name spacing of the registered input.

    -
    + +
    -

    Value

    +

    Value +

    (shiny) input variable accessible with input$tz which is a (character) @@ -137,17 +164,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.2/reference/get_code_tdata.html b/v0.15.2/reference/get_code_tdata.html index d9f154864b..a085b98cac 100644 --- a/v0.15.2/reference/get_code_tdata.html +++ b/v0.15.2/reference/get_code_tdata.html @@ -1,8 +1,24 @@ - -Wrapper for get_code.tdata — get_code_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,35 +137,42 @@
    -

    Usage

    +

    Usage +

    get_code_tdata(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    (character) code used in the tdata object.

    + + + + - - + + diff --git a/v0.15.2/reference/get_datasets_code.html b/v0.15.2/reference/get_datasets_code.html index 14adab55eb..08b81c4950 100644 --- a/v0.15.2/reference/get_datasets_code.html +++ b/v0.15.2/reference/get_datasets_code.html @@ -1,8 +1,24 @@ - -Get datasets code — get_datasets_code • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    get_datasets_code(datanames, datasets, hashes)
    -

    Arguments

    -
    datanames
    +

    Arguments +

    +
    +
    datanames

    (character) names of datasets to extract code from

    @@ -131,28 +156,35 @@

    Arguments -

    Value

    +

    Value +

    -

    Character string concatenated from the following elements:

    • data pre-processing code (from data argument in init)

    • +

      Character string concatenated from the following elements:

      +
        +
      • data pre-processing code (from data argument in init)

      • hash check of loaded objects

      • filter code (if any)

      • -
    + + + + + + - - + + diff --git a/v0.15.2/reference/get_metadata.html b/v0.15.2/reference/get_metadata.html index 48dc07e590..2284d4e6d8 100644 --- a/v0.15.2/reference/get_metadata.html +++ b/v0.15.2/reference/get_metadata.html @@ -1,8 +1,24 @@ - -Function to get metadata from a tdata object — get_metadata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    get_metadata(data, dataname)
     
     # S3 method for tdata
    @@ -125,34 +148,40 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata - object) to extract the data from

    dataname

    (character(1)) the dataset name whose metadata is requested

    -
    + +
    -

    Value

    +

    Value +

    Either list of metadata or NULL if no metadata.

    + + + + - - + + diff --git a/v0.15.2/reference/get_rcode_libraries.html b/v0.15.2/reference/get_rcode_libraries.html index 1c92cce2f5..3e9a985d39 100644 --- a/v0.15.2/reference/get_rcode_libraries.html +++ b/v0.15.2/reference/get_rcode_libraries.html @@ -1,8 +1,24 @@ - -Generates library calls from current session info — get_rcode_libraries • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,29 +136,33 @@
    -

    Usage

    +

    Usage +

    get_rcode_libraries()
    -

    Value

    +

    Value +

    Character vector of library(<package>) calls.

    + + + + - - + + diff --git a/v0.15.2/reference/include_css_files.html b/v0.15.2/reference/include_css_files.html index ddb9781288..aac05699d6 100644 --- a/v0.15.2/reference/include_css_files.html +++ b/v0.15.2/reference/include_css_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal +Include CSS files from /inst/css/ package directory to application header — include_css_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,35 +142,42 @@
    -

    Usage

    +

    Usage +

    include_css_files(pattern = "*")
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes CSS files.

    + + + + - - + + diff --git a/v0.15.2/reference/include_js_files.html b/v0.15.2/reference/include_js_files.html index 05c010eaa8..fa89841321 100644 --- a/v0.15.2/reference/include_js_files.html +++ b/v0.15.2/reference/include_js_files.html @@ -1,12 +1,28 @@ - - + + + + + +Include JS files from /inst/js/ package directory to application header — include_js_files • teal +Include JS files from /inst/js/ package directory to application header — include_js_files • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,39 +142,46 @@
    -

    Usage

    +

    Usage +

    include_js_files(pattern = NULL, except = NULL)
    -

    Arguments

    -
    pattern
    +

    Arguments +

    +
    +
    pattern

    (character) pattern of files to be included, passed to system.file

    except

    (character) vector of basename filenames to be excluded

    -
    + +
    -

    Value

    +

    Value +

    HTML code that includes JS files.

    + + + + - - + + diff --git a/v0.15.2/reference/include_teal_css_js.html b/v0.15.2/reference/include_teal_css_js.html index 837f0f9637..f1fede65a9 100644 --- a/v0.15.2/reference/include_teal_css_js.html +++ b/v0.15.2/reference/include_teal_css_js.html @@ -1,16 +1,32 @@ - - + + + + + +Code to include teal CSS and JavaScript files — include_teal_css_js • teal +Code to include teal CSS and JavaScript files — include_teal_css_js • teal + + + + + + + + + + Skip to contents @@ -26,7 +42,8 @@ + + @@ -126,33 +148,38 @@
    -

    Usage

    +

    Usage +

    include_teal_css_js()
    -

    Value

    +

    Value +

    A shiny.tag.list.

    -

    Details

    +

    Details +

    Simply add include_teal_css_js() as one of the UI elements.

    + + + + - - + + diff --git a/v0.15.2/reference/index.html b/v0.15.2/reference/index.html index f3e4856292..94603d8d14 100644 --- a/v0.15.2/reference/index.html +++ b/v0.15.2/reference/index.html @@ -1,8 +1,22 @@ - -Function reference • teal + + + + + + + Skip to contents @@ -18,7 +32,8 @@ + + @@ -108,230 +128,312 @@
    -

    Core teal functions

    +

    Core teal functions +

    -

    Main functions needed to build a teal app

    +

    +

    Main functions needed to build a teal app

    -
    +
    +
    -
    +
    +
    init()
    Create the server and UI function for the shiny app
    -
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    module() modules() format(<teal_module>) print(<teal_module>) format(<teal_modules>) print(<teal_modules>)
    Create teal_module and teal_modules objects
    -
    +
    +
    +
    ui_teal_with_splash() srv_teal_with_splash()
    Add splash screen to teal application
    -
    +
    +
    +
    teal_slices() as.teal_slices() c(<teal_slices>)
    Filter settings for teal applications
    -
    -

    Helper Functions

    + +
    +
    +

    Helper Functions +

    -

    Helper functions for teal

    +

    +

    Helper functions for teal

    -
    +
    +
    -
    +
    +
    build_app_title()
    Build app title with favicon
    -
    -

    Example module

    + +
    +
    +

    Example module +

    -

    A simple teal module

    +

    +

    A simple teal module

    -
    +
    +
    -
    +
    +
    example_module()
    An example teal module
    -
    -

    Creating reports

    + +
    +
    +

    Creating reports +

    -
    +
    +
    -
    +
    +
    reporter_previewer_module()
    Create a teal module for previewing a report
    -
    +
    +
    +
    TealReportCard
    TealReportCard
    -
    +
    +
    +
    report_card_template()
    Template function for TealReportCard creation and customization
    -
    -

    Landing popup

    + +
    +
    +

    Landing popup +

    -
    +
    +
    -
    +
    +
    landing_popup_module()
    Landing popup module
    -
    -

    Functions for module developers

    + +
    +
    +

    Functions for module developers +

    -
    +
    +
    -
    +
    +
    as_tdata()
    Downgrade teal_data objects in modules for compatibility
    -
    +
    +
    +
    new_tdata()
    Create a tdata object
    -
    +
    +
    +
    get_code_tdata()
    -
    Wrapper for get_code.tdata
    -
    +
    Wrapper for get_code.tdata +
    +
    +
    +
    get_metadata()
    Function to get metadata from a tdata object
    -
    +
    +
    +
    tdata2env()
    -
    Function to convert a tdata object to an environment
    -
    +
    Function to convert a tdata object to an environment +
    +
    +
    +
    teal_data_module() eval_code(<teal_data_module>,<character>) within(<teal_data_module>)
    Data module for teal applications
    -
    +
    +
    +
    show_rcode_modal()
    Show R code modal
    -
    +
    +
    +
    join_keys(<tdata>)
    -
    Extract join_keys from tdata
    -
    -

    Validation functions

    +
    Extract join_keys from tdata +
    + +
    +
    +

    Validation functions +

    -
    +
    +
    -
    +
    +
    validate_has_data()
    Validate that dataset has a minimum number of observations
    -
    +
    +
    +
    validate_has_elements()
    Validates that vector has length greater than 0
    -
    +
    +
    +
    validate_has_variable()
    Validates that dataset contains specific variable
    -
    +
    +
    +
    validate_in()
    Validates that vector includes all expected values
    -
    +
    +
    +
    validate_inputs()
    Send input validation messages to output
    -
    +
    +
    +
    validate_n_levels()
    Validate that variables has expected number of levels
    -
    +
    +
    +
    validate_no_intersection()
    Validates no intersection between two vectors
    -
    +
    +
    +
    validate_one_row_per_id()
    Validate that dataset has unique rows for key variables
    -
    + + + + + + - - + + diff --git a/v0.15.2/reference/init.html b/v0.15.2/reference/init.html index 263abcb8f2..7434539dbd 100644 --- a/v0.15.2/reference/init.html +++ b/v0.15.2/reference/init.html @@ -1,12 +1,28 @@ - - + + + + + +Create the server and UI function for the shiny app — init • teal +Create the server and UI function for the shiny app — init • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    init(
       data,
       modules,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data or teal_data_module) For constructing the data object, refer to teal_data() and teal_data_module().

    @@ -174,21 +199,25 @@

    Arguments -

    Value

    +

    Value +

    Named list with server and UI functions.

    -

    Details

    +

    Details +

    When initializing the teal app, if datanames are not set for the teal_data object, defaults from the teal_data environment will be used.

    -

    Examples

    +

    Examples +

    app <- init(
       data = teal_data(
         new_iris = transform(iris, id = seq_len(nrow(iris))),
    @@ -243,17 +272,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/is_arg_used.html b/v0.15.2/reference/is_arg_used.html index 6e6376230d..95416c4fbc 100644 --- a/v0.15.2/reference/is_arg_used.html +++ b/v0.15.2/reference/is_arg_used.html @@ -1,8 +1,24 @@ - -Does the object make use of the arg — is_arg_used • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    is_arg_used(modules, arg)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_module or teal_modules) object

    arg

    (character(1)) names of the arguments to be checked against formals of teal modules.

    -
    + +
    -

    Value

    +

    Value +

    logical whether the object makes use of arg.

    + + + + - - + + diff --git a/v0.15.2/reference/join_keys.tdata.html b/v0.15.2/reference/join_keys.tdata.html index 0050234c5a..abb57484a9 100644 --- a/v0.15.2/reference/join_keys.tdata.html +++ b/v0.15.2/reference/join_keys.tdata.html @@ -1,8 +1,24 @@ - -Extract join_keys from tdata — join_keys.tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,34 +137,40 @@
    -

    Usage

    +

    Usage +

    # S3 method for tdata
     join_keys(data, ...)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    ...

    Additional arguments (not used)

    -
    + +
    + + + + - - + + diff --git a/v0.15.2/reference/landing_popup_module.html b/v0.15.2/reference/landing_popup_module.html index af908058a7..b5eee1a56e 100644 --- a/v0.15.2/reference/landing_popup_module.html +++ b/v0.15.2/reference/landing_popup_module.html @@ -1,12 +1,28 @@ - - + + + + + +Landing popup module — landing_popup_module • teal +Landing popup module — landing_popup_module • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    landing_popup_module(
       label = "Landing Popup",
       title = NULL,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label of the module.

    @@ -147,16 +172,19 @@

    Arguments -

    Value

    +

    Value +

    A teal_module (extended with teal_landing_module class) to be used in teal applications.

    -

    Examples

    +

    Examples +

    app1 <- init(
       data = teal_data(iris = iris),
       modules = modules(
    @@ -203,17 +231,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/matrix_to_mapping.html b/v0.15.2/reference/matrix_to_mapping.html index d613f76b3e..fb9946f029 100644 --- a/v0.15.2/reference/matrix_to_mapping.html +++ b/v0.15.2/reference/matrix_to_mapping.html @@ -1,14 +1,30 @@ - - + + + + + +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal +Convert mapping matrix to filter mapping specification. — matrix_to_mapping • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,36 +145,43 @@
    -

    Usage

    +

    Usage +

    matrix_to_mapping(mapping_matrix)
    -

    Arguments

    -
    mapping_matrix
    +

    Arguments +

    +
    +
    mapping_matrix

    (data.frame) of logical vectors where columns represent modules and row represent teal_slices

    -
    + +
    -

    Value

    +

    Value +

    Named list like that in the mapping attribute of a teal_slices object.

    + + + + - - + + diff --git a/v0.15.2/reference/module_filter_manager.html b/v0.15.2/reference/module_filter_manager.html index 5c64b9dbe2..d8ecf12a0c 100644 --- a/v0.15.2/reference/module_filter_manager.html +++ b/v0.15.2/reference/module_filter_manager.html @@ -1,8 +1,24 @@ - -Manage multiple FilteredData objects — module_filter_manager • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_ui(id)
     
     filter_manager_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,15 +164,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    A list of reactives, each holding a teal_slices, as returned by filter_manager_module_srv.

    -

    Details

    +

    Details +

    This module observes changes in the filters of each FilteredData object and keeps track of all filters used. A mapping of filters to modules is kept in the mapping_matrix object (which is actually a data.frame) @@ -155,17 +183,19 @@

    Details

    + + + + - - + + diff --git a/v0.15.2/reference/module_filter_manager_modal.html b/v0.15.2/reference/module_filter_manager_modal.html index 2516f2a86b..1689793ca4 100644 --- a/v0.15.2/reference/module_filter_manager_modal.html +++ b/v0.15.2/reference/module_filter_manager_modal.html @@ -1,8 +1,24 @@ - -Filter manager modal — module_filter_manager_modal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    filter_manager_modal_ui(id)
     
     filter_manager_modal_srv(id, filtered_data_list, filter)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id.

    @@ -139,20 +164,23 @@

    Argumentsteal_slices().

    -

    + + + + + + - - + + diff --git a/v0.15.2/reference/module_labels.html b/v0.15.2/reference/module_labels.html index 3481947b5d..4cd2cce0d0 100644 --- a/v0.15.2/reference/module_labels.html +++ b/v0.15.2/reference/module_labels.html @@ -1,8 +1,24 @@ - -Retrieve labels from teal_modules — module_labels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,18 +137,23 @@
    -

    Usage

    +

    Usage +

    module_labels(modules)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    -
    + +
    -

    Value

    +

    Value +

    A list containing the labels of the modules. If the modules are nested, @@ -133,17 +161,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.2/reference/module_management.html b/v0.15.2/reference/module_management.html index 5bb9f35bab..d0fe766999 100644 --- a/v0.15.2/reference/module_management.html +++ b/v0.15.2/reference/module_management.html @@ -1,8 +1,24 @@ - -Extract/Remove module(s) of specific class — extract_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,45 +136,54 @@
    -

    Usage

    +

    Usage +

    extract_module(modules, class)
     
     drop_module(modules, class)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (teal_modules)

    class

    The class name of teal_module to be extracted or dropped.

    -
    + +
    -

    Value

    +

    Value +

    -
    • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

    • +
        +
      • For extract_module, a teal_module of class class or teal_modules containing modules of class class.

      • For drop_module, the opposite, which is all teal_modules of class other than class.

      • -

      teal_modules

      +
    +

    teal_modules

    + + + + - - + + diff --git a/v0.15.2/reference/module_nested_tabs.html b/v0.15.2/reference/module_nested_tabs.html index aa466c5fe2..7608ddb632 100644 --- a/v0.15.2/reference/module_nested_tabs.html +++ b/v0.15.2/reference/module_nested_tabs.html @@ -1,8 +1,24 @@ - -Create a UI of nested tabs of teal_modules — module_nested_tabs • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)
     
     # S3 method for default
    @@ -163,8 +187,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -197,18 +223,25 @@

    Arguments -

    Value

    +

    Value +

    -

    Depending on the class of modules, ui_nested_tabs returns:

    • teal_module: instantiated UI of the module.

    • +

      Depending on the class of modules, ui_nested_tabs returns:

      +
        +
      • teal_module: instantiated UI of the module.

      • teal_modules: tabsetPanel with each tab corresponding to recursively calling this function on it.

      • -

      srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

      +
    +

    srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

    -

    ui_nested_tabs

    +

    +ui_nested_tabs +

    Each teal_modules is translated to a tabsetPanel and each @@ -218,25 +251,32 @@

    ui_nested_tabs

    -

    srv_nested_tabs

    +

    +srv_nested_tabs +

    -

    This module recursively calls all elements of modules and returns currently active one.

    • teal_module returns self as a active module.

    • +

      This module recursively calls all elements of modules and returns currently active one.

      +
        +
      • teal_module returns self as a active module.

      • teal_modules also returns module active within self which is determined by the input$active_tab.

      • -
    + +
    + + + + - - + + diff --git a/v0.15.2/reference/module_tabs_with_filters.html b/v0.15.2/reference/module_tabs_with_filters.html index 5b078ae2fa..77e288b508 100644 --- a/v0.15.2/reference/module_tabs_with_filters.html +++ b/v0.15.2/reference/module_tabs_with_filters.html @@ -1,12 +1,28 @@ - - + + + + + +Add right filter panel into each of the top-level teal_modules UIs — module_tabs_with_filters • teal +Add right filter panel into each of the top-level teal_modules UIs — module_tabs_with_filters • teal + + + + + + + + + + Skip to contents @@ -22,7 +38,8 @@ + + @@ -120,7 +142,8 @@
    -

    Usage

    +

    Usage +

    ui_tabs_with_filters(id, modules, datasets, filter = teal_slices())
     
     srv_tabs_with_filters(
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -161,15 +186,18 @@

    Arguments -

    Value

    +

    Value +

    A shiny.tag.list containing the main menu, placeholders for filters and placeholders for the teal modules.

    -

    Details

    +

    Details +

    The right filter panel's filter choices affect the datasets object. Therefore, all modules using the same datasets share the same filters.

    This works with nested modules of depth greater than 2, though the filter @@ -177,17 +205,19 @@

    Details

    + +
    + + - - + + diff --git a/v0.15.2/reference/module_teal.html b/v0.15.2/reference/module_teal.html index 78a55153af..6d0d716340 100644 --- a/v0.15.2/reference/module_teal.html +++ b/v0.15.2/reference/module_teal.html @@ -1,8 +1,24 @@ - -teal main app module — module_teal • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,7 +137,8 @@
    -

    Usage

    +

    Usage +

    ui_teal(
       id,
       splash_ui = tags$h2("Starting the Teal App"),
    @@ -127,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -171,15 +197,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression which returns the currently active module.

    -

    Details

    +

    Details +

    It displays the splash UI which is used to fetch the data, possibly prompting for a password input to fetch the data. Once the data is ready, the splash screen is replaced by the actual teal UI that is tabsetted and @@ -200,17 +229,19 @@

    Details

    + +
    + + - - + + diff --git a/v0.15.2/reference/module_teal_with_splash.html b/v0.15.2/reference/module_teal_with_splash.html index cbb398bf0f..ae213f7eae 100644 --- a/v0.15.2/reference/module_teal_with_splash.html +++ b/v0.15.2/reference/module_teal_with_splash.html @@ -1,10 +1,26 @@ - -Add splash screen to teal application — module_teal_with_splash • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    ui_teal_with_splash(
       id,
       data,
    @@ -130,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) module id

    @@ -168,15 +193,18 @@

    Argumentsteal_slices().

    -

    + +
    -

    Value

    +

    Value +

    Returns a reactive expression containing a teal_data object when data is loaded or NULL when it is not.

    -

    Details

    +

    Details +

    This module pauses app initialization pending delayed data loading. This is necessary because the filter panel and modules depend on the data to initialize.

    teal_with_splash follows the shiny module convention. @@ -186,12 +214,14 @@

    Detailsinit to create a standalone application.

    -

    See also

    +

    See also +

    -

    Examples

    +

    Examples +

    teal_modules <- modules(example_module())
     # Shiny app with modular integration of teal
     ui <- fluidPage(
    @@ -213,17 +243,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/modules_datasets.html b/v0.15.2/reference/modules_datasets.html index 6ff9cbac30..88cd9a5f09 100644 --- a/v0.15.2/reference/modules_datasets.html +++ b/v0.15.2/reference/modules_datasets.html @@ -1,8 +1,24 @@ - -Create filterable data for modules — modules_datasets • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    modules_datasets(
       data,
       modules,
    @@ -124,8 +147,10 @@ 

    Usage

    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data)

    @@ -140,9 +165,11 @@

    Arguments -

    Value

    +

    Value +

    Returns list of same shape as modules, containing FilteredData at every leaf. @@ -150,17 +177,19 @@

    Value

    + +
    + + - - + + diff --git a/v0.15.2/reference/modules_depth.html b/v0.15.2/reference/modules_depth.html index cb78fdfe3c..f7c93abe3c 100644 --- a/v0.15.2/reference/modules_depth.html +++ b/v0.15.2/reference/modules_depth.html @@ -1,10 +1,26 @@ - -Get module depth — modules_depth • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    modules_depth(modules, depth = 0L)
    -

    Arguments

    -
    modules
    +

    Arguments +

    +
    +
    modules

    (list or teal_modules or teal_module) nested list of teal_modules or teal_module objects or a single teal_modules or teal_module object. These are the specific output modules which @@ -134,26 +159,30 @@

    Arguments -

    Value

    +

    Value +

    Depth level for given module.

    + + + + - - + + diff --git a/v0.15.2/reference/reexports.html b/v0.15.2/reference/reexports.html index 7563220a24..155a10b89d 100644 --- a/v0.15.2/reference/reexports.html +++ b/v0.15.2/reference/reexports.html @@ -1,5 +1,10 @@ - - + + + + + +Objects exported from other packages — reexports • teal +Objects exported from other packages — reexports • teal + + + + + + + + + + Skip to contents @@ -40,7 +56,8 @@ + + @@ -134,7 +156,8 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    lifecycle
    +
    +
    lifecycle

    badge

    @@ -142,21 +165,24 @@

    %>%

    -
    + + - + + + + - - + + diff --git a/v0.15.2/reference/report_card_template.html b/v0.15.2/reference/report_card_template.html index 4c0de52f75..6fa5ed937f 100644 --- a/v0.15.2/reference/report_card_template.html +++ b/v0.15.2/reference/report_card_template.html @@ -1,10 +1,26 @@ - -Template function for TealReportCard creation and customization — report_card_template • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    report_card_template(
       title,
       label,
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) title of the card (unless overwritten by label)

    @@ -149,26 +174,30 @@

    Arguments -

    Value

    +

    Value +

    (TealReportCard) populated with a title, description and filter state.

    + + + + - - + + diff --git a/v0.15.2/reference/reporter_previewer_module.html b/v0.15.2/reference/reporter_previewer_module.html index e398feb1dc..ebf6594de5 100644 --- a/v0.15.2/reference/reporter_previewer_module.html +++ b/v0.15.2/reference/reporter_previewer_module.html @@ -1,20 +1,36 @@ - - + + + + + +Create a teal module for previewing a report — reporter_previewer_module • teal +Create a teal module for previewing a report — reporter_previewer_module • teal + + + + + + + + + + Skip to contents @@ -30,7 +46,8 @@ + + @@ -132,13 +154,16 @@
    -

    Usage

    +

    Usage +

    reporter_previewer_module(label = "Report previewer", server_args = list())
    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    @@ -147,26 +172,30 @@

    Argumentsteal.reporter::reporter_previewer_srv().

    -

    + +
    -

    Value

    +

    Value +

    teal_module (extended with teal_module_previewer class) containing the teal.reporter previewer functionality.

    + + + + - - + + diff --git a/v0.15.2/reference/run_js_files.html b/v0.15.2/reference/run_js_files.html index 322364b8c3..63bd9ad75d 100644 --- a/v0.15.2/reference/run_js_files.html +++ b/v0.15.2/reference/run_js_files.html @@ -1,14 +1,30 @@ - - + + + + + +Run JS file from /inst/js/ package directory — run_js_files • teal +Run JS file from /inst/js/ package directory — run_js_files • teal + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -123,41 +145,49 @@
    -

    Usage

    +

    Usage +

    run_js_files(files)
    -

    Arguments

    -
    files
    +

    Arguments +

    +
    +
    files

    (character) vector of filenames.

    -
    + +
    -

    Value

    +

    Value +

    returns NULL, invisibly.

    -

    Details

    +

    Details +

    system.file should not be used to access files in other packages, it does not work with devtools. Therefore, we redefine this method in each package as needed. Thus, we do not export this method.

    + + + + - - + + diff --git a/v0.15.2/reference/show_rcode_modal.html b/v0.15.2/reference/show_rcode_modal.html index e5a0bfe14c..c74fd03f67 100644 --- a/v0.15.2/reference/show_rcode_modal.html +++ b/v0.15.2/reference/show_rcode_modal.html @@ -1,10 +1,26 @@ - -Show R code modal — show_rcode_modal • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    show_rcode_modal(title = NULL, rcode, session = getDefaultReactiveDomain())
    -

    Arguments

    -
    title
    +

    Arguments +

    +
    +
    title

    (character(1)) Title of the modal, displayed in the first comment of the R code.

    @@ -137,24 +162,28 @@

    Argumentsshiny::getDefaultReactiveDomain() is used.

    -

    + +
    -

    References

    +

    References +

    shiny::showModal()

    + + + + - - + + diff --git a/v0.15.2/reference/slices_store.html b/v0.15.2/reference/slices_store.html index 0c757a7263..4ae609ced8 100644 --- a/v0.15.2/reference/slices_store.html +++ b/v0.15.2/reference/slices_store.html @@ -1,10 +1,26 @@ - -Store and restore teal_slices object — slices_store • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,15 +139,18 @@
    -

    Usage

    +

    Usage +

    slices_store(tss, file)
     
     slices_restore(file)
    -

    Arguments

    -
    tss
    +

    Arguments +

    +
    +
    tss

    (teal_slices) object to be stored.

    @@ -133,9 +158,11 @@

    Arguments.

    -

    + +
    -

    Value

    +

    Value +

    slices_store returns NULL, invisibly.

    @@ -144,32 +171,39 @@

    Value

    slices_restore returns a teal_slices object restored from the file.

    -

    Details

    -

    Date and date time objects are stored in the following formats:

    • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

    • +

      Details +

      +

      Date and date time objects are stored in the following formats:

      +
        +
      • Date class is converted to the "ISO8601" standard (YYYY-MM-DD).

      • POSIX*t classes are converted to character by using format.POSIX*t(usetz = TRUE, tz = "UTC") (YYYY-MM-DD HH:MM:SS UTC, where UTC is the Coordinated Universal Time timezone short-code).

      • -

      This format is assumed during slices_restore. All POSIX*t objects in +

    +

    This format is assumed during slices_restore. All POSIX*t objects in selected or choices fields of teal_slice objects are always printed in UTC timezone as well.

    -

    See also

    +

    See also +

    + + + + - - + + diff --git a/v0.15.2/reference/snapshot_manager_module.html b/v0.15.2/reference/snapshot_manager_module.html index 0e796660f9..a8c1a14bc1 100644 --- a/v0.15.2/reference/snapshot_manager_module.html +++ b/v0.15.2/reference/snapshot_manager_module.html @@ -1,8 +1,24 @@ - -Filter state snapshot management — snapshot_manager_module • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,15 +136,18 @@
    -

    Usage

    +

    Usage +

    snapshot_manager_ui(id)
     
     snapshot_manager_srv(id, slices_global, mapping_matrix, filtered_data_list)
    -

    Arguments

    -
    id
    +

    Arguments +

    +
    +
    id

    (character(1)) shiny module id

    @@ -140,15 +165,18 @@

    Arguments -

    Value

    +

    Value +

    Nothing is returned.

    -

    Details

    +

    Details +

    This module introduces snapshots: stored descriptions of the filter state of the entire application. Snapshots allow the user to save the current filter state of the application for later use in the session, as well as to save it to file in order to share it with an app developer or other users, @@ -160,7 +188,8 @@

    Details

    -

    Server logic

    +

    Server logic +

    Snapshots are basically teal_slices objects, however, since each module is served by a separate instance @@ -175,7 +204,8 @@

    Server logic -

    Snapshot mechanics

    +

    Snapshot mechanics +

    When a snapshot is captured, the user is prompted to name it. @@ -205,7 +235,8 @@

    Snapshot mechanics -

    Transferring snapshots

    +

    Transferring snapshots +

    Snapshots uploaded from disk should only be used in the same application they come from, @@ -215,22 +246,25 @@

    Transferring snapshots

    -

    Author

    +

    Author +

    Aleksander Chlebowski

    + + + + - - + + diff --git a/v0.15.2/reference/tdata.html b/v0.15.2/reference/tdata.html index 7342093efd..21e1cde217 100644 --- a/v0.15.2/reference/tdata.html +++ b/v0.15.2/reference/tdata.html @@ -1,22 +1,38 @@ - - + + + + + +Create a tdata object — tdata • teal +Create a tdata object — tdata • teal + + + + + + + + + + Skip to contents @@ -32,7 +48,8 @@ + + @@ -126,19 +148,25 @@

    [Deprecated]

    Create a new object called tdata which contains data, a reactive list of data.frames -(or MultiAssayExperiment), with attributes:

    • code (reactive) containing code used to generate the data

    • +(or MultiAssayExperiment), with attributes:

      +
        +
      • code (reactive) containing code used to generate the data

      • join_keys (join_keys) containing the relationships between the data

      • metadata (named list) containing any metadata associated with the data frames

      • -
    + +
    -

    Usage

    +

    Usage +

    new_tdata(data, code = "", join_keys = NULL, metadata = NULL)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (named list) A list of data.frame or MultiAssayExperiment objects, which optionally can be reactive. Inside this object all of these items will be made reactive.

    @@ -160,20 +188,24 @@

    Arguments -

    Value

    +

    Value +

    A tdata object.

    -

    See also

    +

    See also +

    as_tdata

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars), dd = data.frame(x = 1:10)),
    @@ -354,17 +386,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/tdata2env.html b/v0.15.2/reference/tdata2env.html index c72dad4bba..06febce645 100644 --- a/v0.15.2/reference/tdata2env.html +++ b/v0.15.2/reference/tdata2env.html @@ -1,8 +1,24 @@ - -Function to convert a tdata object to an environment — tdata2env • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,25 +137,31 @@
    -

    Usage

    +

    Usage +

    tdata2env(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (tdata) object

    -
    + +
    -

    Value

    +

    Value +

    An environment.

    -

    Examples

    +

    Examples +

    
     data <- new_tdata(
       data = list(iris = iris, mtcars = reactive(mtcars)),
    @@ -145,17 +174,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/tdata_deprecation.html b/v0.15.2/reference/tdata_deprecation.html index ae134a4edd..2e4d7dd162 100644 --- a/v0.15.2/reference/tdata_deprecation.html +++ b/v0.15.2/reference/tdata_deprecation.html @@ -1,8 +1,24 @@ - -Downgrade teal_data objects in modules for compatibility — as_tdata • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,24 +136,30 @@
    -

    Usage

    +

    Usage +

    as_tdata(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    data object, either tdata or teal_data, the latter possibly in a reactive expression

    -
    + +
    -

    Value

    +

    Value +

    Object of class tdata.

    -

    Details

    +

    Details +

    Recent changes in teal cause modules to fail because modules expect a tdata object to be passed to the data argument but instead they receive a teal_data object, which is additionally wrapped in a reactive expression in the server functions. @@ -140,7 +168,8 @@

    Details
    -

    Examples

    +

    Examples +

    td <- teal_data()
     td <- within(td, iris <- iris) %>% within(mtcars <- mtcars)
     td
    @@ -192,17 +221,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.15.2/reference/teal-package.html b/v0.15.2/reference/teal-package.html index c155214b25..e4d7102cae 100644 --- a/v0.15.2/reference/teal-package.html +++ b/v0.15.2/reference/teal-package.html @@ -1,10 +1,26 @@ - -teal: Interactive exploration of clinical trials data — teal-package • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -118,21 +141,30 @@
    -

    Details

    +

    Details +

    To learn mode about the package, visit the project website or read the init() manual page.

    -

    Author

    +

    Author +

    Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID)

    -

    Authors:

    + +
    + + + + - - + + diff --git a/v0.15.2/reference/teal_data_datanames.html b/v0.15.2/reference/teal_data_datanames.html index a0c08f7852..158b9149c0 100644 --- a/v0.15.2/reference/teal_data_datanames.html +++ b/v0.15.2/reference/teal_data_datanames.html @@ -1,10 +1,26 @@ - -Wrapper on teal.data::datanames — teal_data_datanames • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + +
    @@ -117,18 +140,23 @@
    -

    Usage

    +

    Usage +

    teal_data_datanames(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (teal_data)

    -
    + +
    -

    Value

    +

    Value +

    character

    @@ -137,17 +165,19 @@

    Value

    + + + + - - + + diff --git a/v0.15.2/reference/teal_data_module.html b/v0.15.2/reference/teal_data_module.html index 03c24967e5..f59aa39776 100644 --- a/v0.15.2/reference/teal_data_module.html +++ b/v0.15.2/reference/teal_data_module.html @@ -1,10 +1,26 @@ - -Data module for teal applications — teal_data_module • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    teal_data_module(ui, server)
     
     # S4 method for teal_data_module,character
    @@ -128,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    ui
    +

    Arguments +

    +
    +
    ui

    (function(id)) shiny module UI function; must only take id argument

    @@ -159,9 +184,11 @@

    Arguments -

    Value

    +

    Value +

    teal_data_module returns an object of class teal_data_module.

    @@ -173,7 +200,8 @@

    Value

    within returns a teal_data_module object with a delayed evaluation of expr when the module is run.

    -

    Details

    +

    Details +

    teal_data_module creates a shiny module to supply or modify data in a teal application. The module allows for running data pre-processing code (creation and some modification) after the app starts. The body of the server function will be run in the app rather than in the global environment. @@ -188,12 +216,14 @@

    Details... argument: as name:value pairs are passed to ..., name in expr will be replaced with value.

    -

    Examples

    +

    Examples +

    tdm <- teal_data_module(
       ui = function(id) {
         ns <- NS(id)
    @@ -326,17 +356,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/teal_data_to_filtered_data.html b/v0.15.2/reference/teal_data_to_filtered_data.html index 495458d944..36154860d7 100644 --- a/v0.15.2/reference/teal_data_to_filtered_data.html +++ b/v0.15.2/reference/teal_data_to_filtered_data.html @@ -1,8 +1,24 @@ - -Create a FilteredData — teal_data_to_filtered_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,39 +137,46 @@
    -

    Usage

    +

    Usage +

    teal_data_to_filtered_data(x, datanames = teal_data_datanames(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (teal_data) object

    datanames

    (character) vector of data set names to include; must be subset of datanames(x)

    -
    + +
    -

    Value

    +

    Value +

    A FilteredData object.

    + + + + - - + + diff --git a/v0.15.2/reference/teal_modules.html b/v0.15.2/reference/teal_modules.html index cb0f323d76..891b8d42d5 100644 --- a/v0.15.2/reference/teal_modules.html +++ b/v0.15.2/reference/teal_modules.html @@ -1,10 +1,26 @@ - -Create teal_module and teal_modules objects — teal_modules • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,7 +139,8 @@
    -

    Usage

    +

    Usage +

    module(
       label = "module",
       server = function(id, ...) {
    @@ -151,14 +174,19 @@ 

    Usage

    -

    Arguments

    -
    label
    +

    Arguments +

    +
    +
    label

    (character(1)) Label shown in the navigation item for the module or module group. For modules() defaults to "root". See Details.

    server
    -

    (function) shiny module with following arguments:

    • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

    • +
      +

      (function) shiny module with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module (see shiny::moduleServer()).

      • input, output, session - (optional; not recommended) When provided, then shiny::callModule() will be used to call a module. From shiny 1.5.0, the recommended way is to use shiny::moduleServer() instead which doesn't require these arguments.

      • @@ -172,14 +200,19 @@

        Argumentsteal.slice::FilterPanelAPI).

      • ... (optional) When provided, server_args elements will be passed to the module named argument or to the ....

      • -

      +
    +
    ui
    -

    (function) shiny UI module function with following arguments:

    • id - teal will set proper shiny namespace for this module.

    • +
      +

      (function) shiny UI module function with following arguments:

      +
        +
      • id - teal will set proper shiny namespace for this module.

      • ... (optional) When provided, ui_args elements will be passed to the module named argument or to the ....

      • -
      +
    +
    filters
    @@ -203,7 +236,8 @@

    Argumentsformat() and print(): Arguments passed to other methods.

    @@ -215,20 +249,26 @@

    Arguments -

    Value

    +

    Value +

    module() returns an object of class teal_module.

    -

    modules() returns a teal_modules object which contains following fields:

    • label: taken from the label argument.

    • +

      modules() returns a teal_modules object which contains following fields:

      +
        +
      • label: taken from the label argument.

      • children: a list containing objects passed in .... List elements are named after their label attribute converted to a valid shiny id.

      • -
    + +
    -

    Details

    +

    Details +

    module() creates an instance of a teal_module that can be placed in a teal application. modules() shapes the structure of a the application by organizing teal_module within the navigation panel. It wraps teal_module and teal_modules objects in a teal_modules object, @@ -241,7 +281,8 @@

    Details
    -

    Examples

    +

    Examples +

    library(shiny)
     
     module_1 <- module(
    @@ -298,17 +339,19 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.15.2/reference/teal_slices.html b/v0.15.2/reference/teal_slices.html index 3d9cf92f1a..7c3c3231cf 100644 --- a/v0.15.2/reference/teal_slices.html +++ b/v0.15.2/reference/teal_slices.html @@ -1,8 +1,24 @@ - -Filter settings for teal applications — teal_slices • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    teal_slices(
       ...,
       exclude_varnames = NULL,
    @@ -133,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    any number of teal_slice objects. For print and format, additional arguments passed to other functions.

    @@ -146,15 +171,19 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal.slice's GitHub repository.

    (character(1)) string specifying how observations are tallied by these filter states. -Possible options:

    • "none" (default) to have counts of single FilterState to show unfiltered number only.

    • +Possible options:

      +
        +
      • "none" (default) to have counts of single FilterState to show unfiltered number only.

      • "all" to have counts of single FilterState to show number of observation in filtered and unfiltered dataset. Note, that issues were reported when using this option with MultiAssayExperiment. Please make sure that adding new filters doesn't fail on target platform before deploying for production.

      • -
    + +
    allow_add
    @@ -162,24 +191,32 @@

    Arguments[Experimental] +
    +

    [Experimental] This is a new feature. Do kindly share your opinions on teal's GitHub repository.

    (named list) specifies which filters will be active in which modules on app start. Elements should contain character vector of teal_slice ids (see teal.slice::teal_slice). -Names of the list should correspond to teal_module label set in module() function.

    • ids listed under "global_filters will be active in all modules.

    • +Names of the list should correspond to teal_module label set in module() function.

      +
        +
      • ids listed under "global_filters will be active in all modules.

      • If missing, all filters will be applied to all modules.

      • If empty list, all filters will be available to all modules but will start inactive.

      • If module_specific is FALSE, only global_filters will be active on start.

      • -
    + +
    app_id
    @@ -192,27 +229,32 @@

    Arguments -

    Value

    +

    Value +

    A teal_slices object.

    -

    Details

    +

    Details +

    Produces a teal_slices object. The teal_slice components will specify filter states that will be active when the app starts. Attributes (created with the named arguments) will configure the way the app applies filters. See argument descriptions for details.

    -

    Examples

    +

    Examples +

    filter <- teal_slices(
       teal_slice(dataname = "iris", varname = "Species", id = "species"),
       teal_slice(dataname = "iris", varname = "Sepal.Length", id = "sepal_length"),
    @@ -245,17 +287,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/unfold_mapping.html b/v0.15.2/reference/unfold_mapping.html index fefc8785ad..1d3354c4b8 100644 --- a/v0.15.2/reference/unfold_mapping.html +++ b/v0.15.2/reference/unfold_mapping.html @@ -1,8 +1,24 @@ - -Explicitly enumerate global filters. — unfold_mapping • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,39 +136,46 @@
    -

    Usage

    +

    Usage +

    unfold_mapping(mapping, module_names)
    -

    Arguments

    -
    mapping
    +

    Arguments +

    +
    +
    mapping

    (named list) as stored in mapping parameter of teal_slices

    module_names

    (character) vector containing names of all modules in the app

    -
    + +
    -

    Value

    +

    Value +

    A named_list with one element per module, each element containing all filters applied to that module.

    + + + + - - + + diff --git a/v0.15.2/reference/validate_app_title_tag.html b/v0.15.2/reference/validate_app_title_tag.html index c1a7d8c5dd..ecba517221 100644 --- a/v0.15.2/reference/validate_app_title_tag.html +++ b/v0.15.2/reference/validate_app_title_tag.html @@ -1,8 +1,24 @@ - -Function for validating the title parameter of teal::init — validate_app_title_tag • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + +
    @@ -114,29 +137,35 @@
    -

    Usage

    +

    Usage +

    validate_app_title_tag(shiny_tag)
    -

    Arguments

    -
    shiny_tag
    +

    Arguments +

    +
    +
    shiny_tag

    (shiny.tag) Object to validate for a valid title.

    -
    + +
    + + + + - - + + diff --git a/v0.15.2/reference/validate_has_data.html b/v0.15.2/reference/validate_has_data.html index f63d174b66..41be8e36df 100644 --- a/v0.15.2/reference/validate_has_data.html +++ b/v0.15.2/reference/validate_has_data.html @@ -1,8 +1,24 @@ - -Validate that dataset has a minimum number of observations — validate_has_data • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,7 +136,8 @@
    -

    Usage

    +

    Usage +

    validate_has_data(
       x,
       min_nrow = NULL,
    @@ -125,8 +148,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    @@ -145,14 +170,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    library(teal)
     ui <- fluidPage(
       sliderInput("len", "Max Length of Sepal",
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/validate_has_elements.html b/v0.15.2/reference/validate_has_elements.html index bbbbbb76c2..1fa0b9936f 100644 --- a/v0.15.2/reference/validate_has_elements.html +++ b/v0.15.2/reference/validate_has_elements.html @@ -1,8 +1,24 @@ - -Validates that vector has length greater than 0 — validate_has_elements • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_has_elements(x, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    msg

    message to display

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B"), each = 15)
    @@ -169,17 +197,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/validate_has_variable.html b/v0.15.2/reference/validate_has_variable.html index cfd25d1a0b..6739c20696 100644 --- a/v0.15.2/reference/validate_has_variable.html +++ b/v0.15.2/reference/validate_has_variable.html @@ -1,8 +1,24 @@ - -Validates that dataset contains specific variable — validate_has_variable • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_has_variable(data, varname, msg)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20)
    @@ -165,17 +193,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/validate_in.html b/v0.15.2/reference/validate_in.html index d6d95db3ee..ab653781da 100644 --- a/v0.15.2/reference/validate_in.html +++ b/v0.15.2/reference/validate_in.html @@ -1,8 +1,24 @@ - -Validates that vector includes all expected values — validate_in • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_in(x, choices, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Vector of values to test.

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    ui <- fluidPage(
       selectInput(
         "species",
    @@ -163,17 +191,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/validate_inputs.html b/v0.15.2/reference/validate_inputs.html index 86059f2f9c..2e9ac2f514 100644 --- a/v0.15.2/reference/validate_inputs.html +++ b/v0.15.2/reference/validate_inputs.html @@ -1,10 +1,26 @@ - -Send input validation messages to output — validate_inputs • teal + + + + + + + + Skip to contents @@ -20,7 +36,8 @@ + + @@ -117,13 +139,16 @@
    -

    Usage

    +

    Usage +

    validate_inputs(..., header = "Some inputs require attention")
    -

    Arguments

    -
    ...
    +

    Arguments +

    +
    +
    ...

    either any number of InputValidator objects or an optionally named, possibly nested list of InputValidator objects, see Details

    @@ -132,15 +157,18 @@

    Arguments -

    Value

    +

    Value +

    Returns NULL if the final validation call passes and a shiny.silent.error if it fails.

    -

    Details

    +

    Details +

    shiny::validate is used to withhold rendering of an output element until certain conditions are met and to print a validation message in place of the output element. @@ -159,12 +187,14 @@

    Detailsheader.

    -

    Examples

    +

    Examples +

    library(shiny)
     library(shinyvalidate)
     
    @@ -238,17 +268,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/validate_n_levels.html b/v0.15.2/reference/validate_n_levels.html index 10b89d4741..851e80147f 100644 --- a/v0.15.2/reference/validate_n_levels.html +++ b/v0.15.2/reference/validate_n_levels.html @@ -1,8 +1,24 @@ - -Validate that variables has expected number of levels — validate_n_levels • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_n_levels(x, min_levels = 1, max_levels = 12, var_name)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    variable name. If x is not a factor, the unique values are treated as levels.

    @@ -137,16 +162,19 @@

    Arguments -

    Details

    +

    Details +

    If the number of levels of x is less than min_levels or greater than max_levels the validation will fail. This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       one = rep("a", length.out = 20),
       two = rep(c("a", "b"), length.out = 20),
    @@ -181,17 +209,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/validate_no_intersection.html b/v0.15.2/reference/validate_no_intersection.html index 8350682688..31fccbc460 100644 --- a/v0.15.2/reference/validate_no_intersection.html +++ b/v0.15.2/reference/validate_no_intersection.html @@ -1,8 +1,24 @@ - -Validates no intersection between two vectors — validate_no_intersection • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,13 +136,16 @@
    -

    Usage

    +

    Usage +

    validate_no_intersection(x, y, msg)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    vector

    @@ -131,14 +156,17 @@

    Arguments -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    data <- data.frame(
       id = c(1:10, 11:20, 1:10),
       strata = rep(c("A", "B", "C"), each = 10)
    @@ -178,17 +206,19 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.15.2/reference/validate_one_row_per_id.html b/v0.15.2/reference/validate_one_row_per_id.html index 3fbad3eec2..095ac6b44d 100644 --- a/v0.15.2/reference/validate_one_row_per_id.html +++ b/v0.15.2/reference/validate_one_row_per_id.html @@ -1,8 +1,24 @@ - -Validate that dataset has unique rows for key variables — validate_one_row_per_id • teal + + + + + + + + Skip to contents @@ -18,7 +34,8 @@ + + @@ -114,27 +136,33 @@
    -

    Usage

    +

    Usage +

    validate_one_row_per_id(x, key = c("USUBJID", "STUDYID"))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (data.frame)

    key

    (character) Vector of ID variables from x that identify unique records.

    -
    + +
    -

    Details

    +

    Details +

    This function is a wrapper for shiny::validate.

    -

    Examples

    +

    Examples +

    iris$id <- rep(1:50, times = 3)
     ui <- fluidPage(
       selectInput(
    @@ -161,17 +189,19 @@ 

    Examples

    + +
    + + - - + +