toTime {eha} | R Documentation

## Calculate duration in years from "0000-01-01" to a given date

### Description

Given a vector of dates, the output is a vector of durations in years since "0000-01-01".

### Usage

    toTime(dates)

### Arguments

`dates` | A vector of dates in character form or of class `Date`

### Value

A vector of durations, as decribed above.

### Author(s)

Göran Broström

### See Also

`toDate`

### Examples

    ##---- Should be DIRECTLY executable !! ----
    ##-- ==>  Define data, use random,
    ##--	or do  help(data=index)  for the standard data sets.

    ## The function is currently defined as
    toTime(c("1897-05-16", "1901-11-21"))

[Package eha version 2.6.0 Index]