yrfraction | R Documentation |
Calculate the fraction of the year for a date variable (after accounting for leap years) or for month.
yrfraction(date, type = "daily")
date |
a date variable if type=‘ |
type |
‘daily’ for dates, or ‘ |
Returns the fraction of the year in the range [0,1).
yrfrac |
Fraction of the year. |
Adrian Barnett a.barnett@qut.edu.au
# create fractions for the start, middle and end of the year date = as.Date(c(0, 181, 364), origin='1991-01-01') # create fractions based on these dates yrfraction(date) yrfraction(1:12, type='monthly')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.