Learn R Programming

LobsterCatch

The second version of LobsterCatch package

Copy Link

Version

Install

install.packages('LobsterCatch')

Monthly Downloads

167

Version

0.1.0

License

GPL (>= 3)

Maintainer

Nickchi Payman

Last Published

June 19th, 2023

Functions in LobsterCatch (0.1.0)

updateGrid

This function updates the coordinate of each lobster at each timestep,
trapInPath

This function determines if lobster gets into a trap and is caught.
replicateCoordinates

This function replicates the coordinates where there are multiple lobsters
rpoisD

This function generates a Poisson or a negative binomial distribution for lobsters in the arena
SimulateLobsterMovement

Function to run the simulation based on defined parameters
catchability

This function calculates the probability of entry into a trap, also known as catchability. It includes the parameters described in Addison and Bell (1997), and can also incorporate the length of the catch while calculating the catchability.
GetSimOutput

This function extracts the results of simulation.
LobsterSizeFreqs

Lobster size frequency data
distanceToClosestTrap

The function finds the closest trap to a lobster and calculates the distance.
distanceToTrapCalculator

This function calculates the Euclidean distance between Trap(s) and each lobster. The function is internally called in distanceToClosestTrap function.
directionalMove

This function models movement of lobsters toward the trap.The distance of lobsters to trap determines the magnitude of those moves. As lobster gets closer to the trap, the magnitude of its directional move becomes larger and the random move becomes smaller.
dispersion

This function calculates the variance to mean ratio (also known as dispersion index).
initialLobsterGrid

This function simulates an arena (or grid) with lobsters in it based on the provided density, size and sex distribution.
randomMove

The function randomly selects an angle (0:360) and moves the lobster. This function is called when a lobster is outside the area of influence.