Skip to content

shinysnap

0.1.0Package record

Save and Restore the State of 'shiny' Applications

0packages depend
401downloads / year
–test coverage
13/13flavors OK

Overview

About

Save the state of applications built with 'shiny', the web application framework by Chang et al. (2026) doi:10.32614/CRAN.package.shiny. Users can share their work and continue it in another session. Input values and selected values held by the server are saved in JSON (JavaScript Object Notation) files that can be read and edited by hand. Saved state can be restored without reloading the page or setting up bookmarking. Restoration waits for inputs that appear as the page changes and reports which values were restored, missing, or could not be applied.

Changes in 0.1.0

Initial release.

Snapshots

  • snap_take() captures the inputs that are on the page (as reported by the client script, so values of removed dynamic UI are dropped), the reactiveValues registered with snap_track(), and the values written by snap_on_save() hooks. Action buttons, passwords, values that shiny's serializers mark as unserializable, ids excluded with setBookmarkExclude(), and the patterns given to snap_enable(), snap_exclude(), and snap_include() are left out.
  • The snapshot object is a plain list of class shinysnap, with snap_inputs(), snap_values(), snap_meta(), and snap_diff().

Files

Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
  • The canonical format is JSON: doubles written with the fewest digits that round-trip, typed wrappers for what JSON cannot say, deterministic layout. snap_serialize(), snap_unserialize(), snap_write(), and snap_read() convert; snap_write(format = "zip") writes a bundle that keeps uploaded files and, with unsupported = "rds", opaque R objects. Bundles are validated before extraction; embedded objects and .rds files need trust = TRUE.
  • snap_download_button(), snap_download_handler(), snap_file_input(), and snap_file_restore() replace the download and upload boilerplate.

Restore

  • snap_restore() restores a snapshot into the running session: tracked values are written back, snap_on_restore() hooks run, and the input values are sent to the browser at once, where the client script applies each one as soon as its input is on the page. shiny's restoreInput() mechanism is primed during the restore so dynamic UI is built with the restored values. A second restore cancels the first.
  • The restore report lists every input as applied, constructed, reapplied, missing, failed, mismatched, or skipped; snap_on_restored() hooks and snap_is_restoring() complete the server-side API.
  • snap_restorer() registers how an input's value becomes the message its binding understands, per binding name or per input id; built-in restorers cover shiny, bslib, and shinyMatrix inputs, and window.shinysnap.registerAdapter() is the JavaScript-side equivalent.

Interoperability

  • snap_as_bookmark_url() encodes a snapshot like URL bookmarking does, snap_as_test_inputs() feeds shiny::testServer(), and snap_attachment() returns the files kept in a bundle.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.1 min · r-release-macos-x86_64
Status changes
  • OK13 OKNow
  • OK2 OK2026-09-28
Advisories

none known

Documentation

In release 0.1.0
READMEYes · 391 wordsVignettesYes · 5 · dynamicNEWSYes · 67% structured · mentions 0.1.0Citation fileNoWebsiteYes · pkgdown
Help pages
19 (1 internal)includes a package overview page
Examples that run
100%18 run in a plain check (10 of them under a condition)
Exported functions with examples
100%
Documented parameters
83%
Return-value docs
100%
Help pages citing references
0%

Downloads

401
CRAN downloads in the past year
Rank #25,221 · ~1/day · ~33/mo
Daily download trend is not available in this view yet.
40130 days
40190 days
4011 year
Compare downloads with other packages →
Also on5 r2u

Repository

1Stars
0Forks
0Open issues
0Open PRs
1Releases
29Commits
1Commit identities
29 commits · Last activity 2026-09-29
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
10
Median days to close, 50 most recently updated closed PRs
0

PRs over time

2026-09-28 · 12026-09-29 · 0
PracticesBeta

6 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/nanxstats/shinysnap on 2026-10-25.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-09-29 · The repository has a site deploy workflow

pkgdown site last built 2026-09-29

Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-09-17
    Pull request it wrote: opened by a project member
    Commits: at least 6 crediting it in the message
Shared conventions any agent may read, so they name no particular tool.
Seen in the repository: AGENTS.md
Models named in its commits
  • Claude Fable 5.15 commits · Sep 2026
  • Claude Opus 4.81 commit · Sep 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
17 external dependencies (excludes base and recommended)

Installing shinysnap adds 31 packages (20 with compiled code, 26 MB of source tarballs). Heaviest: bslib 5.6 MB, promises 3.1 MB, sass 2.9 MB.

Depends (0)
none
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (1)
Author, Maintainer since 0.1.0 (2026), Copyright holder
Releases (1)
  • 0.1.0Latest
    2026-09-28 · current release
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-09-28
Total releases
1 / 1 yrs
License
MIT + file LICENSE OSI
Download size
241 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("shinysnap")
Xiao, N. (2026). shinysnap: Save and Restore the State of 'shiny' Applications (Version 0.1.0) [Computer software]. https://doi.org/10.32614/CRAN.package.shinysnap

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for shinysnap version 0.1.0 [Data set]. HJJB, LLC. Data release v2026-10-26. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy