Field Notes on JavaScript for Shiny Users

About this bookdown

This Bookdown is the content of an informal JavaScript training given inside ThinkR, and will probably be updated from time to time. It’s in no way supposed to be a complete JavaScript course nor even a complete book. Most of the content is composed of pieces of code + comments, without complete sentences.

Please read it with this in mind.

Also, this Bookdown is {shiny}-centric so it focuses on things that can be useful when building Shiny application.

What this book covers : bascic JavaScript objects, adding JavaScript to Shiny apps, the DOM elements & DOM events, jQuery, this and attributes, and building custom inputs for Shiny.

You’ll find in the “Examples” section pieces of code written in real life Shiny Apps.

The Read More part points to external resources about JavaScript and Shiny.

Installing {bubble}

  • R package to interact with NodeJS

Note: you’ll need to have NodeJS installed on your machine

if (!requireNamespace("bubble")){
  • Set the {knitr} engine for Rmds
  • Access a NodeJS REPL

About the image

The illustration on this page comes from Flickr Commons, and is available online

Ref : > Image taken from page 33 of ‘Stanley and Africa: also, the travels, adventures, and discoveries of Captain John H. Speke, Captain Richard F. Burton … and other distinguished explorers. [With plates, including portraits.]’

ThinkR Website