Generate vector field for phase portrait of mutualism model
mutualism_vector_field.RdUsed internally by plot_mutualism_portrait().
Arguments
- sim_df
Data frame of mutualism model simulation returned by
run_mutualism().- vec.density
Density of vectors, specified as a single numeric value larger than 0. e.g. If
vec.density = 20(default), a 20 \(\times\) 20 point grid evenly spaced along each axis is generated, where each grid point is the starting point of a vector.- vec.scale
Value to scale magnitude of vectors by, specified as a single numeric value larger than 0. e.g. If
vec.scale = 0.1(default) the magnitude of each vector is 0.1 times the magnitude of the vector produced by runningrun_mutualism()for one time step given each starting point (specified viavec.density) andparams(inherited fromsim_df).
Value
A data frame of vector start and end point values, collectively representing the vector field for a phase portrait of the model of mutualism with saturating functional response.