Description Usage Arguments Details Value Author(s) References See Also Examples
The class traj
is intended to explore trajects of
animals monitored using radio-tracking.
as.traj
creates an object of this class.
summary.traj
returns the number of relocations for each "burst"
of relocations and each animal.
plot.traj
allows various graphical displays of the
trajects.
getburst
returns an object of class traj
satisfying the
specified criteria (selection of one focus animal, of a period of interest,
of special "bursts" (see details)).
traj2df
, and the reciprocal function df2traj
respectively converts an object of class traj
to an object of
class data.frame
, and conversely.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | as.traj(id, xy, date, burst = id, ...)
## S3 method for class 'traj'
print(x, ...)
## S3 method for class 'traj'
summary(object, id = levels(object$id), date = NULL, ...)
## S3 method for class 'traj'
plot(x, id = levels(x$id), burst = levels(x$burst), date = NULL,
asc = NULL, area = NULL,
xlim = range(x$x), ylim = range(x$y),
colasc = gray((256:1)/256), colpol = "green",
addpoints = TRUE, addlines = TRUE,
perani = TRUE, final = TRUE, ...)
getburst(x, burst = levels(x$burst),
id = levels(x$id), date = NULL)
traj2df(x)
df2traj(df)
|
id |
a factor or a character vector giving for each relocation the
identity of the individual monitored in |
xy |
a data frame with 2 columns containing the x and y coordinates of the relocations |
date |
a vector of class |
burst |
a factor or a character vector giving the identity of each
"burst" of relocations in |
x |
an object of class |
object |
an object of class |
asc |
an object of class |
area |
an object of class |
xlim |
the ranges to be encompassed by the x axis |
ylim |
the ranges to be encompassed by the y axis |
colasc |
a character vector giving the colors of the
map of class |
colpol |
a character vector giving the colors of the
polygon contour map, when |
addlines |
logical. If |
addpoints |
logical. If |
perani |
logical. If |
final |
logical. If |
df |
a data frame to be converted to the class |
... |
other optional vectors containing some variables measured at
each relocation (e.g. temperature, wind,
elevation, etc.) in |
For a given individual, trajects are often sampled as "bursts"
of relocations (Dunn and Gipson, 1977). For example,
when an animal is monitored using radio-tracking, the data may consist
of several circuits of activity (two successive relocations on one
circuit are often highly autocorrelated, but the data from two
circuits may be sampled at long intervals in time). These bursts are
indicated by the factor burst
.
An object of class traj
is a data frame with one column
named id
, one column named x
, one column named y
,
one column named date
and one column named burst
. This
class therefore inherits from the class data.frame
.
Clement Calenge clement.calenge@oncfs.gouv.fr
Dunn, J.E. and Gipson, P.S. (1977) Analysis of radio telemetry data in studies of home range. Biometrics. 59, 794–800.
as.POSIXct
and strptime
for
additional information of the class POSIX
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data(puechabon)
locs <- puechabon$locs
locs[1:4,]
### Conversion of the date to the format POSIX
da <- as.character(locs$Date)
da <- as.POSIXct(strptime(as.character(locs$Date),
"%y%m%d"))
### Creation of the object of class "traj"
(tr <- as.traj(id = locs$Name, xy = locs[,c("X", "Y")],
date = da))
summary(tr)
plot(tr)
### Displays on maps of the study area
k <- puechabon$kasc
ele <- getkasc(k, "Elevation")
plot(tr, asc = ele)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.