Package 'territoria'

Title: Clustering Observations from Breeding Birds into Territoria
Description: Clusters individual observations based on breeding indication and distance between observations.
Authors: Thierry Onkelinx [aut, cre] (<https://orcid.org/0000-0001-8804-4216>, Research Institute for Nature and Forest (INBO)), Research Institute for Nature and Forest (INBO) [cph, fnd]
Maintainer: Thierry Onkelinx <[email protected]>
License: GPL-3
Version: 0.0.3
Built: 2024-12-09 02:57:39 UTC
Source: https://github.com/inbo/territoria

Help Index


Cluster observations

Description

Cluster observations

Usage

cluster_observation(conn, status, max_dist = 336, reset = FALSE)

Arguments

conn

a DBI connection to an SQLite database.

status

highest status to include while clustering the observations.

max_dist

maximum clustering distance in m.

reset

reset the current clustering. Defaults to FALSE


Connect to a database

Description

Connect to a database

Usage

connect_db(db = ":memory:")

Arguments

db

The file name of the database


Calculate the distance matrix

Description

Calculate the distance matrix

Usage

distance_matrix(conn, max_dist = 336)

Arguments

conn

a DBI connection to an SQLite database.

max_dist

maximum clustering distance in m.


Get the information from the clusters

Description

Get the information from the clusters

Usage

get_cluster(conn)

Arguments

conn

a DBI connection to an SQLite database.


Import the observations

Description

The function overwrites any existing table with observations.

Usage

import_observations(observations, conn, max_dist = 336)

Arguments

observations

a data.frame with the observations.

conn

a DBI connection to an SQLite database.

max_dist

maximum clustering distance in m.


Simulate a dataset in a square area

Description

Simulate a dataset in a square area

Usage

simulate_observations(
  density = 1e-05,
  area = 4e+06,
  gamma = 0.5,
  max_dist = 336,
  n_survey = 4,
  p_detection = 0.6,
  status_distribution = c(0.2, 0.5, 0.3)
)

Arguments

density

Density as the number of territoria per m².

area

Area in which to simulate territoria in m².

gamma

interaction parameter of the Strauss process. See gamma in spatstat.core::rStrauss().

max_dist

maximum clustering distance in m.

n_survey

Number of surveys.

p_detection

Probability of detection within a survey.

status_distribution

a weighting vector for statuses. The order of the vector is the number of the status.