robertzk / Ramd

AMD (asynchronous module definitions) in R
MIT License
6 stars 1 forks source link

Ramd::packages fails to load packages when one needs to specify the github location #18

Open tonglu opened 8 years ago

tonglu commented 8 years ago

The below example is awkward @robertzk , but it works on another machine's vanilla R session.

Hence I think this has to do multi-package dependency issues that this machine I experienced the issue doesn't have the necessary the updated packages installed to make Ramd::packages work.

> packageVersion('Ramd')                                                                 
[1] ‘0.3.8’
> Ramd::packages("robertzk/Ramd")                                                        
Warning: unable to access index for repository https://cran.cnr.berkeley.edu/src/contrib
Warning: unable to access index for repository https://cran.cnr.berkeley.edu/bin/macosx/mavericks/contrib/3.2
Error in FUN(X[[i]], ...) : Package robertzk not found
In addition: Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘robertzk’
2: package ‘robertzk’ is not available (for R version 3.2.1) 
3: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘robertzk’          

> Ramd::packages(list("avantcredit/xgboost", subdir = "R-package"))
Warning: unable to access index for repository https://cran.cnr.berkeley.edu/src/contrib
Warning: unable to access index for repository https://cran.cnr.berkeley.edu/bin/macosx/mavericks/contrib/3.2
Error in FUN(X[[i]], ...) : Package avantcredit not found
In addition: Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘avantcredit’
2: package ‘avantcredit’ is not available (for R version 3.2.1) 
3: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘avantcredit’
tonglu commented 8 years ago

@robertzk on another machine, this works:

> packageVersion("Ramd")
[1] ‘0.3.8’
> Ramd::packages("robertzk/Ramd")
[1] TRUE
> packageVersion('xgboost')
[1] ‘1.0.8’
> Ramd::packages(list("avantcredit/xgboost", subdir = "R-package"))
[1] TRUE
> packageVersion('xgboost')                                                  
[1] ‘1.0.9000’
peterhurford commented 8 years ago

@tonglu It returns TRUE if the package is already installed, so it can vary between machines.

peterhurford commented 8 years ago

This is what I get...

> packageVersion("Ramd")
[1] ‘0.3.8’
> Ramd::packages(list("avantcredit/xgboost", subdir = "R-package"))
[1] TRUE
> remove.packages("xgboost")
Removing package from ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library’
(as ‘lib’ is unspecified)
> Ramd::packages(list("avantcredit/xgboost", subdir = "R-package"))
Using GitHub PAT from envvar GITHUB_PAT
Downloading GitHub repo avantcredit/xgboost@master
from URL https://api.github.com/repos/avantcredit/xgboost/zipball/master
Installing xgboost
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ  \
  --no-save --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/k0/4wvp0cp15pd16qwfd06wz5hm0000gp/T/RtmpF7GzhN/devtools15dd55adce1b7/avantcredit-xgboost-9614bda/R-package'  \
  --library='/Library/Frameworks/R.framework/Versions/3.2/Resources/library'  \
  --install-tests

* installing *source* package ‘xgboost’ ...

...

installing to /Library/Frameworks/R.framework/Versions/3.2/Resources/library/xgboost/libs
** R
** data
** demo
** tests
** preparing package for lazy loading
Creating a generic function from function ‘getinfo’ in package ‘xgboost’
Creating a generic function for ‘predict’ from package ‘stats’ in package ‘xgboost’
Creating a generic function from function ‘setinfo’ in package ‘xgboost’
Creating a generic function from function ‘slice’ in package ‘xgboost’
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (xgboost)
Reloading installed xgboost
[1] TRUE