powered by
The function sf2ltraj is a simple function for converting sf objects to ltraj objects.
sf2ltraj
sf2ltraj(sfp, date, id)
A ltraj object. For more information on objects of this type see help(ltraj) and ?as.ltraj.
ltraj
help(ltraj)
?as.ltraj
an object of the class sf which contains the time-stamped movement fixes (as points) of the object(s).
sf
the name of the column containing the date-time information of each fix. Must be converted to a POSIXct type.
either a character string indicating the identity of the animal or the name of the column with the ID of the individuals.
The function sf2ltraj can be used to convert an sf object (stored as points) into an ltraj object.
conSpatial, ltraj2sf
data(deer) #points deer_pt <- ltraj2sf(deer) deer_tr <- sf2ltraj(deer_pt, date='date', id='id')
Run the code above in your browser using DataLab