Skip to contents

Given several lists containing the results of a condition test (i.e., TRUE or FALSE) as returned by filterFunc this function merge the results of the condition tests for further use in filterTracklets.

Usage

mergeFilters(filters = list(NULL), cond = TRUE)

Arguments

filters

A list of lists containing the results of a condition test (TRUE or FALSE) as returned by filterFunc.

cond

A logical value (i.e., TRUE or FALSE) specifying whether the value does follow the rules of the condition test or not.

Value

A list of vector of the same length than the tracklets list containing the merged result of user specified condition tests for each tracklet.

Author

Quentin PETITJEAN

Examples


# create 3 filters, i.e., 3 lists containing the results of a condition tests (TRUE or FALSE) as returned by \code{\link{filterFunc}} for two tracklets (i.e., 1 and 2)
A = list("1" = c(TRUE, FALSE, FALSE), "2" = c(TRUE, TRUE, FALSE))
B = list("1" = c(FALSE, TRUE, FALSE), "2" = c(FALSE, TRUE, FALSE))
C = list("1" = c(FALSE, FALSE, TRUE), "2" = c(TRUE, FALSE, FALSE))

# merge the filters
mergeFilters(filters = list(A, B, C), cond = TRUE)
#> $`1`
#> [1] TRUE TRUE TRUE
#> 
#> $`2`
#> [1]  TRUE  TRUE FALSE
#>