3

I'm trying to install the package PerformanceAnalytics using the following code in a Jupyter Notebook, which I've used to install many packages successfully, such as ggplot2, with the following code:

install.packages("PerformanceAnalytics", repos='http://cran.r-project.org')

But I read on many other questions that adding dependencies=TRUE would solve the issue. Unfortunately, it did not. I keep getting the following error message.

install.packages("PerformanceAnalytics", repos='http://cran.r-project.org', 
dependencies=TRUE)

Warning message in install.packages("PerformanceAnalytics", repos = 
"http://cran.r-project.org"): “installation of package ‘PerformanceAnalytics’ 
had non-zero exit status”Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

The package installs without a problem in the R app and RStudio. Is there something I'm missing that Jupyter requires for this specific package? I'm using macOS 10.12.5. Below is the info when I run sessionInfo().

R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin11.4.2 (64-bit)
Running under: macOS Sierra 10.12.5

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
 [1] R6_2.2.0        magrittr_1.5    IRdisplay_0.4.4 pbdZMQ_0.2-4   
 [5] tools_3.3.2     crayon_1.3.2    uuid_0.1-2      stringi_1.1.2  
 [9] IRkernel_0.7.1  jsonlite_1.1    stringr_1.1.0   digest_0.6.10  
[13] repr_0.10       evaluate_0.10  
James Marquez
  • 365
  • 4
  • 12
  • Could you past your `sessionInfo()`? Try to install every package listed in Depends, Imports and Suggests [on CRAN](https://cran.r-project.org/web/packages/PerformanceAnalytics/index.html) prior to installing the package, might help. – m-dz Apr 08 '17 at 22:32
  • Looking at: `packageDescription("PerformanceAnalytics")` which you might not be able to see from your console but which should be available at CRAN. I see: `NeedsCompilation: yes`. Do you have the required toolchain for whatever undisclosed OS you might be working on? That document also lists the Imports:, Depends:, and Suggests: packages. – IRTFM Apr 08 '17 at 23:19
  • @m-dz I added the `sessionInfo()` output. I tried installing each package separately from Imports, Depends, and Suggests as you suggested, but I ran into the same issue with some of the other packages as well. @42 I seem to be getting the same error with only packages that NeedsCompliation: yes. What is the required toolchain I would need? I'm not familiar with that aspect of installing packages yet. – James Marquez Apr 08 '17 at 23:30

1 Answers1

1

The solution from the question at Is it possible to install bioconductor package 'rain' in R Jupyter notebook? solved my issue as well. I was using Anaconda's version of R. I uninstalled Anaconda and instead installed Jupyter Notebook and IRkernal manually which resolved my issue. See the answer from the above link for full details.

Community
  • 1
  • 1
James Marquez
  • 365
  • 4
  • 12