Please can anyone offer guidance on how to
- calculate column totals and then
- sort on the resultant totals in R?
Everything I've tried so far to total the columns, eg, (colsums()
and sapply()
returns the resultant totals as a vector (eg ABOUT 4022
) and I cannot find any information on how I can split this into the Column Header ABOUT
and Column Value 4022
and then sort both the Header and Value on the Column Value.