print.ts
Print a Time Series

Description

Specially formats and prints a time series. This is automatically called by print when given a time series.

Usage

print.ts(x, calendar, ...) 
.preformat.ts(x, calendar, ...)

Arguments

x a univariate or multivariate time series, i.e., tsp(x) is not NULL.
calendar logical flag: whether print Time Series in calendar format. By default, calendar is TRUE if frequency of x is 4 or 12, and length of start is 2, calendar is FALSE if the first dimension of x, or the length of x is not the same as the tsp(x), and give a warning
... arguments passed to format() when converting data to text.

Details

The time series parameters, tsp(x) are used to ensure that each line either contains a full cycle or that a full cycle occupies an integral number of lines. calendar and the second dimension of x will decide the format of result. Month abbreviations are used for column labels if frequency(x) is 12, and quarter abbreviations are used if frequency(x) is 4. Otherwise the observation number within the current cycle is used.
After each page of output, the column labels are printed again, so that there should always be a copy of the column labels on the screen at any time. To avoid multiple copies of the column labels, execute
options(length=10000)
to specify a very long page. A new format may be chosen at the end of each page.
Each column of a multivariate series is printed in turn. This is in contrast to the default printing of multivariate time series which prints the series as a matrix and then prints the tsp attribute.
Value
print.ts(x), like all print methods, returns x, with the invisible flag set to prevent reprinting.
.preformat.ts(x) returns an object that, when printed, looks like the text printed by print.ts(x). It is not intended for general use.
Side Effects
formats and prints x as a time series.
See Also
print, options.
Examples
print(ts(1:20, frequency = 12, start=2015.5))
print(ts(1:20, frequency = 12, start=2015.5), calendar = FALSE)
print(ts(1:20, frequency = 7, start = 17), calendar = TRUE)
print(ts(cbind(1:3, 2*(1:3), 3*(1:3)), frequency = 4, start=1999.75))
Package stats version 6.1.1-7
Package Index