This article describes how to go from an unsorted table...
..to a table that is sorted.
- A table with one column and multiple rows.
1. Right click on your table and select Reference name.
2. Copy the table name and click OK.
3. Right click in the Report tree and select Add R Output.
4. Go to Properties > R CODE in the object inspector.
5. Add a line to the code that defines the table as
table = table_name where table_name is copied from step 2.
6. Add this line to the code to sort in descending order:
table[order(table, decreasing = TRUE)]
Below is the code from this example that sorts in decreasing order:
table = table.Preferred.cola
table = table[order(table, decreasing = TRUE)]
How to Sort Multiple Column Tables Using R
How to Export Updatable Text to PowerPoint using R
How to Relabel Rows and Columns in an R Table
How to Remove a Row or Column from a Table Using R
Article is closed for comments.