Description Usage Arguments Value Examples
View source: R/betterGreater.R
Test two matrices element by element to see if the first is greater than the second, where NA entries are considered equal and less than -Inf
1 | MbetterGreater(x, y)
|
x |
A numeric matrix |
y |
A numeric matrix with the same dimensions as |
a logical matrix of the same dimensions as the inputs, showing TRUE if the corresponding entry of the first matrix is greater than that of the second (where NA entries are considered equal and less than -Inf), otherwise FALSE.
1 2 3 4 5 6 7 8 9 10 | m1 = matrix(data = c(1:12, 1:12), nrow = 6)
m2 = matrix(1:24, nrow = 6)
m3 = matrix(c(1:6, rep(-Inf, 12), 24:19), nrow = 6)
m4 = matrix(c(rep(NA, 12), 1:12), nrow = 6)
MbetterGreater(m2, m1)
MbetterGreater(m1, m3)
MbetterGreater(m1, m4)
MbetterGreater(m2, m3)
MbetterGreater(m2, m4)
MbetterGreater(m3, m4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.