chjackson / flexsurv

The flexsurv R package for flexible parametric survival and multi-state modelling
http://chjackson.github.io/flexsurv/
53 stars 28 forks source link

Fix qgeneric without args #106

Closed ndunnewind closed 2 years ago

ndunnewind commented 2 years ago

If no args are passed, or if all args are included in matargs and/or scalarargs, qgeneric raises an error. For example, it is not possible to calculate the median of the standard normal distribution (without explicitly supplying the mean and sd):

> qgeneric(pnorm, .5)
Error in max(c(length(p), veclen, matlen)) : 
  invalid 'type' (list) of argument
chjackson commented 2 years ago

Thanks!