https://github.com/cran/spacetime
Tip revision: 835f8e2967ce480dab833d987e85c62dc3f13ce2 authored by Edzer Pebesma on 25 May 2012, 09:36:29 UTC
version 0.7-0
version 0.7-0
Tip revision: 835f8e2
Class-STTDF.R
setClass("STT", # space-time trajectory/ies without data values
representation("ST", 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
representation("STT", data = "data.frame"),
validity = function(object) {
stopifnot(sum(sapply(object@traj, length)) == nrow(object@data))
return(TRUE)
}
)