Add several covariates to movement observations add_covariates add several covariates to a data frame with movement information. It adds : distance between location, spatial angle, speed, smoothed speed, persistence and rotation velocity (calculated with spatial angle).

add_covariates(x, ...)

# S3 method for Move
add_covariates(x, coord.names = c("x", "y"), ...)

# S3 method for ltraj
add_covariates(x, coord.names = c("x", "y"), ...)

# S3 method for data.frame
add_covariates(
  x,
  coord.names = c("x", "y"),
  smoothed = FALSE,
  timecol = "dateTime",
  units = "hour",
  radius = NULL,
  ...
)

Arguments

x

movement data

...

additional arguments

coord.names

names of coordinates column in x

smoothed

whether speed are smoothed or not

timecol

names of POSIXct time column

units

units for time calculation. Default "hour"

radius

for spatial angle calculations

Value

data.frame with additional covariates

Examples

if (FALSE) add_covariates(move_object, coord.names = c("x","y"), smoothed = T)
if (FALSE) {
data(simulmode)
simple_data <- simulmode[,c("dateTime","x","y")]
full_data   <- add_covariates(simple_data, coord.names = c("x","y"),
 timecol = "dateTime",smoothed = TRUE, units ="min")
}