[R] how to print global index from tapply function?
Angelr
angerusso1980 at gmail.com
Fri Jun 8 22:22:03 CEST 2012
Hi, the global row indexing for my cluster assignment is as :
buf <- tapply(test1, test2, FUN = function(x){x;})
$`1`
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
$`2`
[1] 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
I used "tapply" function to find minimum as:
> foo <- tapply(dist, test2, FUN = which.min)
which prints:
1 2
16 17
I want it to print the miminum based on global row indexing as:
1 2
16 77
How can I get to print the actual entry instead of re-counted entry? Any
help? Thanks.
--
View this message in context: http://r.789695.n4.nabble.com/how-to-print-global-index-from-tapply-function-tp4632855.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list