0

I have an df in r which is like the following :

# A tibble: 70 x 2

value Month_considered
dbl> <S3: yearmon>   
24.8  Apr 2017        
47.0  Apr 2017        
35.2  Apr 2017        
19.4  Apr 2017        
30.9  Apr 2017        
6.64  Apr 2017        
10.7  Apr 2017        
11.5  May 2017        
36.3  May 2017        
6.74  May 2017        
# ... with 60 more rows

So when I do levels(intrc_flow$Month_considered) or unique(intrc_flow$Month_considered) the output I get is as following:

 [1] Apr-17 May-17 Jun-17 Jul-17 Aug-17 Sep-17 Oct-17 Nov-17 Dec-17 Jan-18 Feb-18
12 Levels: Apr-17 Aug-17 Dec-17 Feb-18 Jan-18 Jul-17 Jun-17 Mar-17 ... Sep-17

How do I get the levels output as Apr 2017 instead of Apr-17.Thank you.

SNT
  • 1,283
  • 3
  • 32
  • 78

0 Answers0