在底部它问"选择:"我应该在那里写什么?
>library("rattle")
Loading required package: RGtk2
R session is headless; GTK+ not initialized.
Rattle: A free graphical interface for data mining with R.
Version 3.5.0 Copyright (c) 2006-2015 Togaware Pty Ltd.
Type 'rattle()' to shake, rattle, and roll your data.
打开喋喋不休
> rattle()
ce)' failed
(R:1244): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(R:1244): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed
(R:1244): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(R:1244): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed
etc ...
(R:1244): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(R:1244): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed
(R:1244): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion `GDK_IS_DISPLAY (display)' failed
(R:1244): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed
(R:1244): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion `GDK_IS_DISPLAY (display)' failed
Selection:
然后我执行install.packages("rattle");摇铃()
它崩溃了
安装&打开XQuartz,然后重试!
我试图通过ssh在远程服务器上打开GUI应用程序,但我收到了上述错误。正如@YogiEHunt所建议的,我已经安装了XQuartz,但问题是我必须使用-X选项,而我ssh到远程服务器,然后使用XQuartz打开GUI应用程序,没有-X选项,我无法远程打开GUI。
ssh -X user@10.0.0.1
user$ application-command
安装XQuartz后,必须重新启动系统。
使用XQuartz打开的应用程序太慢了。
我找到了一个解决方案,当问题是它无法安装RGtk2时安装Rattle。 https://rattle.togaware.com/
在Linux上:
install.packages("https://cran.microsoft.com/snapshot/2021-12-15/src/contrib/RGtk2_2.20.36.2.tar.gz"回购= NULL)在Windows:
install.packages("https://cran.microsoft.com/snapshot/2021-12-15/bin/windows/contrib/4.1/RGtk2_2.20.36.2.zip"回购= NULL)在Mac:
install.packages("https://cran.microsoft.com/snapshot/2021-12-15/bin/macosx/contrib/4.1/RGtk2_2.20.36.2.tgz"代表