Introduction
This article describes how to go from a standard table...
...to an CreateCustomTable R table (similar to a table with Autofit checked) with span row labels:
Requirements
A table.
Method
1. Select your table.
2. Copy the name from Properties > GENERAL > Name.
3. Right click on the Report tree and select Add R Output.
4. Paste the below under Properties > R CODE:
#identify mytable
mytable = table.Income
#create list of row spans
rowspans = list(list(height=2,label="Low Income"),
list(height=3,label="Med Income"),
list(height=4,label="High Income"),
list(height=1,label=" "))
#create custom table
flipFormat::CreateCustomTable(mytable,
row.spans=rowspans,
border.color = "black")
- The above code defines the table using the reference name from step 2.
- Next, we create a list of the span labels where the height represents the number of rows the span should cover and the label is what should appear within the span.
- Finally, we use our CreateCustomTable function from the flipFormat R package and parse rowspans into the row.spans argument.
5. Right click on the R Output and select Calculation Options.
6. Change Exporting > Format > To PowerPoint as Image of R Output. Note that this means you cannot edit the table once it is exported to PowerPoint.
7. OPTIONAL: Add other arguments to CreateCustomTable to set fill colors, padding and font styles.
Next
How to Customize a Table using CreateCustomTable in R
How to Customize Fonts in a CreateCustomTable R Table
How to Add Row Spans to a CreateCustomTable R Table
How to Add Column Spans to a CreateCustomTable R Table
How to Customize a Table with Multiple Statistics using CreateCustomTable in R
How to Add Statistical Significance to CreateCustomTable R Tables