Displaying 1 result from an estimated 1 matches for "mymat3".
Did you mean:
mymat
2012 Mar 20
1
Remove individual rows from a matrix based upon a list
...of individuals to be removed
MyList
E985088
F952477
F952478
If I were to do this by hand it would look like
MyMat1 <- MyMatrix[!rownames(MyMatrix)%in% "E985088",]
colSums(MyMat1)
MyMat2 <- MyMatrix[!rownames(MyMatrix)%in% " F952477 ",]
colSums(MyMat2)
MyMat3 <- MyMatrix[!rownames(MyMatrix)%in% " F952478 ",]
colSums(MyMat3)
How might I replace the individual ids (in quotes) with a list and remove
rows corresponding to that list from the matrix for the calculation and
returning the row to the list after each calculation before the next.
I...