Created
October 12, 2015 06:23
-
-
Save yutannihilation/7d05bf4c34970258e693 to your computer and use it in GitHub Desktop.
add as.iframe option in htmlwidgets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "leaflet test" | |
author: "Hiroaki Yutani" | |
date: "`r Sys.Date()`" | |
output: | |
html_document: | |
as.iframe: true | |
--- | |
source code of this Rmd is here: https://gist.github.com/yutannihilation/7d05bf4c34970258e693 | |
## Install | |
```{r} | |
devtools::install_github("yutannihilation/htmlwidgets", ref="knit_print-with-iframe") | |
``` | |
## No options | |
```{r echo=FALSE} | |
library(leaflet) | |
leaflet() %>% addTiles() | |
``` | |
## ``widget.height = 300, widget.width = "50%"` | |
```{r echo=FALSE, widget.height = 300, widget.width = "50%"} | |
library(leaflet) | |
leaflet() %>% addTiles() | |
``` | |
## ``widget.styles=list(`border`='10px solid red')`` | |
```{r echo=FALSE, widget.styles=list(`border`='10px solid red')} | |
library(leaflet) | |
leaflet() %>% addTiles() | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment