shinytoastr v2.1.1

0

Monthly downloads

0th

Percentile

Notifications from 'Shiny'

Browser notifications in 'Shiny' apps, using 'toastr': <https://github.com/CodeSeven/toastr#readme>.

Readme

shinytoastr

Notifications in Shiny, via toastr

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Linux Build Status Windows Build status CRAN RStudio mirror downloads

Installation

source("https://install-github.me/mangothecat/shinytoastr")

Usage

Call useToastr() at the beginning of ui definition, and then in the server definition use one of the notification functions, toastr_success(), toastr_info(), toastr_warning() or toastr_error() to create notifications:

library(shinytoastr)

ui <- shinyUI(fluidPage(
  useToastr(),
  pageWithSidebar(
    headerPanel("Header"),
    sidebarPanel(
      ...
      actionButton(inputId = "save_button", label = "Save",
                    class = "btn-primary")
      ...
    ),
    mainPanel(
      ...
    )
  )
))
server <- function(input, output, session) {
  ...
  observeEvent(
    input$save_button,
    {
      tryCatch(
        {
          writeToDB(data)
          toastr_success("Saved to database")
        },
        error = function(e) {
          toastr_error(title = "Database error", conditionMessage(e))
        }
      }
    }
  )
}

License

MIT © John Papa, Tim Ferrell, Hans Fjällemark, Mango Solutions.

Functions in shinytoastr

Name Description
toastr_success Create toastr notifications
useToastr Initialize the toastr notification engine
No Results!

Last month downloads

Details

License MIT + file LICENSE
LazyData true
URL https://github.com/mangothecat/shinytoastr
BugReports https://github.com/mangothecat/shinytoastr/issues
RoxygenNote 5.0.1
Encoding UTF-8
NeedsCompilation no
Packaged 2016-06-05 22:08:00 UTC; gaborcsardi
Repository CRAN
Date/Publication 2016-06-06 06:39:52

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/shinytoastr)](http://www.rdocumentation.org/packages/shinytoastr)