Scientific research should be reproducible. Your scientific reporting should enable others to repeat your research project. Transparent data processing can contribute to reproducible science. Every article, thesis or report contains a “methods” section. Here the author describes typically only on a high-level the calculations that were performed on the measurement data. People acquainted with the field of research can understand this. Others are left with questions. And sometimes even experienced scientists cannot deduce from the “methods” section alone what calculations were performed exactly. Not to mention the calculation of measurement errors…
An appendix with legible R code
But transparency does not have to be limited to a short section on used methods. You can integrate data processing into your report. Data processing system R uses easily legible code that you can insert dynamically into your report, for example as an appendix. Thus, you can stick to the usual “methods” section while giving additional total insight in your calculations with R. This leaves opportunity for others to improve on your work. And it renders your scientific work reproducible.
R code in separate text files
When using R with LyX and LaTeX, one best puts the R code in separate .R (text) files. Thus, one can run the R code on its own using for example R Studio. You connect your report from LyX with the R code files. The R code will run upon typesetting your report. Additionally, LyX can insert the contents of your R code files in your report as typeset text. Thus, the readers of the generated pdf file can discern the actual calculations you performed. See for an example report in pdf the blog post “Graphing nitrogen dioxide air concentration data”.
Set your Text offers tools for transparent data processing with R
A course or consultation with Set your Text enables you to switch to transparent data processing with R. Please get in touch for a talk on the options available.