The challenge is to give as short code as possible to print an ASCII histogram of a set of data.
Input. The number of bins followed by a number of integers representing the data. The data are space separated.
Output. An ASCII histogram of the data using the specified number of bins.
Score. Number of characters in the code excluding trailing whitespace at the beginning or end of each line.
2 2 3 4 2 2 5
* * ** **
Update. The answers are all great although I can only ever imagine using the one in R. No python contribution?