Making htmlwidgets in Rmarkdown mobile friendly

Viewed 1519

The default options of rmarkdown is to set the fig.width = 12. I would like it to auto-adujust for the width of a mobile device if this is possible.

I'm hosting the following Rmarkdown at http://akdata.org/misc/leafletmobile

---
title: "Untitled"
output: html_document

---


```{r}      
  library(leaflet)
  leaflet() %>% addTiles()
``

It will adjust to the width of the screen when I play with different mobile devices in chrome devtools though. I have a physical Samsung Galaxy 5 that I'm testing with.

2 Answers
Related