data(nbfires)
# Get the year 2000 data.
X <- split(nbfires,"year")
Y.00 <- X[["2000"]]
# Plot all of the year 2000 data, marked by fire type.
plot(Y.00,which.marks="fire.type")
# Cut back to forest and grass fires.
Y.00 <- Y.00[marks(Y.00)$fire.type %in% c("forest","grass")]
# Plot the year 2000 forest and grass fires marked by fire duration time.
stt <- marks(Y.00)$dis.julian
fin <- marks(Y.00)$out.julian
marks(Y.00) <- cbind(marks(Y.00),dur=fin-stt)
plot(Y.00,which.marks="dur")
# Look at just the rectangular subwindow (superimposed on the entire window).
nbw.mask <- as.mask(nbfires$window, dimyx=500)
plot(nbw.mask, col=c("green", "white"))
plot(nbfires$window, border="red", add=TRUE)
plot(Y.00[nbw.rect],use.marks=FALSE,add=TRUE)
plot(nbw.rect,add=TRUE,border="blue")
# Look at the K function for the year 2000 forest and grass fires.
K.00 <- Kest(Y.00)
plot(K.00)
Run the code above in your browser using DataLab