teal_slices | R Documentation |
teal
applicationsSpecify initial filter states and filtering settings for a teal
app.
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(...)
... |
any number of |
include_varnames , exclude_varnames |
( |
count_type |
This is a new feature. Do kindly share your opinions on
(
|
allow_add |
( |
module_specific |
optional (
|
mapping |
This is a new feature. Do kindly share your opinions on
(named
|
app_id |
( |
x |
( |
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.
A teal_slices
object.
teal.slice::teal_slices
, teal.slice::teal_slice
, slices_store()
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.