1

I am trying to install the "GISTools" R package in my R Jupyter notebook in IBM's Data Science Experience (DSX) with the following command:

install.packages("GISTools", depend = T)

however, I get the following error message: Installing package into

‘/gpfs/global_fs01/sym_shared/YPProdSpark/user/s17c-9f3318fc11f06c-d37a4b9405b6/R/libs’
(as ‘lib’ is unspecified)
also installing the dependency ‘rgeos’
Warning message in install.packages("GISTools", depend = T):
“installation of package ‘rgeos’ had non-zero exit status”Warning message in install.packages("GISTools", depend = T):
“installation of package ‘GISTools’ had non-zero exit status”

When I try library(GISTools) command, I get the following error message:

Error in library(GISTools): there is no package called ‘GISTools’
Traceback:
1. library(GISTools)
2. stop(txt, domain = NA)

I have looked at the following links in particular (and several other threads on Stack Overflow) but have not been able to resolve my issue:

Cannot install R packages in Jupyter Notebook

conda - How to install R packages that are not available in "R-essentials"?

Please can someone help?

Thanks, V

SymbolixAU
  • 25,502
  • 4
  • 67
  • 139
Venky
  • 13
  • 5
  • are you able to install `rgeos` separately? `install.packages("rgeos")` ? – SymbolixAU Aug 07 '17 at 01:09
  • @SymbolixAU thanks for your follow up question. Yes, I tried installing rgeos separately and that did not work either. I got the following error message: Warning message in install.packages("rgeos", depend = T): “installation of package ‘rgeos’ had non-zero exit status” – Venky Aug 07 '17 at 13:16
  • @Venky The required dependencies are now available and you must be able to install `GISTools` in an R Notebook on https://datascience.ibm.com/ – Sumit Goyal Oct 04 '17 at 08:29

1 Answers1

0

GISTools have dependency on R package rgeos. Now installing rgeos need you to have GEOS installed. https://cran.r-project.org/web/packages/rgeos/rgeos.pdf

I attempted to install GEOS on DSX, it seems that GEOS need sudo permissions to install which are not available on DSX as a user. https://duntuk.com/how-install-geos-centos

"make[7]: Nothing to be done for `install-exec-am'. test -z "/usr/local/include/geos/algorithm/locate" || /bin/mkdir -p "/usr/local/include/geos/algorithm/locate" /bin/mkdir: cannot create directory ‘/usr/local/include/geos’: Permission denied make[7]: *** [install-geosHEADERS] Error 1"

You will need to rely on DSX Team to first install GEOS package installed and then you can install rgeos.

Please raise uservoice to get that installed so that you can install rgeos and then GISTools. https://datascix.uservoice.com/

Hope that helps!!!

Thanks, Charles.

charles gomes
  • 2,145
  • 10
  • 15
  • Thank you Charles! I will raise the uservoice and let you know how it goes. Hopefully, I can come back here after they do and check this off as an answer. Thanks again! - Venky – Venky Aug 07 '17 at 23:42