## bovine tuberculosis data
  X <- subset(btb, select=spoligotype)
  if(interactive()) {
    smax <- 40
    ns <- 16
    dimyx <- NULL
  } else {
    ## reduce data and resolution to speed up
    X <- X[c(TRUE, rep(FALSE, 7))]
    smax <- 9
    ns <- 8
    dimyx <- 32
  }
  b <- bw.relriskHeatppp(X, sigma=smax, ns=ns, dimyx=dimyx)
  b
  plot(b) 
Run the code above in your browser using DataLab