timeser <- ts(1:24, frequency=12) # 12 observations per year
attr(timeser, "units") <- "years" # time in years for 'ts' object
GetUnitText(timeser) # formats unit (1/12 year=months)
Run the code above in your browser using DataLab