https://github.com/cran/spacetime
Tip revision: 87e1b765ce6dc8597a7e37319c5803f6532dbaaa authored by Edzer Pebesma on 01 April 2014, 18:39:45 UTC
version 1.1-0
version 1.1-0
Tip revision: 87e1b76
Class-STTDF.R
setClass("STT", # space-time trajectory/ies without data values
contains = "ST",
slots = c(traj = "list"),
validity = function(object) {
stopifnot(length(object@traj) > 0)
stopifnot(length(object@sp) == 2)
stopifnot(length(object@time) == 2)
stopifnot(all(sapply(object@traj, class) == "STI"))
stopifnot(!isTRUE(timeIsInterval(object)))
return(TRUE)
}
)
setClass("STTDF", # space-time trajectory/ies with data values
contains = "STT",
slots = c(data = "data.frame"),
validity = function(object) {
stopifnot(sum(sapply(object@traj, length)) == nrow(object@data))
.checkAttrIsUnique(object@sp, object@time, object@data)
return(TRUE)
}
)