Hello,

I would like to translate this R formula below in Stata.

My data :
translate <- contains : translate$ID translate$WORDS (list of words) translate$RESUME
home <- contains : home$ID home$adress home$RESUME (empty field)

I whant to complete home$RESUME from translate$RESUME looping with translate$ID and translate$WORDS


[I]for(i in 1:nrow(translate)){
home$RESUME[grepl(translate$WORDS[i], home$adress, ignore.case = TRUE) & home$ID == translate$ID[i]] <- translate$RESUME
}


Thank you for your help !
Marc