No se si entendí la pregunta porque no acompañas un ejemplo
reproducible, de cualquier manera ¿es esto lo que buscas?
A <- data.frame(
a1 = c("aa", "ab", "ac", "ad",
"ae"),
a2 = c("ba", "bb", "bc", "bd",
"be"),
a3 = c("ca", "cb", "cc", "cd",
"ce"),
a4 = c("da", "db", "dc", "dd",
"de"),
a5 = c("ea", "eb", "ec", "ed",
"ee"))
B <- data.frame(
a1 = c("aa", NA, "ac", "ad", "ae"),
a2 = c("ba", "bb", "bc", NA, "be"),
a3 = c("ca", "cb", NA, "cd", "ce"),
b1 = c("1aa", "1ab", "1ac", "1ad",
"1ae"),
b2 = c("2ba", "2bb", "2bc", "2bd",
"2be"),
b3 = c("3ca", "3cb", "3cc", "3cd",
"3ce"),
b4 = c("4aa", "4ab", "4ac", "4ad",
"4ae"),
b5 = c("5ba", "5bb", "5bc", "5bd",
"5be"),
b6 = c("6ca", "6cb", "6cc", "6cd",
"6ce"),
b7 = c("7ca", "7cb", "7cc", "7cd",
"7ce"))
(m1 <- merge(A, B, by.x = c("a1", "a2"), by.y =
c("a1","a2"))[,-6])
Daniel Merino
El día 22 de noviembre de 2012 15:46, Sebastian Kruk
<residuo.solow en gmail.com> escribió:> En el B tengo las variables a1, a2, a3, b1, b2, b3,b4, b5, b6, b7.