Timeline1 Timeline2 Timeline3
v3 v7 v11
v4 v1 v12
v6 v8 v13
v2 v9 v17
v5 v10 v16
df1<- structure(list(Timeline1 = structure(c(2L, 3L, 5L, 1L, 4L), .Label = c("v2",
"v3", "v4", "v5", "v6"), class = "factor"), Timeline2 = structure(c(3L,
1L, 4L, 5L, 2L), .Label = c("v1", "v10", "v7", "v8", "v9"), class = "factor"),
Timeline3 = structure(c(1L, 2L, 3L, 5L, 4L), .Label = c("v11",
"v12", "v13", "v16", "v17"), class = "factor")), .Names = c("Timeline1",
"Timeline2", "Timeline3"), class = "data.frame", row.names = c(NA,
-5L))
のようなテーブルがあると私は、データフレームは、私がすることにより、第1のテーブルを置き換えたい
df2 <- structure(list(Name = structure(c(1L, 12L, 13L, 14L, 15L, 16L,
17L, 18L, 19L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L), .Label = c("v1",
"v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", "V18",
"V19", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9"), class = "factor"),
Meaning = structure(c(3L, 4L, 12L, 13L, 18L, 16L, 11L, 1L,
19L, 17L, 15L, 2L, 8L, 6L, 7L, 9L, 10L, 14L, 5L), .Label = c("A",
"B", "C", "D", "F", "J", "L", "N", "O", "P", "Q", "R", "T",
"U", "V", "W", "X", "Y", "Z"), class = "factor")), .Names = c("Name",
"Meaning"), class = "data.frame", row.names = c(NA, -19L))
の下に見つけることができます
Name Meaning
v1 C
v2 D
v3 R
v4 T
v5 Y
v6 W
v7 Q
v8 A
v9 Z
v10 X
v11 V
v12 B
v13 N
v14 J
v15 L
v16 O
v17 P
V18 U
V19 F
1つのチェックリストテーブルを持っていますチェックリストに示されている値を使用して、最終出力がこのようになる可能性があります。
Timeline1 Timeline2 Timeline3
R Q V
T C B
W A N
D Z P
Y X O