to_track_df: Convert data frame to Movebank Env-Data track request format

Description Usage Arguments Examples

Description

Takes a data frame of latitudes, longitudes and times and generates the strictly formatted data frame needed to upload to Env-Data to obtain covariates for movebank.

Usage

1
2
3
4
5
6
7
to_track_df(
  df,
  time_name = "timestamp",
  long_name = "longitude",
  lat_name = "latitude",
  height_name = NA
)

Arguments

df

data.frame in movebank format: longitude and latitude in WGS84, timestamp in POSIXct or ymd_hms format, and height above ellipsoid (in m). If no timezone information exist, it will be interpreted as UTC time. If no height above ellipsoid provided it

time_name

column name for timestamp. The parameter default values matches ctmm telemetry object data.frame, so there is no need to specify them with telemtry data.frame.

long_name

column name for longitude

lat_name

column name for latitude

height_name

column name for height above ellipsoid. This column is optional and the name can be left as NA

Examples

1
2
3
4
5
library(ctmm)
library(data.table)
data(buffalo)
df <- data.frame(buffalo[[1]])
dt <- to_track_df(df)

ctmm-initiative/DDIM documentation built on Nov. 12, 2021, 7:48 a.m.