I would like to normalize a variable but when I choose one specific variable within my df the following function does not work:
fun_range <- function(x) { # Create user-defined function
(x - min(x)) / (max(x) - min(x))
}
I use aut <- fun_range(x = aut$SupDem)
here my df is 'aut' and my variable is SupDem.