library(shiny)
# Define server logic required to draw a histogram
shinyServer(function(input, output) {
# Expression that generates a histogram. The expression is
# wrapped in a call to renderPlot to indicate that:
#
# 1) It is "reactive" and therefore should be automatically
# re-executed when inputs change
# 2) Its output type is a plot
make_ggplot = reactive({
sp <- ggplot(mtcars, aes(x=wt, y=mpg)) +
geom_point()
gg <- sp +
facet_wrap(~ vs) +
ggtitle("This is the title!")
return(gg)
})
output$polychart1 <- renderPolychart({
gg = make_ggplot()
polychart(gg_obj = gg,
data_cols = input$hovervars)
})
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.