Dropdown menus in R Markdown with bsselectR

December 14, 2016

[This article was first published on Kyle Walker, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I strongly believe that interactive reports, presentations, and scholarly articles are going to become much more prominent in the years ahead. Whereas a PDF article or presentation can often only show a limited aspect of a research project, interactive documents can allow a reader or presenter to explore project content in a much broader sense.

For dynamic research documents, an excellent option is to combine Shiny with R Markdown to generate a report that can execute R code from a Shiny server. However, not all interactive documents need the full power of Shiny. For example, I’m currently writing a report in which I’d like readers to be able to use drop-down menus to select charts to view. As I produced the charts in Python and saved them all to a folder, I don’t need Shiny to dynamically create the charts in the report.

To create the drop-down menu, I came across the bootstrap-select jQuery plugin. bootstrap-select adds Bootstrap’s dropdown.js and Bootstrap styling to re-style HTML

Most visited articles of the week

  1. 5 Ways to Subset a Data Frame in R
  2. How to write the first for loop in R
  3. R – Sorting a data frame by the contents of a column
  4. Animated Plots using ggplot and gganimate
  5. Stata to R cheatsheet for Econometrics
  6. Installing R packages
  7. In-depth introduction to machine learning in 15 hours of expert videos
  8. Date Formats in R
  9. How to perform a Logistic Regression in R


RSS python-bloggers.com (python/data-science news)

RSS Jobs for R users

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)