闪亮错误 - 用户交互/输入无效

时间:2014-09-08 08:03:23

标签: r shiny

每当我尝试运行具有交互性的应用程序(例如课程笔记中的输入闪亮)时,我得到类似于下面的输出。我输入runApp()后立即收听http:// ....打开URL页面后,我立即收到错误消息。我试图卸载并重新安装闪亮和rtools。我在行动中看到的唯一区别是,当我运行应用程序时,在它打开应用程序的chrome浏览器窗口之前,现在它会打开一个立即关闭的R窗口。

> runApp()

Listening on http://127.0.0.1:5066
ERROR: [on_request_read] connection reset by peer

ui.R

library(shiny)
shinyUI(pageWithSidebar(
        headerPanel("Illustrating inputs"),
        sidebarPanel(
                numericInput('id1', 'Numeric input, labeled id1', 0, min = 0, max = 10, step = 1),
                checkboxGroupInput("id2", "Checkbox",
                                   c("Value 1" = "1",
                                     "Value 2" = "2",
                                     "Value 3" = "3")),
                dateInput("date", "Date:")  
        ),
        mainPanel(
                h3('Illustrating outputs'),
                h4('You entered'),
                verbatimTextOutput("oid1"),
                h4('You entered'),
                verbatimTextOutput("oid2"),
                h4('You entered'),
                verbatimTextOutput("odate")
        )
))

server.R

library(shiny)
shinyServer(
        function(input, output) {
                output$oid1 <- renderPrint({input$id1})
                output$oid2 <- renderPrint({input$id2})
                output$odate <- renderPrint({input$date})
        }
)

我正在使用Windows 7和谷歌浏览器作为我的浏览器。

sessionInfo()返回以下内容:

R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shiny_0.10.1

loaded via a namespace (and not attached):
[1] bitops_1.0-6    caTools_1.17    digest_0.6.4    htmltools_0.2.4 httpuv_1.3.0   
[6] Rcpp_0.11.2     RJSONIO_1.3-0   tools_3.1.1     xtable_

Sys.info()输出如下[删除了用户凭据]:

                 sysname                      release                      version 
               "Windows"                      "7 x64" "build 7601, Service Pack 1" 
                machine 
                "x86-64"

1 个答案:

答案 0 :(得分:0)

我有同样的问题。它与我的服务器文件中的函数有关:

  observe(input$file1, {
       updateTabItems(session, "tabs", "upload")
   }
   )

我删除了它,一切都恢复正常