回答編集履歴
2
syuusei
answer
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
patient = c("1","1","2","2","3","3","4","4")
|
3
3
|
score = c(3,6,5,7,7,10,4,8)
|
4
4
|
library(ggplot2)
|
5
|
+
|
6
|
+
x$time <- factor(x$time, levels = c("pre", "post"))
|
5
7
|
|
6
8
|
x = data.frame(time, patient, score)
|
7
9
|
|
1
syuusei
answer
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
time = c("pre","post","pre","post","pre","post","pre","post")
|
2
2
|
patient = c("1","1","2","2","3","3","4","4")
|
3
|
-
|
3
|
+
score = c(3,6,5,7,7,10,4,8)
|
4
4
|
library(ggplot2)
|
5
5
|
|
6
|
-
x = data.frame(time, patient,
|
6
|
+
x = data.frame(time, patient, score)
|
7
7
|
|
8
|
-
g = ggplot(x, aes(x = time, y =
|
8
|
+
g = ggplot(x, aes(x = time, y = score, group=patient) ) +
|
9
9
|
geom_line() +
|
10
10
|
geom_point()
|
11
11
|
|