plot.crwData: Plot 'crwData'

Description Usage Arguments Details See Also Examples

View source: R/plot_crwData.R

Description

Plot observed locations, error ellipses (if applicable), predicted locations, and prediction intervals from crwData or crwHierData object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'crwData'
plot(
  x,
  animals = NULL,
  compact = FALSE,
  ask = TRUE,
  plotEllipse = TRUE,
  crawlPlot = FALSE,
  ...
)

Arguments

x

An object crwData or crwHierData (as returned by crawlWrap).

animals

Vector of indices or IDs of animals for which information will be plotted. Default: NULL ; all animals are plotted.

compact

TRUE for a compact plot (all individuals at once), FALSE otherwise (default – one individual at a time). Ignored unless crwPredictPlot=FALSE.

ask

If TRUE, the execution pauses between each plot.

plotEllipse

If TRUE (the default) then error ellipses are plotted (if applicable). Ignored unless crwPredictPlot=FALSE.

crawlPlot

Logical indicating whether or not to create individual plots using crwPredictPlot. See crwPredictPlot for details.

...

Further arguments for passing to crwPredictPlot

Details

In order for error ellipses to be plotted, the names for the semi-major axis, semi-minor axis, and orientation in x$crwPredict must respectively be error_semimajor_axis, error_semiminor_axis, and error_ellipse_orientation.

If the crwData (or crwHierData) object was created using data generated by simData (or simHierData) or simObsData, then the true locations (mux,muy) are also plotted.

See Also

crwPredictPlot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# extract simulated obsData from example data
obsData <- miExample$obsData

# error ellipse model
err.model <- list(x= ~ ln.sd.x - 1, y =  ~ ln.sd.y - 1, rho =  ~ error.corr)

# create crwData object
crwOut <- crawlWrap(obsData=obsData,
         theta=c(4,0),fixPar=c(1,1,NA,NA),
         err.model=err.model)

plot(crwOut,compact=TRUE,ask=FALSE,plotEllipse=FALSE)

## End(Not run)

momentuHMM documentation built on Sept. 5, 2021, 5:17 p.m.