Displaying 1 result from an estimated 1 matches for "filedat".
Did you mean:
filedata
2024 Jan 06
0
Help request: Parsing docx files for key words and appending to a spreadsheet
...C:","temp")
> files <- list.files(path=basePath, pattern = "docx$")
>
> length(files)
> # 2
>
> # initialize a list to put the data in
> myList <- vector(mode = "list", length = length(files))
>
> for(i in 1:length(files)){
> fileDat <- read_docx(file.path(basePath, files[[i]]))
> # get the data you want, here one line per item to make it clearer
> # assume consistency among articles
> ttl <- fileDat[[1]]
> src <- fileDat[[2]]
> dt <- fileDat[[3]]
> aut <- fileDat[grepl("B...