On Feb 7, 2011, at 12:30 PM, zhaoxing731 wrote:
Hello
I have a 100*100 matrix which is from a intensive computation, e.g.
mat. Is there any method/function that return the max of every row
and the subscript of maximum value simultaneously
#define the function
returnfunction<-function(x)
Hello
I have a 100*100 matrix which is from a intensive computation, e.g. mat. Is
there any method/function that return the max of every row and the subscript of
maximum value simultaneously
#define the function
> returnfunction<-function(x){
+ value<-apply(x,1,max)
+ index<-apply(x,1,which.ma
2 matches
Mail list logo