Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (10 sloc) 270 Bytes
find.replace <- function(vector,find,replace.with){
if(length(find) == length(replace.with)){
for(i in 1:length(find)){
vector[vector == find[i]] <- replace.with[i]
}
} else {
stop("Find and replace vectors should be same length")
}
vector
}