[R] create a matrix with values from data.frame

Nicolas Gutierrez nicolasg at uw.edu
Sat Mar 19 23:16:58 CET 2011


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)



More information about the R-help mailing list