methods-show: Print 'timeSeries' objects

print-methodsR Documentation

Print 'timeSeries' objects

Description

Print "timeSeries" objects.

Usage

## S4 method for signature 'timeSeries'
show(object)

## S4 method for signature 'timeSeries'
print(x, FinCenter = NULL, format = NULL,
          style = c("tS", "h", "ts"), by = c("month", "quarter"), ...)

Arguments

object,x

an object of class "timeSeries".

FinCenter

a character with the the location of the financial center named as "continent/city".

format

the format specification of the input character vector, a character string with the format in POSIX notation.

style

a character string, one of "tS", "h", or "ts".

by

a character string, one of "month", "quarter".

...

arguments passed to the print method for the data part, which is a "matrix" or, in the case of style = "ts", to the print method for class "ts".

Details

show does not have additional arguments.

The print method allows to modify the way the object is shown by explicitly calling print.

The default for style is tS. For univariate time series the style = "h" causes the object to be printed as a vector with the time stamps as labels. Finally, style = "ts" prints like objects from base R class "ts", which is suitable for quarterly and monthly time series.

Value

Prints an object of class timeSeries.

Examples

## Load Micsrosoft Data - 
   setRmetricsOptions(myFinCenter = "GMT")
   LPP <- MSFT[1:12, 1:4]

## Abbreviate Column Names - 
   colnames(LPP) <- abbreviate(colnames(LPP), 6)
   
## Print Data Set -
   print(LPP)
   
## Alternative Use, Show Data Set - 
   show(LPP)

## a short subseries to demo 'print'
   hC <- head(MSFT[ , "Close"])
   class(hC)
   print(hC)
   print(hC, style = "h")

timeSeries documentation built on Aug. 26, 2023, 5:08 p.m.