Thanks Jim and David.. that was easy! Nic On 3/19/2011 3:00 PM, jim holtman wrote: > x.mat<- matrix(NA, 95, 55) # create matrix >> x.mat[cbind(x$xloc, x$yloc)]<- x$totW >> which(!is.na(x.mat), arr.ind =TRUE)