r - 为什么我的闪亮应用程序不起作用?' 没有名为 'tidyverse' 的包'
问题描述
所以,我想知道是否有人对此有所了解。
我有一个可以在我的计算机上运行的应用程序,但是当我尝试使用 shinyapps.io 部署它时,我只收到一条错误消息。
这是我收到的错误消息:
Error in value[[3L]](cond) : there is no package called ‘tidyverse’
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Halted execution.
我的会话信息是:
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shinydashboard_0.7.1 sf_0.8-0 plotly_4.9.1 shinythemes_1.1.2
[5] vctrs_0.2.0 ggcorrplot_0.1.3 DT_0.10 forcats_0.4.0
[9] stringr_1.4.0 dplyr_0.8.3 purrr_0.3.3 readr_1.3.1
[13] tidyr_1.0.0 tibble_2.1.3 ggplot2_3.2.1 tidyverse_1.3.0
[17] shiny_1.4.0 rsconnect_0.8.16
loaded via a namespace (and not attached):
[1] Rcpp_1.0.3 lubridate_1.7.4 lattice_0.20-38 class_7.3-15 assertthat_0.2.1
[6] zeallot_0.1.0 digest_0.6.23 packrat_0.5.0 mime_0.7 R6_2.4.1
[11] cellranger_1.1.0 backports_1.1.5 reprex_0.3.0 e1071_1.7-3 httr_1.4.1
[16] pillar_1.4.2 rlang_0.4.2 lazyeval_0.2.2 curl_4.2 readxl_1.3.1
[21] data.table_1.12.8 rstudioapi_0.10 htmlwidgets_1.5.1 munsell_0.5.0 broom_0.5.2
[26] compiler_3.6.1 httpuv_1.5.2 modelr_0.1.5 pkgconfig_2.0.3 askpass_1.1
[31] htmltools_0.4.0 openssl_1.4.1 tidyselect_0.2.5 viridisLite_0.3.0 crayon_1.3.4
[36] dbplyr_1.4.2 withr_2.1.2 later_1.0.0 grid_3.6.1 nlme_3.1-140
[41] jsonlite_1.6 xtable_1.8-4 gtable_0.3.0 lifecycle_0.1.0 DBI_1.0.0
[46] magrittr_1.5 units_0.6-5 scales_1.1.0 KernSmooth_2.23-15 cli_1.1.0
[51] stringi_1.4.3 fs_1.3.1 promises_1.1.0 xml2_1.2.2 generics_0.0.2
[56] tools_3.6.1 glue_1.3.1 hms_0.5.2 fastmap_1.0.1 colorspace_1.4-1
[61] classInt_0.4-2 rvest_0.3.5 haven_2.2.0
解决方案
将您的应用程序部署到 时shinyapps.io
,Shiny 将搜索您的代码并安装您在library()
函数中加载的所有包。
在搜索 Shiny 文档时,您可以在Package Dependencies部分下找到以下引用。
部署应用程序时,
rsconnect
包会尝试检测应用程序使用的包。rsconnect
将此包列表及其依赖项与您的应用程序一起发送到 shinyapps.io 服务。然后 shinyapps.io 为您的应用程序构建并安装包到 R 库中。第一次部署应用程序时,可能需要一些时间来构建这些包(取决于使用了多少包)。但是,您不会等待这些包在未来部署期间构建(除非您升级或降级包)。
因此,请确保您明确说明您需要的软件包,以便在部署期间安装它们。
推荐阅读
- docker - docker在使用-all时没有列出所有容器
- git - 重置远程分支的本地视图
- css - 下拉菜单在引导程序中不起作用
- r - Cast 函数不适用于 sum 函数
- awk - 如何通过命令行实用程序操作文本:grep、cut、awk、sed 或 BBEdit(Grep 查找选项)
- c++ - 函数不接受 1 个参数 - 观察者/模式
- mysql - LARAVEL, ELOQUENT, SQL - groupBy 1
- swift - 子对象更改的领域通知
- amazon-web-services - Spark:将镶木地板写入 S3 时 XmlResponsesSaxParser ListBucketHandler 中的 AWSClientIOException
- python - 如何绕过验证 pip RHEL 7.6?