Answers for "r scale between 0 and 1"

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
0

r - scale data from 0 to 1

s = sort(rexp(100)) # Generate 100 values of exponential distribution
range01 <- function(x){(x-min(x))/(max(x)-min(x))} # Function MinMax Scaler
range01(s) # Calculate scaleing from 0 to 1
Posted by: Guest on June-23-2020

Code answers related to "r scale between 0 and 1"

Browse Popular Code Answers by Language