cm.school | R Documentation |
Calculates the center of mass of a (simulated) school in 1D, 2D or 3D, or based on acoustic data.
cm.school(school, mass = 1, subset = NULL, na.rm = TRUE, excl.neg = TRUE)
school |
is either a list of x-, y- and z-positions and mass of the fish (named "psxf", "psyf", "pszf" and "mass"), a list of x-, y- and z-positions and volume and acoustic intensity of the voxels (named "psxx", "psyx", "pszx", "volx" and "vbsc" or "mvbs"), or a matrix of columns holding the positions along each dimension. |
mass |
is the mass of the fish. |
subset |
is a numeric or logical vector defineing which positions to include in the calculation of center of mass. |
na.rm |
is used in sum(). |
excl.neg |
is FALSE if negarive mass values are to be included in the calculation of the centers of mass of the school. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.