I have a csv
file with number of points. The data is included longitude, latitude and date. I classified my data based on the season (spring, summer, autumn and winter). I need to calculate the Ripley’s L for each season. I used Lest()
from package spatstat
in R. I could plot Ripley’s L using this function. But the range of x axis (distance) for each plot (season) is different.
How can I make all four plots (seasons) in the same range (distance)?
sa <- readOGR(".", "boundary") # Don't add the .shp extension
W <- as(sa, "owin")
Summer.ppp <- as(Sum_UTM, "ppp")
Autumn.ppp <- as(Autumn_UTM, "ppp")
Winter.ppp <- as(Winter_UTM, "ppp")
Spring.ppp <- as(Spring_UTM, "ppp")
Summer <- Lest(Summer.ppp, correction="Ripley")
plot(Summer , xlab="distance (m)", ylab="K(d)", cex.lab= 2, cex.axis=2)
plot(Summer, . -r ~ r, ylab=expression(hat("L")), xlab="distance (m)",cex.lab= 2, cex.axis=2)
Autumn <- Lest(Autumn.ppp, correction="Ripley")
plot(Autumn, xlab="distance (m)", ylab="K(d)", cex.lab= 2, cex.axis=2)
plot(Autumn, . -r ~ r, ylab=expression(hat("L")), xlab="distance (m)",cex.lab= 2, cex.axis=2)
Winter <- Lest(Winter.ppp, correction="Ripley")
plot(Winter, xlab="distance (m)", ylab="K(d)", cex.lab= 2, cex.axis=2)
plot(Winter, . -r ~ r, ylab=expression(hat("L")), xlab="distance (m)",cex.lab= 2, cex.axis=2)
Spring <- Lest(Spring.ppp, correction="Ripley")
plot(Spring , xlab="distance (m)", ylab="K(d)", cex.lab= 2, cex.axis=2)
plot(Spring, . -r ~ r, ylab=expression(hat("L")), xlab="distance (m)",cex.lab= 2, cex.axis=2)