Respuestas Laboratorio 1

Exercise 1

Los datos ponderosa tienen 108 puntos en una ventana de 120x120 y la intensidad promedio estimada es 0.0075

library(spatstat)
X=ponderosa
plot(X)

X
## Planar point pattern: 108 points
## window: rectangle = [0, 120] x [0, 120] metres
ponderosa$n/area(ponderosa)
## [1] 0.0075

Exercise 2

par(mfrow=c(2,3))
plot.ppp(ponderosa, main="Ponderosa Pine Trees")
plot(ponderosa, chars="X", cols="green")
plot(ponderosa, chars="3", cols="blue")
plot(ponderosa, chars="+", cols="red")
plot(ponderosa, chars="4", cols="gray")
plot(ponderosa, chars="o", cols="yellow")

Exercise 3

par(mfrow=c(1,2))
plot(hamster)
plot.ppp(hamster, chars=c("X", "o"), cols=c("blue", "green"))

plot(split(hamster))

Exercise 4

x <- c(13, 15, 27, 17, 8, 8, 1, 14, 19, 23)
y <- c(3, 15, 7, 11, 10, 17, 29, 22, 19, 29)
w <- owin(c(0, 30), c(0, 30)) #definiendo ventana de observación

A <- ppp(x, y, window=w)
plot(A, main="scintillation events")

Exercise 5

anthills <- read.csv("C:/Users/delia/Desktop/Doctorado/Estadistica_Espacial/TareaProcesosPuntuales/anthills.txt", sep="")

head(anthills) #revisando los primeros datos
##     x    y status
## 1 105  372      j
## 2  65  142      g
## 3 132  862      f
## 4  22   19      g
## 5 185 1173      e
## 6  69  557      f
hills <- with(anthills, ppp(x, y, xrange = c(0, 1200), yrange = c(0, 1500), units=c("metre", "metres")))

plot(hills, pch = 16, cex = 0.3, main = "Anthill locations")