Description Usage Arguments Details Value Examples
Prepare tag release and recovery data prior to fitting
a Markov movement model via mmmFit()
.
1 2 3 4 5 6 7 8 9 |
x |
|
y |
|
cols |
|
groups |
|
step |
|
limits |
|
days_liberty |
|
The x
& y
arguments must be data frames that contain
certain columns that have the same column name in both data frames.
Both x
& y
must include:
character()
column giving unique individual tag IDs.
Date()
column giving individual tag release dates.
integer()
column giving release areas indexed from one.
In addition, y
must include:
Date()
column giving individual tag recovery dates.
integer()
column giving recovery areas indexed from one.
Optionally, both x
& y
can include:
atomic()
column giving values grouped by groups
.
Note that character()
columns in "%Y-%M-%D"
format may be substituted
for Date()
columns.
The cols
argument is a list()
of named elements. The elements
must be character()
string names of columns in x
or
y
. There must be one element for each of the required element
names (except as noted):
id
: x
& y
Individual tag identification
release_date
: x
& y
Release date
release_area
: x
& y
Release area
recover_date
: y
Recovery date
recover_area
: y
Recovery area
group
: (Optional) Grouping variable
The groups
argument is a list()
of named elements. The elements
must be atomic vectors that include all values included in each named
group. All element vectors must be of the same type. The names of the
element vectors must be unique. For groups
to have any effect,
the element group
in argument cols
must name a column
in both x
& y
that has values include in the element
vectors in groups
.
A list object of class mmmTags
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | x <- data.frame(
Release_Date = c("2010-06-01", "2015-04-01", "2018-06-01", "2019-06-01"),
Release_Area = c(1,1,1,1),
Release_Group = c("F", "F", "F", "M"),
ID = c("TAG001", "TAG002", "TAG003", "TAG004"))
y <- data.frame(
Release_Date = c("2010-06-01", "2018-06-01", "2019-06-01"),
Release_Area = c(1,1,1),
Release_Group = c("F", "F", "M"),
Recover_Date = c("2013-08-01", "2020-01-01", "2020-08-01"),
Recover_Area = c(1,2,1),
ID = c("TAG001", "TAG003", "TAG004"))
cols <- list(
release_date = "Release_Date",
release_area = "Release_Area",
recover_date = "Recover_Date",
recover_area = "Recover_Area",
group = "Release_Group",
id = "ID")
groups <- list(m = "M", f = "F")
step <- "year"
limits <- c("2010-01-01", "2020-12-31")
days_liberty <- 0L
tags <- mmmTags(x, y, cols, groups, step, limits, days_liberty)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.