Problems to create a database

You don't need to do that, that part of the code is just to provide some made up sample data to work with for reproducibility purposes, you can simply use your own data frame instead. The key to solve your problem is the uncount() function.

To better understand why the solution given to you includes code to create a dataframe, please read the guide on this link

1 Like