actel (version 1.1.0)

preload: Load a dataset before running an analysis

Description

This function allows the user to prepare a set of R objects to be run through an explore, migration or residency analysis.

Usage

preload(
  biometrics,
  spatial,
  deployments,
  detections,
  dot,
  distances,
  tz,
  start.time = NULL,
  stop.time = NULL,
  section.order = NULL,
  exclude.tags = NULL,
  disregard.parallels = FALSE,
  discard.orphans = FALSE
)

Arguments

biometrics

A data frame containing biometric information.

spatial

A data frame containing spatial information.

deployments

A data frame containing deployment information.

detections

A data frame containing the detections.

dot

A DOT string of the array configuration.

distances

A distances matrix between arrays. See distancesMatrix.

tz

The time zone of the study area. Must match one of the values present in timezones.

start.time

Detection data prior to the timestamp set in start.time (in YYYY-MM-DD HH:MM:SS format) is not considered during the analysis.

stop.time

Detection data posterior to the timestamp set in stop.time (in YYYY-MM-DD HH:MM:SS format) is not considered during the analysis.

section.order

A vector containing the order by which sections should be aligned in the results.

exclude.tags

A vector of tags that should be excluded from the detection data before any analyses are performed. Intended to be used if stray tags from a different code space but with the same signal as a target tag are detected in the study area.

disregard.parallels

Logical: Should the presence of parallel arrays invalidate potential efficiency peers? See the vignettes for more details.

discard.orphans

Logical: Should actel automatically discard detections that do not fall within receiver deployment periods, or that were recorded before the respective fish were released?

Value

A dataset that can be used as an input for actel's main analyses. This dataset contains:

  • bio: The biometric data

  • sections: The sections of the study area, if set using the argument sections (required to run residency and migration analyses)

  • deployments: The deployment data

  • spatial: The spatial data, split in stations and release sites.

  • dot: A table of array connections.

  • arrays: A list with the details of each array

  • dotmat: A matrix of distances between arrays (in number of arrays).

  • dist.mat: The distances matrix.

  • detections.list: A processed list of detections for each tag.

  • paths: A list of the possible paths between each pair of arrays.

  • disregard.parallels: Logical: Should parallel arrays invalidate efficiency peers? (required to run residency and migration analyses)

  • tz: The time zone of the study area

Examples

Run this code
# NOT RUN {
# This function requires a series of pre-created R objects.
# We can create them by loading the example files from actel:
aux <- system.file(package = "actel")[1]

bio <- read.csv(paste0(aux, "/example_biometrics.csv"))
deployments <- read.csv(paste0(aux, "/example_deployments.csv"))
spatial <- read.csv(paste0(aux, "/example_spatial.csv"))
detections <- read.csv(paste0(aux, "/example_detections.csv"))

dot <- "A0--A1--A2--A3--A4--A5--A6--A7--A8--A9"

# Now that we have the R objects created, we can run preload:

x <- preload(biometrics = bio, deployments = deployments, spatial = spatial,
 detections = detections, dot = dot, tz = "Europe/Copenhagen")


# }

Run the code above in your browser using DataCamp Workspace