add_totals_row function

Append a totals row to a data.frame.