无法为R

时间:2018-06-22 23:06:38

标签: r packages

我无法为R安装某些软件包。我现在发现jtools,sjplot和sjmisc存在此问题。奇怪的是,并非所有软件包都包含ggplot2以及devtools软件包。

我粘贴了以下输出以尝试安装sjplot。

这可能只是一个巧合,可能是因为我对R不太了解,所以可能会读错一些,但是与那些不工作的人和不工作的人相比,它们的共同之处在于他们似乎是.tar.gz而不是.zip。 我在此日志的中间和在Temp \ Rtmps96tec \ downloaded_pa​​ckages文件夹中都看到了它,最后它会弹出。该文件夹显示以前的软件包下载,而在我遇到麻烦之前,我尝试尝试的所有软件包都是.zip的。 然后,在日志中,它看起来像是寻找.zips及其它的精细文件,然后寻找.tar.gzs,在这些问题不断出现之后, ““ E:\ Program”未被识别为内部或外部命令, 可操作程序或批处理文件。” 信息。在那之后,除了吐出临时文件夹中的文件,它看起来没有其他效果。

我很希望能够通过R运行它,但是如果有一种手动安装的方法,因为我已经下载了.tar.gz,并且可以将文件移过来,但是只移动那些尝试引用库(sjplot)似乎不起作用。我还尝试使用该tarball而不是Repository进行安装,但这也不起作用。

> install.packages("sjPlot")
also installing the dependencies ‘httpuv’, ‘later’, ‘prediction’, ‘shiny’, ‘emmeans’, ‘effects’, ‘ggeffects’, ‘merTools’, ‘modelr’, ‘sjlabelled’, ‘sjmisc’, ‘sjstats’


  There are binary versions available but the source versions are later:
             binary  source needs_compilation
httpuv        1.4.1 1.4.4.1              TRUE
later         0.7.1   0.7.3              TRUE
prediction    0.3.2   0.3.6             FALSE
shiny         1.0.5   1.1.0             FALSE
emmeans       1.1.3   1.2.1             FALSE
effects       4.0-1   4.0-2             FALSE
ggeffects     0.3.2   0.3.4             FALSE
merTools      0.3.0   0.4.1             FALSE
modelr        0.1.1   0.1.2             FALSE
sjlabelled    1.0.8  1.0.11             FALSE
sjmisc        2.7.1   2.7.3             FALSE
sjstats    0.14.2-3  0.15.0             FALSE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/httpuv_1.4.1.zip'
Content type 'application/zip' length 1118480 bytes (1.1 MB)
downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/later_0.7.1.zip'
Content type 'application/zip' length 605749 bytes (591 KB)
downloaded 591 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/sjPlot_2.4.1.zip'
Content type 'application/zip' length 1054285 bytes (1.0 MB)
downloaded 1.0 MB

package ‘httpuv’ successfully unpacked and MD5 sums checked
package ‘later’ successfully unpacked and MD5 sums checked
package ‘sjPlot’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
installing the source packages ‘prediction’, ‘shiny’, ‘emmeans’, ‘effects’, ‘ggeffects’, ‘merTools’, ‘modelr’, ‘sjlabelled’, ‘sjmisc’, ‘sjstats’

trying URL 'https://cran.rstudio.com/src/contrib/prediction_0.3.6.tar.gz'
Content type 'application/x-gzip' length 34409 bytes (33 KB)
downloaded 33 KB

trying URL 'https://cran.rstudio.com/src/contrib/shiny_1.1.0.tar.gz'
Content type 'application/x-gzip' length 2350156 bytes (2.2 MB)
downloaded 2.2 MB

trying URL 'https://cran.rstudio.com/src/contrib/emmeans_1.2.1.tar.gz'
Content type 'application/x-gzip' length 571200 bytes (557 KB)
downloaded 557 KB

trying URL 'https://cran.rstudio.com/src/contrib/effects_4.0-2.tar.gz'
Content type 'application/x-gzip' length 2021373 bytes (1.9 MB)
downloaded 1.9 MB

trying URL 'https://cran.rstudio.com/src/contrib/ggeffects_0.3.4.tar.gz'
Content type 'application/x-gzip' length 239215 bytes (233 KB)
downloaded 233 KB

trying URL 'https://cran.rstudio.com/src/contrib/merTools_0.4.1.tar.gz'
Content type 'application/x-gzip' length 476671 bytes (465 KB)
downloaded 465 KB

trying URL 'https://cran.rstudio.com/src/contrib/modelr_0.1.2.tar.gz'
Content type 'application/x-gzip' length 118432 bytes (115 KB)
downloaded 115 KB

