R/RESCALE.R

Defines functions RESCALE

Documented in RESCALE

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 Nov. 17, 2017, 8 a.m.