I have the following dataset :
date prmd N Tx
1: 2023-10-31 UAE 102889
2: 2023-10-31 UB 15183
3: 2023-11-30 TX 2
4: 2023-11-30 UAE 94110
5: 2023-11-30 UB 15339
6: 2023-12-31 TX 67
7: 2023-12-31 UAE 90417
8: 2023-12-31 UB 16556
9: 2024-01-31 TX 44
10: 2024-01-31 UAE 86732
11: 2024-01-31 UB 16572
12: 2024-02-29 TX 34
13: 2024-02-29 UAE 84257
14: 2024-02-29 UB 15745
I’d like to plot in R using ggplot2 3 lines, 1 for each prmd (i.e. UB, TX, UAE) where x=date and y=’N Tx’.
I tried using group/color but couldn’t succeed.
I’d like the code to be sort of general, i.e. cover cases where more categorical values exist as prmd (i.e. not for just 3 lines).
Thanks in advance