R/map.R

map <-
function(x,from,to,strict=TRUE,...){
	stopifnot(length(to)==length(from))
	res <- to[match(x,table=from)]
	if(!strict) res[!(x %in% from)] <- x[!(x %in% from)]
	res
}
anniejw6/metrumrg documentation built on May 10, 2019, 11:50 a.m.