File: methods-show.Rd

package info (click to toggle)
r-cran-timeseries 4041.111-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,704 kB
  • sloc: makefile: 14
file content (91 lines) | stat: -rw-r--r-- 2,197 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
\name{print-methods}

\alias{show,timeSeries-method}
\alias{print.timeSeries}


\title{Print 'timeSeries' objects}

\description{
  Print \code{"timeSeries"} objects.
}

\usage{
\S4method{show}{timeSeries}(object)

\method{print}{timeSeries}(x, FinCenter = NULL, format = NULL,
    style = c("tS", "h", "ts"), by = c("month", "quarter"), ...)
}

\arguments{

  \item{object,x}{  
    an object of class \code{"timeSeries"}.
  }
  \item{FinCenter}{
    a character with the the location of the  financial center named 
    as "continent/city". 
  }
  \item{format}{
    the format specification of the input character vector,
    a character string with the format in POSIX notation.
  }  
  \item{style}{
    a character string, one of \code{"tS"}, \code{"h"}, or \code{"ts"}.
  }
  \item{by}{
    a character string, one of \code{"month"}, \code{"quarter"}.
  }
  \item{\dots}{
    arguments passed to the print method for the data part, which is a
    \code{"matrix"} or, in the case of \code{style = "ts"}, to the print
    method for class \code{"ts"}.
  }
}

%   \item{recordIDs}{
%     for the \code{print} method, a logical value - should the
%     \code{recordIDs} be printed together with the data matrix and time
%     series positions?

\details{

  \code{show} does not have additional arguments.

  The \code{print} method allows to modify the way the object is shown
  by explicitly calling \code{print}.

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

}

\value{
  Prints an object of class \code{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
LPP  # equivalently, show(LPP)

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

\keyword{chron}