Write an academic paper in R?

R has become a very nice ecosystems that is not limited to programming or analysis but the full web and editing experience. Have you worried that you don't know enough LaTex and Microsoft Word drives you crazy when writing acadmic papers. Well a very nice option is to take advantage of R Markdown and the rticles R package. The latter comes with lots of templates for popular acadmic journals, which essentially turn them into the required LaTex format for you?

What about citations?

You can do @bibkey as you normally would for citation in LaTex using BibTex. Put all your BibTex entries in a .bib file.

Not just LaTex?

R Markdown utilizes 'pandoc' which means it can turn into other document formats such as HTML, Word and others. A cool use case here is the R Journal web document. R Journal doesn't use a publishing house so it compiles the articles themselves. I can simply compile my article in R markdown with the ouput option rjtools::rjournal_web_article. See my example here.

What about track changes?

You can make use of the online latexdiff tool if you have two versions of the R-generated LaTex file (.tex). Then you can just run the diff.tex file with the journal latex template. It's probably easiest to run it on Overleaf. Don't forget to define the latexdiff commands in your LaTex files. There's an latexdiffr package which essentially make this all seamlessly done within R, but I have trouble getting it to work as of today.

Go Top