speed: Computes the Speed Between Successive Relocations of an...

Description Usage Arguments Value Note Author(s) See Also Examples

Description

speed measures the speed between successive relocations of animals, using objects of class traj.

Usage

1
2
speed(x, id = levels(x$id), burst = levels(x$burst), date = NULL,
      units = c("seconds", "hours", "days"))

Arguments

x

an object of class traj

id

a character vector giving the identity of the animals for which the speed is to be computed

burst

a character vector giving the identity of the circuits for which the speed is to be computed (see traj)

date

a vector of class POSIXct of length 2 (beginning, end) delimiting the period of interest

units

a character string. It determines how the speeds are computed. For example, if the coordinates are given in meters, and if units = "seconds", speeds are returned in meters per second.

Value

Returns a data frame with the following components:

id

the identity of the animal

x

if the speed is computed between the relocation 1 and 2, the x coordinate of the relocation 1.

y

if the speed is computed between the relocation 1 and 2, the y coordinate of the relocation 1.

date

a vector of class POSIXct, giving the date of relocation 1.

burst

the identity of the circuit

sp.x

the computed speed of the animal in the x direction

sp.y

the computed speed of the animal in the y direction

speed

the computed speed of the animal on the plane.

dt

the duration between the two relocations (in the units given by the parameter units).

Note

The function speed is deprecated. The class ltraj computes the speeds automatically (see ltraj).

Author(s)

Clement Calenge clement.calenge@oncfs.gouv.fr

See Also

traj

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
#### Computes the speed for each wild boar
#### monitored at Puechabon
data(puechcirc)
puechcirc <- ltraj2traj(puechcirc)
puechcirc

plot(puechcirc)
sp <- speed(puechcirc)
sp[1:4,]

## End(Not run)

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 
******** Data frame of class traj *********

Animal  CH93 :    2  circuits (149 relocations)
Animal  JE93 :    1  circuits (66 relocations)

Variables measured for each relocation:

 [1] id        burst     x         y         date      dx        dy       
 [8] dist      dt        R2n       abs.angle rel.angle
Warning message:
'speed' is deprecated.
Use 'as.ltraj' instead.
See help("Deprecated") 
    id      x       y                date    burst        sp.x       sp.y
1 CH93 700151 3158187 1993-08-24 15:00:00 CH930824          NA         NA
2 CH93     NA      NA 1993-08-24 15:10:00 CH930824          NA         NA
3 CH93 700291 3158404 1993-08-24 15:20:00 CH930824 -0.08333333 -0.1066667
4 CH93 700241 3158340 1993-08-24 15:30:00 CH930824  0.06666667  0.2866667
      speed  dt
1        NA 600
2        NA 600
3 0.1353596 600
4 0.2943165 600

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