r - 为什么我不能下载 tidycensus?
问题描述
当我尝试下载软件包时tidycensus
,出现以下错误:
> install.packages("tidycensus")
Installing package into ‘C:/Users/krosi/OneDrive/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘ellipsis’, ‘lifecycle’, ‘tidyselect’, ‘vctrs’, ‘pillar’, ‘dplyr’, ‘rlang’
There are binary versions available but the source versions are later:
binary source needs_compilation
ellipsis 0.3.0 0.3.2 TRUE
lifecycle 0.2.0 1.0.0 FALSE
tidyselect 1.0.0 1.1.1 TRUE
vctrs 0.2.4 0.3.8 TRUE
pillar 1.4.3 1.6.1 FALSE
dplyr 0.8.5 1.0.6 TRUE
rlang 0.4.5 0.4.11 TRUE
tidycensus 0.9.9.2 1.0 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/ellipsis_0.3.0.zip'
Content type 'application/zip' length 44220 bytes (43 KB)
downloaded 43 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tidyselect_1.0.0.zip'
Content type 'application/zip' length 242507 bytes (236 KB)
downloaded 236 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/vctrs_0.2.4.zip'
Content type 'application/zip' length 1018801 bytes (994 KB)
downloaded 994 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/dplyr_0.8.5.zip'
Content type 'application/zip' length 3256479 bytes (3.1 MB)
downloaded 3.1 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rlang_0.4.5.zip'
Content type 'application/zip' length 1115838 bytes (1.1 MB)
downloaded 1.1 MB
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘tidyselect’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\krosi\AppData\Local\Temp\RtmpI1FQMN\downloaded_packages
installing the source packages ‘lifecycle’, ‘pillar’, ‘tidycensus’
trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.0.tar.gz'
Content type 'application/x-gzip' length 83389 bytes (81 KB)
downloaded 81 KB
trying URL 'https://cran.rstudio.com/src/contrib/pillar_1.6.1.tar.gz'
Content type 'application/x-gzip' length 1111747 bytes (1.1 MB)
downloaded 1.1 MB
trying URL 'https://cran.rstudio.com/src/contrib/tidycensus_1.0.tar.gz'
Content type 'application/x-gzip' length 2115609 bytes (2.0 MB)
downloaded 2.0 MB
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.10 is required
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/krosi/OneDrive/Documents/R/win-library/3.5/lifecycle'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package 'tidycensus' ...
** package 'tidycensus' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'dplyr' 0.8.5 is being loaded, but >= 1.0.0 is required
ERROR: lazy loading failed for package 'tidycensus'
* removing 'C:/Users/krosi/OneDrive/Documents/R/win-library/3.5/tidycensus'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘tidycensus’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'pillar'
* removing 'C:/Users/krosi/OneDrive/Documents/R/win-library/3.5/pillar'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘pillar’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\krosi\AppData\Local\Temp\RtmpI1FQMN\downloaded_packages’
这是我的sessioninfo
:
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 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
loaded via a namespace (and not attached):
[1] compiler_3.5.1 assertthat_0.2.1 Matrix_1.2-14 cli_2.0.2 tools_3.5.1 glue_1.4.0 rstudioapi_0.11 yaml_2.2.0 crayon_1.3.4
[10] fansi_0.4.0 grid_3.5.1 lattice_0.20-35
有任何想法吗?
解决方案
重新启动 R 并在干净的会话中重新安装包:您当前已加载包,因此无法在较新版本中重新加载。
推荐阅读
- java - 使用杰克逊将计算的虚拟属性添加到每个字段
- python - 在 Tkinter 上更改 Entry 变量
- c# - 如何更改自定义控件 IsMouseOver 的属性值
- javascript - 如何创建一个函数来拆分以下字符串?
- angular - srcset 中的图像访问错误
- sql - tsql 全选或使用 where 条件
- javascript - 如何使用 JavaScript 中的按钮重新加载网页
- flutter - 如何在 Flutter 中滚动带有粘性标题的堆叠容器?
- javascript - 编辑图像的 Src
- terraform - Terraspace:使用 -target 选项调用 terraform