Learn R Programming

HMMoce (version 1.0.0)

getCtr: Get specified contour coordinates

Description

getCtr uses hmm.smoother output to calculate coordinates at a specified contour of each posterior distribution of the state

Usage

getCtr(distr, tr, g, threshold = 50, makePlot = FALSE)

Arguments

distr

is output array from hmm.smoother

tr

is output dataframe from calc.track

g

grid from setup.grid

threshold

numeric indicating the percent contour of interest. Default is 50 percent.

makePlot

is logical indicating whether or not to plot at each iteration

Value

a list of length T, dim(distr)[2], containing 1) coordinates of the contour at each time, t. 2) the x and y distance to that contour from the mean of the distribution (lat/lon in track). 3) reference coordinate from mean of distribution. 4) the points of intersection of the contour by which distance is measured in x and y