Information about the used Software

All of the thesis was done in the R-Studio IDE using R Markdown extended with the bookdown package. R Markdown allows the user to execute R code in so-called code chunks that are located between the texts. These code chunks can be used, for example, to generate charts that can be displayed in the output instead of the code. Each chunk of code can be cached to avoid time-consuming repetition, and the caching can be disabled to recreate the entire thesis, including all the code and charts it contains. This is helpful primarily for the user to ensure stability of older code, and secondarily for the reader who has access to the R-Markdown files, as they can trace back any analysis or diagram displayed. R-Markdown can produce various formats, such as HTML or PDF output, both of which are used for this thesis. The HTML output is deposited in the corresponding GitHub repository at [@GitHub]. The recommended output format of R-Markdown is an HTML file, which has all the capabilities of a web page with HTML, CSS, and Javascript. For this reason, some javascript code has been added to the HTML version to allow the reader to expand important blocks of code alongside the text. The bookdown package is used as a template that contains the necessary styles and formatting to write books with an HTML or PDF output including table of contents, references and more. Together with the possibilities of the programming language R, a reproducible and traceable thesis can be created.

R Version and Packages

The used packages and versions can be found in the table below:

r{13}\\selectfont"} options(width=70) x <- capture.output(sessionInfo()) x <- x[-c(5:11)] z <- sapply(x, function(k){cat(paste0(k, "\n"))})

Reproducibility

Everything in this thesis can be reproduced via the public GitHub repository at [@GitHub]. All code sections that use random number generators start with seed 0 to ensure the credibility of the analyses and diagrams shown.

R Functions

The following functions were created to simplify working with R Markdown and to take advantage of the HTML version of this thesis.

html_save()

Converts HTML plots to images to display them in the PDF output. This allows the author to use the desired plot packages without having to worry about the different output formats. The disadvantage is, that it is not possible to define the font size within the charts and tables exactly, because the saved images are adjusted to the page width by latex.

javascript files

The javascript files are located in the www/ folder of the attached GitHub repository and are used for the HTML version of this thesis to make code blocks expandable. This allows the reader to inspect the code used and to follow analyses in detail.



AxelCode-R/Master-Thesis documentation built on Feb. 25, 2023, 7:57 p.m.