A workflow for LibreOffice/Zotero/Rstudio and knitr
I am probably not alone in using LO and Zotero for writing and R/Rstudio for data analysis. I am interested to see if anyone else is interested in imagining an improved workflow for these tools.
Ok the R/Rstudio side of things, up until recently, the odfWeave package allows one to tear apart an odf XML file, add R-generated content, and then tidy it all back up into a new odf/XML file. But there are several problems:
- it was a very "batch" approach to things.
- I found it bulky and unwieldy at times
- it lacked the elegancy of knitr/latex, etc.
I am trying to imagine how one might get the same value out of LO/Zotero as one can get now from Zotero. I suppose in my dreams, Zotero and LibreOffice play together sufficiently nicely that you could escape from LO to Rstudio without great clutter or costs.
I'd welcome thoughts on how this might all come together.
Rob
Ok the R/Rstudio side of things, up until recently, the odfWeave package allows one to tear apart an odf XML file, add R-generated content, and then tidy it all back up into a new odf/XML file. But there are several problems:
- it was a very "batch" approach to things.
- I found it bulky and unwieldy at times
- it lacked the elegancy of knitr/latex, etc.
I am trying to imagine how one might get the same value out of LO/Zotero as one can get now from Zotero. I suppose in my dreams, Zotero and LibreOffice play together sufficiently nicely that you could escape from LO to Rstudio without great clutter or costs.
I'd welcome thoughts on how this might all come together.
Rob
I suspect that the strategy would have to be to grab the Latex or HTML5 generated out of R/Rstudio and bring that smoothly into LO.
So, there are elements here of LO, Rstudio, and Zotero and the trick is asking if anyone else is trying to square this circle. I think it is worth doing, but many minds...
Thanks,
R
So the question really does seem to be how to get this into LO - you can certainly ask this here, but it does not seem to me to be the best place for it, because Zotero is only of accidental relevance and will not be part of any workflow.
And far as Zotero goes, it also work in several other formats supported by R/knitr, including LaTeX/LyX via the Lyz plugin and reStructured Text via zotero-plain.
Here is how you would plug into the markdown process:
For example, I'm currently working in LyX on a paper about the Great Recession. One figure is a graph of land prices over time and overlaid with a graph of the CPI and recession shading. I'm preparing this with Rstudio, and it would be great to have it in a notebook that contains information about how to construct and update the graph, notes about the underlying data, and observations about the patterns revealed. Each of the three data sources has its own citation requirements, and logically this should be included in the notebook. So this most definitely is a job for Zotero.
Ideally, the stuff in the notebook would easily and selectively integrated into the LyX document, so there's no duplication of effort and appropriate changes automatically propagate to all documents that rely on the graph. While this is not primarily a Zotero issue, the relations between Zotero, the .bib file containing the references used in the paper, and the references used in the R Notebook (presumably stored in the same .bib file) may require some thought on the Zotero side. (LyZ comes to mind as a tool that might serve as a model.)
http://r.iresmi.net/2019/02/02/bibliography-with-knitr-cite-your-references-and-packages/