Calculates a range of metrics from path coordinates.

calculate_metrics(path, arena)



An rtrack_path object as returned by read_path.


An rtrack_arena object as returned by read_arena.


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

plot_path functions.


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.

See also

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


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