Zach Mayer's work reproducing John Hussman's Recession Warning Composite prompted me to dig this trick out of my (Evernote) notebook.
First, let's grab some data to plot using the very handy
getSymbols() function from Jeffrey Ryan's quantmod package. We'll load the U.S. unemployment rate (
UNRATE) from the St. Loius Fed's Federal Reserve Economic Data (
src="FRED") and load the time series into a…