4 Commits

Author SHA1 Message Date
c3fecc1bf0 survival: Create functions for plots
Each plot has now its own function. This makes it easier to adjust the
creation and tweaking of a single plot. sma_plot_file() will now call
the individual plot function before saveing the plot.
2020-11-16 22:38:07 +01:00
f919a31527 utils: Add sma_load_data()
This function loads the data and adjust some wrong column types. It
shoulb be used from all other scripts to load the data. It the same
source data for all following calculations.
The data is stored inside a 'tibble' from the 'tidyverse' package.
2020-11-16 12:24:20 +01:00
815731cbcf utils: Hide garbage output from dev.off()
dev.off() prints not usefull messages like "null device 1" when
finishing. This supresses these messages.
2020-11-03 16:55:29 +01:00
a8c4b327a0 Introduce plot to file function
sma_plot_file(fname, ftype, title_list, legend_list, fun, ...)
can be used to write plot to a file.
It supports all output filetypes R can handle. Title and legend
arguments can be passed as lists.
All available plotting functions can be used, arguments go into a
variable argument list.
2020-10-22 18:29:13 +02:00