This should be rather simple, I would like to expand rows of my data set. The criteria to expand the rows is equal to a value in a specified column. In my code below that column is row_nbr2. Currently I can expand my rows the way I want however, the functions deletes all but two columns. I have two different ways of expanding my data set:
Thank you very much that was simple enough. Quick question though, in addition to wanting the rows expanded, I also want the function to create a new column that would number the rows. For example, if id A's rows expanded to 3 rows then I would want a column to include 1,2,3. Can I incorporate something like that with uncount?