I would like to creat a ggplot graph with the following data:
`patient condition essai 10MWT
1 sans 1 9,57
1 sans 2 9,52
1 sans 3 8,92
1 avec 1 9,73
1 avec 2 9,38
1 avec 3 9,3
2 sans 1 19,41
2 sans 2 17,04
2 sans 3 17,61
2 avec 1 15,79
2 avec 2 16,58
2 avec 3 16,83
3 sans 1 6,99
3 sans 2 8,07
3 sans 3 7,91
3 avec 1 7,54
3 avec 2 7,65
3 avec 3 8,42
4 sans 1 8,75
4 sans 2 8,29
4 sans 3 8,18
4 avec 1 7,96
4 avec 2 8,09
4 avec 3 8,34
5 sans 1 9,36
5 sans 2 8,91
5 sans 3 8,88
5 avec 1 8,24
5 avec 2 7,57
5 avec 3 7,56
6 sans 1 7,53
6 sans 2 8,15
6 sans 3 7,52
6 avec 1 7,39
6 avec 2 7,34
6 avec 3 6,85
`
I wrote the following commands but I don’t succeed in connecting the paires values (10MWT) for 1 same patient and the same try (essai 1 or 2) and the different conditions.
ggplot(data3, aes(factor(condition), value)) +
geom_boxplot(width=0.3, size=1, fatten=1, colour="black") +
geom_point( size=2, alpha=0.5, col= data3$patient) +
geom_line(aes(x=factor(condition), y=value), colour= data3$patient)
Can anyone help me?
Best regards
New contributor
alexis ruet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.