Hi, for example I have two list:
nombreL <- c("Alvaro Perez", "Sebasti?n Garc?a", "Luis Gomez", "Jorge
Rial", "Ronaldo Apud",..., "Ana Mar?a Bianco")
nombreC <- c("Alvaro",..., "Ana",...,"Jorge",...,"Ronaldo", "Sebastian",...)
and my code is:
cuenta <- 0
topL <- length(nombreL)
topC <- length(nombreC)
for (i in 1:topL) {
for (j in 1:topC) {
k <-
grep(noquote(nombreL[i]),nombreC[j])
if (length(k) > 0){
cuenta <- cuenta + 1
}
}
Thanks,
Sebastian.