formatR icon indicating copy to clipboard operation
formatR copied to clipboard

Use formatR with Rmarkdown?

Open oli666 opened this issue 8 years ago • 2 comments

Hi, probably more a feature request than an issue. formatR does current not work out-of-the-box with a complete markdown file using "tidy_file", does it? Sub-question: Is there a way in RStudio to use the formatR addin on a specific chunk only? Selecting the chunk before running the addin does not do the trick for me. Thanks, Oli

oli666 avatar Aug 24 '17 08:08 oli666

No, it cannot format an Rmd file at the moment.

RE: the addin, please feel free to improve it here: https://github.com/rstudio/addinexamples/blob/master/R/reformatAddin.R

yihui avatar Aug 24 '17 14:08 yihui

agree with @oli666 , the ability to format code inside Rmd chunks would be outstanding

rpietro avatar Nov 22 '17 15:11 rpietro