Notifications

The ability to create notifications is part of a larger amount of functionality within shinydashboard, which allows you to create messages, tasks, and notifications in the header of your dashboard. For more details, visit rstudio.github.io/shinydashboard/structure.html.

In this example, we will just add notifications. The code is very similar to the other two types of content. On the server.R side, the code is as follows:

output$notifications <- renderMenu({

This line allows the notification content to be rendered dynamically and called in the ui.R file with dropdownMenuOutput("notifications"). We have the following code:

 users <- sum(gadf[gadf$date == max(gadf$date), "users"]) newusers <- sum(gadf[gadf$date == max(gadf$date), "newUsers"]) ...

Get Web Application Development with R Using Shiny - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.