Description Usage Arguments Value Author(s) Examples
View source: R/PrintYieldCurves.R
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.
| 1 2 | PrintYieldCurves(YieldCurveDF, rows = c(1), title = "Yield Curve",
  tabprt = FALSE)
 | 
| 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 | 
nothing: produces a plot and optionally a table
George Fisher GeorgeRFisher@gmail.com
| 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)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.