Learn R Programming

moveHMM (version 1.0)

prepData: Preprocessing of the tracking data

Description

Preprocessing of the tracking data

Usage

prepData(trackData, type = c("LL", "UTM"), coordNames = c("x", "y"))

Arguments

trackData
A dataframe of the tracking data, including at least coordinates (either longitude/latitude values or cartesian coordinates), and optionnaly a field ID (identifiers for the observed individuals). Additionnal fields are considered as covariate
type
'LL' if longitude/latitude provided (default), 'UTM' if easting/northing.
coordNames
Names of the columns of coordinates in the data frame. Default: c("x","y").

Value

  • An object moveData, i.e. a dataframe of:
  • IDThe ID(s) of the observed animal(s)
  • stepThe step lengths - in kilometers if longitude/latitude provided, and in the metrics of the data otherwise
  • angleThe turning angles (if any) - in radians
  • xEither easting or longitude
  • yEither norting or latitude
  • ...Covariates (if any)

Examples

Run this code
coord1 <- c(1,2,3,4,5,6,7,8,9,10)
coord2 <- c(1,1,1,2,2,2,1,1,1,2)
trackData <- data.frame(coord1=coord1,coord2=coord2)
d <- prepData(trackData,type='UTM',coordNames=c("coord1","coord2"))

Run the code above in your browser using DataLab