I would like to turn a character variable formatted as YYYY-QQ, so for example 2010-Q1
, into something I can use as a date. I have played around with as.yearqtr
, but haven't could only figure out the output format. I haven't been been able to define the input format though.
Edit:
Has also been answered here.