I'm currently using Jupyter Notebook to do some R work (since it can do markdown at the same time.).
However when I try to install a package fGarch
, I encountered this problem.
> install.packages('fGarch')
Warning message in install.packages("fGarch"):
“installation of package ‘fGarch’ had non-zero exit status ”Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
and when I load it by
> library('fGarch')
Error in library("fGarch"): there is no package called ‘fGarch’
Traceback:
1. library("fGarch")
2. stop(txt, domain = NA)
i.e., it didn't install it at the first place. I googled, but all methods mentioned did not work for me, including methods provided in: 'How to install R packages that are not available in “R-essentials”?' For example, I tried to use RStudio to install this package into the directory for Jupyter notebook, but I got a error saying that the directory is not writable(even if I opened RStudio by sudo command, I'm a Mac user so I can not really right click to open an app as admin). I even tried to copy and paste the library from RStudio directory into Jupyter Notebook one, but still, this not working.
Can anyone help me install packages for R in Jupyter notebook that are not 'R-essentials' ?