data(longleaf)
# Longleaf Pines data
# the marks are positive real numbers indicating tree diameters.
<testonly># smaller dataset
longleaf <- longleaf[seq(1, longleaf$n, by=80)]</testonly>
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