trying URL 'https://cran.rstudio.com/src/contrib/sjlabelled_1.0.11.tar.gz'
Content type 'application/x-gzip' length 131062 bytes (127 KB)
downloaded 127 KB

trying URL 'https://cran.rstudio.com/src/contrib/sjmisc_2.7.3.tar.gz'
Content type 'application/x-gzip' length 187915 bytes (183 KB)
downloaded 183 KB

trying URL 'https://cran.rstudio.com/src/contrib/sjstats_0.15.0.tar.gz'
Content type 'application/x-gzip' length 339472 bytes (331 KB)
downloaded 331 KB

'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
  running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/prediction_0.3.6.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘prediction’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
  running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/shiny_1.1.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘shiny’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
  running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/emmeans_1.2.1.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘emmeans’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
  running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/effects_4.0-2.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘effects’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
  running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/modelr_0.1.2.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘modelr’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
  running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/merTools_0.4.1.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘merTools’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
  running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/sjlabelled_1.0.11.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘sjlabelled’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
  running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/sjmisc_2.7.3.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘sjmisc’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
  running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/sjstats_0.15.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘sjstats’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
  running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/ggeffects_0.3.4.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘ggeffects’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages’

感谢您的帮助!

编辑:我尝试从temp文件中的工具菜单中进行安装,但出现类似错误:

> install.packages("C:/Users/Coldzero/AppData/Local/Temp/Rtmps96tec/downloaded_packages/sjstats_0.15.0.tar.gz", repos = NULL, type = "source")
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
  running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" "C:/Users/Coldzero/AppData/Local/Temp/Rtmps96tec/downloaded_packages/sjstats_0.15.0.tar.gz"' had status 1
Warning in install.packages :
  installation of package ‘C:/Users/Coldzero/AppData/Local/Temp/Rtmps96tec/downloaded_packages/sjstats_0.15.0.tar.gz’ had non-zero exit status

我还尝试使用devtools直接从github安装: install_github(“ strengejacke / sjPlot”)

> install_github("strengejacke/sjPlot")
Downloading GitHub repo strengejacke/sjPlot@master
from URL https://api.github.com/repos/strengejacke/sjPlot/zipball/master
Installing sjPlot
Installing 1 package: arm
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/arm_1.10-1.zip'
Content type 'application/zip' length 219529 bytes (214 KB)
downloaded 214 KB

package ‘arm’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Installing 1 package: effects

  There is a binary version available (and will be installed) but the source version is later:
        binary source
effects  4.0-1  4.0-2

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/effects_4.0-1.zip'
Content type 'application/zip' length 1508494 bytes (1.4 MB)
downloaded 1.4 MB

package ‘effects’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Installing 1 package: ggeffects

  There is a binary version available (and will be installed) but the source version is later:
          binary source
ggeffects  0.3.2  0.3.4

also installing the dependencies ‘emmeans’, ‘modelr’, ‘prediction’, ‘sjlabelled’, ‘sjmisc’, ‘sjstats’

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/emmeans_1.1.3.zip'
Content type 'application/zip' length 1052492 bytes (1.0 MB)
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/modelr_0.1.1.zip'
Content type 'application/zip' length 135311 bytes (132 KB)
downloaded 132 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/prediction_0.3.2.zip'
Content type 'application/zip' length 140872 bytes (137 KB)
downloaded 137 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/sjlabelled_1.0.8.zip'
Content type 'application/zip' length 205033 bytes (200 KB)
downloaded 200 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/sjmisc_2.7.1.zip'
Content type 'application/zip' length 311847 bytes (304 KB)
downloaded 304 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/sjstats_0.14.2-3.zip'
Content type 'application/zip' length 378915 bytes (370 KB)
downloaded 370 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/ggeffects_0.3.2.zip'
Content type 'application/zip' length 264629 bytes (258 KB)
downloaded 258 KB

package ‘emmeans’ successfully unpacked and MD5 sums checked
package ‘modelr’ successfully unpacked and MD5 sums checked
package ‘prediction’ successfully unpacked and MD5 sums checked
package ‘sjlabelled’ successfully unpacked and MD5 sums checked
package ‘sjmisc’ successfully unpacked and MD5 sums checked
package ‘sjstats’ successfully unpacked and MD5 sums checked
package ‘ggeffects’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Installing 1 package: knitr
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/knitr_1.20.zip'
Content type 'application/zip' length 892099 bytes (871 KB)
downloaded 871 KB

package ‘knitr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Installing 1 package: lme4
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/lme4_1.1-17.zip'
Content type 'application/zip' length 5220055 bytes (5.0 MB)
downloaded 5.0 MB

package ‘lme4’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Skipping install of 'modelr' from a cran remote, the SHA1 (0.1.1) has not changed since last install.
  Use `force = TRUE` to force installation
Installing 1 package: psych

  There is a binary version available (and will be installed) but the source version is later:
       binary source
psych 1.8.3.3  1.8.4

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/psych_1.8.3.3.zip'
Content type 'application/zip' length 5388180 bytes (5.1 MB)
downloaded 5.1 MB

package ‘psych’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Installing 1 package: scales
also installing the dependency ‘viridisLite’

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/viridisLite_0.3.0.zip'
Content type 'application/zip' length 56811 bytes (55 KB)
downloaded 55 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/scales_0.5.0.zip'
Content type 'application/zip' length 692819 bytes (676 KB)
downloaded 676 KB

package ‘viridisLite’ successfully unpacked and MD5 sums checked
package ‘scales’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Skipping install of 'sjlabelled' from a cran remote, the SHA1 (1.0.8) has not changed since last install.
  Use `force = TRUE` to force installation
Skipping install of 'sjmisc' from a cran remote, the SHA1 (2.7.1) has not changed since last install.
  Use `force = TRUE` to force installation
Skipping install of 'sjstats' from a cran remote, the SHA1 (0.14.2-3) has not changed since last install.
  Use `force = TRUE` to force installation
"E:/Program Files/R/R-3.3.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "C:/Users/Coldzero/AppData/Local/Temp/Rtmps96tec/devtools42282da83eaa/strengejacke-sjPlot-87179d5" --library="E:/Program Files/R/R-3.3.3/library"  \
  --install-tests 

'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Installation failed: Command failed (1)

Edit2: 我在github.com/r-lib/devtools/issues/1514中查看了该主题。我的E:驱动器已将其禁用,但我启用了它,重新启动了RStudio,但所有三种安装方法仍然存在问题。似乎仍然是.tar.gz,因为当它用于我首先尝试过的zip文件夹中的一个依赖项时,我激动了一会儿。

Edit3:

> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

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     

other attached packages:
[1] devtools_1.13.5

loaded via a namespace (and not attached):
 [1] httr_1.2.1         tidyr_0.8.0        splines_3.3.3      carData_3.0-1      modelr_0.1.1       assertthat_0.2.0   stats4_3.3.3       coin_1.2-2        
 [9] yaml_2.1.14        pillar_1.2.2       lattice_0.20-34    glue_1.2.0         digest_0.6.12      glmmTMB_0.2.0      snakecase_0.9.1    minqa_1.2.4       
[17] colorspace_1.3-2   sandwich_2.3-4     Matrix_1.2-8       survey_3.33-2      plyr_1.8.4         psych_1.8.3.3      pkgconfig_2.0.1    broom_0.4.4       
[25] haven_1.1.1        xtable_1.8-2       purrr_0.2.4        mvtnorm_1.0-7      scales_0.5.0       stringdist_0.9.4.7 lme4_1.1-17        emmeans_1.1.3     
[33] git2r_0.21.0       arm_1.10-1         tibble_1.4.2       effects_4.0-1      bayesplot_1.5.0    ggplot2_2.2.1      sjlabelled_1.0.8   TH.data_1.0-8     
[41] withr_2.1.2        TMB_1.7.13         nnet_7.3-12        lazyeval_0.2.0     cli_1.0.0          mnormt_1.5-5       survival_2.40-1    magrittr_1.5      
[49] crayon_1.3.4       memoise_1.1.0      estimability_1.3   nlme_3.1-131       MASS_7.3-47        forcats_0.3.0      foreign_0.8-67     tools_3.3.3       
[57] data.table_1.10.4  multcomp_1.4-8     stringr_1.2.0      munsell_0.4.3      prediction_0.3.2   bindrcpp_0.2.2     ggeffects_0.3.2    rlang_0.2.0       
[65] grid_3.3.3         nloptr_1.0.4       ggridges_0.5.0     rstudioapi_0.7     gtable_0.2.0       codetools_0.2-15   abind_1.4-5        sjstats_0.14.2-3  
[73] curl_2.4           reshape2_1.4.2     sjmisc_2.7.1       R6_2.2.0           zoo_1.8-0          pwr_1.2-2          knitr_1.20         dplyr_0.7.4       
[81] bindr_0.1.1        modeltools_0.2-21  stringi_1.1.5      parallel_3.3.3     Rcpp_0.12.16       lmtest_0.9-35      tidyselect_0.2.4   coda_0.19-1       

好像是R的旧版本试图尽早查找该版本,但只找到了rstudio版本,然后忘了我在寻找它...

0 个答案:

没有答案