ifneg | R Documentation |
checks if the transposed values of a matrix are negative and maps different values to it if they are or are not
ifneg(mat, t = 1, f = 3)
mat |
matrix to be used (should not already be transposed as the matrix does this-if the martix is in the orientation needed for a barplot without transposing you may need to transpose it when feeding into this function) |
t |
the value to map the negative values to. defaults to 1 |
f |
the value to map the positive values to. defaults to 3 |
ifneg_function()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.