RMarkdown support?

Hi!

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?

Cheers,
Bernhard

Hi @Bernhard !

There is an rmarkdown support. You can

  • 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.

Cheers,
Nicolas

Hi @Nicholas,

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.

Cheers,
Bernhard

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.

Then, you will have all options!

Cheers,
Nicolas

Hi!

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.

Thanks,
Bernhard

Hi!

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!

Cheers,
Nicolas

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.

Thank you,
Bernhard