部署时 R 无法找到包 RODBC 的存储库
R unable to find repository for package RODBC when deploying
当我部署到 shinyapps.io 时,出现错误:
Unable to find repository URL for package RODBC
因此,当我通过 URL 打开图表时,它没有显示任何内容,因为它无法连接到我拥有的连接并将数据加载到我创建的数据框中。
部署信息:
包安装正常,连我的数据库都通过它搜索了。
我将问题发布到 R (R Community Question) 社区后,我最终按照@nirgrahamuk 指导的步骤进行操作,错误不再出现!
所以我不得不将 R 版本更新到最新版本,它成功了!
在 R 中执行命令后,他问:
> getOption("repos")
CRAN
"https://cran.rstudio.com/"
attr(,"RStudio")
[1] TRUE
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.1 rsconnect_0.8.16 tools_3.6.1 curl_4.3 jsonlite_1.6.1
[6] digest_0.6.25 openssl_1.4.1 askpass_1.1
更新R版本后:
> getOption("repos")
CRAN
"https://cran.rstudio.com/"
attr(,"RStudio")
[1] TRUE
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] reshape2_1.4.4 lubridate_1.7.9 dplyr_1.0.0 DBI_1.1.0 RODBC_1.3-17 timevis_0.5
[7] shiny_1.5.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.4.6 compiler_4.0.2 pillar_1.4.4 later_1.1.0.1 plyr_1.8.6
[6] tools_4.0.2 digest_0.6.25 evaluate_0.14 jsonlite_1.6.1 lifecycle_0.2.0
[11] tibble_3.0.1 pkgconfig_2.0.3 rlang_0.4.6 cli_2.0.2 rstudioapi_0.11
[16] yaml_2.2.1 curl_4.3 xfun_0.15 fastmap_1.0.1 withr_2.2.0
[21] knitr_1.29 stringr_1.4.0 htmlwidgets_1.5.1 generics_0.0.2 vctrs_0.3.1
[26] askpass_1.1 tidyselect_1.1.0 glue_1.4.1 R6_2.4.1 fansi_0.4.1
[31] rmarkdown_2.3 purrr_0.3.4 magrittr_1.5 promises_1.1.1 htmltools_0.5.0
[36] ellipsis_0.3.1 assertthat_0.2.1 rsconnect_0.8.16 mime_0.9 xtable_1.8-4
[41] httpuv_1.5.4 stringi_1.4.6 openssl_1.4.1 crayon_1.3.4
所以版本已经从R version 3.6.1 (2019-7-05)
更新到R version 4.0.2 (2020-06-22)
。
并且错误不再出现:
当我部署到 shinyapps.io 时,出现错误:
Unable to find repository URL for package RODBC
因此,当我通过 URL 打开图表时,它没有显示任何内容,因为它无法连接到我拥有的连接并将数据加载到我创建的数据框中。
部署信息:
包安装正常,连我的数据库都通过它搜索了。
我将问题发布到 R (R Community Question) 社区后,我最终按照@nirgrahamuk 指导的步骤进行操作,错误不再出现!
所以我不得不将 R 版本更新到最新版本,它成功了!
在 R 中执行命令后,他问:
> getOption("repos")
CRAN
"https://cran.rstudio.com/"
attr(,"RStudio")
[1] TRUE
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.1 rsconnect_0.8.16 tools_3.6.1 curl_4.3 jsonlite_1.6.1
[6] digest_0.6.25 openssl_1.4.1 askpass_1.1
更新R版本后:
> getOption("repos")
CRAN
"https://cran.rstudio.com/"
attr(,"RStudio")
[1] TRUE
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] reshape2_1.4.4 lubridate_1.7.9 dplyr_1.0.0 DBI_1.1.0 RODBC_1.3-17 timevis_0.5
[7] shiny_1.5.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.4.6 compiler_4.0.2 pillar_1.4.4 later_1.1.0.1 plyr_1.8.6
[6] tools_4.0.2 digest_0.6.25 evaluate_0.14 jsonlite_1.6.1 lifecycle_0.2.0
[11] tibble_3.0.1 pkgconfig_2.0.3 rlang_0.4.6 cli_2.0.2 rstudioapi_0.11
[16] yaml_2.2.1 curl_4.3 xfun_0.15 fastmap_1.0.1 withr_2.2.0
[21] knitr_1.29 stringr_1.4.0 htmlwidgets_1.5.1 generics_0.0.2 vctrs_0.3.1
[26] askpass_1.1 tidyselect_1.1.0 glue_1.4.1 R6_2.4.1 fansi_0.4.1
[31] rmarkdown_2.3 purrr_0.3.4 magrittr_1.5 promises_1.1.1 htmltools_0.5.0
[36] ellipsis_0.3.1 assertthat_0.2.1 rsconnect_0.8.16 mime_0.9 xtable_1.8-4
[41] httpuv_1.5.4 stringi_1.4.6 openssl_1.4.1 crayon_1.3.4
所以版本已经从R version 3.6.1 (2019-7-05)
更新到R version 4.0.2 (2020-06-22)
。
并且错误不再出现: