Add ggplot2 layer to clinical data

Hi, I am having several questions on editing my clinical data for waterfall plot

  1. I would like to group my clinical data legend according it's category, eg: age group and population.
    Even though the plot function is specified on package under Bioconductor but the arguments, clinLayer stated: Valid ggplot2 layer to be added to the clinical sub-plot so I would take it as finding an answer from those who are familiar with ggplot2 function instead? https://rdrr.io/github/griffithlab/GenVisR/src/R/deprecated.R#sym-waterfall

    This is a picture of my current plot and all the legend labels are clustered together so I would like to separate all of them with the groupings like Age, Disease status, vital status, and population.

    I am not familiar what does it meant by a valid ggplot2 layer. I didn't post a reprex() as the data is not fully available online and I only interested in editing my clinical data by creating a valid ggplot2 layer.

  2. Besides how do i create a line to separate population as the plot shown in the link? https://genviz.org/module-03-genvisr/0003/03/01/tvti_GenVisR/ I tried to set the xintercept by variables in ClinData but it creates error: Error in UseMethod("rescale") :
    no applicable method for 'rescale' applied to an object of class "factor" . Is there any other online tutorial that is easier for me to apply?

Welcome any suggestions and comments! Thank you in advanced!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.