Description Usage Arguments Value Examples
Create a sidebar panel containing input controls that can in turn be passed
to sidebarLayout
.
1 | sidebarPanel(..., width = 4)
|
... |
UI elements to include on the sidebar |
width |
The width of the sidebar. For fluid layouts this is out of 12 total units; for fixed layouts it is out of whatever the width of the sidebar's parent column is. |
A sidebar that can be passed to sidebarLayout
1 2 3 4 5 6 7 8 | # Sidebar with controls to select a dataset and specify
# the number of observations to view
sidebarPanel(
selectInput("dataset", "Choose a dataset:",
choices = c("rock", "pressure", "cars")),
numericInput("obs", "Observations:", 10)
)
|
You probably do not want to attach this package (with library() or require()). Instead, you should use shinybootstrap2::withBootstrap2(). You can hide this message with suppressPackageStartupMessages().
<div class="span4">
<form class="well">
<label class="control-label" for="dataset">Choose a dataset:</label>
<select id="dataset"><option value="rock" selected>rock</option>
<option value="pressure">pressure</option>
<option value="cars">cars</option></select>
<script type="application/json" data-for="dataset" data-nonempty="">{}</script>
<label for="obs">Observations:</label>
<input id="obs" type="number" value="10"/>
</form>
</div>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.