Running Rattle on Mac OS X 10.9 (Mavericks) - r

After installing Mavericks on my Mac, I'm not able to run Rattle anymore.
Because of compatibility issues between RStudio and 10.9 (http://www.r-bloggers.com/rstudio-and-os-x-10-9-mavericks/), I installed v 0.98.433 of RStudio and R 3.0.2
Tried to launch Rattle the normal way: none.
I tried in a different way:
I manually launched xQuartz to install GTK+
via R-Studio I installed RGtg2 and Cairo
Installed Rattle, launched it and I got 1 sec message from Rattle, before it disappeared, crashing R session.
I then tried going back to R 2.15.3 (using RSwitch), doing same procedure.
Rattle starts with no ricognizable character and a bunch of related error messages on the RStudio console, from Pango.
Problem is it is looking for a directory .../pango/1.6.0 that does not exist (I have /1.8.0).
Is there any one who came out with a working combination of R/RStudio/Rattle on Mavericks?
I have a course I'm going to teach on data mining next semester and I introduced Rattle as the core tool, but I need it running.
Going back to previous Mac OS is not an option, because students may have the latest version.
Any help would be highly appreciated

I believe that the problem is with the GTK2 and Cairo modules. After building a few packages from source, rattle works for me...
I have had difficulties with Cairo/GTK2 since Mountain Lion. I got crashes using Simon's binary packages for these. Note that I updated my system to Mavericks, so I have not tried this on a clean install... I also have Homebrew installed for building programs from source. I use the ATT binary installer for R (thanks, Simon) for most packages but build a few packages from source. There were some hiccups and I spent a lot of time searching with Google. Here is what I did:
One needs XCode and the Xcode command line tools installed. After you install XCode, you need to run
sudo xcode-select --install
to install the command line tools. Then install Homebrew according to directions from the web site... Install gtk+ and cairo with their dependencies with:
brew install gtk+ cairo
And wait quite a while for everything to build....
The first problem I had is that I couldn't build any R packages from source because of this error:
make: llvm-gcc-4.2: No such file or directory
Google to the rescue...
I needed to change two lines in Makeconf in /Library/Frameworks/R.framework/Resources/etc to
CC=clang
CXX=clang++
Note: the R Mac Tools page now says this should be:
CC=/usr/local/clang4/bin/clang
CXX=/usr/local/clang4/bin/clang++
LDFLAGS=-L/usr/local/clang4/lib
Then download the source packages for RGtk2, Cairo, and cairoDevice. I do all the work in my ~/bld directory with:
cd ~/bld
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/Library/Frameworks/GTK+.framework/Versions/Current/Resources/lib/pkgconfig:$PKG_CONFIG_PATH
R CMD install RGtk2_2.20.25.tar.gz
R CMD install Cairo_1.5-2.tar.gz
R CMD install cairoDevice_2.19.tar.gz
Hope this helps.

Related

Python: Camelot-PY (Error: GhostscriptNotFound while it is installed) for M1 MacOS

Problems using Camelot-py for PDF parsing. Cannot locate 'gs' package, although it has been installed in any imaginable way... Using M1 Monterey OS.
While GS is clearly installed (gs launches from Terminal root just fine), home-brew installation of python / Xcode, PATH variables added through 'export PATH'. Still getting the same error with Ghostscript not being installed when trying to parse a PDF table.
Any suggestions / experience on this please? One would have thought it should not be such a massive pain to resolve...
I had the same issue, which was resolved by installing camelot-py from Anaconda:
conda install -c conda-forge camelot-py

Unable to load fonts on Ubuntu

Using R version 4.1.2 on Ubuntu 20.04, I run hist(10). The error says
X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 2 at size 14 could not be loaded
I find two things on google. This thread I can't understand, and this thread suggests I build R differently. I did recently build R from source, without the cairo flag recommended by the Bio-Deago github thread, but I have now replaced it with a binary from Rstudio, and the problem persists. Any suggestions? Thanks!
EDIT: the problem only occurs in Rstudio, not when I run R through a terminal.
R gets installed to different places depending on whether you install from source or as a binary: see this, which says:
For versions of R installed by system package managers (e.g. r-base on Debian or Ubuntu) this will be /usr/bin/R. For versions of R installed from source this will typically (but not always) be /usr/local/bin/R.
Rstudio looks first at which R, which in this case is the version from source. I deleted the source version (target of symlink at which R). Then when I ran R in a terminal, said R is not installed. Then, I followed the Rstudio binary install instructions mentioned in the question. I followed them from the beginning even though I had already installed an Rstudio binary. Now I can run hist(10) and get a plot as expected.

R can't install devtools or git2r due to lack of zlib on macOS 10.12.3 and 10.12.5

I am trying to install two packages in R (3.3.2): devtools and git2r. They are depending on the existence of zlib. This comes with macOS Sierra (10.12.3) and it's version 1.2.8 by default.
When I'm trying to install these packages I get the error below.
I've been trying a lot of things.
directly installing via CRAN in RStudio: no effect.
trying to locate zlib on macOS: can't find zlib.
installing via R CMD INSTALL git2r: no effect.
I notice someone has a similar issue posted on GitHub: https://github.com/ropensci/git2r/issues. There is no solution yet.
Does anyone here have an idea?
Thanks!
Sander
ERROR MESSAGE BELOW
configure error in "/private/tmp/RtmpP6HZFx/R.INSTALLe73412909267/git2r"
configure error
The zlib library that is required to build git2r was not found.
Please install:
zlib1g-dev (package on e.g. Debian and Ubuntu)
zlib-devel (package on e.g. Fedora, CentOS and RHEL)
and try again.
If the zlib library is installed on your system but the git2r configuration is unable to find it, you can specify the include and lib path to zlib with:
"R CMD INSTALL --configure-args='--with-zlib-include=INCLUDE_PATH --with-zlib-lib=LIB_PATH' git2r"
See "config.log" for more details
ERROR: configuration failed for package "git2r"
*removing "/usr/local/lib/R/3.3/site-library/git2r"
UPDATE: the same issue persists on macOS X 10.12.5 in combination with R 3.4.0 - the latter I need for DESeq2.
Solution...Mmm. Not really. I simply uninstalled R and all the packages, and than I reinstalled everything again. I installed R and RStudio via homebrew, following the instructions here: https://rud.is/b/2015/10/22/installing-r-on-os-x-100-homebrew-edition/.
Oddly enough: all issues disappeared.
UPDATE #1: this solution does not - obviously - work for the combination R 3.4.0 and macOS X 10.12.5. We need a solution for this issue.
UPDATE #2: I have discovered what I believe was the issue: a wrong path to the xcode command line tools.
sudo xcode-select --reset did the trick and now xcode-select -p points to /Library/Developer/CommandLineTools. And which xcode-select points to /usr/bin/xcode-select. Googling I discovered that it is not needed to install Xcode through the App Store as it states on http://railsapps.github.io/xcode-command-line-tools.html:
"On earlier versions of macOS, it was more difficult to install Xcode Command Line Tools. It required a huge download of the full Xcode package from the Mac App Store or registration as an Apple developer for a smaller Command Line Tools package. Mac OS X Mavericks made installation of Xcode Command Line Tools much simpler.".
i was having the same problem. i have a note 8(samsung). just go to GitHub and install zlib from there.

how to install/update a package from source inside cygwin

new to Cygwin. I downloaded apg-cyg and have been using it to install packages.
Recently I installed R and the current version in Cygwin packages is R.3.2.4. I wanted to install the latest R package but couldn't find a way from googling on how to do it inside Cygwin.
Is this possible to do or I just have to wait for the Cygwin packages updating their packages to the latest version? It would be nice to be able to update a package using the source file inside Cygwin..
Edit:
I should mention that I tried to install ggplot2 inside R using install.packages() and there was non-zero exit status and the installation couldn't go through.
You can install the source using cygwin setup. Click on the mouse on the "Src?" column.
The source will be installed in /usr/src
PS: next R release 3.3.1 is in 11 days. It will be packed for cygwin if there are no build issue
Followup:
There were several build issues, it took longer than expected to build 3.3.1
https://www.cygwin.com/ml/cygwin-announce/2016-06/msg00056.html

Homebrew install R without Xquartz on OS X

Installing R with the pkg installer doesn't require XQuartz. However, install R with Homebrew requires to install XQuartz first.
Can anybody explain why please?
Is there a way to install R without Xquartz with Homebrew?
I need to decide whether to use Homebrew, or install R, Python etc with their pkg installers before applying to multiple computers (running OS X 10.8).
If you look at the recipe you'll see you can pass --without-x11 as a parameter (which should remove the need to have XQuartz installed. There is a cask for xquartz, btw. There is a recipe for R GUI, as well.
Homebrew R has had some issues with RStudio in the past and is also not recommended by the R maintainers.
According to this commit on GitHub, it has been fixed.
r: fix build with Quartz-only cairo #2434
Now, XQuartz is not required anymore, tested and it works:
brew update
brew tap homebrew/science
brew install r
I found that R works just fine without x.11 until I wanted to use the simple text editor. It complained about not having x.11, and wanted xquartz. I installed xquartz from home-brew and RStudio (and R) worked just fine. Hope that's useful.

Resources