#==> create a stpp object <===#
x <- rnorm(30, mean = 10, sd = 1)
y <- rnorm(30, mean = 100, sd = 10)
t <- runif(30, 0, 100)
stw <- stwin(xcoord = c(0, 20), ycoord = c(50, 150), tcoord = c(0, 100))
X <- stpp(x, y, t, stw = stw)
#===> create a stpp object from redbanana data <===#
data(redbanana)
attach(redbanana)
xcoord <- c(min(longitude)-.01, max(longitude)+.01)
ycoord <- c(min(latitude)-.01, max(latitude)+.01)
tcoord <- c(0, max(birth)+.01)
stw <- stwin(xcoord, ycoord, tcoord)
X <- stpp(longitude, latitude, birth, stw)
Run the code above in your browser using DataLab