我一直试图在rst.r和server.r下面的rstudio上运行它,但是当我运行应用程序时,窗口会自行打开和关闭。
ui.r
library(shiny)
library(ggplot2)
library(dplyr)
shinyUI(fluidPage(
titlePanel(h3("Choose a Project")),
sidebarLayout(
sidebarPanel(
br(),
selectInput("select_p",label=h3("Choose a Project Name"),choices=c(data$project_name)),
br(),
radioButtons("color","Choose a Color" ,choices =c("Green","Yellow","Red"))
),
mainPanel(
plotOutput("table")
)
))
)
server.r
library(shiny)
library(dplyr)
library(ggplot2)
library(ggplot2)
data <- read.csv(file = "data.csv", na.strings =c("", "NA"))
call <- data.frame(data)
shinyServer(function(input, output) {
dataset <- reactive({ data%>%
filter(project_name==input$select_p)%>%
group_by(project_id)%>%
summarise(count=n())
})
output$table <- renderPlot({
plot(data[,input$assesor_id],
main=input$name,
ylab="Number of Discharges",
xlab="Discharge Type")
})
})
我已计算每个项目评估员在每个项目中进行的评估数量并绘制图表
错误 -
警告:pairs.default中的错误:'pairs'
参数中只有一列堆栈跟踪(最里面的第一个):
80: pairs.default
79: pairs
78: plot.data.frame
77: plot
76: renderPlot [F:\R\Navriti\plots/server.R#30]
68: output$table
1: runApp