[R] a small bug in spatstat::rmh

From: Evgueni Parilov <parilov_at_cat.nyu.edu>
Date: Thu 08 Jul 2004 - 05:30:06 EST


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



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 08 05:33:26 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 02:34:54 EST