R runtime environment does not work in recent macOS versions

Calls to the R runtime environment (browser), that is installed with IBM® SPSS® Statistics, do not work in recent macOS versions (Catalina and Big Sur).

SPSS Statistics can become unresponsive when R runtime environment calls are made in a macOS environment. For example:

begin program r.
print(2)
plot(3)
browser()
end program.

The issue is the result of XQuartz/X11 no longer being included in macOS. Additionally, macOS does not support older XQuartz/X11 versions (versions that were included in previous macOS versions). For more information, see R for Mac OS X.

Installing XQuartz

  1. Before you install the latest XQuartz version, you must first uninstall any existing version.
    sudo rm -rf /Applications/Utilities/XQuartz.app /usr/X11/bin/Xquartz /usr/X11R6/bin/Xquartz
  2. Download XQuartz version 2.8.1.
  3. Unquarantine the XQuartz installer disk image:
    xattr -d com.apple.quarantine XQuartz-2.7.11.dmg
  4. Install XQuartz 2.8.1.

Note that when you run either an R based extension or the begin program r syntax in a macOS environment, XQuartz automatically launches and appears in your task bar.