[R] install problem from Github or downloaded file

Jianling Fan fanjianling at gmail.com
Wed Mar 1 23:44:40 CET 2017


Hello everyone,

I can install packages from CRAN, but I got some problem for
installing packages from Github or downloaded package files. I got
this problem in recent weeks.

example:

> devtools::install_github('bart6114/artyfarty')
Downloading GitHub repo bart6114/artyfarty at master
from URL https://api.github.com/repos/bart6114/artyfarty/zipball/master
Error in utils::unzip(src, exdir = target) :
  cannot open file
'C:/Users/FanJ/AppData/Local/Temp/Rtmp6PonUm/devtools23184c742bf4/Bart6114-artyfarty-abf831d/R/helpers.R':
No such file or directory

so, I downloaded the package and try to install it from local folder:

> install.packages("C:/Users/FanJ/Downloads/artyfarty-master.zip", repos = NULL, type = "win.binary")
Error in install.packages : cannot open file
'C:/Users/FanJ/Documents/R/R-3.3.2/library/file2318185d1b3c/artyfarty-master/R/helpers.R':
No such file or directory

It seems R try to create an extra folder "file2318185d1b3c".

I googled this problem. some people said it is caused by TMP dir. But
that seems not my case:

> Sys.getenv(c("TMP","TEMP","TMPDIR"))
                                    TMP                                    TEMP
"C:\\Users\\FanJ\\AppData\\Local\\Temp" "C:\\Users\\FanJ\\AppData\\Local\\Temp"
                                 TMPDIR
"C:\\Users\\FanJ\\AppData\\Local\\Temp"

> .Options$unzip
[1] "internal"


> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252
LC_MONETARY=English_Canada.1252
[4] LC_NUMERIC=C                    LC_TIME=English_Canada.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
 [1] agricolae_1.2-4         Evapotranspiration_1.10 zoo_1.7-14
      dplyr_0.5.0
 [5] purrr_0.2.2             readr_1.0.0             tidyr_0.6.1
      tibble_1.2
 [9] ggplot2_2.2.1           tidyverse_1.1.1

loaded via a namespace (and not attached):
 [1] gtools_3.5.0      reshape2_1.4.2    splines_3.3.2     haven_1.0.0
      lattice_0.20-34   colorspace_1.3-2
 [7] expm_0.999-1      AlgDesign_1.1-7.3 withr_1.0.2
foreign_0.8-67    DBI_0.5-1         sp_1.2-4
[13] modelr_0.1.0      readxl_0.1.1      plyr_1.8.4
stringr_1.2.0     munsell_0.4.3     combinat_0.0-8
[19] gtable_0.2.0      rvest_0.3.2       devtools_1.12.0
memoise_1.0.0     coda_0.19-1       psych_1.6.12
[25] forcats_0.2.0     curl_2.3          parallel_3.3.2
spdep_0.6-11      broom_0.4.2       Rcpp_0.12.9
[31] scales_0.4.1      gdata_2.17.0      jsonlite_1.2
deldir_0.1-12     mnormt_1.5-5      digest_0.6.12
[37] klaR_0.6-12       hms_0.3           stringi_1.1.2
gmodels_2.16.2    grid_3.3.2        tools_3.3.2
[43] LearnBayes_2.15   magrittr_1.5      lazyeval_0.2.0
cluster_2.0.5     MASS_7.3-45       Matrix_1.2-8
[49] xml2_1.1.1        lubridate_1.6.0   assertthat_0.1    httr_1.2.1
      R6_2.2.0          boot_1.3-18
[55] git2r_0.18.0      nlme_3.1-131


Any suggestions?

Thanks a lot!!



More information about the R-help mailing list