我有一个很长的 R 脚本文件(其中一个有 2723 行),我可以创建目录或索引来浏览文件吗?
我想创建一个指向文本中特定行的目录,假设我有 20 个变量要分析,一个目录将包含 20 个项目。
最佳答案
您可以使用 CTRL
插入部分+ SHIFT
+ R
(Cmd
+ Shift
+ R
在 Mac 上)
有关更多详细信息,请参阅Code Folding and Sections
Code Folding RStudio supports both automatic and user-defined folding for regions of code. Code folding allows you to easily show and hide blocks of code to make it easier to navigate your source file and focus on the coding task at hand.
...
To navigate between code sections you can use the Jump To menu available at the bottom of the editor:
关于r - R 文件内的目录/索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22647591/