knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(intercali)
From an sf class density map map_obj
(data.frame), an inohomogene Poisson point process is used to simulate the presence of individuals in the study area. The probability of presence of an individual is dependent on the density given by the map.
An example of this function use a dataset dataset_map
consisting in a dataframe of class sf
containing density information.
From this map, the aim of the function simulate_ind
is to simulate the presence of individuals in the study area. The function return a dataframe, here ind
, containing the differents individuals simulated and their geographic coordinates.
data(dataset_map) ind <- simulate_ind(map_obj = dataset_map, crs = 2154) head(ind)
This function allows to plot the simulated individuals obs_obj
on the map with density information. It is nessary to use the map_obj
, a sf dataframe, contaning at least, a colums density_km
. The title
and the legend
can be personnalized.
An example of this function use a dataset dataset_map
consisting in a dataframe of class sf
containing density information.
From this dataframe, locations of individuals are simulated thanks to the simulate_ind
function. Then the function plot_obs
allows to plot the map with the individuals simulated.
data(dataset_map) ind <- simulate_ind(map_obj = dataset_map, crs = 2154) plot_obs(obs_obj = ind, map_obj = dataset_map)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.