I have this raster file and I want to rescale the y axis (frequency) to [0,1](by dividing the frequency by the sum of all frequencies).
conne <- file("C:\\fined.bin","rb")
sd<- readBin(conne, numeric(), size=4, n=1440*720, signed=TRUE)
y<-t(matrix((data=sd), ncol=1440, nrow=720))
r = raster(y)
hist(r, breaks=30, main="SMD_2010",
xlab="Pearson correlation", ylab="Frequency", xlim=c(-1,1))
example:
values frequency (rescaled by dividing each frequency by the sum(85600))
-1 0 0
-0.5 100 0.001168224
0 38000 0.443925234
0.5 7500 0.087616822
0.75 40000 0.46728972