Shiny的新手(这基本上是我正在构建的第一个应用程序),我目前仍然遇到以下问题: 我列出了各个月招聘KPI的详细信息
library(dplyr)
hr <- list(June = tibble(ID = c("1","2","3"),
Job= c("a","b","c"),
Applicants=c("20","30","40"),
`First Interviews`=c("3","2","1"),
`Second Interviews`=c("1","1","1"),
Confirmations=c("0","1","0")),
May = tibble(ID = c("1","3","4"),
Job= c("a","c","d"),
Applicants=c("10","10","40"),
`First Interviews`=c("2","2","2"),
`Second Interviews`=c("2","2","1"),
Confirmations=c("2","1","0")),
April = tibble(ID = c("4","5","6"),
Job= c("d","e","f"),
Applicants=c("10","10","50"),
`First Interviews`=c("4","2","5"),
`Second Interviews`=c("3","1","3"),
Confirmations=c("1","1","3")))
我想构建一个闪亮的应用程序,其中显示每个月的表格。到目前为止,我的版本是这样的:
library(shiny)
library(shinyjs)
ui <- fluidPage(headerPanel("Recruiting KPIs"),selectInput("input_name", "Month:", choices = names(hr)),tableOutput('table'))
server <- function(input, output) {addClass(selector = "body", class ="sidebar-collapse") observeEvent(input$input_name,{output$table <- renderTable({data.frame(hr[[input$input_name]], check.names = FALSE)
})})}
shinyApp(ui, server)
我使用这种简单的布局就可以了,因为该应用程序的目的只是存储数据,但是我想添加两列(“本月的未结头寸数量”和“上个月的未结头寸数量”用户必须手动填写“作业”和“申请人”之间的“。”这些用户输入值必须通过闪亮保存。 另外,我需要该应用程序能够让用户手动添加行作为选项(例如,用于未公布的职位空缺)。 其他已给出的值,用户不得更改。
谢谢。