R/rename.variables.r

Defines functions rename.variables

  rename.variables = function(oldnames, lookupnames) {
    newnames = oldnames
    nvars = length(oldnames)
    for (i in 1:nvars) {
      j = which(lookupnames[,1] == oldnames[i])
      if (length(j)>0) newnames[i] = lookupnames[j,2]
    }
   return (newnames) 
  }
jae0/emaf documentation built on May 28, 2019, 9:57 p.m.