calculate_metrics: Calculation of spatial search path metrics.

View source: R/calculate_metrics.R

calculate_metricsR Documentation

Calculation of spatial search path metrics.

Description

Calculates a range of metrics from path coordinates.

Usage

calculate_metrics(path, arena)

Arguments

path

An rtrack_path object as returned by read_path.

arena

An rtrack_arena object as returned by read_arena.

Details

Metrics are calculated based on normalised coordinate data and are made accessible to machine learning algorithms in the features element of the rtrack_path object. A relevant selection of metrics (with the same units as the raw data) is also available as the summary element. These can be useful for custom plots and are also the values exported by export_results. Extended metrics are also available as separate elements of the rtrack_metrics object.

Value

An rtrack_metrics object containing metrics of the search path. This object is required as input for the call_strategy and plot_path functions.

See Also

read_path, read_arena, and also read_experiment for processing many tracks at once.

Examples

require(Rtrack)
track_file <- system.file("extdata", "Track_1.tab", package = "Rtrack")
arena_description <- system.file("extdata", "Arena.txt", package = "Rtrack")
arena <- read_arena(arena_description)
path <- read_path(track_file, arena, track.format = "raw.tab")
metrics <- calculate_metrics(path, arena)


Rtrack documentation built on Aug. 10, 2023, 9:10 a.m.