我想知道是否有人可以帮助我解决以下问题
ui = fluidPage(
mainPanel(
.......
fluidRow(
textInput("res",h4("size"))
)
)
)
server = function(input,output){
index1 = reactive({...})
index2 = reactive({...})
index3 = reactive({...})
index4 = reactive({...})
observe({
x = renderText(
if(input$selc2=="EMT"){
as.character(EMT[index1(),2])
}else if(input$selc2=="SUS-304"){
as.character(SUS[index2(),2])
}else if(input$selc2=="RSG"){
as.character(RSG[index3(),2])
}else{
as.character(PVC_p[index4(),2])
}
)
})
updateTextInput("res",
value = paste(x))
}
我正在尝试更新textInput值,但它始终显示
error in as.vector: cannot coerce type 'closure' to vector of type 'chracter'
EMT,SUS,RSG,PVC_p是.csv文件