base-start: Terminal times and range

startR Documentation

Terminal times and range

Description

Extracts the time when the first or last observation was taken, or computes the range of the dates in a "timeDate" object.

Usage

## S3 method for class 'timeDate'
start(x, ...)

## S3 method for class 'timeDate'
end(x, ...)

## S3 method for class 'timeDate'
min(..., na.rm = FALSE)

## S3 method for class 'timeDate'
max(..., na.rm = FALSE)

## S3 method for class 'timeDate'
range(..., na.rm = FALSE)

Arguments

x

an object of class "timeDate".

...

ignored by start and end; a 'timeDate' object for min, max, and range.

na.rm

not used.

Details

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.

Value

an object of class "timeDate"

Examples

  
## timeCalendar
# Random Calendar Dates:

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)

timeDate documentation built on Sept. 22, 2024, 5:07 p.m.