From 67478d4a19aea74414675a538c0b3b8e59441b54 Mon Sep 17 00:00:00 2001 From: Sam Brilleman Date: Tue, 31 Oct 2023 23:47:21 +1100 Subject: [PATCH] Fix inherits - broken due to breaking change in splines2 0.5 splines2 v0.5.0 made a breaking change, and the class was renamed from iSpline to ISpline, and the order of the class heirarchy was also changed. Same for their mSpline class, etc. --- R/stan_surv.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/stan_surv.R b/R/stan_surv.R index c0aa6690..815e7e73 100644 --- a/R/stan_surv.R +++ b/R/stan_surv.R @@ -1732,8 +1732,8 @@ make_basis <- function(times, basehaz, integrate = FALSE) { basis_matrix <- function(times, basis, integrate = FALSE) { out <- predict(basis, times) if (integrate) { - stopifnot(inherits(basis, "mSpline")) - class(basis) <- c("matrix", "iSpline") + stopifnot(inherits(basis, "MSpline")) + class(basis) <- c("ISpline", "splines2", "matrix") out <- predict(basis, times) } aa(out)