R/RESCALE.R

RESCALE <-
function(x){ 
	if(max(x)==min(x)){x=rep(0, length(x))}
	if(max(x)!=min(x)){max=max(abs(x)); x=x/max}
x
}

Try the MoLE package in your browser

Any scripts or data that you put into this service are public.

MoLE documentation built on May 2, 2019, 3:02 p.m.