R/segmentation_helper_functions.R
prep_data_internal.Rd
An internal function that calculates step lengths, turning angles, and time steps for a given animal ID.
prep_data_internal(dat, coord.names)
A data frame that contains the columns associated with the x and y
coordinates as well as the date-time. For easier interpretation of the
model results, it is recommended that coordinates be stored after UTM
projection (meters) as opposed to unprojected in decimal degrees (map
units). Date-time should be of class POSIXct
and be labeled
date
within the data frame.
character. A vector of the column names under which the coordinates are stored. The name for the x coordinate should be listed first and the name for the y coordinate second.
A data frame where all original data are returned and new columns are
added for step length (step
), turning angle (angle
),
net-squared displacement (NSD
), and time step (dt
).