<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/step-up-your-dashboard-with-shinydashboard-exercises-part-2/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://www.r-exercises.com/2018/09/17/step-up-your-dashboard-with-shinydashboard-exercises-part-2/"> R-exercises</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><a rel="nofollow" href="https://i0.wp.com/www.r-exercises.com/wp-content/uploads/2018/09/car-dashboard-2667434_1280.jpg?ssl=1" target="_blank"><img sizes="(max-width: 300px) 100vw, 300px" src="https://i2.wp.com/www.r-exercises.com/wp-content/uploads/2018/09/car-dashboard-2667434_1280-300x200.jpg?resize=300%2C200&ssl=1" alt="" width="300" class="wp-image-11905" data-recalc-dims="1" height="200"></a>The shinydashboard provides a well-designed dashboard theme for Shiny apps, and allows for an easy assembly of a dashboard from a couple of basic building blocks. The package is widely used in commercial environments as well, due to its neat features for building convenient and robust layouts.</p>
<p>This exercise set will help you practice all of the main features of this great package. By completing the two part of the exercise series, you’ll know that you’re ready to start building well-designed Shiny apps. We will make some minimal use of the built-in dataset <code>datasets::CO2</code> (specific description of the dataset are irrelevant, but you can check them out by typing <code>?datasets::CO2</code>). Each exercise is adding some more features/functionalities to the code of the previous exercise, so be sure to not discard the code until after you’re done with all of the exercises. Answers to the exercises are available <a rel="nofollow" href="https://www.r-exercises.com/2018/09/17/step-up-your-dashboard-with-shinydashboard-solutions-part-2/" target="_blank">here</a>.</p>
<p>In the solutions page, you’ll first find only the relevant component of each exercise, and then at the end of the page you will find the entire Shiny app code, that contain all of the different components together. This exercise set is based on the output code of <a rel="nofollow" href="https://www.r-exercises.com/2018/09/10/step-up-your-dashboard-with-shinydashboard-part-1-exercises/" target="_blank">this</a> exercise set. If you haven’t done it, you can just use the code under “All Exercises Combined” <a rel="nofollow" href="https://www.r-exercises.com/2018/09/10/step-up-your-dashboard-with-shinydashboard-part-1-solutions/" target="_blank">here</a> (at the bottom) as your basis for this exercise set.</p>
<p>For other parts of the series follow the tag <a rel="nofollow" href="http://www.r-exercises.com/tag/shinydashboard" target="_blank">shinydashboard</a></p>
<p><strong>Exercise 1</strong><br>
In the “data” tab, add a <code>box()</code> with the title “CO2 Data”.<br>
The box should have a blue header, and it should be collapsible.</p>
<p><strong>Exercise 2</strong><br>
Add the <code>CO2</code> table to the box you just created.<br>
The table should be filtered by the <code>plant</code> input that was created in the previous exercise set.</p>
<p><strong>Exercise 3</strong><br>
In the “licenses” tab, add a <code>tabBox()</code> that contains two panels: one titled “Data”, and one titled “Icons”.<br>
You can leave those panels empty for now.</p>
<p><strong>Exercise 4</strong><br>
In the “contact_us” tab, add an <code>infoBox()</code> with some content of your choice, and select its color and icon.</p>
<p><strong>Exercise 5</strong><br>
In the “contact_us” tab, add an <code>valueBox()</code> with some content of your choice, and select its color and icon.</p>
<div>
<aside><img src="https://www.r-exercises.com/2018/09/17/step-up-your-dashboard-with-shinydashboard-exercises-part-2/"></aside>
<div><strong>Learn more</strong> about Shiny apps in the online courses <a rel="nofollow" href="https://www.r-exercises.com/product/r-shiny-apps/" target="_blank">Create Interactive Web Applications with the R Shiny Package</a> and <a rel="nofollow" href="https://www.r-exercises.com/product/r-shiny-interactive-web-apps/" target="_blank">R Shiny Interactive Web Apps</a>.</div>
</div>
<p><strong>Exercise 6</strong><br>
Add a “messages” dropdown menu to the header.<br>
Select its icon and badge-status, and add one <code>messageItem()</code> to it.</p>
<p><strong>Exercise 7</strong><br>
Add a “tasks” dropdown menu to the header.<br>
Select its icon and badge-status, and add two <code>taskItem()</code>s to it.</p>
<p><strong>Exercise 8</strong><br>
Add a placeholder for a “notifications” dropdown menu in the header using <code>dropdownMenuOutput()</code>.<br>
The output ID of should be “notifications”.</p>
<p><strong>Exercise 9</strong><br>
Add the server-side code of the “notifications” dropdown menu.<br>
It should have a single notification item that shows what is the current value of the <code>plant</code> input that was created in the previous exercise set.</p>
<p><strong>Exercise 10</strong><br>
Add a link to “r-exercises.com” in the header.<br>
Hint: use <code>tags$li(class = &quot;dropdown&quot;, ...)</code> together with <code>tags$a(...)</code>.</p>
<div>
<h3>Related exercise sets:</h3>
<ol>
<li><a rel="nofollow" href="https://www.r-exercises.com/2017/11/29/spatial-data-analysis-introduction-to-raster-processing-part-1/" title="Spatial Data Analysis: Introduction to Raster Processing (Part 1)" target="_blank">Spatial Data Analysis: Introduction to Raster Processing (Part 1) </a></li>
<li><a rel="nofollow" href="https://www.r-exercises.com/2017/08/03/parallel-computing-exercises-snow-and-rmpi-part-3/" title="Parallel Computing Exercises: Snow and Rmpi (Part-3)" target="_blank">Parallel Computing Exercises: Snow and Rmpi (Part-3) </a></li>
<li><a rel="nofollow" href="https://www.r-exercises.com/2017/10/21/mathematical-expressions-in-r-plots-tutorial/" title="Mathematical Expressions in R Plots: Tutorial" target="_blank">Mathematical Expressions in R Plots: Tutorial </a></li>
<li><a rel="nofollow" href="http://www.r-exercises.com/start-here-to-learn-r/" target="_blank">Explore all our (>1000) R exercises</a></li>
<li><a rel="nofollow" href="http://www.r-exercises.com/r-courses/" target="_blank">Find an R course using our R Course Finder</a> directory</li>
</ol>
</div>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://www.r-exercises.com/2018/09/17/step-up-your-dashboard-with-shinydashboard-exercises-part-2/"> R-exercises</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/7l7ObM1IZbQ" height="1"></a></div>