I have this dataset:
at the beginning I had,
Date Action Daily.Contact
1/1/2012 All 4
1/1/2012 Email 2
1/1/2012 Text 1
2/2/2012 Phone Call 1
2/2/2012 All 7
2/2/2012 Email 2
2/2/2012 Text 2
2/2/2012 Phone Call 2
3/3/2012 All 4
3/3/2012 Email 2
3/3/2012 Text 1
3/3/2012 Phone Call 1
4/3/2012 All 9
4/3/2012 Email 4
4/3/2012 Text 4
4/3/2012 Phone Call 1
After some data manipulation I ended up with:
Date All Email Text Phone Call
1/1/2012 4 2 1 1
2/2/2012 7 2 2 3
3/3/2012 4 2 1 1
4/4/2012 9 3 4 2
How do I create a line graph showing 3 lines for Email, Text, Phone call?
So far I have:
plot(as.Date(df$Date), df$Daily.Contact,
type = 'l', lwd = 2, xlab = "Date", ylab = "Daily.Contact")