twosigma / beakerx

Beaker Extensions for Jupyter Notebook
http://BeakerX.com
Apache License 2.0
2.8k stars 382 forks source link

R tutorial 'Install R Packages' is not working #4381

Closed redmode closed 8 years ago

redmode commented 8 years ago

In this tutorial: https://lab.beakernotebook.com/publications/8645c600-3ec4-11e6-b811-8b63dac7dd4c?fullscreen=false doesn't work.

This command returns error: install.packages('igraph', '/mnt/scratch/rpackages', repos='http://cran.us.r-project.org')

Error
Warning in install.packages("igraph", "/mnt/scratch/rpackages", repos = "http://cran.us.r-project.org") :
      'lib = "/mnt/scratch/rpackages"' is not writable
Error in install.packages("igraph", "/mnt/scratch/rpackages", repos = "http://cran.us.r-project.org") : 
  unable to install packages
scottdraves commented 8 years ago

confirmed. @ildipo ?

ildipo commented 8 years ago

did you create the directory?

scottdraves commented 8 years ago

ah yes i didn't read the instructions 😊 maybe the R code could call dir.create() to avoid this.

now it has gone and download a bunch of stuff and compiled a bunch of code, but seems to have hung here:

gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG     -DUSING_R -I. -Iinclude -Ics -Iglpk -Iplfit -ICHOLMOD/Include -IAMD/Include -ICOLAMD/Include -ISuiteSparse_config -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-
security -D_FORTIFY_SOURCE=2 -g -I/usr/include/libxml2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -I/usr/include/libxml2 -DNDEBUG -DNPARTITION -DNTIMER -DNCAMD -DNPRINT -DPACKA
GE_VERSION=\"@VERSION@\" -DINTERNAL_ARPACK -DIGRAPH_THREAD_LOCAL=/**/ -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c CHOLMOD/MatrixOps/cholmod_sdmult.c -o CHOLMOD/Matrix
Ops/cholmod_sdmult.o
redmode commented 8 years ago

Indeed if directory created it works. Maybe it makes sense to add to the first R cell of the tutorial this line?

dir.create('/mnt/scratch/rpackages', showWarnings = FALSE, recursive = TRUE)
``