subsample: Subsample a Trajectory

Description Usage Arguments Value Author(s) See Also Examples

View source: R/subsample.r

Description

This function subsamples a regular trajectory (i.e. changes the time lag between successive relocations).

Usage

1
2
subsample(ltraj, dt, nlo = 1,
          units = c("sec", "min", "hour", "day"), ...)

Arguments

ltraj

an object of class ltraj

dt

numeric value. The new time lag (should be a multiple of the time lag in ltraj)

nlo

an integer, or a vector of integers (with length equal to the number of bursts in ltraj), indicating the position of the first location of the new bursts in the old bursts. For example, if the previous time lag is equal to 300 seconds and the new time lag is 900 seconds, the new bursts may begin at the first, second or third relocations of the old bursts in ltraj.

units

character string. The time units of dt

...

additional arguments to be passed to other functions

Value

An object of class ltraj

Author(s)

Clement Calenge clement.calenge@oncfs.gouv.fr

See Also

ltraj for additional information on objects of class ltraj, is.regular for regular trajectories.

Examples

1
2
3
4
5
data(capreotf)
plot(capreotf)

toto <- subsample(capreotf, dt = 900)
plot(toto)

Example output

Loading required package: ade4
Loading required package: tkrplot
Loading required package: tcltk
Loading required package: shapefiles
Loading required package: foreign

Attaching package: 'shapefiles'

The following objects are masked from 'package:foreign':

    read.dbf, write.dbf

Loading required package: sp

************************************************
************************************************
THE PACKAGE adehabitat IS NOW DEPRECATED!!!!!!!
 It is dangerous to use it, as bugs will no longer be corrected.
It is now recommended to use the packages adehabitatMA, adehabitatLT, adehabitatHR, and adehabitatHS.
These 4 packages are the future of adehabitat.
 They have a vignette explaining in detail how they can be used.
They implement more methods than adehabitat
They are based on the more common and more clever spatial classes implemented in sp.
Bugs are corrected frequently.
Really, avoid to use the classical adehabitat, unless you have a very good reason for it.

*****THIS IS THE VERY LAST WARNING*****
 This is the last version of adehabitat submitted to CRAN (at the time of writing: 2015-03-27).
 THE NEXT VERSION OF adehabitat WILL JUST BE A VIRTUAL PACKAGE LOADING ALL THE PACKAGES DESCRIBED ABOVE.

Warning messages:
1: no DISPLAY variable so Tk is not available 
2: loading Rplot failed 

adehabitat documentation built on Jan. 28, 2018, 5:02 p.m.