我试图在一个组合框上显示一个过滤值的简单表。
library(shiny)
library(readxl)
library(plyr)
library(magrittr)
library(ggplot2)
REGISTROS <- read_xlsx("~/folder/my-file.xlsx", col_names=TRUE)
ui <- fluidPage(
titlePanel("Ociosidade de loja"),
sidebarLayout(
sidebarPanel(
selectInput("lojaInput",
label = "Loja",
choices = unique(REGISTROS$loja),
selected = 1)
),
mainPanel(
tableOutput("RESULTADO_LISTA")
)
)
)
server <- function(input, output){
output$RESULTADO_LISTA <- renderTable({
filtered <-
REGISTROS %>%
filter(
loja == input$lojaInput <=== ERROR LINE = object 'loja' not found
)
filtered
})
}
shinyApp(ui = ui, server = server)
它工作了几次,但现在它说错误
object 'loja' not found
.
selectInput使用相同的数据并正确填充。另外,我可以在环境变量上看到这些值。。。
weekday time_entry mins loja group
seg 12 587 Thoughtsphere Maroon Morumb
思想?