Compares matrix entries to a value,
returning a matrix of same size as a
containing TRUE
or FALSE
values
as the result of applying compare_fun
and val
to all entries in a
.
compare_byname(a, compare_fun = c("==", "!=", "<", "<=", ">=", ">"), val = 0)
a | a matrix or list of matrices whose values are to be counted according to |
---|---|
compare_fun | the comparison function, one of " |
val | a single value against which entries in matrix |
a logical matrix of same size as a
containing TRUE
where the criterion is met,
FALSE
otherwise
#> [,1] [,2] #> [1,] TRUE FALSE #> [2,] TRUE FALSE #> [3,] TRUE TRUE#> [[1]] #> [,1] [,2] #> [1,] TRUE FALSE #> [2,] TRUE FALSE #> [3,] TRUE TRUE #> #> [[2]] #> [,1] [,2] #> [1,] TRUE FALSE #> [2,] TRUE FALSE #> [3,] TRUE TRUE #>