rrstudiodevtoolsroxygen2

Shift+Cmd+D is copy-pasting prior line rather than documenting R package


Shift+Cmd+D is listed as the standard keyboard shortcut for documenting packages in R, but lately Shift+Cmd+D has been copy-pasting the previous line of code rather than generating package documentation. I have re-installed devtools and roxygen2 but this has not fixed the problem.

Can anyone help me trouble shoot this?


Solution

  • Go to "Tools"->"Project Options"->"Build Tools"->Check "Generate documentation with Roxygen". This makes Ctrl+Shift+D work for me. Since it is in the projects options, I guess you have to opt in to use roxygen for every project. I don't know if there is a way to make this the default.