I am new to R and am struggling to create assign a set of bins to a data frame that contains a set of numbers. Such as:
value
21
53
1
43
56
If I run hist
then I know I can assign these values to a bin but that gives me a graphical output. How do I assign the bins to a new column in a data frame, i.e.,
value class
21 20
53 50
1 0
43 40
56 50