The goal of gto is to provide the tools to allow users to insert gt tables into officeverse. Right now the only supported output is word.
You can install the development version of gto like so:
::install_github("GSK-Biostatistics/gto") remotes
#load officer and gt
library(officer)
library(gt)
library(gto)
## create simple gt table
<- gt(head(exibble))
gt_tbl
## Create docx and add gt table
<- read_docx()
doc <- body_add_gt(doc, value = gt_tbl)
doc
## Save docx
<- tempfile(fileext = ".docx")
fileout print(doc, target = fileout)