for each group, sets the top row of the group to the group's value. All other rows in the group are set to "". See the example

collapseRows(df, variable)

Arguments

df

a data frame

variable

group variable to be collapsed

Value

a data frame with an updated variable column