User:Linkerzx

Julien Kervizic - Data Guy


 * @medium
 * @gitlab

R
apply_replace <- function(x,r,m,f) apply(as.data.frame(x) ,1 ,FUN=f,z=m,i =r) loop_replace <- function (x,i,m,f) {if(i + 1>nrow(m)) {return(x)} else {loop_replace( apply_replace(x,i,m,f),i+1,m,f)} } replace.func <- function(x,z,i) str_replace_all(x,as.character(z[i,1]),as.character(z[i,2])) regexp.replace.func <- function(x,z,i) gsub(pattern=as.character(z[i,1]),replacement=as.character(z[i,2]),x) bo.titles.a <- loop_replace(dataset.BO.TITLES.processed$title,1,dataset.dictionary,replace.func)