library(spatstat)
data(longleaf)
# Longleaf Pines data
# the marks are positive real numbers indicating tree diameters.
plot(longleaf)
# cut the range of tree diameters into three intervals
long3 <- cut(longleaf, 3)
plot(long3)
# adult trees defined to have diameter at least 30 cm
long2 <- cut(longleaf, breaks=c(0,30,100), labels=c("Sapling", "Adult"))
plot(long2)
plot(long2, cols=c("green","blue"))
Run the code above in your browser using DataLab