我花了一整天的时间尝试安装 sjPlot,并且一直在搜索论坛 + 其他论坛,但似乎找不到解决问题的方法。本质上,当我尝试安装 sjPlot 包时,我得到以下输出:
> install.packages("sjPlot", dependencies = TRUE)
Installing package into ‘C:/Users/mmarttin/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependencies ‘VGAM’, ‘pbkrtest’ are not available
also installing the dependencies ‘bindrcpp’, ‘glue’, ‘purrr’, ‘bayesplot’, ‘pillar’, ‘dplyr’, ‘ggeffects’, ‘rlang’, ‘sjlabelled’, ‘sjmisc’, ‘sjstats’, ‘tidyselect’, ‘tibble’, ‘tidyr’, ‘AICcmodavg’, ‘car’
> There are binary versions available but the source versions are later:
binary source needs_compilation
bindrcpp 0.1 0.2 TRUE
glue 1.0.0 1.2.0 TRUE
purrr 0.2.2 0.2.4 TRUE
bayesplot 1.2.0 1.4.0 FALSE
dplyr 0.5.0 0.7.4 TRUE
sjmisc 2.4.0 2.6.3 FALSE
sjstats 0.10.0 0.14.0 FALSE
tibble 1.3.0 1.4.2 TRUE
tidyr 0.6.1 0.7.2 TRUE
AICcmodavg 2.1-0 2.1-1 FALSE
car 2.1-4 2.1-6 FALSE
sjPlot 2.3.1 2.4.0 FALSE
> Binaries will be installed
Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘rlang’
‘tidyselect’
These will not be installed
> trying URL '...cran.rstudio.com/bin/windows/contrib/3.2/bindrcpp_0.1.zip'
Content type 'application/zip' length 567177 bytes (553 KB)
downloaded 553 KB
> trying URL '...cran.rstudio.com/bin/windows/contrib/3.2/glue_1.0.0.zip'
Content type 'application/zip' length 34947 bytes (34 KB)
downloaded 34 KB
> trying URL '...cran.rstudio.com/bin/windows/contrib/3.2/purrr_0.2.2.zip'
Content type 'application/zip' length 807672 bytes (788 KB)
downloaded 788 KB
> trying URL '...cran.rstudio.com/bin/windows/contrib/3.2/dplyr_0.5.0.zip'
Content type 'application/zip' length 2520396 bytes (2.4 MB)
downloaded 2.4 MB
> trying URL '...cran.rstudio.com/bin/windows/contrib/3.2/tibble_1.3.0.zip'
Content type 'application/zip' length 566754 bytes (553 KB)
downloaded 553 KB
> trying URL '...cran.rstudio.com/bin/windows/contrib/3.2/tidyr_0.6.1.zip'
Content type 'application/zip' length 802821 bytes (784 KB)
downloaded 784 KB
>package ‘bindrcpp’ successfully unpacked and MD5 sums checked
package ‘glue’ successfully unpacked and MD5 sums checked
package ‘purrr’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘tibble’ successfully unpacked and MD5 sums checked
package ‘tidyr’ successfully unpacked and MD5 sums checked
> The downloaded binary packages are in
C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X\downloaded_packages
> installing the source packages ‘bayesplot’, ‘pillar’, ‘ggeffects’, ‘sjlabelled’, ‘sjmisc’, ‘sjstats’, ‘AICcmodavg’, ‘car’, ‘sjPlot’
> trying URL '...cran.rstudio.com/src/contrib/bayesplot_1.4.0.tar.gz'
> Content type 'application/x-gzip' length 4736155 bytes (4.5 MB)
downloaded 4.5 MB
> trying URL '...cran.rstudio.com/src/contrib/pillar_1.1.0.tar.gz'
> Content type 'application/x-gzip' length 71173 bytes (69 KB)
downloaded 69 KB
> trying URL '...cran.rstudio.com/src/contrib/ggeffects_0.3.1.tar.gz'
> Content type 'application/x-gzip' length 215735 bytes (210 KB)
downloaded 210 KB
> trying URL '...cran.rstudio.com/src/contrib/sjlabelled_1.0.6.tar.gz'
> Content type 'application/x-gzip' length 132974 bytes (129 KB)
downloaded 129 KB
> trying URL '...cran.rstudio.com/src/contrib/sjmisc_2.6.3.tar.gz'
> Content type 'application/x-gzip' length 171577 bytes (167 KB)
downloaded 167 KB
> trying URL '...cran.rstudio.com/src/contrib/sjstats_0.14.0.tar.gz'
> Content type 'application/x-gzip' length 258648 bytes (252 KB)
downloaded 252 KB
> trying URL '...cran.rstudio.com/src/contrib/AICcmodavg_2.1-1.tar.gz'
> Content type 'application/x-gzip' length 250768 bytes (244 KB)
downloaded 244 KB
> trying URL '...cran.rstudio.com/src/contrib/car_2.1-6.tar.gz'
> Content type 'application/x-gzip' length 627349 bytes (612 KB)
downloaded 612 KB
> trying URL '...cran.rstudio.com/src/contrib/sjPlot_2.4.0.tar.gz'
> Content type 'application/x-gzip' length 917066 bytes (895 KB)
downloaded 895 KB
> ERROR: dependency 'rlang' is not available for package 'bayesplot'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/bayesplot'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/bayesplot_1.4.0.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘bayesplot’ had non-zero exit status
> ERROR: dependency 'rlang' is not available for package 'pillar'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/pillar'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/pillar_1.1.0.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘pillar’ had non-zero exit status
> ERROR: dependency 'rlang' is not available for package 'sjlabelled'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/sjlabelled'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/sjlabelled_1.0.6.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘sjlabelled’ had non-zero exit status
> ERROR: dependency 'VGAM' is not available for package 'AICcmodavg'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/AICcmodavg'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/AICcmodavg_2.1-1.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘AICcmodavg’ had non-zero exit status
> ERROR: dependency 'pbkrtest' is not available for package 'car'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/car'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/car_2.1-6.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘car’ had non-zero exit status
> ERROR: dependencies 'rlang', 'sjlabelled', 'tidyselect' are not available for package 'sjmisc'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/sjmisc'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/sjmisc_2.6.3.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘sjmisc’ had non-zero exit status
> ERROR: dependencies 'bayesplot', 'rlang', 'sjlabelled', 'sjmisc', 'tidyselect' are not available for package 'sjstats'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/sjstats'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/sjstats_0.14.0.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘sjstats’ had non-zero exit status
ERROR: dependencies 'rlang', 'sjlabelled', 'sjmisc', 'sjstats', 'tidyselect' are not available for package 'ggeffects'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/ggeffects'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/ggeffects_0.3.1.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘ggeffects’ had non-zero exit status
ERROR: dependencies 'ggeffects', 'rlang', 'sjlabelled', 'sjmisc', 'sjstats', 'tidyselect' are not available for package 'sjPlot'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/sjPlot'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/sjPlot_2.4.0.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘sjPlot’ had non-zero exit status
> The downloaded source packages are in
‘C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X\downloaded_packages’
我已经尝试安装 VGAM 和 pbkrtest,以及 rlang 和 tidyselect,但它只是说以下内容:
> Warning in install.packages :
packages ‘VGAM’, ‘pbkrtest’ are not available (for R version 3.2.1)
> Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘rlang’
These will not be installed
> Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘rlang’
‘tidyselect’
These will not be installed
据我了解,最核心的包似乎是 rlang。所以我在一些线程中读到,也许我可以将 RTools 下载到我的计算机并尝试再次下载 rlang,但我似乎无法在 R 中打开 Rtools(或者它可以工作;我尝试遵循https://上的指南github.com/stan-dev/rstan/wiki/Install-Rtools-for-Windows但我无法让它工作)。
我还尝试下载 .zip 文件并在 R 中打开包;但是,这只会在我再次尝试安装 sjPlot 时导致错误(类似于“过程入口点无法位于动态链接库中......”的内容,参考 rlang 包)。
我敢肯定你会说,我很迷茫,非常感谢解决这个问题的任何帮助!不确定您需要我提供什么样的信息,但我在 Windows 8.1 上运行,他们网站上提供的 RStudio 最新版本(RStudio Desktop 1.1.419)。
我也尝试过重新安装 RStudio,寻找更新等。