I have a vector of 1000 value, I then make a histogram with 100 bins. I want to make a vector = (Value, Freq) with the value being the individual value (so I will have 1000 of them) with the freq = the count of the values in the bin that particular value falls into.
Hopefully this can make problem clearer:
data <- c(6.429229, 9.300965, 11.073744, 6.527263, 8.425178, 
          6.821384, 6.515991,  9.131452, 6.313888, 8.866572) 
Myhist <- hist(data,2)
Myhist$counts
# 5 4 1
# c(5,4,1,5,4,5,5,4,5,4)
MyDF <- cbind(data,c(5,4,1,5,4,5,5,4,5,4))
# Result I want: 
# [1,]  6.429229 5
# [2,]  9.300965 4
# [3,] 11.073744 1
# [4,]  6.527263 5
# [5,]  8.425178 4
# [6,]  6.821384 5
# [7,]  6.515991 5
# [8,]  9.131452 4
# [9,]  6.313888 5
#[10,]  8.866572 4
 
    