plot_df: Plot a data frame or xts matrix to plotting device

Description Usage Arguments Examples

Description

This function plots a dataframe or anything that can be coerce to a dataframe to the plotting device. This includes xts matrices. It uses the gridExtra package to plot a dataframe or a matrix, including an xts matrix, to the plot region. The row names are plotted by default. Only the first 30 rows are plotted.

Usage

1
2
plot_df(df, main = " ", footnote = " ", title_size = 2,
  foot_size = 1, scaling = 1, Nmax = 20)

Arguments

df

The dataframe or matrix to plot

main

Title to put above the table

footnote

An optional footnote plotted just below the table

title_size

This is a scaling factor for the title. Default is 2.0

foot_size

A scaling factor for the size of the footnote. Default is 1.0

scaling

This is a global scaling factor (similar to cex for graphics). It scales the size of the entire table. Default fontsize is 12, and scaling by a factor other than 1.0 will scale the fontsize accordingly.

Nmax

This is the maximum number of rows to plot. Normally set to 20.

Examples

1
2
x <- xts_data
plot_df(x, main="First 20 rows in xts_data", footnote = "some footnote text here")

jeanmarcgp/xtsanalytics documentation built on May 19, 2019, 12:38 a.m.