Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道许多编程语言都有整理编程代码的工具?有没有办法整理 R 代码或一些可以做到这一点的工具(例如包含在 R IDE 中?)?
你可以试试我通过这篇博文找到的formatR。
在 RStudio 中,菜单中有一个选项:代码 > 重新格式化代码。Windows 中的默认热键是 Ctrl+Shift+A