如何通过 StatEt Eclipse 插件使用 "R Graph Builder" 和 "R Graphics" 视图?

How to use "R Graph Builder" and "R Graphics" view with StatEt Eclipse Plugin?

我是 R 的新手,想在 Windows 7.

上将 Eclipse 插件 StatEt 与 Oxygen.2 Release (4.7.2) 一起使用

我尝试使用 R Graph Builder 创建示例图。我单击 "play button" 并在 R Code 选项卡上获得以下输出。此外,我听到 "ping" 的声音。

library(ggplot2)

p <- ggplot(data = mtcars, aes(x = mpg, y = cyl))
p <- p + labs(title = "test")

print(p)

但是,我看不到任何图表。

=> "play action" 的目的只是为了产生控制台输出吗?

=> 我在哪里可以找到有关图形生成器的文档?

=> 我可以输入什么数据来获得第一个示例图?

此外,当我在 StatEt 中绘制图表时,我希望它的输出出现在视图 "R Graphics" 中。但是,R 打开了一个新的 window。我在控制台 运行 配置的 "R Console" 选项卡上启用了 "Set R Graphic view by StatET as default graphic device for new plots in R" 选项。

=> "R Graphics" 视图的目的是什么?

示例图:

x<-c(1:10)
y<-sin(x)       
plot(x=x,y=y)

-

library(ggplot2)
ggplot(data = mtcars,aes(x=wt))+geom_bar()

相关问题:

  • 为了使用 StatEt 的这些功能,您需要在控制台 运行 配置中 select RJ (default) 而不是 Rterm。 (Rterm 可能对故障排除和初始设置有用,但 RJ 是正常使用所必需的。R 包 RJ 需要从 R 中安装。为此应用 Rterm 一次或直接使用 R.exe 另见 )

  • RJ 2.1Java 9 不兼容。目前您需要在 运行 配置的 JRE 设置中安装 Java8 和 select 它。

  • 确保在 运行 配置>R 控制台中选中框 Set R Graphic view by StatET as default graphic device for new plots in R。 (默认选中。)

创建图形后,示例代码即用代码编写。这通常会发送到 R 控制台。您现在应该能够在 R 图形视图中看到图形结果。