* visualize:
Visualize asct per diagnosis per age
Visualize asct per diagnosis per year
Add basic histograms
Remove unused factor levels from data after limiting
It seems that calling library() within a function may fail silently.
Moving them out of the function at the beginning of utils.R fixes this.
One particular place, where all necessary libraries are loaded, seem to
be a much easier way than inside a function.
sma_init() can now be used to load all libraries and the data.
It is safe to call sma_init() multiple times. To forcefully reload the
data call sma_init_force().
At this time only solid tumors are important. This is a hard coded
switch, not very useful. But it get the job done and we can decide later
how this can be made better.
This will create the plot using the ggsurvplot from "survminer" package.
survminer user ggplot for plotting and comes with some powerful and nice
looking features.
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.
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.
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.