i.e. use the region.id of class nb from the spdep package rather than ignoring it as spdep::nb2INLA does?
I've been trying to link a column in my data containing these regions as a factor, to an INLA model with a graph describing their spatial arrangement.
#something like this
f(rgn16cd,
model = "bym2",
graph = inla_graphs$gb_regions)
It works if I coerce rgn16cd from factor to numeric. Is there a way to get the region names into the graph file?
Where nbs is a list of class nb, made using an spatial polygons object with row.names given values from a column of the @data slot of the spatial polygons object.
This code should return a graph with named element as shown.