This installation guide is tested on Yosemite.

  • Open a Terminal and run the following command to install xcode:
    > sudo xcode-select --install
  • Go to, download XQuartz-2.7.7.dmg and install it. Vedio tutorial can be found on Youtube.
  • Go to, download and install macport (Install MacPorts for your version of OS X)
  • Open a Terminal and run the following commands:
    > sudo port install pkgconfig
    > sudo port install gtk2
  • Install R: download the binary version of R from the download page and install it.
  • Go to and download RGtk2_2.20.31.tar.gz (the version might be different)
  • from within the Terminal, and run the following command:
    > sudo R CMD INSTALL ~/Download/RGtk2_2.20.31.tar.gz (assume RGtk2_2.20.31.tar.gz is located in ~/Download)
  • If the above step is successful, launch R and install RQDA from within R:
    > install.packages('RQDA', type='source')
  • If all steps are successful, then we can laugh RQDA by the following R command:
    > library(RQDA)

    If gtk2 has been installed appropriately and the following error is raised when loading RQDA: unable to load shared object '/Library/R/3.1/library/RGtk2/libs/':
    It is possible that RGtk2 can not find the libary because the Path Environment Variables have not been set correctly. You might try to fix it by including the following lines in the file '.bash_profile':
    export PATH=/opt/local/bin:/opt/local/sbin:$PATH
    export PATH=/opt/pkgconfig/bin:$PATH
    export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig
    export PATH=/Library/Frameworks/GTK+.framework/Resources/bin:$PATH

    Binary package of GTK+ is available here for some vesion of Mac OSX.