PrintYieldCurves: Print yield curves

Description Usage Arguments Value Author(s) Examples

View source: R/PrintYieldCurves.R

Description

Given a data.frame returned by the CMTrates, function, you can specify one or more dates to use to print the yield curve on those dates.

Usage

1
2
PrintYieldCurves(YieldCurveDF, rows = c(1), title = "Yield Curve",
  tabprt = FALSE)

Arguments

YieldCurveDF

data.frame created by the CMTrates function

rows

a vector of integer row indices indicating the row(s) to use for plotting

title

a string to use as the title of the plot

tabprt

if TRUE, print a table of the rate data used

Value

nothing: produces a plot and optionally a table

Author(s)

George Fisher GeorgeRFisher@gmail.com

Examples

1
2
3
4
5
6
7
8
library(ustreasuries)
all_data <- CMTrates()
PrintYieldCurves(dplyr::filter(all_data,
                                   all_data$NEW_DATE>=as.Date("2006-01-01") &
                                   all_data$NEW_DATE<=as.Date("2009-12-31")),
                   rows=c(1, 272, 272*2, 272*3),
                   title="Yield Curves Before & During the Financial Crisis",
                   tabprt=TRUE)

grfiv/ustreasuries documentation built on May 17, 2019, 8:36 a.m.