Learn R Programming

adehabitatLT (version 0.3.28)

burst: ID, Bursts and infolocs of an Object of Class ltraj

Description

Functions to get or set the attribute "id", "burst", and "infolocs" of the components of an object of class ltraj.

Usage

burst(ltraj)
burst(ltraj) <- value
id(ltraj)
id(ltraj) <- value
infolocs(ltraj, which)
infolocs(ltraj) <- value
removeinfo(ltraj)

Value

For id and burst, a character vector of the same length as ltraj. For infolocs, the data frame containing the information on the relocations. removeinfo returns an object of class ltraj.

For id<- and burst<-, the updated object. (Note that the value of burst(x) <- value is that of the assignment,

value, not the return value from the left-hand side.)

Arguments

ltraj

an object of class ltraj

value

for the assignment functions burst and id, a character vector of up to the same length as ltraj. For infolocs a list of data frames of the same length of ltraj (with each component having the same number of rows as the corresponding element in ltraj).

which

an optional character vector containing the names of the variables in the infolocs attribute to be returned

Author

Clement Calenge clement.calenge@ofb.gouv.fr

Details

The functions id, burst and infolocs are accessor functions, and id<- and burst<- are replacement function. removeinfo removes the attribute infolocs from the object ltraj (see the help page of as.ltraj).

See Also

ltraj, names

Examples

Run this code
data(puechcirc)
puechcirc

## To see the ID and the burst
id(puechcirc)
burst(puechcirc)

## Change the burst
burst(puechcirc) <- c("glou", "toto", "titi")
puechcirc

burst(puechcirc)[2] <- "new name"
puechcirc

## Change the ID
id(puechcirc)[id(puechcirc)=="CH93"] <- "WILD BOAR"
puechcirc

## example of an object with an attribute "infolocs"
data(capreochiz)
head(capreochiz)

## Create an object of class "ltraj"
cap <- as.ltraj(xy = capreochiz[,c("x","y")], date = capreochiz$date,
                id = "Roe.Deer", typeII = TRUE,
                infolocs = capreochiz[,4:8])
cap
cap2 <- removeinfo(cap)
cap2

infolocs(cap)



Run the code above in your browser using DataLab