inst/examples/loess-shiny/loess-shiny/ui.R

library(shiny)

# Just create an empty div for our content, we won't actually be drawing
# anything, just modifying an existing plot.
# As a result we're actually more interested in the "svggrid" output.
reactiveFiller <- function (outputId) {
    HTML(paste('<div id="', outputId, '"></div>', sep = ""))
}

shinyUI(pageWithSidebar(
    headerPanel("LOESS Smoother Example"),

    sidebarPanel(
        # Span parameter for loess
        sliderInput("spanalpha", "Span:", 
                    min = 0.05, max = 1, value = 0.75, step = 0.05)
    ),

    mainPanel(
        htmlOutput("svggrid"),
        # See reactiveFiller() above
        reactiveFiller("smoothempty"),
        includeHTML("smoother.html")
    )
))
sjp/sjpMScThesis documentation built on May 30, 2019, 12:06 a.m.