Generates and writes to file, fish positions which are AR(1) but not interacting, by the model in Holmin et al. 2012, "Simulations of multi-beam sonar echos from schooling individual fish in a quiet environment".

1 2 3 4 5 | ```
ARsim_school(con = NULL, size = c(30, 20, 10), shape = c("e", "cc"),
pd = 1, pol = 16.9, sd = NULL, vel = c(0.5, 0, 0), current = c(0, 0,
0), T = 100, dt = 1, t0 = unclass(Sys.time()), pre = 10, x0 = c(0,
0, 0), gamma = c(0.8, 0.8, 0.8), spacing = NULL, seed = NULL,
form = NULL, maxfilesize = 3e+08)
``` |

`con` |
is a the path to the directory in which to put the files. |

`size` |
is a three element vector giving the x, y, and z size of the school (the axes, not the semi-axes). |

`shape` |
is the shape of the school, either given as one of the two pre-defined shape strings "e" (ellipsoid) and "cc" (cubic compound school structure), as a three column matrix of initial fish positions relative to the school center, or as a function applied to the grid of fish positions inside the size of the school. |

`pd` |
is the packing density of the school in fish per cubic meter. |

`pol` |
is the polarization of the school, given either by one value representing the mean angle deviation between individual and group heading (Huth and Wissel 1982), or as two values representing the mean angle deviation between individual and group heading in the azimuth angle and the elevation angle separately. If the polarization is to change between time steps, provide 'pol' as a one or two column matrix with time steps in the rows. |

`vel` |
is the velocity of the school center (x, y, and z) given either as one vector for constant velocity, or as a three column matrix for varying velocity. |

`T` |
is the number of time steps. |

`dt` |
is the time step difference (constant). |

`t0` |
is the start time in UNIX time. |

`x0` |
is the initial position of the school center. |

`gamma` |
is the three element vector of AR(1)-coefficients. |

`spacing` |
is the spacing between the fish, deduced from 'pd' if not given. 'spacing' can be used to define different spacing vertically and horizontally. |

`seed` |
is the seed if the simulation. |

`form` |
is a funciton used for transforming the positions of the school at time step 'i'. |

`maxfilesize` |
is the maximum size of the files. |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.