I have a data frame as follows:
Category Name Value
How would I select say, 5 random names per category? Using sample returns random rows using all rows as possible candidates. However, I want to specify the number of random rows per category. Any suggestions?
Update: I am open to using ddply
Best guess in absence of test cases:
Tested with Jonathan’s data: