Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Extract.ltraj

Extract or Replace Parts of an Object of Class ltraj


Description

Extract or replace subsets of objects of class ltraj.

Usage

## 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.

When replacement is done, it is required that value and x have the same variables in attribute infolocs (i.e., both contain the same variables or both do not contain any variable, see the help page of as.ltraj)

Value

An object of class ltraj.

Author(s)

Clement Calenge clement.calenge@ofb.gouv.fr

See Also

Examples

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

adehabitatLT

Analysis of Animal Movements

v0.3.25
GPL (>= 2)
Authors
Clement Calenge, contributions from Stephane Dray and Manuela Royer
Initial release
2020-01-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.