dec_time: Create decimal time from time vector

View source: R/dec_time.R

dec_timeR Documentation

Create decimal time from time vector

Description

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

Usage

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

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

dec_time(dts)

WRTDStidal documentation built on Oct. 20, 2023, 5:08 p.m.