如何在R中绘制此图,其中Department和Year分组,Time为x轴,Counts为y轴?并有一条线连接并着色相同的组
Department Year Counts Time
1 CPD 2011 24 0
2 CPD 2011 28 1
3 CPD 2011 31 2
4 APD 2012 20 0
5 APD 2012 25 2
6 APD 2012 21 3
7 CPD 2012 30 2
8 CPD 2012 26 3
9 CPD 2012 11 5