Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

How to delete tables and figures from a set of docx files using R

$
0
0

@azza00 wrote:

Is there any solution to parse a set of docx files one by one and delete all the tables and caption in. I tried to use the oficer package and i found this deleting code itwors with corsor to set it in the deleting place but it works just ith keywords, i couldn’t find a parameter for parsing tables or figures

library(officer)
my_doc <- read_docx(path = "ipsum_doc.docx")  %>% 
  cursor_reach(tkeyword="text  to delete") %>% 
  body_remove()

print(my_doc, target = "ipsum1_doc.txt")

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles