Learn R Programming

forecast (version 8.23.0)

monthdays: Number of days in each season

Description

Returns number of days in each month or quarter of the observed time period.

Usage

monthdays(x)

Value

Time series

Arguments

x

time series

Author

Rob J Hyndman

Details

Useful for month length adjustments

See Also

bizdays

Examples

Run this code

par(mfrow=c(2,1))
plot(ldeaths,xlab="Year",ylab="pounds",
    main="Monthly deaths from lung disease (UK)")
ldeaths.adj <- ldeaths/monthdays(ldeaths)*365.25/12
plot(ldeaths.adj,xlab="Year",ylab="pounds",
    main="Adjusted monthly deaths from lung disease (UK)")

Run the code above in your browser using DataLab