How to create a Flexdashboard: Exercises

June 15, 2018
By

(This article was first published on R-exercises, and kindly contributed to R-bloggers)

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.

To leave a comment for the author, please follow the link and comment on their blog: R-exercises.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)