as_tdata {teal} | R Documentation |
Downgrade teal_data
objects in modules for compatibility
Description
Convert teal_data
to tdata
in teal
modules.
Usage
as_tdata(x)
Arguments
x |
data object, either |
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.
In order to easily adapt such modules without a proper refactor,
use this function to downgrade the data
argument.
Value
Object of class tdata
.
Examples
td <- teal_data()
td <- within(td, iris <- iris) %>% within(mtcars <- mtcars)
td
as_tdata(td)
as_tdata(reactive(td))
[Package teal version 0.15.2 Index]