I have this data frame:
d <- data.frame(c(rep("A",5), rep("B",5), rep("C",5), rep("D",5), rep("E",5)),
sample(c(1:25), 25, replace=TRUE),
sample(c(1:25), 25, replace=TRUE))
colnames(d) <- c("col1","col2","col3")
head(d);tail(d)
col1 col2 col3
1 A 20 13
2 A 24 21
3 A 9 23
4 A 13 1
5 A 14 12
6 B 22 5
col1 col2 col3
20 D 23 1
21 E 3 1
22 E 24 19
23 E 15 3
24 E 22 6
25 E 21 7
I want to plot separately graphics using GGPLOT. As i have five letters, i will have five line graphics. Each letter of col1 gives me one graphic with col2 and col3 in the same line graphic.
For example:
The first graphic will have x=A
and y= col1 and col 3
. And the same for the others letters.
How can i do this?