Description Usage Arguments Value Examples
View source: R/CreateCompareMatrix.R
Given two numeric matrices with equal dimensions, create a matrix of max values of corresponding cells and apply row and column names. NA's are only returned if both matrices have NA in the same cell.
1 | CreateCompareMatrix(studentlist, Exams, matrix1, matrix2)
|
studentlist |
A vector of row names |
Exams |
A vector of column names |
matrix1 |
A numeric matrix |
matrix2 |
A numeric matrix with the same dimensions as |
A numeric matrix with the same dimensions as the input matrices
1 2 3 4 5 6 7 8 | s1 = LETTERS[1:5]
E1 = c("Math", "Science", "History")
m1 = matrix(sample(100, 15, F), 5)
m2 = matrix(c(NA, 7*(1:14)), 5)
m3 = matrix(c(NA, NA, 100 - 7*(1:13)), 5)
CreateCompareMatrix(s1, E1, m1, m2)
CreateCompareMatrix(s1, E1, m1, m3)
CreateCompareMatrix(s1, E1, m2, m3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.