I have a data frame:
head(cat1)
expl.val  pred.val
    1     0.602
    1     0.602
    1     0.602
    1     0.602
    1     0.604
    1     0.604
I want to calculate the mean of the pred.val for the different expl.val, which are values from 1 to 14. And put it in a new data frame.
Something like this:
expl.val  pred.val
    1     mean of expl.val(1)
    2     mean of expl.val(2)
    3     mean of expl.val(3)
    4     mean of expl.val(4)
    5     mean of expl.val(5)
    6     mean of expl.val(6)
How can I do this?
