【发布时间】:2017-05-30 07:24:27
【问题描述】:
我想将闪亮的 2 个输出的结果用于另一个输出进行绘图: 第一个输出是下面的soq1:
output$soq <- renderTable({
if (input$selectedLevels == "Technical Junior")
{soq1<-sum(simplegap1[,input$Candidate]>0)}
else if (input$selectedLevels == "Entry Level")
{soq1<-sum(simplegap2[,input$Candidate]>0)}
else if (input$selectedLevels == "Product Owner")
{soq1<-sum(simplegap3[,input$Candidate]>0)}
else if (input$selectedLevels == "Technical Leader")
{soq1<-sum(simplegap4[,input$Candidate]>0)}
else if (input$selectedLevels == "Senior Manager")
{soq1<-sum(simplegap5[,input$Candidate]>0)}
}, include.rownames = TRUE , bordered = TRUE ,hover = TRUE, align = "c" )
我稍后要使用的第二个输出是:
output$suq <- renderTable({
if (input$selectedLevels == "Technical Junior")
{suq1<-sum(simplegap1[,input$Candidate]<0)}
else if (input$selectedLevels == "Entry Level")
{suq1<-sum(simplegap2[,input$Candidate]<0)}
else if (input$selectedLevels == "Product Owner")
{suq1<-sum(simplegap3[,input$Candidate]<0)}
else if (input$selectedLevels == "Technical Leader")
{suq1<-sum(simplegap4[,input$Candidate]<0)}
else if (input$selectedLevels == "Senior Manager")
{suq1<-sum(simplegap5[,input$Candidate]<0)}
}, include.rownames = TRUE , bordered = TRUE ,hover = TRUE, align = "c" )
稍后我想将结果 soq1 和 suq1 用于另一个输出进行计算:
output$qsplot <- renderPlot({
if (input$selectedLevels == "Technical Junior")
{ plot(x,-x,type = "p",main = "Qualification Space",xlim = c(0,1),ylim = c(-1,0), xlab = "SOQ",ylab = "SUQ")
points(soq1,suq1,type="o",pch=20) }
})
【问题讨论】: