R markdown code chunk not executable after saving
See original GitHub issueDescribe the bug
The code chunk works perfectly before I named and saved the file. The following code, without naming and saving, can be linted and produce the right plot in vs code plot pane. But the same chunk will be no longer executable, and not linted, after I gave the file a name (such as test.Rmd) and saved the file.
To Reproduce
Steps to reproduce the behavior:
- press ctrl+N, choose file type as .Rmd
- type in the following code
test <- rnorm(1000)
plot(test)
- the code chunk was linted and if you run the code chunk, it works perfectly with a plot pane shows up
- save the file with name “test.Rmd”
- the lint disappeared, and the code chunk was no longer executable.
Do you want to fix by self? (We hope your help!)
No
Expected behavior I would like the code executable after the .Rmd file is named and saved.
Screenshots when unsaved, everything works fine.
after naming and saving, the code chunk is not executable
Environment (please complete the following information):
- OS: Windows 10
- VSCode Version: 1.65.2
- R Version: 4.1.2
- vscode-R version: 2.4.0
additional information
This is my first time raising an issue, please let me know if there is anything improper in my request.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
preventing a chunk run in rmarkdown
I have situation different than above, I want to present the script but should not run in html as this will take very...
Read more >2.6 R code chunks and inline R code | R Markdown
You can insert an R code chunk either using the RStudio toolbar (the Insert ... is compiled (if the code chunk was not...
Read more >Trouble with the knit function in R Markdown and difficulty ...
Hello, I have been having some consistent problems with R markdown recently, starting from being unable to save R files as R documents...
Read more >play button disappears in Rmd files · Issue #6220
Open a default Rmd file in the IDE via File->New File->R Markdown (HTML) ... executable SQL chunks, you need to enable inline code...
Read more >Chunk options and package options - Yihui Xie
Note that R Markdown has changed this default value to FALSE . When the chunk option include = FALSE , knitr will stop...
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
@tomule https://github.com/REditorSupport/vscode-R/wiki/R-Markdown#file-association is added to the wiki.
Confirmed! It worked on my PC.
Actually I did not touch the .jason files, I have no idea where they came from…
Many thanks!