Skip to content

Commit

Permalink
change the object in example_module and document it
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr committed Nov 14, 2024
1 parent 0481d15 commit 103ad27
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 8 additions & 2 deletions R/dummy_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
#'
#' `r lifecycle::badge("experimental")`
#'
#' This module creates an object called `object` that can be modified with decorators.
#' The `object` is determined by what's selected in `Choose a dataset` input in UI.
#' The object can be anything that can be handled by `renderPrint()`.
#' See the `vignette("decorate-modules-output", package = "teal")` or [`teal_transform_module`]
#' to read more about decorators.
#'
#' @inheritParams teal_modules
#' @return A `teal` module which can be included in the `modules` argument to [init()].
#' @examples
Expand Down Expand Up @@ -40,7 +46,7 @@ example_module <- function(label = "example teal module", datanames = "all", tra
table_data <- reactive({
within(data(),
{
table <- dataname
object <- dataname
},
dataname = as.name(input$dataname)
)
Expand All @@ -50,7 +56,7 @@ example_module <- function(label = "example teal module", datanames = "all", tra

output$text <- renderPrint({
req(table_data_decorated)
table_data_decorated()[["table"]]
table_data_decorated()[["object"]]
})

teal.widgets::verbatim_popup_srv(
Expand Down
7 changes: 7 additions & 0 deletions man/example_module.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 103ad27

Please sign in to comment.