knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(intercali)

Simulate individuals with a inhomogenous Poisson point process.

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.

Example

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)

Plot simulated individuals

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.

Example

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)


maudqueroue/intercali documentation built on Oct. 8, 2022, 2:09 p.m.