Fast track publishing with R using knitr and R2DOCX

This is a past event

72 people went

MEB - Inst. för med. epi. & biostatistik

Nobels väg 12A · Stockholm

How to find us

You can find a KI-map to MEB here:

Location image of event venue


NOTICE: Due to the wide interest in this topic and the large number of first-time attendees, the evening will start with a microlecture on the topic of "R in 12 minutes: An introduction". The lecture will give a brief overview of R and is aimed at newcomers to R who have some experience of statistical programming in other statistical packages such as SPSS or SAS. Our scheduled programme will start at around 18:15.

Writing up your precious article that you gathered months/years of data may seem like a minor task, but as many of you know - the obstacles are plentiful. For instance, a common issue is realizing (actually your supervisor realizes) that you need to exclude some patients as they don’t match the inclusion criteria, thus changing all the tables, estimates and other neat things that you have monotonously copied from your statistical package into your manuscript. To speed this task you can use knitr/markdown and R2DOCX by auto generating tables, plots and text.

The knitr session (Max Gordon)

The knitr-package allows easy creating of documents both in LaTeX and markdown format. While the LaTeX is pretty, most medical journals only accept Word-documents and therefore the session focuses on the markdown alternative.

I will show how a markdown document is structured, the integration with RStudio, and how to convert the generated html-file into a Word-file. I will also briefly touch up on cascading-style-sheets, options for tables, dealing with citations and some caveats that I’ve come across.

The R2DOCX session (Jakob Bergström)

The R2DOCX-package allows for direct generation of Word-files. All it requires is Java and although it is still in development (not on CRAN) the package is mature enough for production environment. You can choose exactly where to add images, text and tables. By using a template it can be ideal way to auto generate a report with all the required logos, fonts etc.

I will show how to convert a knitr-generated LaTeX-report into a Word-file. The report contains the usual images, tables and descriptions.