actel (version 1.1.0)

getSpeeds: Extract speeds from the analysis results.

Description

Extract speeds from the analysis results.

Usage

getSpeeds(
  input,
  type = c("all", "forward", "backward"),
  direct = FALSE,
  n.events = c("first", "all", "last")
)

Arguments

input

An actel results object generated by explore, migration or residency.

type

The type of movements to record. One of "all", "forward", or "backward". In the two last options, only the forward or backwards (relatively to the study area structure) movement speeds are returned.

direct

Logical: Extract only speeds between arrays that are directly connected (i.e. neighbouring arrays)?

n.events

The events to record. One of "first", "all", or "last".

Value

A data frame with the following columns:

  • Fish: The tag of the fish who performed the recorded speed

  • Event: The valid event where the speed was recorded

  • From.array: The array from which the fish left

  • From.station: The station from which the fish left

  • To.array: The array to which the fish arrived

  • To.station: The station to which the fish arrived

  • Speed: The speed recorded in the described movement

Examples

Run this code
# NOT RUN {
# using the example results loaded with actel
getSpeeds(example.results)

# You can specify which direction of movement to extract with 'type'
getSpeeds(example.results, type = "forward")
# or
getSpeeds(example.results, type = "backward")

# and also how many events per fish (this won't change the output 
# with the example.results, only because these results are minimal).
getSpeeds(example.results, n.events = "first")
# or
getSpeeds(example.results, n.events = "all")
# or
getSpeeds(example.results, n.events = "last")

# }

Run the code above in your browser using DataCamp Workspace