View source: R/plot_raw_recoveries.R
plot_raw_recoveries | R Documentation |
This function plots the distribution of recoveries in the real world data in Europe and Africa.
plot_raw_recoveries(
mark_recapture_object,
pdf = FALSE,
pdf_name = "raw_recoveries.pdf",
origin_names = NULL,
facet_by_age = FALSE,
facet_by_area = FALSE,
age_min = 0,
age_max = NULL,
xname = "longitude",
yname = "latitude",
timename = "age",
mark_area_name = "mark_area",
plot_title = "",
map = NULL,
prj = "+proj=longlat"
)
mark_recapture_object |
object of class mark_recapture_object (see mark_recapture_object()) |
pdf |
logical, saves image as pdf-file if TRUE. Defaults to FALSE. |
pdf_name |
string to name pdf-file, please include ".pdf"! |
origin_names |
optional, order of the names of the area of origin to be plotted, defaults to NULL. In the default case order of the areas of origin in mark_recapture_object will be chosen. |
facet_by_age |
logical, determines if the data should be faceted by the age column. Defaults to FALSE. |
facet_by_area |
logical, determines if the data should be faceted by the area column. Defaults to FALSE. |
age_min |
numeric. Defaults to 0. If set only data points older than age_min are plotted. |
age_max |
numeric. If set only data points younger or equal age_max are plotted. Defaults to NULL. |
xname |
character, name of column containing first dimension, defaults to "longitude". |
yname |
character, name of column containing second dimension, defaults to "latitude". |
timename |
character, name of column containing third dimension, defaults to "age". |
mark_area_name |
character, name of column containing information on areas where marking took place, defaults to "mark_area". |
plot_title |
character, title of plot, defaults to "". |
map |
map to plot the data on. Needs to be compatible with ggplot2. For example, map can be ggmap::ggmap(myMap), where myMap is created by ggmap::get_stamenmap. |
prj |
projection of the coordinates of the dead recoveries. Defaults to "+proj=longlat". For details see ?sf::st_crs. If the data has another projection it will be transformed to the longitude latitude system using sf::st_transform |
depending on arguments plot as pdf or to plot to device
plot_raw_recoveries(mro1D)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.