dec_time: Create decimal time from time vector

Description Usage Arguments Details Value Examples

View source: R/dec_time.R

Description

Create decimal time on an annual scale from an input time vector

Usage

1
2
3
4
dec_time(date_in)

## S3 method for class 'Date'
dec_time(date_in)

Arguments

date_in

input time vector, usually a date object

Details

Function is used internally within the package.

Value

A named list of four numeric vectors including day_num (decimal day on an annual scale), month (month of the year as integer), year, and dec_time (decimal time as sum of year and day_num)

Examples

1
2
3
4
dt <- Sys.Date()
dts <- seq.Date(dt - 365, dt, by = 'day') 

dec_time(dts)

WRTDStidal documentation built on Nov. 18, 2019, 1:06 a.m.