addad stat_masterthesis.R file and integrate it in *.Rnw file using read_chunk()