Site icon R-bloggers

shinyStore – Persistent Client-Side Storage in Shiny

[This article was first published on Trestle Technology, LLC - R, 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.

We’re thrilled to announce the availability of shinyStore, an R package that enables HTML5 Web Storage from Shiny, an interactive web application framework for R.

A live demo of an example application is available here. Set a text value then refresh the page, or close the tab and come back in a new tab. You’ll find that any tab in that browser will always remember the last text value you’d saved. You can imagine using this functionality to remember a user’s preferences or inputs for your application.

The package is open-source (MIT) and the code and more details can be obtained from the GitHub page; if you encounter any problems or feature requests, feel free to open a ticket there.

To get started with the package, you’ll need to installed it from GitHub, as it’s not yet available on CRAN. The easiest way to do this is using the devtools package which you should install if you haven’t already:

install.packages("devtools")
library(devtools)

Now you’re ready to install shinyStore and load up one of the examples:

# Load shiny (I'm assuming it's already installed)
library(shiny)

# Run one of the included examples in the shinyStore package.
runApp(system.file("examples/01-persist", package="shinyStore"))

We’re interested in hearing ways that you might be able to use this package, or ways that it could be improved to better accommodate your use cases!

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

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.