rattle in R on OS X Mavericks
-
22-12-2019 - |
Question
I'm running R 3.0.2 on OS X Mavericks.
I was able to install rattle (Rattle 2.6.27 r148) and gtk+ in R and run rattle. The screen shows up, but I cannot load any files in rattle. Here is the error message:
(R:18008): Gtk-WARNING **: Attempting to store changes into `/Users/amir/.local/share/recently-used.xbel', but failed: Failed to create file '/Users/amir/.local/share/recently-used.xbel.0HMGBX': No such file or directory
(R:18008): Gtk-WARNING **: Attempting to set the permissions of `/Users/amir/.local/share/recently-used.xbel', but failed: No such file or directory Error in resetRattle() : attempt to apply non-function
It keep giving the last error every time I try to load a csv file into it.
Thanks
Solution
I had the same problem with rattle on Mac. However, it is now fixed in a recent update. I came across the fix here:
https://groups.google.com/forum/#!forum/rattle-users
Worth keeping an eye on, Graham Williams is very active on the thread.
Run this line to install the latest Rattle that fixes the most commonly reported issues on Mac OSX
install.packages("rattle", repos="http://rattle.togaware.com", type="source")
OTHER TIPS
Here is the details of what worked for me:
First install XCode and command line tools:
sudo xcode-select --install
Then install XQuartz from http://xquartz.macosforge.org/landing/
Then install brew from http://brew.sh and then brew some Gtk stuff:
brew install gtk+ cairo
Then set the compiling folder to right place:
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/Library/Frameworks/GTK+.framework/Versions/Current/Resources/lib/pkgconfig:$PKG_CONFIG_PATH
Then run r in command line and install these packages using source:
install.packages(“RGtk2”,type=”source”)
install.packages(“Cairo”,type=”source”)
install.packages(“cairoDevice”,type=”source”)
install.packages("rattle", repos="http://rattle.togaware.com", type="source")
then everything should be ready for working with rattle in OSX