Error in ShinyApp(ui, server) : could not find function "ShinyApp"

Just ran the example ui and server
from the link Shiny - The basic parts of a Shiny app

(saving ui ain ui.R and server in server.R)
and the app.R file has only

library(shiny)
shinyApp(ui = ui, server = server)

but when executed app.R
I get an error as below:

Similar link:

Also, installR is not working.

> library(shiny)
> shiny::runApp() # which has usual shiny code shinyApp(ui = ui, server = server)]
Error in ShinyApp(ui, server) : could not find function "ShinyApp"
> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Amazon Linux 2

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] shiny_1.4.0.2

loaded via a namespace (and not attached):
 [1] compiler_3.6.0  fastmap_1.0.1   magrittr_1.5    R6_2.4.1        promises_1.1.0  later_1.0.0    
 [7] htmltools_0.4.0 tools_3.6.0     Rcpp_1.0.4      digest_0.6.25   xtable_1.8-4    httpuv_1.5.2   
[13] mime_0.9        rlang_0.4.5

Actually, I used to use RunApp button but
when I select ui.R, server.R and app.R code and ran. it worked.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.