How to run JS code in R?

How to use the following code written in JS to produce same chart in R with a dataframe object in R?

Have you seen the highcharter package, and this tutorial?