Displaying 12 results from an estimated 12 matches for "docx_summari".
Did you mean:
docx_summary
2023 Dec 30
2
Help request: Parsing docx files for key words and appending to a spreadsheet
Hi Eric
Thanks for that. That seems to fix one problem (the lack of a
separator), but introduces a new one when I complete the function Calum
proposed:Error in docx_summary() : argument "x" is missing, with no default
The whole code so far looks like this:
# Load libraries
library(tcltk)
library(tidyverse)
library(officer)
filepath <- setwd(tk_choose.dir())
filename <-
2023 Dec 30
3
Help request: Parsing docx files for key words and appending to a spreadsheet
An update: Running this block of code:
# Load libraries
library(tcltk)
library(tidyverse)
library(officer)
filepath <- setwd(tk_choose.dir())
filename <- "Now they want us to charge our electric cars from litter
bins.docx"
#full_filename <- paste0(filepath, filename)
full_filename <- paste(filepath, filename, sep="/")
if (!file.exists(full_filename)) {
?
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
? Fri, 29 Dec 2023 20:17:41 +0000
Andy <phaedrusv at gmail.com> ?????:
> doc_in <- read_docx(files)
>
> Results in this error:Error in filetype %in% c("docx") &&
> grepl("^([fh]ttp)", file) :'length = 9' in coercion to 'logical(1)'
help(read_docx) says that the function only imports one docx file. In
order to read multiple files,
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
help(read_docx) says that the function only imports one docx file. In
> order to read multiple files, use a for loop or the lapply function.
>
I told you people will suggest better ways to loop!!
>
> docx_summary(read_docx("Now they want us to charge our electric cars
> from litter bins.docx")) should work.
>
Ivan thanks for spotting my fail! Since the OP is new to
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
Hi Roy (& others)
Many thanks for the advice - well taken. Thanks also to the others who
have responded so quickly - I thought I might have to wait days!! :-)
I'm on a Linux (Mint) machine. Below, I document three attempts, two
using officer and the last now using textreadr
My attempts so far using 'officer':
##################
(1) First Attempt:
# Load libraries
2023 Dec 30
1
Help request: Parsing docx files for key words and appending to a spreadsheet
full_filename <- paste(filepath, filename,sep="/")
On Sat, Dec 30, 2023 at 1:45?PM Andy <phaedrusv at gmail.com> wrote:
> Thanks Ivan and Calum
>
> I continue to appreciate your support.
>
> Calum, I entered the code snippet you provided, and it returns 'file
> missing'. Looking at this, while the object 'full_filename' exists, what
> is
2023 Dec 30
1
Help request: Parsing docx files for key words and appending to a spreadsheet
Thanks Ivan and Calum
I continue to appreciate your support.
Calum, I entered the code snippet you provided, and it returns 'file
missing'. Looking at this, while the object 'full_filename' exists, what
is happening is that the path from getwd() is being appended to the
title of the article, but without the '/' between the end of the path
name (here 'TEST' and
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
I would also look at https://pandoc.org perhaps which can
export a number of formats...
And for spreadsheets https://github.com/jqnatividad/qsv is my
goto weapon. Can also read and write XLSX and others.
A sample document or two would always be helpful...
el
On 29/12/2023 21:01, CALUM POLWART wrote:
> It sounded like he looked at officeR but I would agree
>
> content <-
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
It sounded like he looked at officeR but I would agree
content <- officer::docx_summary("filename.docx")
Would get the text content into an object called content.
That object is a data.frame so you can then manipulate it. To be more
specific, we might need an example of the DF
You can loop this easily with a for statement although there are people who
prefer a non-for approach to
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
Thanks - I'll have a look at these options too.
I'm happy to send over a sample document, but wasn't aware if
attachments are allowed. The documents come Lexis+, so require user
credentials to log in, but I could upload the file somewhere if that
would help? Any ideas for a good location to do so?
On 29/12/2023 20:25, Dr Eberhard W Lisse wrote:
> I would also look at
2023 Dec 29
2
Help request: Parsing docx files for key words and appending to a spreadsheet
Hi Andy:
I don?t have an answer but I do have what I hope is some friendly advice. Generally the more information you can provide, the more likely you will get help that is useful. In your case you say that you tried several packages and they didn?t do what you wanted. Providing that code, as well as why they didn?t do what you wanted (be specific) would greatly facilitate things.
Happy
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
checkout the 'officer' package
Thanks
Jim Holtman
*Data Munger Guru*
*What is the problem that you are trying to solve?Tell me what you want to
do, not how you want to do it.*
On Fri, Dec 29, 2023 at 10:14?AM Andy <phaedrusv at gmail.com> wrote:
> Hello
>
> I am trying to work through a problem, but feel like I've gone down a
> rabbit hole. I'd very much