print.xts: Print An xts Time-Series Object

View source: R/print.R

print.xtsR Documentation

Print An xts Time-Series Object

Description

Method for printing an extensible time-series object.

Usage

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

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")).

Value

Returns x invisibly.

Author(s)

Joshua M. Ulrich

Examples


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)


xts documentation built on Oct. 16, 2024, 1:08 a.m.