You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On MaxOS X Mavericks and Yosemite, Retistruct installs OK, and demo("retistruct.method") works, but it fails when running the package with the command retistruct(), with the error output:
> retistruct()
Loading required package: gWidgetsRGtk2
Trying to install required package gWidgetsRGtk2
package ?gWidgetsRGtk2? is available as a source package but not as a binary
Warning in install.packages :
package ?gWidgetsRGtk2? is not available (for R version 3.1.2)
Loading required package: gWidgetsRGtk2
Error in require.package(paste0("gWidgets", guiToolkit)) :
Could not install gWidgetsRGtk2
In addition: Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return
= TRUE, :
there is no package called ?gWidgetsRGtk2?
2: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return
= TRUE, :
there is no package called ?gWidgetsRGtk2?
> I am trying to run it from RStudio using the latest version of R (2.1.2) under
> Mac OS X Yosemite. I have re-installed the latest version of X11.
The problem is that retistruct depends on the gWidgetsRGtk2 package, which in turn depends on the RGtk2 package, and unfortunately this package is hard to install on Mavericks (Mac OS X
10.9), and probably also hard to install on Yosemite. There are a number of possibilities, none of which I've tried myself as I don't have a Mac.
0. Use GTK binaries
Chris von Csefalvay's method appears to be the most straightforward way of installing RGtk2. Ignore the references to rattle, another package that depends on RGtk2.
Try installing RGtk2 using the "Step by step solution" here, which uses macports: http://marcoghislanzoni.com/blog/2014/08/29/solved-installing-rattle-r-3-1-mac-os-x-10-9/
In a comment some way down the page, the author says the instructions should work for Yosemite, but there's no guarantee. Once you've installed RGTK2, you will (I think) have to install gWidgetsRGTK2 manually from within RStudio (or R):
brew install socat
brew cask install xquartz # SJE didn't need this step.
open -a XQuartz
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"
# in another window
docker run -e DISPLAY=192.168.59.3:0 -ti --rm r-base
install.packages("retistruct")
retistruct()
The text was updated successfully, but these errors were encountered:
davidcsterratt
changed the title
Running retistruct GUI in MacOS X Mavericks and Yosemite
Running Retistruct GUI in MacOS X Mavericks and Yosemite
May 11, 2015
On MaxOS X Mavericks and Yosemite, Retistruct installs OK, and
demo("retistruct.method")
works, but it fails when running the package with the commandretistruct()
, with the error output:The problem is that retistruct depends on the gWidgetsRGtk2 package, which in turn depends on the RGtk2 package, and unfortunately this package is hard to install on Mavericks (Mac OS X
10.9), and probably also hard to install on Yosemite. There are a number of possibilities, none of which I've tried myself as I don't have a Mac.
0. Use GTK binaries
Chris von Csefalvay's method appears to be the most straightforward way of installing RGtk2. Ignore the references to rattle, another package that depends on RGtk2.
1. Use macports
Try installing RGtk2 using the "Step by step solution" here, which uses macports:
http://marcoghislanzoni.com/blog/2014/08/29/solved-installing-rattle-r-3-1-mac-os-x-10-9/
In a comment some way down the page, the author says the instructions should work for Yosemite, but there's no guarantee. Once you've installed RGTK2, you will (I think) have to install gWidgetsRGTK2 manually from within RStudio (or R):
Then retistruct should work.
2. Use Homebrew
Thanks to @bcohn12 for suggesting this. In a terminal copy and paste:
However, I'm guessing that you may need to install XCode and XQuartz manually beforehand, if they are not already installed.
3. Run R in (docker)[http://www.docker.com]
Thanks to @sje30 for suggesting trying to run R in docker, as discussed here: rocker-org/rocker#110
The text was updated successfully, but these errors were encountered: