I'd like to pitch the question discussed here to the SO community: what is the best way for Sweave users to collaborate with Word users?
I'm trying to move my entire workflow to R and Sweave (or similar, e.g. maybe Knitr will prove more useful). However, the last step in my workflow is usually to write a manuscript with collaborators. They work by passing MS Word documents back and forth, and editing text using Track Changes.
Let's stipulate that I can't convince any of them to learn any new software - their process isn't going to change. I am looking for a straightforward way to:
1.) send Sweave-created documents to coauthors
2.) allow them to open the documents in Word and make tracked changes
3.) receive the edited documents and reincorporate them into Sweave, ideally with co-authors' changes highlighted in some way
4.) And if the solution works for OSX, that would be great.
The discussion on the R help mailing list focusses on SWord which appears to be undocumented and available only for Windows. Does anyone know if it is good? The discussion on Vanderbilt's biostatistics wiki is good on ways to get Sweave documents into Word-readable forms, but no so much on how to integrate edited Word documents with Sweave.
With Office and OneDrive or SharePoint, multiple people can work together on a Word document, Excel spreadsheet, or PowerPoint presentation. When everyone is working at the same time, that's called co-authoring.
Did you know that Microsoft Word has built-in collaboration tools? Word supports real-time chat and co-editing of documents online. Ready to start? All you need is Microsoft OneDrive and Word 2016.
Microsoft Word Put your best words forward with an Office 365 subscription. Real-time co-authoring in Word 2016 allows for this and, in fact, has been available since 2013, when we introduced real-time collaboration in Office Online.
I use a combination of approaches, depending on who is editing. My default is to have editors / collaborators markup a PDF or hard copy. Foxit Reader is free and provides more extensive PDF commenting tools than Acrobat reader, although reader allows comment bubbles.
For more extensive contributions, it helps that I separate out the Sweave parts of a document from the main text, e.g. by writing results in results.Rnw and the inserting \input{results.tex}
into the main document. This allows you to send around the part that does not include the R markup. You can also copy-paste everything between the preamble and bibliography into a word document, and ask users to ignore the markup. If you copy-paste from an editor with syntax highlighting, it can be copied to word, making the process easier.
You might also consider using Inference for R, which is like Sweave for Word. There is also Lyx, which requires users to learn a new program, but which is easier to use than Sweave.
I've always thought that this was a good use case for odfWeave....
I've been researching on the issue for a couple of weeks now, and here is what I have come up with so far. Unfortunately, my newbie reputation does not allow to post all the proper links, but Google search should be evident for all the packages involved.
Conversions between LaTeX and Word are cumbersome, therefore I consider it feasible to use a third format which allows export to both LaTeX and Word. Several alternatives are available. First, you have Markdown, a markup language which I am using even to write this post :). Markdown in itself is not really suited for academic writing, but there is an extension in development that allows for citations, footnotes and other features of technical writing.
Second, perhaps more promising, the reStructuredText markup from Docutils, which can handle citations already. My idea is to write my articles in plain text using reST, weaving (or knitting) them using knitr into HTML or PDF, this is supported natively from within R. R code can be embedded of course, that is the whole point.
To convert the text to .doc one can use Pandoc, which can also handle citations, and is able to convert between multiple document formats, including PDF, Word, OpenDocument etc.
I still have to figure the whole workflow out. Converting between formats without the citations seems pretty straightforward to me (even though it requires some minor editing in Word afterwards). Working with citations still requires some figuring out. Hope this information helps whoever is on the same path of Reproducible Research, but also in the need to share texts with non-geek population.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With