Extract.ltraj: Extract or Replace Parts of an Object of Class ltraj

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

Description

Extract or replace subsets of objects of class ltraj.

Usage

1
2
3
4
  ## S3 method for class 'ltraj'
x[i, id, burst]
  ## S3 replacement method for class 'ltraj'
x[i, id, burst] <- value

Arguments

x

an object of class ltraj

i

numeric. The elements to extract or replace

id

a character vector indicating the identity of the animals to extract or replace

burst

a character vector indicating the identity of the bursts of relocations to extract or replace

value

an object of class ltraj

Details

Objects of class ltraj contain several bursts of relocations. This function subsets or replaces these bursts, based on their indices or on the attributes id *or* burst.

Value

An object of class ltraj.

Author(s)

Clement Calenge clement.calenge@oncfs.gouv.fr

See Also

ltraj, gdltraj

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  data(puechcirc)
  puechcirc

  ## Extract the second and third bursts
  (toto <- puechcirc[2:3])

  ## Extracts all bursts collected on the animal JE
  puechcirc[id = "JE93"]

  
  ## Replace one burst
  toto[2] <- puechcirc[1]
  toto

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