chjackson / survextrap

Survival Extrapolation With a Flexible Parametric Model and External Data
https://chjackson.github.io/survextrap/
GNU General Public License v3.0
7 stars 3 forks source link

plot() produces an error #1

Closed mikesweeting closed 1 year ago

mikesweeting commented 1 year ago

Hi Chris,

This is a great package and I'm just starting to investigate it.

I've come across an error in the example

nd_mod <- survextrap(Surv(years, status) ~ 1, data=colons, chains=1)
plot(nd_mod, tmax=5)

Error in FUN(): ! Can't use !!! at top level.

chjackson commented 1 year ago

What version of ggplot2 do you have installed? Does updating that fix it? I suspect that some code in survextrap is assuming ggplot2 3.4.0 or later without declaring the version dependency - I'll add this to the DESCRIPTION for the moment, though I'm unsure whether this is too bleeding edge. It's sensible to keep packages up to date but it's a hassle to have to do it too often.

mikesweeting commented 1 year ago

I should have checked package versions before reporting this. Yes I was on an old version of ggplot2 (3.3.6) and updating this has fixed the issue.

Many thanks Mike

chjackson commented 1 year ago

Fixed in https://github.com/chjackson/survextrap/commit/c56e06674cdb78f0f09a9b340df4f5a199d6246c