Extracts the time when the first or last observation was taken, or
computes the range of the dates in a "timeDate"
object.
# S3 method for timeDate
start(x, ...)# S3 method for timeDate
end(x, ...)
# S3 method for timeDate
min(..., na.rm = FALSE)
# S3 method for timeDate
max(..., na.rm = FALSE)
# S3 method for timeDate
range(..., na.rm = FALSE)
an object of class "timeDate"
an object of class "timeDate"
.
ignored by start
and end
;
a 'timeDate' object for min
, max
, and range
.
not used.
Conceptually, the "timeDate"
object is sorted before the
computations. In particular, start
is not necessarilly the
first element of the object and similarly for the other functions.
min
and max
are equivalent to start
end
end
, respectively.
range
returns the earlies and the latest times in a
"timeDate"
object. The remaining functions return only one of
them, as suggested by their names.
## timeCalendar
# Random Calendar Dates:
set.seed(1234)
tR = sample(timeCalendar())
sort(tR)
tR
## start | end
start(tR)
end(tR)
## the first and last time stamp
tR[1]
tR[length(tR)]
rev(tR)[1]
## the range
c(start(tR), end(tR))
range(tR)
Run the code above in your browser using DataLab