My experience is that this still goes unanswered, that if there is -2 in one of the columns, the current answer will not produce a 0-100 scale. Although I appreciate the answer when I tried to do this, do I have variables that are from -100 to 100, and this still left some kind of negative result?
I have a solution in case this applies to you:
rescale <- function(x) (x-min(x))/(max(x) - min(x)) * 100 dat <- rescale(dat)
source share