2 min read

Week16 - Games in R

Week16 - Games in R

htmlwidgets News This Week

Be sure to check out rcstatebin from Ramnath Vaidyanathan, author of htmlwidgets. For rcstatebin, Ramnath created both the underlying d3js library and R wrapper, so they integrate beautifully. In creating the d3js side, he is able to contribute back to the JavaScript community from which we source so much. Avid readers already know, but for all the newest and updated htmlwidgets, just do this Github search, and you’ll quickly get up to date.

This Week’s Widget - gamer

If you are like me, the last thing you need is another excuse to procrastinate/“research” while you are in R. I thought making gamer–this week’s htmlwidget–would help expand our minds to think beyond charts and tables when we think htmlwidgets. Wouldn’t you know it the prolific Yihui Xie from RStudio has already made the fun package if you want more games for R.

Earlier this month, I spotted this post about EntangledClone, which is written in TypeScript with help from d3.js. It is nice in that it is fun, it is small, and it is responsive, and it is easily embeddable, so go ahead and put it in your next rmarkdown research paper. Most of the work(not hard at all) wrapping EntangledClone was locally building the project. Then, I just separated the instantiation piece and pasted it into entangler.js.

Quick Installation

gamer is very unlikely to go to CRAN, so for now please install with devtools::install_github.

devtools::install_github("timelyportfolio/gamer")

Example

I think one example is plenty. Press tab for a new game.

library(gamer)

entangler( )

Thanks

Thanks so much