1
我正在處理我的第一個Shiny應用程序,並且無法爲我的情節制作一個輸入參數,而無法響應用戶輸入到textInput框中。讓R有光澤renderPlot與文本輸入無關
這是一個瘦身的代碼示例,這應該看起來很熟悉那些以前曾經與之合作過的人。
#ui.R
library(shiny)
shinyUI(fluidPage(
titlePanel("Shiny App"),
sidebarLayout(
sidebarPanel(h2("Menu"),
mainPanel(h1("Main"),
tabPanel("Differential Expression",
column(6,
p("Input your gene of interest below"),
textInput(uiOutput("GeneVariable"), label = h4("Gene of interest"),
value = "Gjb2"),
submitButton("Submit")),
plotOutput("plot2"),
)
)
))
。
#server.R
shinyServer(function(input, output) {
output$plot2 <- renderPlot({
scde.test.gene.expression.difference("GeneVariable",
models=o.ifm, counts=cd, prior=o.prior)
})
GeneVariable <- reactive({ ###I don't know what to put here#####
})
})
我需要用戶能夠輸入基因名稱到與textInput箱中的「GeneVariable」位置,並且具有由所述scde.test.gene.expression.difference函數處理名稱。
感謝您的幫助和耐心,我對此很感興趣。
是否有一些代碼缺失? – BigDataScientist
是的,我試圖只複製代碼的相關部分。 – Paul