Add space-time points to a stpp object
This function adds new points to a
A space-time object of class “
A vector, data frame, matrix or list of points to be added to
points can be a vector of length three describing one x, y, and t coordinate, or a matrix or data frame where the first column is a column of x coordinates, the second column is a column of y coordinates, and the third column is a column of t coordinates. If
points is a list, the first entry is a vector of x coordinates, the second entry is a vector of y coordinates, and the third entry is a vector of t coordinates.
add.stpoints returns an object of class “
1 2 3 4 5 6 7 8 9 10 11 12 13
#===> 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) #===> add new points to X <===# x.new <- rnorm(10, mean = 10, sd = 1) y.new <- rnorm(10, mean = 100, sd = 10) t.new <- runif(10, 0, 100) all.new <- data.frame(cbind(x.new, y.new, t.new)) Y <- add.stpoints(X, all.new)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.