ShinyApp(ui,server)中的错误:找不到函数“ ShinyApp” [关闭]

问题描述 投票:-1回答:1
只需运行示例ui和服务器从链接https://shiny.rstudio.com/articles/basics.html

(将ui ain ui.R和服务器保存在server.R中)并且app.R文件仅具有

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

但是执行app.R时我收到如下错误:

类似链接:shinyApp command in shiny package?Error in ShinyApp: Could not find function

而且,installR无法正常工作。

> 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

r shiny
1个回答
0
投票
实际上,我曾经使用RunApp按钮,但是当我选择ui.R,server.R和app.R代码并运行时。有效。
© www.soinside.com 2019 - 2024. All rights reserved.