R/map.R

Defines functions map

Documented in map

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
}
metrumresearchgroup/metrumrg documentation built on May 22, 2019, 7:51 p.m.