【发布时间】:2016-07-06 09:01:09
【问题描述】:
根据快捷键帮助(Alt+Shift+K)组合Ctrl+ Shift+D 应该运行文档例程。 (这在 Hadley Wickhams “R packages”http://runsheng.github.io/attachment/r-packages.pdf 的第 5.1 节中也有提及。)但在我的 RStudio 设置中,它会将所选行加倍(所以我不相信这是答案中提出的全局使用问题这里:Visual Studio won't recognize key combination)。在https://support.rstudio.com/hc/en-us/community/posts/201819358-Ctrl-Shift-D-doesn-t-run-document-in-preview-release 上有人提出了这个问题,但没有解决方案。我怎样才能让 RStudio 做它应该做的事情?
我使用的是 RStudio 版本 0.99.902,sessionInfo() 给出:
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] hmi_0.1.0 roxygen2_5.0.1 coda_0.18-1 MASS_7.3-45 devtools_1.12.0
loaded via a namespace (and not attached):
[1] magrittr_1.5 tools_3.3.1 withr_1.0.2 rstudioapi_0.6 Rcpp_0.12.5
[6] memoise_1.0.0 stringi_1.1.1 grid_3.3.1 stringr_1.0.0 digest_0.6.9
[11] lattice_0.20-33
【问题讨论】:
-
只是想说我也有这个问题,直到大约一个月前才出现。我相信这可能是新版本 RStudio 中的一个错误。 @Qaswed,您可以转到 RStudio > 工具 > 修改键盘快捷键并手动编辑“重复选择”的快捷键,现在设置为与文档包相同的键
-
感谢@LuisUsier 的提示。当我将“重复选择”更改为其他内容时(我选择了 Shift+Alt+F),Ctrl+Shift+D 没有执行任何操作。另外,当我将“Roxygenize Package”(所需快捷方式的名称)更改为 Ctrl+Shift+Y 时。
-
是的,我也遇到了同样的情况。