John Coene

JavaScript for R

Price - $59.95 | £44.99

Enhance your data science products with JavaScript

Preorder Read for free

Forthcoming on CRC Press

What's inside?

Simple yet thorough, it will let you unlock a whole new world of possibilities.

6 Parts, 24 Chapters

Generalisable learnings

Approachable topics

Plenty of examples

Core topics

Two languages, multiple use cases


Use JavaScript for computations


Create your own interactive visualisation packages

Web Development

Immensely improve your shiny apps

Learn to use JavaScript with R—the fun way


R has been catapulted into web browsers: learn their language.

The book will let you improve:

How You Communicate Insights

Your Shiny Applications

Your Interactive Visualisations

Much more

Book Parts

The book is split in 6 major parts each covering a specific aspect of making JavaScript work with R.

1. Introduction

Ease into it. The book starts with a recap of the basics, rationales for introducing JavaScript into your workflow and the various ways one can make JavaScript work for R.

2. Data Visualisation

Learn how to build your own packages for data visualisation. We start by building a small package to produce inline charts, then build another for a globe visualisation, we then delve into advanced topics such as cross widget communication, responsiveness, and more.

3. Web Development

JavaScript for Shiny apps. Learn how to communicate between the R server and the JavaScript front-end to improve the user experience, we display notifications, leverage shiny events, build an image classifier that runs in the browser, and more.

4. Computations

The last practical integration of JavaScript with R: computations. Run computations using Google's V8 engine. Don't reinvent the wheel: learn to leverage external JavaScript libraries to easily bring new functionalities to R.

5. Webpack & NPM

The book introduces more modern JavaScript development technologies, namely webpack and Node's Package Manager which will allow you to build fast, robust, and maintainable JavaScript for your R packages, and shiny applications.

6. Closing

Closing remarks with motivating comments and tips on where to go next.

Learn to use JavaScript with R—the fun way

The author

I have written many R packages that use JavaScript to create visualisations, provide new functionalities to shiny, and run computations, some of which are listed here.

This book contains much of what I have learned building those packages.

—John Coene


echarts4r on CRAN
Versatile visualisations


cicerone on CRAN
Tours of shiny apps


waiter on CRAN
Loading screens


globe4r on CRAN
3D globe visualisations