Is it possible to get RStudio to show function arguments and descriptions for custom functions?

前端 未结 2 1909
迷失自我
迷失自我 2021-01-17 19:27

The code completion in RStudio is great, and I really like how a popover appears to describe the arguments for the function inputs. For example, if one types matrix(

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-17 19:44

    To add to Hadley's answer in the comments, Rstudio is mining specific portions of the help files to generate the helper window. Specifically, tabbing before the parentheses brings up the "Usage" and "Description" sections and tabbing inside the parentheses or after a comma brings up the "Arguments" section. Therefore, not only does a package need to be made, but the help files must be generated to take advantage of this feature.

提交回复
热议问题