Z Package conventions - openpharma/visR GitHub Wiki
Function names
Estimator functions: visR::estimate_xxx
- Input is data set, following the Analysis Data Model (ADaM)
- Typically calculate model estimates together with confidence limits
- Output is a model object
An example is visR::estimate_KM function that estimates the Kaplan-Meier estimates from a Basic Data Structure (BDS) Time-to-Event (TTE) data set. The output is an survfit
object.
plotting functions visR::plot, visR::add_xxx
- Recognize the model object and proposes a visual pleasing representation using ggplot2
- Layers can be added
- Plots can be modified using ggplot
An example is visR::plot function that plots the survival function from a survfit
object after which a risktable is added using add_risktable
Summary functions: visR::get_xxx
- Recognize the input object and summarizes it accordingly
- output is a data frame with the summarized data