RMarkdown 八度图
当使用 Octave 作为其引擎时,RMarkdown 可以生成绘图吗?这是一个基本示例:
```{octave}
plot([1,2,3])
```
在 CoCalc 中,就像在 Octave 和 MATLAB 中一样,输出将是一个绘图。同样,当在 RMarkdown 中使用 R 引擎时,
```{r}
plot(c(1,2,3))
```
我希望能够在 RMarkdown 中为 Octave 执行此操作 - 有解决方案吗?
Can RMarkdown produce plots when using Octave for its engine? Here's a basic example:
```{octave}
plot([1,2,3])
```
In CoCalc, as in Octave and MATLAB, the output would be a plot. Similarly, when using the R engine in RMarkdown for
```{r}
plot(c(1,2,3))
```
I would like to be able to do this for Octave in RMarkdown - is there a solution for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Octave 的函数绘图不返回图像,而是打开一个窗口。这就是为什么它默认也不能在 R Studio Server 上工作。以下是使用
print()
并随后显示图像的解决方法:Octave's function plot does not return an image, but opens a window instead. This is why it also doesn't work on R Studio Server by default. Here is a workaround by using
print()
and displaying the image afterwards: