Skip to content
Prev 229520 / 398500 Next

finding max value in a row and reporting colum name

pdb wrote:
as.data.frame(cbind(row.names(a),apply(a,1,function(x)
names(a)[which(x==max(x))])))

LB