[R] a small bug in spatstat::rmh

Evgueni Parilov parilov at cat.nyu.edu
Wed Jul 7 21:30:06 CEST 2004


Time to time, rmh.default fails to simulate a "lookup"-type process on a 
statement:

if(all.equal(diff(r),rep(deltar,nlook-1))) {
        equisp <- 1
        par <- c(beta,nlook,equisp,deltar,rmax,h)
    } else {
        equisp <- 0
        par <- c(beta,nlook,equisp,deltar,rmax,h,r)
    }

According to the manual, all.equal should not be used in if-statement 
directly. This works:
identical(all.equal(diff(r), rep(deltar, nlook - 1)),TRUE)

Evgueni




More information about the R-help mailing list