R/rename.df.r

Defines functions rename.df

  rename.df = function(x, n0, n1) {
  	if(!length(n0)== length(n1)) stop('length of names and renames need to be the same length')
  	for(i in 1:length(n0)){
    	names(x)[which(names(x)==n0[i])] = n1[i]
		}
    return(x)
  }
jae0/snowcrab documentation built on Nov. 6, 2024, 10:13 p.m.