Description Usage Arguments Details Value Author(s) See Also Examples
This function adds new points to a stpp
object.
1 | add.stpoints(X, points)
|
X |
A space-time object of class “ |
points |
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 “stpp
”.
Robert Clements
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.