plotSpatialCov {momentuHMM} | R Documentation |
Plot observations on raster image
Description
Plot tracking data over a raster layer.
Usage
plotSpatialCov(
data,
spatialCov,
segments = TRUE,
compact = TRUE,
col = NULL,
alpha = 1,
size = 1,
shape = 16,
states = NULL,
animals = NULL,
ask = TRUE,
return = FALSE,
stateNames = NULL
)
Arguments
data |
Data frame or |
spatialCov |
|
segments |
|
compact |
|
col |
Palette of colours to use for the dots and segments. If not specified, uses default palette. |
alpha |
Transparency argument for |
size |
Size argument for |
shape |
Shape argument for |
states |
A sequence of integers, corresponding to the decoded states for these data. If specified, the observations are colored by states. |
animals |
Vector of indices or IDs of animals/tracks to be plotted.
Default: |
ask |
If |
return |
If |
stateNames |
Optional character vector of length |
Examples
## Not run:
stepDist <- "gamma"
angleDist <- "vm"
# plot simulated data over forest raster automatically loaded with the packge
spatialCov<-list(forest=forest)
data <- simData(nbAnimals=2,nbStates=2,dist=list(step=stepDist,angle=angleDist),
Par=list(step=c(100,1000,50,100),angle=c(0,0,0.1,5)),
beta=matrix(c(5,-10,-25,50),nrow=2,ncol=2,byrow=TRUE),
formula=~forest,spatialCovs=spatialCov,
obsPerAnimal=225,states=TRUE)
plotSpatialCov(data,forest,states=data$states)
## End(Not run)