如何在pycharm中隐藏rstudio中的代码?

发布于 2025-01-19 19:08:53 字数 547 浏览 3 评论 0 原文

我在rstudio进行探索工作,并且经常不应执行我的代码的某个部分。此外,我想避免我的代码部分使我分心。

在Pycharm中,我可以使用IDE的代码折叠可能性。通过交互方式折叠代码(语句(如果语句)单击“减去”按钮)这些目前不需要的东西对我来说是不再可见的。如果需要,如果语句相应,我可以展开该部分并更改


“折叠”

rstudio是否可以使用类似的东西?

I am working exploratively in RStudio and have quite frequently the situation that a certain part of my code should not be executed. Additionally I want to avoid that this part of my code distracts me.

In Pycharm, I can use the code folding possibilities of the IDE. By folding the code interactively (clicking on the "minus" button at the if statement) these things that are not needed presently are not visible anymore to me. If needed I can unfold the section and change the if statement accordingly.

not folded


folded

Is there something similar possible with RStudio?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

鲜肉鲜肉永远不皱 2025-01-26 19:08:53

是的,我们在 Rstudio 中确实有类似的功能。只要你的代码用大括号{}包裹起来,它就可以折叠和展开。

展开:

展开

折叠(点击数轴旁边的向下小箭头将其折叠):

只需点击黄色部分即可再次展开

folded< /a>


有关 Rstudio 支持页面< /a>.

Yes we do have similar functionality in Rstudio. As long as your code is wrapped with curly bracket {}, it can be folded and unfolded.

Unfolded:

unfolded

Folded (click on the little downward arrow next to the number line to fold it):

Just click on the yellow part to expand it again

folded


More information on the Rstudio support page.

∞觅青森が 2025-01-26 19:08:53

如果您没有卷发支架,请在顶部添加评论行,即

”

”在此处输入图像说明”

If you don't have curly brackets then just add a comment line on top, i.e.

enter image description here

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文