From 3df3729da2dab851d5b38ed81381c01a55c30d2e Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Sat, 14 Dec 2024 13:59:22 -0800 Subject: [PATCH] Fix bug from last commit with EDF printing --- DESCRIPTION | 2 +- R/print.R | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 77a47578..3f569290 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: sdmTMB Title: Spatial and Spatiotemporal SPDE-Based GLMMs with 'TMB' -Version: 0.6.0.9019 +Version: 0.6.0.9020 Authors@R: c( person(c("Sean", "C."), "Anderson", , "sean@seananderson.ca", role = c("aut", "cre"), diff --git a/R/print.R b/R/print.R index 05dc0c8e..99bb65d8 100644 --- a/R/print.R +++ b/R/print.R @@ -139,8 +139,10 @@ print_smooth_effects <- function(x, m = 1, edf = NULL, silent = FALSE) { if (!is.null(edf)) { if (is_delta(x)) { - lp_regex <- paste0("^", m, "LP-") + lp_regex <- paste0("^", m, "LP-s\\(") edf <- edf[grepl(lp_regex, names(edf))] + } else { + edf <- edf[grepl("^s\\(", names(edf))] } edf <- round(edf, 2) re_sm_mat <- cbind(re_sm_mat, matrix(edf, ncol = 1))