Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- structure(list(condition = c("id_0.2cov_0.0evalue_0.001", "id_0.3cov_0.0evalue_0.001",
- "id_0.4cov_0.0evalue_0.001", "id_0.5cov_0.0evalue_0.001", "id_0.6cov_0.0evalue_0.001",
- "id_0.7cov_0.0evalue_0.001", "id_0.8cov_0.0evalue_0.001", "id_0.9cov_0.0evalue_0.001",
- "id_1.0cov_0.0evalue_0.001"), min = c(1, 1, 1, 1, 1, 1, 1, 1,
- 1), max = c(14342, 11393, 2084, 605, 599, 332, 312, 87, 27),
- mean = c(140.048780487805, 54.4480442512841, 13.275661095323,
- 3.88437742230991, 3.06546546546547, 2.34792609062332, 1.80316779085515,
- 1.38615434908341, 1.0040692315819), sd = c(678.649173146197,
- 264.996993952984, 48.1297686832552, 10.8809910787991, 7.88905730023133,
- 5.24114778761008, 3.328441395118, 1.64173750197931, 0.0878496418628203
- ), sum = c(275616L, 275616L, 275616L, 275616L, 275616L, 275616L,
- 275616L, 275616L, 275616L), n = c(1968L, 5062L, 20761L, 70955L,
- 89910L, 117387L, 152851L, 198835L, 274499L), rep = c(0.00714036920933473,
- 0.0183661325902705, 0.0753258156275398, 0.257441512829444,
- 0.32621473354232, 0.425907784743992, 0.554579559967491, 0.721420381980727,
- 0.995947259955881), dif = c(273648L, 270554L, 254855L, 204661L,
- 185706L, 158229L, 122765L, 76781L, 1117L), identity = c(0.2,
- 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1)), class = c("tbl_df",
- "tbl", "data.frame"), row.names = c(NA, -9L))
- library(shiny)
- library(ggplot2)
- ui <- shinyUI(
- fluidPage(
- titlePanel("Cluster summary"),
- sidebarLayout(
- sidebarPanel(
- selectInput(
- "selectedX",
- "Select colum for X axis",
- choices = colnames(clu.summary[-1]),
- selected = colnames(clu.summary[-1])[2]
- ),
- selectInput(
- "selectedY",
- "Select colum for Y axis",
- choices = colnames(clu.summary[-1]),
- selected = colnames(clu.summary[-1])[3]
- ),
- selectInput(
- "selectedG",
- "Select colum for Group",
- choices = colnames(clu.summary[,c(1,10)]),
- selected = colnames(clu.summary[,c(1,10)])[2]
- )
- ),
- mainPanel(plotOutput("distPlot")) )))
- server <- shinyServer(function(input, output) {
- output$distPlot <- renderPlot({
- x_axis <- input$selectedX
- y_axis <- input$selectedY
- gcolor <- input$selectedG
- gg <- ggplot(clu.summary, aes(x=x_axis,y=y_axis)) +
- geom_point(aes(color=gcolor)) +
- geom_smooth(method = "lm")
- gg
- })
- })
- shinyApp(ui, server)
- > colnames(clu.summary[-1])[2]
- [1] "max"
- > colnames(clu.summary[-1])[3]
- [1] "mean"
- > colnames(clu.summary[,c(1,10)])[2]
- [1] "identity"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement