2 min read

Week23 - formattable

Week23 - formattable

htmlwidgets News This Week

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 - formattable

This week’s widget formattable is unique from all of the other widgets so far. One of my favorite R developers @renkun-ken (also created rlist and pipeR) made this really nice package formattable to add styling and Excel-like conditional formatting to tables in Rmarkdown. However, its design limited its use to Rmd contexts. Of course, the magic of htmlwidgets can solve this, so we created a new function as.htmlwidget to convert formattable objects and added some logic to auto-convert. Kun Ren deserves all the credit for the awesomeness of formattable. I simply assisted in the htmlwidget conversion and testing.

Quick Installation

formattable is not yet on CRAN, so for now please install with devtools::install_github.

# should move to master soon
devtools::install_github("renkun-ken/formattable")

Vignette

I tried to discuss in the vignette added to the package. I’ll embed it as an iframe below.

Thanks

Thanks so much

  • @renkun-ken for formattable, rlist, and pipeR
  • authors of markdown
  • Yihui Xie for knitr
  • Ramnath Vaidyanathan and RStudio for htmlwidgets
  • all the contributors to R and JavaScript