I would like to use normalization for 0 until 1 using this function:
range01 <- function(x){(x-min(x))/(max(x)-min(x))}
if I use it for single case it works fine
However I would like to use it for a whole dataframe in which it find the min and max of all columns and makes the normalization I used this option:
data.frame(apply(df[2:ncol(df)], 2, range01))
However it doesn't give the exepected results. Any idea if the apply should be different?