- Get Data Into the Right Format to Create your First Table
- Use better column names and a title
- Align columns
- Use groups instead of repetitive columns
- Format your table's numbers
- Add summaries
- Add additional horizontal lines
- Add background colors
- Change the text appearance
- Change cell properties
- Export Your Tables
- Heat map columns
- Adding Charts with Flextable
- Add your own ggplot
- Case Study
Making Beautiful Tables with R
Export Your Tables
This lesson is called Export Your Tables, part of the Making Beautiful Tables with R course. This lesson is called Export Your Tables, part of the Making Beautiful Tables with R course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
What will happen here is pretty straightforward.
save_as_docx(
final_table,
path = 'final_table.docx'
)
# Make sure that you have {webshot2} and phantomJS installed. The latter can be installed via {webshot2}
save_as_image(
final_table,
path = 'final_table.png',
webshot = 'webshot2'
)
[1] "/media/albert/Files/NextCloud/R Projects/tables-course/final_table.png"
# Beware that in the output pptx file there can be empty cells that have huge font.
# This will cause the line heights of the cells to be large.
# You have to manually tweak this.
save_as_pptx(
final_table,
path = 'table.pptx'
)
Your Turn
Export your last table as a .docx
-, .png
- and .pptx
-file. For the .png-file use the webshot2
package (which you need to have installed). You will also need to install phantomJS, which you can download here. Beware that in the output .pptx
-file there can be empty cells that have a huge font. This will cause the line heights of the cells to be large. You have to manually tweak this.
You need to be signed-in to comment on this post. Login.