read.graph.RdConstruct a graph-object from a file or a matrix; write graph-object to file
The filename of the graph.
An inla.graph-object, a (sparse) symmetric matrix, a filename containing the graph,
a list or collection of characters and/or numbers defining the graph,
or a neighbours list with class nb (see spdep::card and
spdep::poly2nb for for details of nb and an example a function
returning an nb object
The mode of the file; ascii-file or a (gzip-compressed) binary. Default value depends on
the inla.option internal.binary.mode which is default TRUE; see inla.setOption.
An inla.graph -object
An inla.graph -object
Not used
Only read the size of the graph
Additional arguments. In inla.read.graph,
then it is the graph definition (object, matrix, character, filename), plus extra arguments.
In inla.write.graph it is extra arguments to inla.read.graph.
The output of inla.read.graph, is an inla.graph object, with elements
is the size of the graph
is a vector with the number of neigbours
is a list-list with the neigbours
list with connected component information
idis a vector with the connected component id for each node (starting from 1)
nis the number of connected components
nodesis a list-list of nodes belonging to each connected component
Methods implemented for inla.graph are summary and plot.
The method plot require the libraries Rgraphviz and graph from the Bioconductor-project,
see https://www.bioconductor.org.
inla.spy