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