I'm trying to create scatterplots using data from B and C, however I'd like to create a difference scatterplot for each category in A.
A B C
Monday 2 4
Tuesday 4 2
Monday 3 5
Wednesday 3 10
Friday 7 9
This is the code I currently have is to just make a normal scatterplot with my data. Is there an addition or something that I can use to automatically make scatterplots based on category?
attach(data)
plot(C, B, main="scatterplots",xlab="C", ylab="B", pch=10)
abline(lm(C~B), col="red")