timeDate (version 4032.109)

start: 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 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)

Value

an object of class "timeDate"

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.

Examples

Run this code
## 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