mbojan / d3net

Shiny application for interactive network data visualization and exploration
7 stars 2 forks source link

Embedding in RMarkdown documents #23

Closed mbojan closed 8 years ago

mbojan commented 8 years ago

See http://rmarkdown.rstudio.com/authoring_embedded_shiny.html Calling d3net in code chunk does not seem to work.

pawluczuk commented 8 years ago

It seems that Rmd file doesn't have an access to R files and libraries. If you add all the libraries in the code chunk and set Output format to Shiny HTML embedding works OK (at least on Mac).

You can also embed plots, for example:

```{r, echo=FALSE}
library(d3net)
library(igraphdata)
data(karate)
d3net(karate)
.``` (dot added so that it doesn't disappear)
screen shot 2015-11-09 at 20 34 48
mbojan commented 8 years ago

Works indeed. I forgot to set runtime: shiny... :P