RStudio支持代码折叠.您可以标准化注释块,以便将它们识别为代码块.
例如,将其输入到RStudio编辑器中
#=======================================================
# this is a comment block
# more comments here
# comments upon comments
Run Code Online (Sandbox Code Playgroud)
然后按Alt+ L折叠,Alt+ Shift+ L展开.