R markdown: Knit button and keyboard knit shortcut doesn't work
See original GitHub issueDescribe the bug I use the same rmd file as in #886 in this report. (The preview problem has been fixed.) When the setting “Knit: Use Background Process” is on, the knit button and keyboard shortcut (Ctrl + Shift + k) don’t work. The output panel of R markdown showed nothing. But after turning off the “Knit: Use Background Process”, the rmd file can be knitted correctly.
To Reproduce Steps to reproduce the behavior:
- turn on “Knit: Use Background Process”
- Click on ‘Knit’
Do you want to fix by self? (We hope your help!)
No, I don’t know how vscode works.
// R.exe path for windows
"r.rterm.windows": "D:\Softwares\Anaconda3\Scripts\radian.exe",
// R path for Mac OS X
"r.rterm.mac": "",
// R path for Linux
"r.rterm.linux": "",
// R command line options (i.e: --vanilla)
"r.rterm.option": [--no-save --no-restore],
// An optional encoding to pass to R when executing the file, i.e. 'source(FILE, encoding=ENCODING)'
"r.source.encoding": "UTF-8",
// Keeping focus when running
"r.source.focus": "editor",
// Use active terminal for all commands, rather than creating a new R terminal
"r.alwaysUseActiveTerminal": false,
// Use bracketed paste mode
"r.bracketedPaste": false,
// Enable R session watcher
"r.sessionWatcher": true,
// Delay in milliseconds before sending each line to rterm (only applies if r.bracketedPaste is false)
"r.rtermSendDelay": 8,
Expected behavior The rmd file can be knitted correctly when “Knit: Use Background Process” is on.
Screenshots
“Knit: Use Background Process” is on:
“Knit: Use Background Process” is off:
Environment (please complete the following information):
- OS: Windows
- VSCode Version: 1.62.3 (user setup)
- R Version: 4.1.1
- vscode-R version: v2.3.4
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
17.1 Use RStudio keyboard shortcuts | R Markdown Cookbook
Task Windows & Linux macOS
Insert R chunk Ctrl+Alt+I Command+Option+I
Preview HTML Ctrl+Shift+K Command+Shift+K
Knitr document (knitr) Ctrl+Shift+K Command+Shift+K
Read more >Knitr button completely unresponsive - R Markdown
Hi there, When I try to press the 'Knit' button on RStudio - nothing happens. Literally nothing occurs. A "R Markdown" dialog box...
Read more >Find keyboard shortcuts don't work in knitted R Markdown ...
Knit an R Markdown file with preview in window. Describe the problem in detail. The keyboard shortcut for finding, CMD-F , doesn't go...
Read more >I can't find "Knit" button in RStudio - Stack Overflow
RMD file the knitting will not work. Then in your file explorer, find where you saved the file. Right-click the file and click...
Read more >15 Common Problems with rmarkdown (and some solutions)
To avoid problems in the first place, I try and do the following: Develop code in chunks and execute the chunks until they...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ElianHugh Looks like we should check the usage of workspace folder in the rmarkdown part of code.
I believe that it’s just a misunderstanding. The workspace Elian is talking about is the working path set by the explorer in the sidebar, not the .rdata file. After setting the directory in explorer, the button should work.