Chr*_*ris 4 r jupyter jupyter-notebook jupyter-irkernel
如何在 Jupyter 中运行 R 中的 %%magic?
%%javascript
IPython.OutputArea.auto_scroll_threshold = 99999;
Run Code Online (Sandbox Code Playgroud)
较长输出的自动滚动功能非常烦人,因为我有几个函数和脚本会输出大量输出。
上面的 Javascript 在 python 笔记本中运行良好,但在 R 笔记本中则不行。
当我在 R 中运行 %% magic 命令时,它会吐出:
Error in parse(text = x, srcfile = src): <text>:1:1: unexpected SPECIAL
1: %%
Run Code Online (Sandbox Code Playgroud)
有什么建议么?
根据这篇文章disable_autoscroll.py,可以将该Javascript放入profile_dir/static/js/custom.js文件中。请告诉我,Windows 机器上的 profile_dir 在哪里?
我发现:c:/Anaconda2/Lib/site-packages/notebook/static/custom/custom.js但那是中心的 custom.js 文件。
参考: