Skip to content

Instantly share code, notes, and snippets.

@sgibb
Last active December 18, 2015 04:28
Show Gist options
  • Save sgibb/5725234 to your computer and use it in GitHub Desktop.
Save sgibb/5725234 to your computer and use it in GitHub Desktop.
give shiny a try; to run this example: `install.packages("shiny"); library("shiny"); runGist("5725234")`
library("shiny")
library("MALDIquant")
data("fiedler2009subset")
shinyServer(function(input, output) {
output$plotBaseline <- renderPlot({
plot(fiedler2009subset[[1]])
lines(estimateBaseline(fiedler2009subset[[1]],
method=input$bem, input$hws), col=2, lwd=2)
})
})
library("shiny")
shinyUI(pageWithSidebar(
headerPanel("MALDIquant - Baseline Estimation"),
sidebarPanel(
radioButtons("bem", 'Baseline Estimation Method:',
c(SNIP="SNIP",
TopHat="TopHat",
ConvexHull="ConvexHull",
Median="median"),
"SNIP"),
sliderInput("hws",
"halfWindowSize:",
min = 1,
max = 1000,
value = 100)
),
mainPanel(
plotOutput("plotBaseline")
)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment