#This is the same as StraussHard(r=0.7,h=0.05)
   strpot <- function(d,par) {
         r <- par$r
         h <- par$h
         value <- (d <= r)
         value[d < h] <- -Inf
         value
   }
   mySH <- Pairwise(strpot, "StraussHard", list(r=0.7,h=0.05),
           c("interaction distance r", "hard core distance c"))
   data(cells)
   ppm(cells, ~ 1, mySH, correction="isotropic")Run the code above in your browser using DataLab