Description Usage Arguments Details Value
View source: R/combine_sources.R
This function will attempt to combine data from trials that have been tracked by multiple trackers ('sources'). This is useful if one want to leverage the individual strengths of multiple trackers (e.g. combine orientation and ellipse data from Ctrax with resolved identities from idTracker). It can also be used to exert quality control, by excluding observations that trackers don't agree on.
1 2 | combine_sources(tracks1, tracks2, err_cutoff = 25^2, id_reliability = 1,
report = TRUE)
|
tracks1 |
Tracks object to be combined. |
tracks2 |
The other tracks object to be combined. |
err_cutoff |
Hard limit for error (squared distance), that is deemed unreliable as a match. The default is 25 ^ 2, which means the centroids estimated are allowed to be 25 pixels apart. |
id_reliability |
Minimum estimated reliability of the id source, if available. |
report |
Whether a small report should be printed to the console. |
All variables that are supplied by both trackers will be used to match identities between sources. The error will be calculated and added to the $tr table, along with the mean values for the two sources. All other variables will be maintained. In some cases, precedence may be given when a source clearly is better suited for that variable (e.g. when combining idTracker with Ctrax, identities will always be based on idTracker.)
The methods tend to be designed for reasonable speeeds, and may use a lot of memory.
Animal names _will_ be lost.
A tracks object.
Note on parallel performance: Some of the current implementation limitations fo multidplyr force us to start and close several clusters during combining.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.