Code autocompletion with lists in RStudio

后端 未结 1 879
伪装坚强ぢ
伪装坚强ぢ 2021-01-27 15:39

Given the following list, do I need to choose between cleaner code or autocompletion or can I have both? I\'m using the newest version of RStudio on MacOS 10.10.5.



        
相关标签:
1条回答
  • 2021-01-27 16:14

    Fortunately, it's possible to have both autocomplete and nicely formatted code. In RStudio, autocomplete works for both $ and [[ but it functions slightly differently.

    For indexing with $, the autocomplete list is triggered immediately after typing $.

    However, for [[, it's necessary to press tab before the autocomplete list is shown. And this works multiple levels deep just as it does with $.

    The comment above from @docendo discimus was helpful in finding this answer.

    0 讨论(0)
提交回复
热议问题