# invyrfraction: Inverse Fraction of the Year or Hour In season: Seasonal Analysis of Health Data

 invyrfraction R Documentation

## Inverse Fraction of the Year or Hour

### Description

Inverts a fraction of the year or hour to a useful time scale.

### Usage

```invyrfraction(frac, type = "daily", text = TRUE)
```

### Arguments

 `frac` a vector of fractions of the year, all between 0 and 1. `type` “`daily`” for dates, “`monthly`” for months, “`hourly`” for hours. `text` add an explanatory text to the returned value (TRUE) or return a number (FALSE).

### Details

Returns the day and month (for `daily`) or fraction of the month (for `monthly`) given a fraction of the year. Assumes a year length of 365.25 days for `daily`. When using `monthly` the 1st of January is 1, the 1st of December is 12, and the 31st of December is 12.9. For `hourly` it returns the fraction of the 24-hour clock starting from zero (midnight).

### Value

 `daym` date (day and month for `daily`) or fractional month (for `monthly`) or fractional of the 24-hour clock (for `hourly`).

### Author(s)

Adrian Barnett a.barnett@qut.edu.au

### Examples

```
invyrfraction(c(0, 0.5, 0.99), type='daily')
invyrfraction(c(0, 0.5, 0.99), type='monthly')
invyrfraction(c(0, 0.5, 0.99), type='hourly')

```

season documentation built on March 21, 2022, 9:10 a.m.