print-methods | R Documentation |
Print "timeSeries"
objects.
## S4 method for signature 'timeSeries'
show(object)
## S3 method for class 'timeSeries'
print(x, FinCenter = NULL, format = NULL,
style = c("tS", "h", "ts"), by = c("month", "quarter"), ...)
object , x |
an object of class |
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 |
by |
a character string, one of |
... |
arguments passed to the print method for the data part, which is a
|
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
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.
Prints an object of class timeSeries
.
## 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
LPP # equivalently, show(LPP)
## a short subseries to demo 'print'
hC <- head(MSFT[ , "Close"])
class(hC)
print(hC)
print(hC, style = "h")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.