Hi,
if I run the simple shinydashboard app below from https://rstudio.github.io/shinydashboard/get_started.html I get the error:
> shiny::runApp()
Loading required package: shiny
Fehler in ..stacktraceon..({ : the file './R/00.R' does not exist!
> traceback()
11: stop("the file './R/00.R' does not exist!")
10: ..stacktraceon..({
stop("the file './R/00.R' does not exist!")
})
9: eval(exprs, envir)
8: eval(exprs, envir)
7: FUN(X[[i]], ...)
6: lapply(helpers, sourceUTF8, envir = renv)
5: force(code)
4: withr::with_dir(appDir, {
lapply(helpers, sourceUTF8, envir = renv)
})
3: loadSupport(appDir, renv = sharedEnv, globalrenv = NULL)
2: appParts$onStart()
1: shiny::runApp()
When I run in RStudio IDE from the editor I with the "Run App" button I get the error. If copy the code in the Console window then the app runs without problems.
My local machine has R 4.0.2, shiny 1.5.0, Ubuntu 18.04.5LTS, RStudio 1.3.1073
Any ideas? Sigbert
## app.R ##
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Basic dashboard"),
dashboardSidebar(),
dashboardBody(
# Boxes need to be put in a row (or column)
fluidRow(
box(plotOutput("plot1", height = 250)),
box(
title = "Controls",
sliderInput("slider", "Number of observations:", 1, 100, 50)
)
)
)
)
server <- function(input, output) {
set.seed(122)
histdata <- rnorm(500)
output$plot1 <- renderPlot({
data <- histdata[seq_len(input$slider)]
hist(data)
})
}
shinyApp(ui, server)