R版本4中的调试问题
我最近刚刚升级到R版本4.0.3,使用这个版本,我无法再调试我的闪亮应用程序,无论是使用browser()还是设置断点。在脚本中包含这两个选项都会导致Rstudio在我单击“运行应用程序”时崩溃。如果我切换回R的早期版本,一切都会顺利运行,但由于我使用的其他一些软件包,我希望使用R版本4 有没有办法让browser()在R版本4中工作? 我在下面提供了一个来自Shinny的示例应用程序,以说明browser()的问题。当在R版本4中注释掉这一点时,应用程序工作正常。 我在这里发现了一篇使用旧版本R的类似文章 这表明需要更新这些包。当我在下面的脚本中包含update.packages行时,Rstudio在运行应用程序时仍然崩溃R版本4中的调试问题,r,debugging,shiny,R,Debugging,Shiny,我最近刚刚升级到R版本4.0.3,使用这个版本,我无法再调试我的闪亮应用程序,无论是使用browser()还是设置断点。在脚本中包含这两个选项都会导致Rstudio在我单击“运行应用程序”时崩溃。如果我切换回R的早期版本,一切都会顺利运行,但由于我使用的其他一些软件包,我希望使用R版本4 有没有办法让browser()在R版本4中工作? 我在下面提供了一个来自Shinny的示例应用程序,以说明browser()的问题。当在R版本4中注释掉这一点时,应用程序工作正常。 我在这里发现了一篇使用旧版本
library(shiny)
#update.packages(ask = FALSE, checkBuilt = TRUE)
ui <- fluidPage(
titlePanel("Hello Shiny!"),
sidebarLayout(
sidebarPanel(
sliderInput(inputId = "bins",
label = "Number of bins:",
min = 1,
max = 50,
value = 30)
),
mainPanel(
plotOutput(outputId = "distPlot")
)
)
)
server <- function(input, output) {
output$distPlot <- renderPlot({
browser()
x <- faithful$waiting
bins <- seq(min(x), max(x), length.out = input$bins + 1)
hist(x, breaks = bins, col = "#75AADB", border = "white",
xlab = "Waiting time to next eruption (in mins)",
main = "Histogram of waiting times")
})
}
shinyApp(ui=ui, server=server)
库(闪亮)
#update.packages(ask=FALSE,checkbuild=TRUE)
ui就像一个数据点:对我来说,调试工作与R4.0.2
、Shining 1.5.0
和RStudio 1.3.1056
就像一个数据点:对我来说,调试工作与R4.0.2
、Shining 1.5.0
和RStudio 1.3.1056