library(officer);
doc <- read_docx();
doc <- body_add_table(doc, iris, style = “table_template”);
doc;
you will observe the following errors:
- Content at cursor location:
Error in$<-.data.frame
(*tmp*
, “style_name”, value = character(0)) :
replacement has 0 rows, data has 755
How to solve this issue? The above codes are sample code from officer package