I'm trying to rescale a dataset of Rdata comprised between 0.17 and 0.00002589 to a range between 0 and 1. I would like the cumulative frequence to be equal to 1.
I tried to use the function rescale (from scales package) :
library(scales)
t <-rescale(df, to = c(0,1)) #data go from [0.00002589:0.17] to [0.53:0.00004914]
cumsum(t)= 4.24...
How do I correct my data in order to have cumsum equal to 1 ?
Thank you for your help.