Reads a separate interactions config file and returns a local-interaction radius along with an \(S \times S\) interaction matrix for \(S\) species (rows = focal, columns = neighbour). If the file is missing or incomplete, a neutral matrix of ones and radius 0 are returned.
Value
A list with components:
radius
Numeric length-1; the interaction radius (0 disables interactions).
matrix
Numeric matrix of size \(S \times S\) with dimnames
LETTERS[1:S]
. Non-finite values are rejected.
Details
The interactions file is parsed as simple KEY = value
pairs. The
following keys are recognized:
INTERACTION_RADIUS
: non-negative numeric; distance threshold within which neighbours influence assignment probabilities.MATRIX_CSV
: path to a CSV containing a (sub)matrix with row names and column names corresponding to species labels (e.g. A..Z). Any missing rows/columns are filled with1
.EDGELIST_CSV
: path to a CSV with columnsfocal, neighbor, value
; entries are inserted into the appropriate cells of the full matrix.AUTO
: optional flag (TRUE
/FALSE
) enabling a simple built-in example structure if no CSV is provided.
If both MATRIX_CSV
and EDGELIST_CSV
are supplied,
MATRIX_CSV
takes precedence.