Reordering Factors--NOT alphabetical!

Hi,
I am a neew R Studio Community user and relatively new R user.

I have seen this question posted before, but answer was unclear to me.

I have a dataset with multiple counts ("normalized " in my data) per month. 12 months per year x 2 years I am simply trying to create a line plot the average monthly normalized count over the entire period of record.

I have calculated mean value per month, but output is in alphabetical order. How do I get the original order (e.g., jan-2018, feb-2019, ....)? I have tried several things, but cannot get this to work.

thanks

Reprex code:

bm <- bees %>%
group_by(m_y) %>%
summarise(normalized=mean(normalized)) %>%
bm

Data
Set m_y Trap normalized
24-Jan-18 Jan-18 NE-1 1.11
24-Jan-18 Jan-18 NE-2 2.22
24-Jan-18 Jan-18 NW-1 13.33
24-Jan-18 Jan-18 NW-1 2.22
24-Jan-18 Jan-18 NW-2 1.11
24-Jan-18 Jan-18 NW-2 6.67
24-Jan-18 Jan-18 NW-2 1.11
24-Jan-18 Jan-18 SW-1 1.11
24-Jan-18 Jan-18 SW-1 2.22
24-Jan-18 Jan-18 SW-1 5.56
24-Jan-18 Jan-18 SW-1 1.11
24-Jan-18 Jan-18 SW-1 1.11
24-Jan-18 Jan-18 SW-2 1.11
24-Jan-18 Jan-18 SW-2 2.22
24-Jan-18 Jan-18 VC-1 1.11
24-Jan-18 Jan-18 VC-2 1.11
24-Jan-18 Jan-18 VC-2 1.11
24-Jan-18 Jan-18 VC-2 2.22
12-Feb-18 Feb-18 NE-1 15.00
12-Feb-18 Feb-18 NE-2 30.00
12-Feb-18 Feb-18 NW-1 12.50
12-Feb-18 Feb-18 NW-2 2.50
12-Feb-18 Feb-18 SW-1 2.50
12-Feb-18 Feb-18 SW-2 2.50
12-Feb-18 Feb-18 VC-1 2.50
12-Feb-18 Feb-18 VC-2 2.50
9-Mar-18 Mar-18 NE-1 23.33
9-Mar-18 Mar-18 NE-2 3.33
9-Mar-18 Mar-18 NW-1 23.33
9-Mar-18 Mar-18 NW-2 10.00
9-Mar-18 Mar-18 NW-2 3.33
9-Mar-18 Mar-18 NW-2 3.33
9-Mar-18 Mar-18 SW-1 3.33
9-Mar-18 Mar-18 SW-1 3.33
9-Mar-18 Mar-18 SW-1 23.33
9-Mar-18 Mar-18 SW-2 30.00
9-Mar-18 Mar-18 SW-2 3.33
9-Mar-18 Mar-18 SW-2 3.33
9-Mar-18 Mar-18 VC-1 3.33
9-Mar-18 Mar-18 VC-2 6.67
9-Mar-18 Mar-18 VC-2 6.67
12-Mar-18 Mar-18 NE-1 1.43
12-Mar-18 Mar-18 NE-1 1.43
12-Mar-18 Mar-18 NE-1 31.43
12-Mar-18 Mar-18 NE-2 4.29
12-Mar-18 Mar-18 NE-2 1.43
12-Mar-18 Mar-18 NE-2 1.43
12-Mar-18 Mar-18 NE-2 8.57
12-Mar-18 Mar-18 NW-1 1.43
12-Mar-18 Mar-18 NW-1 1.43
12-Mar-18 Mar-18 NW-1 38.57
12-Mar-18 Mar-18 NW-1 1.43
12-Mar-18 Mar-18 NW-2 1.43
12-Mar-18 Mar-18 NW-2 1.43
12-Mar-18 Mar-18 NW-2 15.71
12-Mar-18 Mar-18 SW-1 1.43
12-Mar-18 Mar-18 SW-1 1.43
12-Mar-18 Mar-18 SW-1 1.43
12-Mar-18 Mar-18 SW-1 4.29
12-Mar-18 Mar-18 SW-2 1.43
12-Mar-18 Mar-18 SW-2 2.86
12-Mar-18 Mar-18 SW-2 1.43
12-Mar-18 Mar-18 SW-2 34.29
12-Mar-18 Mar-18 SW-2 2.86
12-Mar-18 Mar-18 VC-1 1.43
12-Mar-18 Mar-18 VC-2 1.43
12-Mar-18 Mar-18 VC-2 1.43
12-Mar-18 Mar-18 VC-2 1.43
12-Mar-18 Mar-18 VC-2 2.86
4-Apr-18 Apr-18 NE-1 6.00
4-Apr-18 Apr-18 NE-1 2.00
4-Apr-18 Apr-18 NW-1 2.00
4-Apr-18 Apr-18 NW-1 4.00
4-Apr-18 Apr-18 NW-1 2.00
4-Apr-18 Apr-18 NW-2 2.00
4-Apr-18 Apr-18 NW-2 4.00
4-Apr-18 Apr-18 SW-1 8.00
4-Apr-18 Apr-18 VC-1 10.00
4-Apr-18 Apr-18 VC-2 2.00
4-Apr-18 Apr-18 VC-2 2.00
21-May-18 May-18 NE-1 1.43
21-May-18 May-18 NE-1 1.43
21-May-18 May-18 NE-1 1.43
21-May-18 May-18 NE-1 1.43
21-May-18 May-18 NE-2 1.43
21-May-18 May-18 NW-2 1.43
21-May-18 May-18 NW-2 2.86
21-May-18 May-18 SW-1 2.86
21-May-18 May-18 SW-1 1.43
21-May-18 May-18 SW-2 1.43
21-May-18 May-18 VC-1 5.71
11-Jun-18 Jun-18 NE-1 0.83
11-Jun-18 Jun-18 NE-1 1.67
11-Jun-18 Jun-18 NE-1 0.83
11-Jun-18 Jun-18 NE-1 0.83
11-Jun-18 Jun-18 NW-1 0.83
11-Jun-18 Jun-18 NW-1 0.83
11-Jun-18 Jun-18 NW-2 0.83
11-Jun-18 Jun-18 NW-2 0.83
11-Jun-18 Jun-18 NW-2 1.67
11-Jun-18 Jun-18 SW-1 0.83
11-Jun-18 Jun-18 SW-1 2.50
11-Jun-18 Jun-18 SW-1 0.83
11-Jun-18 Jun-18 SW-2 0.83
11-Jun-18 Jun-18 VC-1 1.67
11-Jun-18 Jun-18 VC-1 0.83
11-Jun-18 Jun-18 VC-2 1.67
11-Jun-18 Jun-18 VC-2 0.83
11-Jun-18 Jun-18 VC-2 2.50
11-Jun-18 Jun-18 VC-2 2.50
12-Jul-18 Jul-18 NE-1 0.50
12-Jul-18 Jul-18 NE-1 0.50
12-Jul-18 Jul-18 NE-1 1.50
12-Jul-18 Jul-18 NE-1 0.50
12-Jul-18 Jul-18 NE-1 0.50
12-Jul-18 Jul-18 NE-1 0.50
12-Jul-18 Jul-18 NE-2 0.50
12-Jul-18 Jul-18 NE-2 4.50
12-Jul-18 Jul-18 NE-2 0.50
12-Jul-18 Jul-18 NE-2 0.50
12-Jul-18 Jul-18 NW-1 0.50
12-Jul-18 Jul-18 NW-1 0.50
12-Jul-18 Jul-18 NW-1 1.00
12-Jul-18 Jul-18 NW-1 0.50
12-Jul-18 Jul-18 NW-2 0.50
12-Jul-18 Jul-18 NW-2 0.50
12-Jul-18 Jul-18 SW-1 1.00
12-Jul-18 Jul-18 SW-2 0.50
12-Jul-18 Jul-18 SW-2 1.50
12-Jul-18 Jul-18 SW-2 0.50
12-Jul-18 Jul-18 SW-2 2.50
12-Jul-18 Jul-18 SW-2 0.50
12-Jul-18 Jul-18 SW-2 0.50
12-Jul-18 Jul-18 SW-2 0.50
12-Jul-18 Jul-18 VC-1 0.50
12-Jul-18 Jul-18 VC-1 0.50
12-Jul-18 Jul-18 VC-1 1.50
12-Jul-18 Jul-18 VC-2 0.50
12-Jul-18 Jul-18 VC-2 1.00
12-Jul-18 Jul-18 VC-2 0.50
12-Jul-18 Jul-18 VC-2 0.50
14-Aug-18 Aug-18 NE-1 5.45
14-Aug-18 Aug-18 NE-1 0.91
14-Aug-18 Aug-18 NE-2 6.36
14-Aug-18 Aug-18 NE-2 0.91
14-Aug-18 Aug-18 NE-2 0.91
14-Aug-18 Aug-18 NW-1 7.27
14-Aug-18 Aug-18 NW-1 0.91
14-Aug-18 Aug-18 NW-1 0.91
14-Aug-18 Aug-18 NW-2 2.73
14-Aug-18 Aug-18 NW-2 0.91
14-Aug-18 Aug-18 NW-2 0.91
14-Aug-18 Aug-18 SW-1 7.27
14-Aug-18 Aug-18 SW-1 0.91
14-Aug-18 Aug-18 SW-1 0.91
14-Aug-18 Aug-18 SW-1 1.82
14-Aug-18 Aug-18 SW-2 9.09
14-Aug-18 Aug-18 SW-2 1.82
14-Aug-18 Aug-18 SW-2 0.91
14-Aug-18 Aug-18 VC-1 0.91
14-Aug-18 Aug-18 VC-1 0.91
14-Aug-18 Aug-18 VC-1 2.73
14-Aug-18 Aug-18 VC-2 3.64
14-Aug-18 Aug-18 VC-2 0.91
14-Aug-18 Aug-18 VC-2 2.73
14-Aug-18 Aug-18 VC-2 0.91
18-Sep-18 Sep-18 NE-1 69.17
18-Sep-18 Sep-18 NE-1 0.83
18-Sep-18 Sep-18 NE-1 1.67
18-Sep-18 Sep-18 NE-2 37.50
18-Sep-18 Sep-18 NE-2 0.83
18-Sep-18 Sep-18 NW-1 5.00
18-Sep-18 Sep-18 NW-1 1.67
18-Sep-18 Sep-18 NW-1 0.83
18-Sep-18 Sep-18 NW-2 4.17
18-Sep-18 Sep-18 NW-2 5.00
18-Sep-18 Sep-18 NW-2 0.83
18-Sep-18 Sep-18 NW-2 0.83
18-Sep-18 Sep-18 SW-1 1.67
18-Sep-18 Sep-18 SW-1 2.50
18-Sep-18 Sep-18 SW-1 3.33
18-Sep-18 Sep-18 SW-1 0.83
18-Sep-18 Sep-18 SW-2 12.50
18-Sep-18 Sep-18 SW-2 0.83
18-Sep-18 Sep-18 VC-1 5.00
18-Sep-18 Sep-18 VC-1 0.83
18-Sep-18 Sep-18 VC-1 0.83
18-Sep-18 Sep-18 VC-2 2.50
18-Sep-18 Sep-18 VC-2 33.33
18-Sep-18 Sep-18 VC-2 4.17
20-Oct-18 Oct-18 NE-1 152.50
20-Oct-18 Oct-18 NE-1 1.25
20-Oct-18 Oct-18 NE-1 1.25
20-Oct-18 Oct-18 NE-1 1.25
20-Oct-18 Oct-18 NE-2 71.25
20-Oct-18 Oct-18 NE-2 2.50
20-Oct-18 Oct-18 NE-2 2.50
20-Oct-18 Oct-18 NE-2 1.25
20-Oct-18 Oct-18 NE-2 1.25
20-Oct-18 Oct-18 NW-1 20.00
20-Oct-18 Oct-18 NW-1 1.25
20-Oct-18 Oct-18 NW-2 1.25
20-Oct-18 Oct-18 SW-1 6.25
20-Oct-18 Oct-18 SW-1 2.50
20-Oct-18 Oct-18 SW-2 32.50
20-Oct-18 Oct-18 SW-2 1.25
20-Oct-18 Oct-18 VC-1 1.25
19-Nov-18 Nov-18 NE-1 6.67
19-Nov-18 Nov-18 NE-1 3.33
19-Nov-18 Nov-18 NE-1 26.67
19-Nov-18 Nov-18 NE-2 1.67
19-Nov-18 Nov-18 NE-2 3.33
19-Nov-18 Nov-18 NE-2 1.67
19-Nov-18 Nov-18 NE-2 8.33
19-Nov-18 Nov-18 NE-2 1.67
19-Nov-18 Nov-18 NW-1 1.67
19-Nov-18 Nov-18 NW-1 3.33
19-Nov-18 Nov-18 NW-1 5.00
19-Nov-18 Nov-18 NW-2 3.33
19-Nov-18 Nov-18 SW-1 1.67
19-Nov-18 Nov-18 SW-1 1.67
19-Nov-18 Nov-18 SW-2 6.67
19-Nov-18 Nov-18 VC-1 5.00
19-Nov-18 Nov-18 VC-1 3.33
19-Nov-18 Nov-18 VC-2 3.33
19-Nov-18 Nov-18 VC-2 5.00
19-Nov-18 Nov-18 VC-2 1.67
24-Dec-18 Dec-18 NE-1 5.56
24-Dec-18 Dec-18 NE-2 6.67
24-Dec-18 Dec-18 NE-2 2.22
24-Dec-18 Dec-18 NW-1 1.11
24-Dec-18 Dec-18 NW-1 2.22
24-Dec-18 Dec-18 NW-1 1.11
24-Dec-18 Dec-18 NW-2 3.33
24-Dec-18 Dec-18 NW-2 1.11
24-Dec-18 Dec-18 SW-1 2.22
24-Dec-18 Dec-18 SW-2 1.11
24-Dec-18 Dec-18 SW-2 1.11
24-Dec-18 Dec-18 VC-1 1.11
14-Jan-19 Jan-19 NE-1 0.83
14-Jan-19 Jan-19 NE-1 0.83
14-Jan-19 Jan-19 NE-2 1.67
14-Jan-19 Jan-19 NW-1 2.50
14-Jan-19 Jan-19 SW-1 0.83
14-Jan-19 Jan-19 SW-2 0.83
14-Jan-19 Jan-19 VC-1 2.50
14-Jan-19 Jan-19 VC-1 0.83
14-Jan-19 Jan-19 VC-1 0.83
14-Jan-19 Jan-19 VC-2 0.83
13-Feb-19 Feb-19 NE-1 1.11
13-Feb-19 Feb-19 NE-1 32.22
13-Feb-19 Feb-19 NE-1 1.11
13-Feb-19 Feb-19 NE-2 18.89
13-Feb-19 Feb-19 NE-2 48.89
13-Feb-19 Feb-19 NE-2 1.11
13-Feb-19 Feb-19 NE-2 2.22
13-Feb-19 Feb-19 NE-2 1.11
13-Feb-19 Feb-19 NW-1 10.00
13-Feb-19 Feb-19 NW-1 1.11
13-Feb-19 Feb-19 NW-2 7.78
13-Feb-19 Feb-19 NW-2 2.22
13-Feb-19 Feb-19 SW-1 3.33
13-Feb-19 Feb-19 SW-1 1.11
13-Feb-19 Feb-19 SW-2 5.56
13-Feb-19 Feb-19 VC-1 2.22
13-Feb-19 Feb-19 VC-2 1.11
13-Feb-19 Feb-19 VC-2 1.11
11-Mar-19 Mar-19 NE-1 5.71
11-Mar-19 Mar-19 NE-1 40.00
11-Mar-19 Mar-19 NE-2 1.43
11-Mar-19 Mar-19 NE-2 45.71
11-Mar-19 Mar-19 NW-1 2.86
11-Mar-19 Mar-19 NW-1 8.57
11-Mar-19 Mar-19 NW-1 1.43
11-Mar-19 Mar-19 NW-2 2.86
11-Mar-19 Mar-19 NW-2 2.86
11-Mar-19 Mar-19 SW-1 1.43
11-Mar-19 Mar-19 SW-2 2.86
11-Mar-19 Mar-19 SW-2 7.14
11-Mar-19 Mar-19 SW-2 2.86
11-Mar-19 Mar-19 VC-1 1.43
11-Mar-19 Mar-19 VC-2 1.43
11-Mar-19 Mar-19 VC-2 1.43
11-Mar-19 Mar-19 VC-2 1.43
9-Apr-19 Apr-19 NE-1 2.50
9-Apr-19 Apr-19 NE-1 2.50
9-Apr-19 Apr-19 NE-1 2.50
9-Apr-19 Apr-19 NE-2 2.50
9-Apr-19 Apr-19 NE-2 12.50
9-Apr-19 Apr-19 NE-2 2.50
9-Apr-19 Apr-19 NW-1 2.50
9-Apr-19 Apr-19 NW-1 2.50
9-Apr-19 Apr-19 NW-2 2.50
9-Apr-19 Apr-19 NW-2 2.50
9-Apr-19 Apr-19 SW-1 2.50
9-Apr-19 Apr-19 SW-1 2.50
9-Apr-19 Apr-19 SW-1 2.50
9-Apr-19 Apr-19 SW-2 5.00
9-Apr-19 Apr-19 SW-2 2.50
9-Apr-19 Apr-19 SW-2 7.50
9-Apr-19 Apr-19 VC-1 2.50
9-Apr-19 Apr-19 VC-1 7.50
14-May-19 May-19 NE-1 22.50
14-May-19 May-19 NE-1 2.50
14-May-19 May-19 NE-1 2.50
14-May-19 May-19 NE-2 5.00
14-May-19 May-19 NE-2 2.50
14-May-19 May-19 NE-2 17.50
14-May-19 May-19 NE-2 2.50
14-May-19 May-19 NW-1 2.50
14-May-19 May-19 NW-2 5.00
14-May-19 May-19 SW-1 5.00
14-May-19 May-19 SW-1 2.50
14-May-19 May-19 SW-1 5.00
14-May-19 May-19 SW-2 5.00
14-May-19 May-19 VC-1 2.50
14-May-19 May-19 VC-1 2.50
14-May-19 May-19 VC-1 10.00
14-May-19 May-19 VC-2 2.50
14-May-19 May-19 VC-2 10.00
18-Jun-19 Jun-19 NE-1 42.00
18-Jun-19 Jun-19 NE-1 4.00
18-Jun-19 Jun-19 NE-2 32.00
18-Jun-19 Jun-19 NW-1 2.00
18-Jun-19 Jun-19 NW-1 2.00
18-Jun-19 Jun-19 NW-1 2.00
18-Jun-19 Jun-19 NW-1 2.00
18-Jun-19 Jun-19 NW-1 2.00
18-Jun-19 Jun-19 NW-2 2.00
18-Jun-19 Jun-19 NW-2 4.00
18-Jun-19 Jun-19 SW-2 2.00
18-Jun-19 Jun-19 SW-2 2.00
18-Jun-19 Jun-19 VC-1 2.00
18-Jun-19 Jun-19 VC-1 2.00
18-Jun-19 Jun-19 VC-1 8.00
18-Jun-19 Jun-19 VC-2 2.00
18-Jun-19 Jun-19 VC-2 4.00
18-Jun-19 Jun-19 VC-2 10.00
14-Jul-19 July-19 VC-1 1.25
14-Jul-19 July-19 VC-1 2.50
14-Jul-19 July-19 VC-1 5.00
14-Jul-19 July-19 VC-1 1.25
14-Jul-19 July-19 VC-2 1.25
14-Jul-19 July-19 VC-2 2.50
14-Jul-19 July-19 VC-2 1.25
14-Jul-19 July-19 VC-2 3.75
14-Jul-19 July-19 NE-1 2.50
14-Jul-19 July-19 NE-1 22.50
14-Jul-19 July-19 NE-1 1.25
14-Jul-19 July-19 NE-2 7.50
14-Jul-19 July-19 NE-2 1.25
14-Jul-19 July-19 NW-1 1.25
14-Jul-19 July-19 NW-1 5.00
14-Jul-19 July-19 NW-1 1.25
14-Jul-19 July-19 NW-2 6.25
14-Jul-19 July-19 NW-2 1.25
14-Jul-19 July-19 NW-2 3.75
14-Jul-19 July-19 NW-1 1.25
14-Jul-19 July-19 NW-1 1.25
11-Aug-19 Aug-19 VC-1 3.33
11-Aug-19 Aug-19 VC-1 3.33
11-Aug-19 Aug-19 VC-1 6.67
11-Aug-19 Aug-19 VC-2 3.33
11-Aug-19 Aug-19 VC-2 3.33
11-Aug-19 Aug-19 NE-1 3.33
11-Aug-19 Aug-19 NE-1 23.33
11-Aug-19 Aug-19 NE-1 3.33
11-Aug-19 Aug-19 NW-1 3.33
11-Aug-19 Aug-19 SW-1 3.33
11-Aug-19 Aug-19 SW-1 3.33
11-Aug-19 Aug-19 SW-2 6.67
8-Sep-19 Sep-19 VC-1 2.50
8-Sep-19 Sep-19 VC-1 2.50
8-Sep-19 Sep-19 VC-2 2.50
8-Sep-19 Sep-19 VC-2 5.00
8-Sep-19 Sep-19 NE-1 35.00
8-Sep-19 Sep-19 NE-2 2.50
8-Sep-19 Sep-19 NE-2 15.00
8-Sep-19 Sep-19 NE-2 5.00
8-Sep-19 Sep-19 NW-1 2.50
8-Sep-19 Sep-19 NW-1 2.50
8-Sep-19 Sep-19 NW-2 2.50
8-Sep-19 Sep-19 NW-2 2.50
8-Sep-19 Sep-19 SW-2 2.50
8-Sep-19 Sep-19 SW-2 2.50
8-Sep-19 Sep-19 SW-2 5.00
4-Oct-19 Oct-19 VC-1 4.29
4-Oct-19 Oct-19 VC-2 4.29
4-Oct-19 Oct-19 NE-1 148.57
4-Oct-19 Oct-19 NE-1 1.43
4-Oct-19 Oct-19 NE-1 1.43
4-Oct-19 Oct-19 NE-1 1.43
4-Oct-19 Oct-19 NE-2 98.57
4-Oct-19 Oct-19 NE-2 1.43
4-Oct-19 Oct-19 NE-2 1.43
4-Oct-19 Oct-19 NW-1 1.43
4-Oct-19 Oct-19 NW-1 1.43
4-Oct-19 Oct-19 NW-1 4.29
4-Oct-19 Oct-19 NW-2 1.43
4-Oct-19 Oct-19 NW-2 32.86
4-Oct-19 Oct-19 NW-2 1.43
4-Oct-19 Oct-19 NW-2 2.86
4-Oct-19 Oct-19 SW-1 48.57
4-Oct-19 Oct-19 SW-1 1.43
4-Oct-19 Oct-19 SW-1 1.43
4-Oct-19 Oct-19 SW-1 1.43
4-Oct-19 Oct-19 SW-2 1.43
4-Oct-19 Oct-19 SW-2 24.29
4-Oct-19 Oct-19 SW-2 1.43
24-Nov-19 Nov-19 VC-1 1.43
24-Nov-19 Nov-19 VC-2 1.43
24-Nov-19 Nov-19 NE-1 11.43
24-Nov-19 Nov-19 NE-1 4.29
24-Nov-19 Nov-19 NE-2 8.57
24-Nov-19 Nov-19 NE-2 1.43
24-Nov-19 Nov-19 NW-1 1.43
24-Nov-19 Nov-19 NW-2 4.29
24-Nov-19 Nov-19 NW-2 1.43
24-Nov-19 Nov-19 NW-2 1.43
24-Nov-19 Nov-19 SW-2 2.86
24-Nov-19 Nov-19 SW-2 1.43
24-Nov-19 Nov-19 SW-2 2.86
24-Nov-19 Nov-19 SW-2 1.43
15-Dec-19 Dec-19 VC-1 1.67
15-Dec-19 Dec-19 VC-1 1.67
15-Dec-19 Dec-19 NE-2 1.67
15-Dec-19 Dec-19 NE-2 6.67
15-Dec-19 Dec-19 NW-1 1.67
15-Dec-19 Dec-19 NW-1 1.67
15-Dec-19 Dec-19 NW-2 8.33
15-Dec-19 Dec-19 SW-1 3.33
15-Dec-19 Dec-19 SW-2 1.67
15-Dec-19 Dec-19 SW-2 1.67

If you post data, please restrict it to the minimum necessary and also do so as code via e.g. dput().

This is because R recognizes m_y as a character vector, which will be converted into a factor and reordered alphabetically when mapped onto the x-axis. So you have to pre-order m_y by its first appearance using fct_inorder()

bm <- bees %>% 
  mutate(m_y = fct_inorder(m_y)) %>%
  group_by(m_y) %>%
  summarise(normalized=mean(normalized))

bm %>%
  ggplot() + 
  geom_line(aes(m_y, normalized, group = 1))

Another option is not to use factors at all, you can create the line plot with dates

library(tidyverse)
library(lubridate)

bees %>% 
    mutate(Set = dmy(Set),
           m_y = floor_date(Set, unit = "month")) %>% 
    group_by(m_y) %>% 
    summarise(normalized = mean(normalized)) %>% 
    ggplot(aes(x = m_y, y = normalized)) +
    geom_line() +
    scale_x_date(date_breaks = "1 month", date_labels = "%b-%Y") +
    theme(axis.text.x = element_text(angle = 45, hjust = 1, vjust = 1))

Thanks @martin.R, @enixam, and @andresrcs

Great and timely feedback. Much appreciated.

Craig

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.