Learn R Programming

LobsterCatch (version 0.1.0)

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

Description

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

Usage

distanceToClosestTrap(Lobster, Trap)

Value

Returns distance to closest trap and saves the trap number in case of multiple traps.

Arguments

Lobster

location of lobster in the arena

Trap

location of trap in the arena