fmesher question- error with R. 4.3

9 views
Skip to first unread message

Nayantara Wijayanandana

unread,
Sep 22, 2025, 12:38:33 PM (2 days ago) Sep 22
to R-inla discussion group
Hello,

Please could you let me know if there is a workaround to upgrading my R version (4.3.1) so my model still runs with INLA.

Everything was working fine upto this point. But I started to get an error recently when I tried to rerun a model. I think this has to do with the version of fmesher, but maybe I am wrong. At this moment in time, I do not want to upgrade everything so would be grateful for any help to hone in on the problem.  I uploaded the version of INLA that was indicated for R 4.3.

Many thanks,
Nayantara

> library(INLA)
Error: package or namespace load failed for ‘INLA’:
 object ‘fm_identical_CRS’ is not exported by 'namespace:fmesher'
In addition: Warning message:
package ‘INLA’ was built under R version 4.3.3 

#Stack creation and inla analysis
s.index <- inla.spde.make.index(name="spatial.field", n.spde=spde$n.spde)
A.est = inla.spde.make.A(mesh=mesh,
                         loc=as.matrix(df.st[,c("x","y")]))
stack.est = inla.stack(data=list(obs=df.st$obs),
                       A=list(A.est,
                              1),
                       effects=list(c(s.index, list(Intercept=1)),
                                    list(df.st[,-1])),
                       tag='stdata')


INLA help

unread,
Sep 22, 2025, 12:40:43 PM (2 days ago) Sep 22
to Nayantara Wijayanandana, R-inla discussion group
Upgrade to R-4.5 …

Haavard Rue
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/r-inla-discussion-group/cf675752-cfff-4ae7-8119-f68992fe16a2n%40googlegroups.com.

Nayantara Wijayanandana

unread,
Sep 22, 2025, 1:08:33 PM (2 days ago) Sep 22
to INLA help, R-inla discussion group
Hello,

Thank you for the quick response. Yes, in parallel I upgraded to  R 4.5.1. on my desktop so I can compare.  I got this error :

Error in UseMethod("fm_dof") : 

  no applicable method for 'fm_dof' applied to an object of class "inla.mesh"

 

> packageVersion("INLA")

[1] ‘25.6.7’

> packageVersion("fmesher")

[1] ‘0.5.0.9004’

Havard Rue

unread,
Sep 22, 2025, 1:11:01 PM (2 days ago) Sep 22
to INLA help, Nayantara Wijayanandana, R-inla discussion group
When you upgrade to R 4.5, you need to reinstall all packages. Better, remove all, and then reinstall

Håvard Rue
Professor of Statistics
Chair of Statistics Program, CEMSE Division
King Abdullah University of Science and Technology
Thuwal 23955-6900, Saudi Arabia

Email: haava...@kaust.edu.sa
Office: +966 (0)12 808 0640
Mobile: +966 (0)54 470 0421
Research group: bayescomp.kaust.edu.sa
R-INLA project: www.r-inla.org
Zoom: kaust.zoom.us/my/haavard.rue

Finn Lindgren

unread,
Sep 22, 2025, 1:22:18 PM (2 days ago) Sep 22
to R-inla discussion group
You likely have a very very old, stored mesh object?
Best solution is to regenerate the mesh to get a modern object with the correct S3 class.
Fmesher also has conversion tools that may work, like
fm_as_fm(mesh)
the old inla.mesh class does have a conversion;method, according to


Finn
Reply all
Reply to author
Forward
0 new messages