calc_speed: Calculate speed along a path

View source: R/prepare_covariates.R

calc_speedR Documentation

Calculate speed along a path

Description

calc_dist calculate speed between locations, taking a dataframe as input. Speed can also be smoothed over the two steps before and after the each point.

Usage

calc_speed(
  x,
  coord.names = c("x", "y"),
  timecol = "dateTime",
  smoothed = FALSE,
  units = "hour"
)

Arguments

x

data.frame with locations

coord.names

names of coordinates column in x

timecol

names of POSIXct time column

smoothed

whether speed are smoothed or not

units

units for time calculation. Default "hour"

Value

vector of distance

Author(s)

Remi Patin

Examples

## Not run: calc_speed(df,coord.names = c("x","y"), timecol = "dateTime",
smoothed = T)
## End(Not run)

segclust2d documentation built on Aug. 21, 2023, 9:10 a.m.