Embedding networkd3 simpleNetwork in slidify deck - no errors but plot doesn't render

195 views Asked by At

As the title says, I'm trying to incorporate one of Christopher Gandrud's networkD3 graphs into a Slidify deck, which I assumed would be easy enough thanks to Ramnath's incorporation of rCharts. Not so much. Here is my YAML along with the ui and server code for trying to render the chart:

---
title       : A Brief Tutorial on the Phone Record Analyzer
subtitle    : 
author      : me
job         : my job
framework   : io2012
highlighter : highlight.js
hitheme     : github
widgets     : [interactive, shiny]
ext_widgets : {rCharts: [libraries/nvd3]}
mode        : selfcontained
knit        : slidify::knit2slides
---

## What it does: Calculates Call Frequencies
``` {r, opts.label='shiny'}
slidifyUI(
    sidebarPanel(
    ),

    mainPanel(
        simpleNetworkOutput('networkGraph')
    )
)
```

Here is what is in my app1.R file saved in the apps/ directory:

output$networkGraph <- ({
src <- c(rep('Target 1', 20), rep('Target 2', 10), rep('Target 3', 15))
target <- sample(paste('Unknown', 1:50), 45, replace=T)
nd <- data.frame(src, target)
simpleNetwork(nd, fontSize=12)
})

When I render the deck using runDeck(), everything works with the exception of this slide. It just shows up with the title and nothing else. There are no errors or any other indicators that nothing is working. Can anyone help explain why?

0

There are 0 answers