pivot_cols
and indicator_cols
can be used to restrict possible column choices.
It's also possible to fully initialize the first pivot table with the argument initialization
, a named list with :
NULL
NULL
NULL
NULL
NULL
NULL
NULL
initialization <- list(
"rows" = c("TOC", "Status"),
"cols" = "TrainCategory",
"target" = NULL,
"idc" = NULL,
"combine_target" = NULL,
"combine_idc" = NULL,
"combine" = NULL,
"idcs" = c(
list(
# simple
c("label" = "status", "target" = "ServiceId", "idc" = "Count")
)
)
)
# ui
ui = shiny::fluidPage(
shinypivottablerUI(id = "id",
app_colors = c("#e6e6e6", "#430838"),
app_linewidth = 3
)
)
# server
server = function(input, output, session) {
shiny::callModule(module = shinypivottabler,
id = "id",
show_title = FALSE,
initialization = initialization,
data = data)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.