Skip to content

Instantly share code, notes, and snippets.

@jfreels
Created October 9, 2013 19:28
Show Gist options
  • Save jfreels/6906848 to your computer and use it in GitHub Desktop.
Save jfreels/6906848 to your computer and use it in GitHub Desktop.
R + Shiny + d3js: Blank template.

R + Shiny + d3js: Blank template.

script.js belongs in 'www' directory.

<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script>
d3.select('.span8').append('p').text('Hello World!')
</script>
shinyServer(function(input,output) {
})
library(shiny)
shinyUI(pageWithSidebar(
headerPanel("Application Title"),
sidebarPanel(),
mainPanel(
includeHTML('www/script.js')
)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment