Learn R Programming

xts (version 0.13.1)

print.xts: Print An xts Time-Series Object

Description

Method for printing an extensible time-series object.

Usage

# S3 method for xts
print(x, fmt, ..., show.rows = 10, max.rows = 100)

Value

Returns x invisibly.

Arguments

x

An xts object

fmt

Passed to coredata to format the time index

...

Arguments passed to other methods

show.rows

The number of first and last rows to print if the number of rows is truncated (default 10, or getOption("xts.print.show.rows"))

max.rows

The output will contain at most max.rows rows before being truncated (default 100, or getOption("xts.print.max.rows"))

Author

Joshua M. Ulrich

Examples

Run this code
data(sample_matrix)
sample.xts <- as.xts(sample_matrix)

# output is truncated and shows first and last 10 observations
print(sample.xts)

# show the first and last 5 observations
print(sample.xts, show.rows = 5)

Run the code above in your browser using DataLab