bin function

Bins the values of a variable (typically a factor)