library(shiny)
shinyUI(pageWithSidebar(
headerPanel("Distribution Calculator"),
sidebarPanel(
#radio button or dropdown?
selectInput(inputId = "dist",
label = "Distribution:",
choices = c("Normal" = "rnorm",
"Binomial" = "rbinom",
"t" = "rt",
"F" = "rf",
"Chi-Squared" = "rchisq"),
selected = "rnorm"),
br(),
uiOutput("mean"),
uiOutput("sd"),
uiOutput("df1"),
uiOutput("df2"),
uiOutput("n"),
uiOutput("p"),
br(),
br(),
helpText("Model:"),
div(textOutput("model"),style="text-indent:20px;font-size:125%;"),
br(),
uiOutput("tail"),
uiOutput("lower_bound"),
uiOutput("upper_bound"),
uiOutput("a"),
uiOutput("b"),
br(),
helpText(a(href="https://duke.qualtrics.com/SE/?SID=SV_3L8WjmwQo32cVk9", target="_blank", "Rate this app!")),
helpText(a(href="https://github.com/ShinyEd/ShinyEd/tree/master/dist_calc", target="_blank", "View code")),
helpText(a(href="http://stat.duke.edu/~mc301/shiny/applets.html", target="_blank", "Check out other apps")),
helpText(a(href="https://www.coursera.org/course/statistics", target="_blank", "Want to learn more for free?"))),
mainPanel(
plotOutput("plot"),
div(textOutput("area"), align = "center", style="font-size:150%;")
)
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.