Unable to install slam on Mac OS 10.8.3 - r

I'm having some trouble installing the R package "slam" on my machine. I'm running a Macbook Pro OS 10.8.3 with R Version 3.2.1.
In order to get RTextTools package to work, I require a slam package of version 0.1-30 and above. I've read the documentation and it states that slam v0.1-30 and above (with the exception of 0.1-38) can run on any R version above 2.8.0.
This doesn't seem to be the case however. I've tried everything from 0.1-31 to 0.1-37 and the installation keeps failing with the following message:
ERROR: compilation failed for package ‘slam’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/slam’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/slam’
Warning in install.packages :
installation of package ‘/Users/(user)/Downloads/slam_0.1-34.tar.gz’ had non-zero exit status
Can anybody help me please? Is there a way to solve this problem (either install RTextTools or install slam) without upgrading my machine's OS?

Related

Installation issue with tidyverse package

I am having trouble installing packages, I was not able to install any. I got the following error in my r console:
ERROR: dependency 'cachem' is not available for package 'memoise'
* removing 'C:/Users/VasquezV/Documents/R/win-library/3.4/memoise'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\VasquezV\Documents\R\win-library\3.4" C:\Users\VasquezV\AppData\Local\Temp\1\RtmpuiYtO1/downloaded_packages/memoise_2.0.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘memoise’ had non-zero exit status
The major issue with this problem is that the cli package might not be updated as it often shows 3.1.1 installed but 3.3.0 required. Hence you have two solutions:
install.packages(cli) - there are chances that even this step
might fail as the error message is displayed: "Error in unpacking packages."
Uninstall Cran R and R studio and reinstall it or install the package for replacing the existing one to solve the issue.
This will definitely work as I have solved the issue through this way itself.

rgl installation in Mac: X11 not found

I am having the same problem as this and this.
I have installed R and rstudio through a conda environment which included r-rgl. I am now trying to install a package within R that requires rgl. However, calling library(rgl) gives the error
Error: package or namespace load failed for ‘rgl’:
package ‘rgl’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
I have tried to install rgl from within R, but then I get this message:
checking for X... no
configure: error: X11 not found but required, configure aborted.
ERROR: configuration failed for package ‘rgl’
* removing ‘/path/to/miniconda3/envs/my_conda_env/lib/R/library/rgl’
* restoring previous ‘/path/to/miniconda3/envs/my_conda_env/lib/R/library/rgl’
Warning in install.packages :
installation of package ‘rgl’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/vh/.../downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
The solution to the last error seems to be installing XQuartz in Mac, but I had it installed before. So I tried specifying install.packages("rgl", INSTALL_opts = "--with-libpng-prefix=/usr/X11/") but I still get the error above. Any suggestions? I'm quite lost now...
TL;DR: how do I connect my XQuartz installation with each conda environment that I create?

Unable to install ggm package un R language

I'm currently operating in macOS with the R version of 3.6.3.
When I tried to install the package ggm, a warning occurred as follows.
Warning in install.packages :
dependency ‘graph’ is not available
also installing the dependency ‘igraph’
Then when it completed installing, it seemed not to work either:
ERROR: compilation failed for package ‘igraph’
* removing ‘/usr/local/lib/R/3.6/site-library/igraph’
ERROR: dependencies ‘igraph’, ‘graph’ are not available for package ‘ggm’
* removing ‘/usr/local/lib/R/3.6/site-library/ggm’
What is happening? I have searched for this error and didn't find anything that helps. Please help me. I'll be much appreciated!
I had the same problem.
To install the package graph you need to install the latest version of Bioconductor (i.e. package called BioManager).
Then you install the package graph and then simply run the installation for the ggm package.
install.packages("BiocManager")
BiocManager::install("graph")
install.packages("ggm")
library(ggm)
The package is then loaded into your R enviroment.

installing R2jags library in HPC linux

I am trying to install R2jags an r package in HPC linux environment, but doesn't work. This does work in windows, but not in HPC linux. I tried several options like:
install.packages("https://cran.r-project.org/src/contrib/R2jags_0.5-7.tar.gz", repos=NULL
but ends up with error:
ERROR: dependency 'rjags' is not available for package 'R2jags'
* removing '/ddn/home/grpl22/R/x86_64-pc-linux-gnu-library/3.6/R2jags'
Warning message:
In install.packages("https://cran.r-project.org/src/contrib/R2jags_0.5-7.tar.gz", :
installation of package '/tmp/Rtmprf6lN0/downloaded_packages/R2jags_0.5-7.tar.gz' had non-zero exit status
any sugeestion please how i can install this?

Trying to install Rattle for R on my Mac

I'm trying to install Rattle and have been running into some issues. Below is the initial code and results.
install.packages('rattle', repo='https://cran.cnr.Berkeley.edu/')
also installing the dependency ‘RGtk2’
Package which is only available in source form, and may need compilation of
C/C++/Fortran: ‘RGtk2’
Do you want to attempt to install these from sources?
I tried yes and the error it gave me is this
configure: error: GTK version 2.8.0 required
ERROR: configuration failed for package ‘RGtk2’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RGtk2’
Warning in install.packages :
installation of package ‘RGtk2’ had non-zero exit status
ERROR: dependency ‘RGtk2’ is not available for package ‘rattle’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rattle’
Warning in install.packages :
installation of package ‘rattle’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/47/39zt_y995czg2rgb3n485ty80000gn/T/Rtmpb8Eli0/downloaded_packages’
I also tried no and the error it gave me was this
ERROR: dependency ‘RGtk2’ is not available for package ‘rattle’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rattle’
Warning in install.packages :
installation of package ‘rattle’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/47/39zt_y995czg2rgb3n485ty80000gn/T/Rtmpb8Eli0/downloaded_packages’
Would anybody happen to know where I'm going wrong? Thank you in advance for any input.
My reputation is too low to comment, so I must post an answer. Zhiya's method worked for some of my students. It was not working for everyone, so we worked out a second method (thanks, Tugay!!)
The wrapper method of GW also was not working, perhaps because since it was compiled some of the versions have changed. (My theory is that all of the following must have versions that can interoperate: R, RGtk+, GTK, MacOS, Rattle. When any of them is updated on my system, Rattle may stop working. That's why you got this message
configure: error: GTK version 2.8.0 required
My blog post documenting what worked for me is here. It works with: MacOS 10.13.4,R 3.4.4, Rattle 5.1.3, RGtk2 2.24.32. YMMV.
I am sure that if I knew some UNIX, I could have gotten other methods to work as well. Again, the apparent problem is that as of today there are not up-to-date versions of RGtk2 and GTK that are compiled for the latest MacOS. A suitable compiled version does exist for Windows and is in the CRAN repository. Solving the error messages requires compiling the missing programs from their source code versions on CRAN.

Resources