A flexible function to set up or change the mosquito dispersal matrix (see xds_info_mosquito_dispersal).
The function was designed to dispatch on the first argument, name:
nameis a method nameoptionsis a named list that sets the parameters in a functionmake_K_matrix_nameBefore dispatching, the function sets
class(option) = "name"
Pre-dispatch cases were developed to make the function call more flexible: any
matrix can be passed as the first argument: or the user could set up an options list
and pass it
(e.g. Koptions is passed to setup_K_matrix in xds_setup). The pre-dispatch
parsing:
if
nameis a method name, setclass(options) = "name"if
nameis a matrix, setclass(options) = "as_matrix"if
nameis a list of options,
Available methods are:
"as_matrix" — sets up the matrix
"herethere" — calls make_K_matrix_herethere
"xy" – calls make_K_matrix_xy
"list" — for options lists
"zero" — sets up the zero matrix
"no_setup" — returns the
xdsobject without modification
Usage
setup_K_matrix(name, xds_obj, options = list(), s = 1)