https://github.com/cran/spacetime
Tip revision: b2c8cd19a2db64171a546f15c5adb8b71e199197 authored by Edzer Pebesma on 02 September 2013, 17:53:54 UTC
version 1.0-6
version 1.0-6
Tip revision: b2c8cd1
endtime.R
if (!isGeneric("endTime"))
setGeneric("endTime", function(x, ...)
standardGeneric("endTime"))
if (!isGeneric("endTime<-"))
setGeneric("endTime<-", function(x, value)
standardGeneric("endTime<-"))
setMethod("endTime", "ST", function(x, ...) x@endTime)
setReplaceMethod("endTime", c("ST", "POSIXct"), # including xts
function(x, value) {
stopifnot(length(value) == dim(x)[2])
stopifnot(any(value < index(x@time)))
x@endTime = value
x
}
)
setReplaceMethod("endTime", c("ST", "xts"), # including xts
function(x, value) {
endTime(x) = index(x)
x
}
)