Tools for the Analysis of Animal Track Data

Functions for accessing and manipulating spatial data for animal tracking, with straightforward coercion from and to other formats. Filter for speed and create time spent maps from animal track data. There are coercion methods to convert between 'trip' and 'ltraj' from 'adehabitatLT', and between 'trip' and 'psp' and 'ppp' from 'spatstat'.


Travis-CI Build Status AppVeyor Build Status CRAN_Status_Badge Coverage Status

The trip package provides functions for accessing and manipulating spatial data for animal tracking. Filter for speed and create time spent plots from animal track data.

Installing

The package is easily installed from CRAN in R.

install.packages("trip")

Install dev version

To install the development package from Github, use devtools:

devtools::install_github("mdsumner/trip")

TODO

  • Probability image. The SGAT (and tripEstimation) packages have functions for dealing with spatial track summaries that are atomized to the level of each time step. There are methods for combining summaries from multiple tracks and for casting arbitrary durations (by sum) to standard image structures. This would be a good feature to replace the existing tripGrid function by storing the individual grid summaries for each implicit line segment.

  • Coercion to/from other classes See spbabel.

  • Validation Must include a detailed report object of where the problems are, and how to filter/fix/flush them.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

News

CHANGES IN trip VERSION 1.5.0

o removed a problematic warning

o new data set walrus818, courtesy of Anthony Fischbach

o new function homedist

o added imports for recommended package functions

o new trip<- replace method for one-step trip creation

o removed character method for spTransform, now standard in rgdal/sp

BUG FIXES

o fix for last namespace clash with dplyr in cut.trip

o argos.sigma was not vectorized on adjust for argment x, fixed

CHANGES IN trip VERSION 1.1-21

o modified PROJ.4 string in vignette for CRAN

o moved vignette stub to knitr markdown

CHANGES IN trip VERSION 1.1-20

o rasterize for trip can now accept a 'field' argument to replace the default time-spent calculation

o trip now Imports raster, for use of rasterize to replace tripGrid

o new function homedist

o bug fix via complete rewrite of cut.trip, including modification of argument name "dates" to "breaks"

o modified example with missing +ellps to satisfy new PROJ.4 (thanks to Roger Bivand)

CHANGES IN trip VERSION 1.1-19

o urgent bug fix release for trackDistance

o Package Title Gets Title Case

CHANGES IN trip VERSION 1.1-18

OVERVIEW

o fixed missing Suggest for rgdal for CRAN (thanks to Prof. Ripley)

o new function sda, and efficient and flexible implementation of argosfilter

SIGNIFICANT USER-VISIBLE CHANGES

o cut can now accept a character string like "2 hours" as per cut.POSIXt, rather than all explicit interval boundaries

CHANGES IN trip VERSION 1.1-17

OVERVIEW

o This release provides some overdue cleanup and improvements.

SIGNIFICANT USER-VISIBLE CHANGES

o readArgos is now significantly faster and more reliable

o new function explode to convert to a SpatialLinesDataFrame with line segments for every individual time step

o trackAngle is now generic with methods for trip objects and matrix/es

BUG FIXES

o fixed line width in vignette

CHANGES IN trip VERSION 1.1-16

o trackDistance is now generic, with a new argument "prev"

o new function trackAngle to calculate internal angles between segments

o fixed install problem with imports from maptools/sp, and other problems with the namespace, all doc is now done with roxygen2

CHANGES IN trip VERSION 1.1-15

OVERVIEW

o modification to to summary.trip to give summaries of distance, speed

o implemented trackAngle() to provide turning angles along trips

o method for spTransform("trip", "character")

CHANGES IN trip VERSION 1.1-14

o much of the source was overhauled and tidied up

o cut.trip added to replace old function trip.split.exact which is deprecated

o tripTransform deprecated, replaced by method for spTransform (generic from sp)

    CHANGES IN trip VERSION 1.1-12

o fix for ltraj2trip

ACKNOWLEDGEMENTS

o Thanks to Sebastian Luque for ltraj2trip patch

    CHANGES IN trip VERSION 1.1-12

o reduced time taken by examples by removal with dontrun, thanks to CRAN maintainers

    CHANGES IN trip VERSION 1.1-11

ACKNOWLEDGEMENTS

o Thanks to Sebastian Luque for advice on NAMESPACE fixes

o thanks to Andrew Irwin for update on trackDistance documentation

OVERVIEW

