active.nest: A Function to Infer Nesting Chronology from Nest Observations...

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

Description

Infers nest chronology from nest observations

Usage

1
2
active.nest(d, useprecalc = FALSE, error = FALSE, nparam = NULL, sp = FALSE, year = FALSE, layer = FALSE, region = FALSE, id = FALSE,
int.choice = FALSE, locations = FALSE, progress = TRUE, lsc = NULL, spgroup = NULL, lang = "english", fromtk = FALSE ...)

Arguments

d

A data.frame containing observations for one or several nests. An object of class data.frame with column names?: nest_id, species_code, date, eggs, young and optionally status_code, lon and lat.

useprecalc

When used with the nestwatch database, precalculated data can be used to speed up the process whent set to TRUE.

error

When set to TRUE, nest ids generating an error (either due to erroneous data or a bug in Rnest) will be displayed.

nparam

A data.frame containing nesting parameters for the species. An object of class data.frame with column names?: species_code, cmin, cmax, clutch, laying, start, incub and rearing.

sp

A set of species for which the nesting chronology has to be inferred. All species are included when the argument is set to FALSE. Otherwise, a vector with the species code has to be given.

year

Used to subset nests to be included based on their date of initiation. All nests are included when the argument is set to FALSE. Otherwise, either a vector containing dates (in character format) or years (in numeric/integer format) to be included. Years and dates given can precede or exceed values observed in the database. When the nesting chronology of a nest encompasses two years and years are given as an argument, it will be included if its date of initiation corresponds to a year given in the subset. If the argument is a set of dates, nests for which either the initiation or the fledging date correspond to one of the dates given will be included.

layer

Name of a layer (ESRI shapefile) used to restrict the subset of nests studied to polygons contained in the layer. All nests are used when layer is set to FALSE, unless the argument int.choice is set to TRUE. Otherwise, a character string giving the name of a layer (without the extension) containing the region of interest has to be given. The file has to be located in the R working directory along with other necessary files to interpret the layer. The shapefile has to be in geographic coordinates with the NAD83 system. Used in conjonction with region and int.choice.

region

Regions to which the nests should be restricted. The two possible values are FALSE or a vector of the names of regions of interest. When int.choice is TRUE, the name of the first region will be given to the selected polygon and a warning will be given if more than one region is specified. When int.choice is FALSE, a layer containing the names of the regions in its data slot has to be given, otherwise, an error message will be returned.

id

Names of the columns in the attribute table of the shapefile to be used to create the regions of interest. A character vector with the names of columns in the attribute table. When set to FALSE, the first column is used to describe the regions.

int.choice

Let's the user draw a polygon containing the region of interest. When set to TRUE, the user is asked to draw a polygon in the graphic device. If a layer is specified, the polygon is drawn in a plot showing the layer. If layer is set to FALSE, a world map is plotted and the user is asked for a polygon. The first 4 clicks on the graphic device will be used to rescale the map to get a greater accuracy in the drawing of the polygon.

locations

Used to map the locations of the nests within the region studied. When set to TRUE, nest locations contained in the regions of interest are plotted.

progress

Displays the progression of the function (number of nests for which the chronology has been estimated). The progression is displayed when progress is set to TRUE. This argument uses the function progress from the svMisc package.

lsc

A named list with stages as names and each element of the list has to be status codes to be interpreted as such.

spgroup

A named list with group names as names. Each element of the list has to be a vector of characters with the species 4-letters AOU codes.

lang

Used within the tcltk interface to choose the language used. Default value "english", otherwise "fran?ais" is used.

fromtk

Used when the function is called within the tcltk interface to generate error and warning messages with tkmessageBox. Default value FALSE.

...

Further arguments to be passed to the chronology function.

Details

Details of the algorithm are described in the Rnest manual.

Value

A data.frame with the following columns:

sp

species 4-letters AOU code

id

nest id

region

region where the nest is found

initiation

estimated initiation date (character)

fledging

estimated fledging date or of departure from the nest date (character)

warning

warning encountered when backcalculating

Note

To be described

Author(s)

Francois Rousseu <francoisrousseu@hotmail.com>

See Also

chronology, nesting.activity

Examples

1
To be described.

frousseu/rNest documentation built on May 16, 2019, 3:32 p.m.