booleanMatrix: Creation of boolean matrices for highlighting results
Description
A simple function to create boolean matrices to be used when constructing LaTeX tables.
Usage
booleanMatrix(data, find = "max", th = 0, by = "row")
Arguments
data
It can be a data frame, a matrix or a vector.
find
A string indicating what has to be detected. Possible values are:
'eq' All values equal to the value passed in th
'le' All values lower or equal to the value passed in th
'ge' All values greater or equal to the value passed in th
'lw' All values lower than the value passed in th
'gt' All values greater than the value passed in th
'min' Minimum value in each row / column / matrix
'max' Maximum value in each row / column / matrix
th
Thershold used when find is set to 'eq', 'ge', 'le', 'gt' or 'lw'.
by
A string or string vector indicating where the min/max values have to be find. It can be 'row', 'col' or 'mat' for the row, column and matrix min/max respectively.
Value
A boolean matrix that matches in dimension the output data and where the identified elements are marked as TRUE.