chjackson / flexsurv

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

t ordering #179

Closed mikesweeting closed 10 months ago

mikesweeting commented 10 months ago

Output of standsurv matches the ordering of the t input argument, and duplicates in t produce duplicates in standsurv output

chjackson commented 10 months ago

Great, thanks for dealing with this, Mike!

I found that when the tests were run under devtools::test() (but not when run interactively, I didn't figure out why...) I got a warning from inner_join(x,y) inside tidy.standsurv about a "many-to-many relationship", i.e. there were multiple matches in y for a row in x. I fixed this by doing distinct() on the LCL and UCL data frames before joining them to the estimates.

Also added this line to fix a R CMD check NOTE about "global variables", which is an annoyance about programming with tidyverse.