class: center, middle, inverse, title-slide #
widgetframe
in Xaringan ### Bhaskar Karambelkar ### 2017/01/13 --- # `widgfetframe` in Xaringan This is just a small demo of using `widgetframe` package to wrap `htmlwidgets` inside a `xaringan` presentation in responsive iframes. --- # Leaflet ```r library(leaflet) suppressPackageStartupMessages(library(widgetframe)) l <- leaflet() %>% addTiles() %>% setView(0,0,2) frameWidget(l, height = '300') ```
--- # Dygraph ```r library(dygraphs) ts <- dygraph(nhtemp, main = "New Haven Temperatures") frameWidget(ts, height = 300, width = '95%') ```
--- # DT ```r library(DT) dt <- datatable( head(iris, 20), options = list( columnDefs = list(list(className = 'dt-center', targets = 5)), pageLength = 5, lengthMenu = c(5, 10, 15, 20)), fillContainer = T) frameWidget(dt, height = 350, width = '95%') ```