distanceToClosestTrap: This function finds the closest trap to a lobster and...

View source: R/distanceToClosestTrap.R

distanceToClosestTrapR Documentation

This function finds the closest trap to a lobster and calculates its distance and returns the distance and trap number.

Description

This function finds the closest trap to a lobster and calculates its distance and returns the distance and trap number.

Usage

distanceToClosestTrap(Lobster, Trap)

Arguments

Lobster

location of lobster in the grid in x and y coordinates.

Trap

location of trap in x and y coordinates.

Value

Returns distance to closest trap and the trap number.


vpourfaraj/lobsterCatch documentation built on May 17, 2023, 1:37 p.m.