[R] Plotting quarterly time series

phil at philipsmith.ca phil at philipsmith.ca
Sun Jan 28 22:09:10 CET 2018


I have a data set with quarterly time series for several variables. The
time index is recorded in column 1 of the dataframe as a character vector
"Q1 1961", "Q2 1961","Q3 1961", "Q4 1961", "Q1 1962", etc. I want to
produce line plots with ggplot2, but it seems I need to convert the time
index from character to date class. Is that right? If so, how do I make
the conversion?



More information about the R-help mailing list