sf2ltraj: Convert sf spatial object to ltraj

View source: R/sf2ltraj.R

sf2ltrajR Documentation

Convert sf spatial object to ltraj

Description

The function sf2ltraj is a simple function for converting sf objects to ltraj objects.

Usage

sf2ltraj(sfp, date, id)

Arguments

sfp

an object of the class sf which contains the time-stamped movement fixes (as points) of the object(s).

date

the name of the column containing the date-time information of each fix. Must be converted to a POSIXct type.

id

either a character string indicating the identity of the animal or the name of the column with the ID of the individuals.

Details

The function sf2ltraj can be used to convert an sf object (stored as points) into an ltraj object.

Value

A ltraj object. For more information on objects of this type see help(ltraj) and ?as.ltraj.

See Also

conSpatial, ltraj2sf

Examples

data(deer)
#points
deer_pt <- ltraj2sf(deer)
deer_tr <- sf2ltraj(deer_pt, date='date', id='id')


wildlifeDI documentation built on Nov. 14, 2023, 1:09 a.m.