How can I pass from position in length inside a matrix to position in dim ?
a=matrix(c(1:999),nrow=9) which(a==87) #position in length 1:length(a) 87 which(a==87,arr.ind=TRUE) #position in dim row col [1,] 6 10 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.