r - 如何在 Jupyter 中启用 R 语法高亮显示?

我希望为用 Jupyter 编写的 R 代码添加语法突出显示。准确地说,语法高亮超出了数字、文本等已经存在的语法高亮。

我的设置:

  • 包裹
    • conda R 3.2.4
    • conda 版本 4.0.6
    • Jupyter 版本 4.1.0
  • 在带有 Chrome 的 Windows 7 上运行

我在这里看到了类似的实现。不确定有没有R

https://github.com/merqurio/jupyter_themes

欢迎任何想法。谢谢。

最佳答案

使用“.r”作为文件扩展名。显然“.R”在 Jupyter 4.2 之前不会进行语法高亮显示(至少添加此功能的 PR 在 4.2 里程碑上)。参见 this github issue获取更多信息。

https://stackoverflow.com/questions/37213746/

相关文章:

java - Mallet:字母不匹配异常

android - 交错 GridView 中的可点击 TextView

android - 相同的 ImageButtons 消耗大量内存

google-apps-script - 如何更新谷歌可视化仪表板的底层谷歌数据表并刷新仪表板 Vi

android - 从 Custom Content Provider 访问数据

c# - Asp.Net Web Api 在 Godaddy 服务器上不工作,但在本地工作正常

python - 在 Python 中获取页面的所有请求 url

algorithm - 跳跃点搜索 : mix between Normal and Orthogo

objective-c - 自定义 UIButton 焦点在 tvOS 中无法正常工作

ios - 如何通过gcdwebserver获取本地html文件