Merck / gsdmvn

The goal of gsdmvn is to enable group sequential trial design for time-to-event endpoints under non-proportional hazards assumptions.
http://merck.github.io/gsdmvn/
GNU General Public License v3.0
3 stars 5 forks source link

Define an S3 class and related function for input #16

Open elong0527 opened 2 years ago

elong0527 commented 2 years ago

replacing the exposed tibble() and data.frame() calls for constructing non-trivial types of inputs with formally-defined classes and generators using S3 or else.

Without it, we are just assuming: 1) the developer always know what an input object has; 2) users always know what they should put into them; 3) users can construct them correctly.

Reference: https://adv-r.hadley.nz/s3.html

Example: ggplot2::aes https://github.com/tidyverse/ggplot2/blob/main/R/aes.r