Re: [R-sig-Geo] Error in simulation R-code

2009-07-16 Thread Steve Hong
On Thu, Jul 16, 2009 at 5:44 AM, Roger Bivand wrote: > On Wed, 15 Jul 2009, Steve Hong wrote: > > First I apologize all of you for annoying messages. Since I did not >> receive >> the mail I sent, I thought there might be some errors. >> > > OK. Note that there may be latency issues - occasional

Re: [R-sig-Geo] Error in simulation R-code

2009-07-16 Thread Roger Bivand
On Wed, 15 Jul 2009, Steve Hong wrote: First I apologize all of you for annoying messages. Since I did not receive the mail I sent, I thought there might be some errors. OK. Note that there may be latency issues - occasionally, it takes much longer for the mail servers to process submitted po

Re: [R-sig-Geo] Error in simulation R-code

2009-07-15 Thread Steve Hong
First I apologize all of you for annoying messages. Since I did not receive the mail I sent, I thought there might be some errors. On Wed, Jul 15, 2009 at 5:13 PM, Roger Bivand wrote: > On Wed, 15 Jul 2009, Steve Hong wrote: > > Dear List, >> >> I have a question about simulation code. Here are

Re: [R-sig-Geo] Error in simulation R-code

2009-07-15 Thread Roger Bivand
On Wed, 15 Jul 2009, Steve Hong wrote: Dear List, I have a question about simulation code. Here are the code and error message. sim.sp <- function(data,CM,n,N) + { + C <- matrix(rep(NA,N),ncol=1) + for(i in 1:N) + { + j <- n + xx <- which(colSums(CM[j,])==1) + V <- names(xx) + V <- paste(V

[R-sig-Geo] Error in simulation R-code

2009-07-15 Thread Steve Hong
Dear List, I have a question about simulation code. Here are the code and error message. > sim.sp <- function(data,CM,n,N) + { + C <- matrix(rep(NA,N),ncol=1) + for(i in 1:N) + { + j <- n + xx <- which(colSums(CM[j,])==1) + V <- names(xx) + V <- paste(V, collapse="+") + V <- paste("SBA~", V) +

[R-sig-Geo] Error in simulation R-code

2009-07-15 Thread Steve Hong
Dear List, I have got error message when I run the R-code. Can anyone has a suggestion? v.code <- df.bm7[,c(10:31)]; v.code[1:3,] names(v.code) CM = v.code # variable binomial code sim.sp <- function(data,CM,n,N) { C <- matrix(rep(NA,N),ncol=1) for(i in 1:N) { j <- n x

[R-sig-Geo] Error in simulation R-code

2009-07-15 Thread Steve Hong
Dear List, I have got error message when I run the R-code. I guess this happened when observation(s) has no neighborhood at specified distance. Is there any way/R-code to ignore one without neighborhood and proceed the simulation? v.code <- df.bm7[,c(10:31)]; v.code[1:3,] names(v.code) CM = v.co

[R-sig-Geo] Error in simulation R-code

2009-07-15 Thread Steve Hong
Dear List, I have got error message when I run the R-code. Can anyone has a suggestion? v.code <- df.bm7[,c(10:31)]; v.code[1:3,] names(v.code) CM = v.code # variable binomial code sim.sp <- function(data,CM,n,N) { C <- matrix(rep(NA,N),ncol=1) for(i in 1:N) { j <- n x