R/rescale.R

rescale <-
function(x, fun='center'){ 
if(fun=='z-score'){
.zscore <-((x - mean(x))/sd(x))
return(.zscore) }
else {
.center <- (x - mean(x))
return(.center) }
}

Try the SciencePo package in your browser

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

SciencePo documentation built on May 2, 2019, 5:53 p.m.