search for: adjascent

Displaying 1 result from an estimated 1 matches for "adjascent".

Did you mean: adjacent
2001 Oct 22
1
statistics for ragged arrays: loop to vector
Dear R users, I am currently writing a MCMC algorithm for spatial Poisson model. One problem which I need to solve is as follows: I have a vector X[1:J] which describes characteristics of cells of a rectangular grid. Further, for each cell I have a list of adjascent cells adj[] and the vector listing numbed of adjascent cells num[]. Thus if I want to list cells adjascent to cell i I write begin.n[i]<-cumsum(c(0,adj)[1:i])+1 end.n[i]<-cumsum(adj[1:i]) and if I want to calculate some function, say mean, over the adjascent cells I write f.X[i]<-mean(...