## Download an example DOCX file from tableParser's github repo to temp directory
d<-'https://github.com/ingmarboeschen/tableParser/raw/refs/heads/main/tableExamples.docx'
# for Windows
if(grepl("[A-Z]:",tempdir()))
download.file(d,paste0(tempdir(),"/","tableExamples.docx"),method="wget")
# all other machines
if(!grepl("[A-Z]:",tempdir()))
download.file(d,paste0(tempdir(),"/","tableExamples.docx"))
Sys.sleep(.2)
# Extract tables as character matrices
docx2matrix(paste0(tempdir(),"/","tableExamples.docx"))
Run the code above in your browser using DataLab