Read a exernal table into Rmd when rendering Word

When rendering Word using Rmarkdown, I want to import an external file which is a table in Word. What should I do?

---
title: "word report"
date: "`r Sys.Date()`"
output: 
  officedown::rdocx_document:
    number_sections: yes
    df_print: kable
---


# Creating a ggplot

```{r, message=FALSE, warning=FALSE}
library(tidyverse)

ggplot(data = mpg) + 
  geom_point(mapping = aes(x = displ, y = hwy))


library(officer)

doc <- read_docx("example.docx")      # there is a  external table in example.docx

Thank you for your help!

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.