[R] Recombining Mon and Year values

Jeff Reichman re|chm@nj @end|ng |rom @bcg|ob@|@net
Tue May 16 22:29:27 CEST 2023


R Help

 

I have a data.frame where I've broken out the year <dbl> and an ordered
month <ord> values. But I need to recombine them so I can graph mon-year in
order but when I recombine I lose the month order and the results are
plotted alphabetical.

 

Year        month  mon_year            

<dbl>     <ord> 

2021     Mar        Mar-2021

2021     Jan         Jan-2021

2021     Apr         Apr-2021

 

So do I need to convert the months back to an integer then recombine to
plot.

 

Jeff Reichman


	[[alternative HTML version deleted]]



More information about the R-help mailing list