countCells: Overlay a grid and count cell crossings

View source: R/countCells.R

countCellsR Documentation

Overlay a grid and count cell crossings

Description

This function overlays a grid on the track generated by the trackPath function and counts the number of cells crossed by the animal. It is useful for returning count and proportional data abount an animal's path.

Usage

countCells(path.list, xgrid, ygrid)

Arguments

path.list

a list object created by the trackPath function

xgrid

an integer specifying the number of grid cells the arena should be divided into along its width

ygrid

an integer specifying the number of grid cells the arena should be divided into along its height

Value

If assigned to an object, a list containing the number of cells crossed and the proportion of total cells crossed; if not assigned to an object, a message in the console is returned.


aharmer/pathtrackr documentation built on June 3, 2023, 1:29 p.m.