How to create a Flexdashboard: Exercises
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
INTRODUCTION
With flexdashboard, you can easily create interactive dashboards for R. What is amazing about it is that with R Markdown, you can publish a group of related data visualizations as a dashboard.
Additionally, it supports a wide variety of components, including htmlwidgets; base, lattice, and grid graphics; tabular data; gauges and value boxes and text annotations.
It is flexible and easy to specify rows and column-based layouts. Components are intelligently re-sized to fill the browser and adapted for display on mobile devices.
In combination with Shiny, you can create a high quality dashboard with interactive visualizations.
Before proceeding, please follow our short tutorial.
Look at the examples given and try to understand the logic behind them. Then, try to solve the exercises below by using R without looking at the answers. Then, check the solutions to check your answers.
Exercise 1
Create a new flexdashboard R Markdown file from the R console
Exercise 2
Create the very initial dashboard interface in a single column.
Exercise 3
Add the space in which you will put your first chart
Exercise 4
Add the space in which you will put your second chart. The two charts should be stacked vertically.
Exercise 5
Add a third chart with the same logic.
Exercise 6
Transform your layout to scrolling.
Exercise 7
Displays THE 3 charts split across two columns.
Exercise 8
Change the width of these two columns.
Exercise 9
Defines two rows instead of columns, the first of which has a single chart and the second of which has two charts:
Exercise 10
Change the height of these two columns.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.