Answers for "R scale 1 to 0"

R
1

scale between 0 and 1 r

s = sort(rexp(100))

range01 <- function(x){(x-min(x))/(max(x)-min(x))}

range01(s)
Posted by: Guest on February-10-2021

Browse Popular Code Answers by Language