search for: tp2525631p2525666

Displaying 1 result from an estimated 1 matches for "tp2525631p2525666".

Did you mean: tp2525631p2525631
2010 Sep 03
5
how to get row name of matrix when result is a vector
Hi, the R code: a <- matrix(c(1,5,4,3,7,10,34,4,3,8,6,5,12,17,45,3,2,45,46,47,3,4,22,12,21), nrow=5) rownames(a) <- c("a","b","c","d","e") a a[which(a[,3] < 8), ] a[which(a[,3] < 6), ] produces the following output: > a [,1] [,2] [,3] [,4] [,5] a 1 10 6 3 3 b 5 34 5 2 4 c 4 4 12 45 22 d