Learn R Programming

docxtractr (version 0.1.0.9000)

docx_extract_all: Extract all tables from a Word document

Description

This function makes no assumptions about an

Usage

docx_extract_all(docx, guess_header = TRUE, trim = TRUE)

Arguments

docx
docx object read with read_docx
guess_header
should the function make a guess as to the existense of a header in a table? (Default: TRUE)
trim
trim leading/trailing whitespace (if any) in cells? (default: TRUE)

Value

list of data.frames or an empty list if no tables exist in docx

See Also

assign_colnames, docx_extract_tbl

Examples

Run this code
# a "real" Word doc

real_world <- read_docx(system.file("examples/realworld.docx", package="docxtractr"))
docx_tbl_count(real_world)

# get all the tables
tbls <- docx_extract_all(real_world)

Run the code above in your browser using DataLab