I find myself using RMarkdown as a primary context for my analyses more and more as it facilitates communication with my collaborators. Is there any RMarkdown / knitr support in RCode or is any planned or are we supposed to make suggestions on how RCode could improve over time?
Create a .Rmd choosing Rmarkdown file when creating a new file.
Open a .Rmd file
Then, you have your .Rmd file open in RCode with a contextual code coloration. You can compile it with the bar menu that appears with the file. If pandoc is not yet installed, RCode will propose you to do it with one click.
We improve RCode with updates over time, but do not hesitate to make suggestions, the feedback is always fruitful.
that sounds great. By the way, how can I choose a filetype when creating a new file? If I click “File → NewFile” or hit “Ctrl-N” RCode 4.1.1 just opens a “untitled-no.R” file without asking.
Should I use “Save as…” to determine filename and ending? If so, where should a bar menu open? I have not found it so far.
I guess your are not in a ‘project’ yet in RCode. A project in RCode is simply a folder. You can create or open one with the File menu. More details at R Project · PGM Documentation.
Yes, creating a project changed the New File behaviour and automated knitting works like a charm now.
Just out of curiosity: Is there some shortcut to enter code blocks? In the other IDE you’ll hit --i in an .Rmd file and that will enter two rows with three backticks each and an {r}. That comes quite handy as on a German keyboard, backticks are not really easy to type (you’ll need ) and you’ll need so many of them. So some shortcut for “new line and three backticks” would be worthwhile.
Unfortunately, there is not yet a shortcut to do this. However, it’s an easy feature to add and will likely be implemented for the next version of RCode. Thanks for the feedback!
It is not important but could be a nice addition. Either with Ctrl-Alt-i or as code completion option when one backtick is entered.
A different proposal for worthwhile additional functionality in the long run could be integration of Git and support for package development. Nevertheless, I will try this out the way it is now.