read_docx {officer} | R Documentation |
read and import a docx file as an R object representing the document.
read_docx(path = NULL) ## S3 method for class 'rdocx' print(x, target = NULL, ...) ## S3 method for class 'rdocx' length(x)
path |
path to the docx file to use as base document. |
x |
an rdocx object |
target |
path to the docx file to write |
... |
unused |
# create an rdocx object with default template --- read_docx() print(read_docx()) # write a rdocx object in a docx file ---- if( require(magrittr) ){ read_docx() %>% print(target = tempfile(fileext = ".docx")) } # how many elements are there in the document ---- length( read_docx() )