read_Ctrax: Read Ctrax data

Description Usage Arguments Details Value See Also

View source: R/read_functions.R

Description

Loads a csv or mat file containing tracking data from Ctrax into R.

Usage

1
2
3
read_Ctrax(file = NULL, folder = NULL, type = "fixed",
  file_type = ifelse(is.null(file), "mat", tools::file_ext(file)),
  recursive = TRUE, animals = NULL)

Arguments

file

Either directly supply a path to a file, a list/vector of paths,

folder

or supply a path to a folder.

type

If folder is supplied, use type to indicate which track type should be read. When 'fixed', will try to find files with a 'fixed_' suffix, when 'raw' those with the suffix will be excluded.

file_type

Whether to use mat files or csv files. Will guess from the extension if file is used, defaults to 'mat' if folder is used.

recursive

If TRUE, will also try to find files in the subfolders of folder and combine them into one long data.frame. Only use when using folder.

animals

Optional vector of names (ordered in the same order as the tracking id's). Otherwise file names are used instead.

Details

This function always filters out (0, 0) coordinates, as they are a Ctrax bug.

Value

A long data.frame (with class tbl_df and source idTracker).

See Also

Other trackr read functions: read_idTracker


Ax3man/trackr documentation built on Oct. 8, 2019, 10:53 p.m.