o added a NAMESPACE file and package updates to make everything work, maptools is now Imports, rgdal, adehabitatLT and lattice are Suggests

o modified dependency on adehabitat to adehabitatLT

o removed class definitions for ppp, psp and owin, now imported from maptools

o update to trackDistance documentation

    CHANGES IN trip VERSION 1.1-10

SIGNIFICANT USER-VISIBLE CHANGES

    o Suppressed warnings from owin for duplicate points used in
    pixellate/tripGrid.

o spatstat is now required, not just suggested.

BUG FIXES

o superimpose used rather than deprecated superimposePSP

    o consistency for S3 generic / method arguments in as.ppp.trip
    and as.psp.trip

    o fixed incomplete "[" method documentation for trip


CHANGES IN trip VERSION 1.1-9

SIGNIFICANT USER-VISIBLE CHANGES

o speed improvement in speedfilter, 6x or more


CHANGES IN trip VERSION 1.1-8

ACKNOWLEDGEMENTS

 o Thanks to Sebastian Luque for pointing out a problem with
 zero-length lines.

 o Thanks to Francois Rousseu for bug report in readDiag.

SIGNIFICANT USER-VISIBLE CHANGES

o new function filter.penSS to provide non-destructive filter
for track data.

o colours for plotting lines(trip) has been updated, with
smarter defaults and leveraging new capacity in sp for passing
in lwd/lty/col etc.

o trackDistance has been completely replaced as a wrapper to
an R-level gcdist. This can provide a roughly 3x speed-up for
running trackDistance and speedfilter.

o Removed "push" argument from trackDistance.

o New as.ppp and as.psp methods to convert from trip to
spatstat's point and line classes.

o New as(trip, "SpatialLinesDataFrame") method to convert to
sp lines.

    o spTransform method for trip objects.

o trip now Suggests rgdal for spTransform use.

o new as.ltraj.trip methods for ltraj class in adehabitat

o trip now Suggests adehabitat for coercion to ltraj

BUG FIXES

o readDiag would fail when no invalid records were present.

o Zero-length lines would propagate NaNs to the entire
tripGrid for method "density" (fixed by spatstat > 1.19-1).


CHANGES IN trip VERSION 1.1-6

ACKNOWLEDGEMENTS

 o Thanks to Adrian Baddeley for updates to pixellate.psp in
 spatstat 1.18-3 and 1.18-4.

 o Thanks to Edzer Pebesma for updates to the CVS development
 version of sp, methods for split and SpatialPixelsDataFrame.

SIGNIFICANT USER-VISIBLE CHANGES

o New function trip.split.exact to cut trip events at specific
time-based boundaries.

o Added method argument, including density and pixellate to
 tripGrid, using density.psp and pixellate.psp.


 o trip.R: updated tripGrid, replaced old interpolation
approximation with spatstat exact line/cross/cell logic
(pixellate.psp). Zero length line segments are supported by
trip, and their contribution is recorded by point in cell
measurement.  tripGrid.interp still exists for the old
approach, and kde method.

o added verbose argument to readArgos to suppress reporting of
duplicate time modifications.

o added summary of trip duration total to print.summary.tordata.

BUG FIXES o improvements to makeGridTopology which would sometimes give a silly result

o removed boilerplate tags in many Rd files

o removed unused \dots argument in speedfilter

o trip.R: validtordata required the ID component of a trip to
be numeric or factor. This now allows character.

o trip.R: updated setMethod("[", "trip" to use same argument
handling as SpatialPointsDataFrame

o Fixed harmless warning error in readArgos for longitudes > 180.


CHANGES IN trip VERSION 1.1-4

o trip.R: removed setReplaceMethod required by r50609 in R-devel.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("trip")

1.5.0 by Michael D. Sumner, 2 years ago


https://github.com/mdsumner/trip


Report a bug at https://github.com/mdsumner/trip/issues


Browse source code at https://github.com/cran/trip


Authors: Michael D. Sumner [aut, cre] , Sebastian Luque [ctb] , Anthony Fischbach [ctb]


Documentation:   PDF Manual  


Task views: Analysis of Spatial Data, Handling and Analyzing Spatio-Temporal Data


GPL-3 license


Imports maptools, MASS, raster, spatstat

Depends on methods, sp

Suggests adehabitatLT, knitr, rgdal, testthat, covr, rmarkdown, diveMove, argosfilter


Imported by SDLfilter.

Suggested by spbabel.


See at CRAN