【发布时间】:2021-08-17 14:01:06
【问题描述】:
我需要帮助,我正在努力学习闪亮,但我遇到了以下问题:我根本没有收到任何堆栈跟踪。即使我正在复制书中的示例:
https://mastering-shiny.org/action-workflow.html#tracebacks-in-shiny
我书中的闪亮代码只是为了测试堆栈跟踪:
library(shiny)
h <- function(x) x * 2
ui <- fluidPage(
selectInput("n", "N", 1:10),
plotOutput("plot")
)
server <- function(input, output, session) {
output$plot <- renderPlot({
n <- h(input$n)
plot(head(cars, n))
}, res = 96)
}
shinyApp(ui, server)
我收到的信息是:
Listening on http://127.0.0.1:7840
Warning: Error in *: non-numeric argument to binary operator
[No stack trace available]
R studio 服务器正在运行:10.4.1.252:8787
我的猜测是与 Shiny 连接的东西正在侦听本地 IP 地址 (127.0.0.1) 并且应用程序正在远程服务器上运行,我需要连接到 VPN 才能连接到该机器(以及 RStudio 服务器)本身)
【问题讨论】: