Description Usage Arguments Note Examples
Create a layout with panels that can be resized with splitter component
1 | metroSplitter(panel1, panel2, vertical = FALSE, minSize = 100, gutterSize = 4)
|
panel1 |
Left panel. Wrap in tagList. This can be a nested metroSplitter. |
panel2 |
Right panel. Wrap in tagList. This can be a nested metroSplitter. |
vertical |
Vertical split. FALSE by default. |
minSize |
Minimum panel size. 100px by default. |
gutterSize |
Minimum gutter size (separator). 4 px by default. |
vertical does not work yet.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | if (interactive()) {
library(shiny)
library(shinyMetroUi)
shiny::shinyApp(
ui = metroPage(
metroSplitter(
vertical = FALSE,
gutterSize = 10,
panel1 = tagList(
sliderInput(
"obs",
"Number of observations:",
min = 0,
max = 1000,
value = 500
),
plotOutput("distPlot")
),
panel2 = tagList(
sliderInput(
"obs2",
"Number of observations:",
min = 0,
max = 1000,
value = 500
),
plotOutput("distPlot2")
)
)
),
server = function(input, output) {
output$distPlot <- renderPlot({
hist(rnorm(input$obs))
})
output$distPlot2 <- renderPlot({
hist(rnorm(input$obs2))
})
}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.