search for: phaedrusv

Displaying 13 results from an estimated 13 matches for "phaedrusv".

2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
...r::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 [...] >> On Fri, Dec 29, 2023 at 10:14 AM Andy <phaedrusv at gmail.com> >> wrote: [...] >>> I'd like to be able to accomplish the following: >>> >>> (1) Append the title, the month, the author, the number of >>> words, and page number(s) to a spreadsheet >>> >>> (2) Read each article and e...
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
...wrote: > 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 appreciate any help. > > > > The task: I have several directories of multiple (some directories, up > &g...
2023 Dec 29
2
Help request: Parsing docx files for key words and appending to a spreadsheet
...et 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 new year, -Roy > On 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 appreciate any help. > > The task: I have several directories of multiple (some directories, up to 2,500+) *.docx files (newspaper arti...
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 appreciate any help. > > The task: I have several directories of multiple (some directories, up > to 2,500+) *.docx files (newspaper a...
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
...our 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 new year, > > -Roy > > >> On 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 appreciate any help. >> >> The task: I have several directories of multiple (some directories, up to 2,500+) *.docx...
2023 Dec 29
2
Help request: Parsing docx files for key words and appending to a spreadsheet
Hello I am trying to work through a problem, but feel like I've gone down a rabbit hole. I'd very much appreciate any help. The task: I have several directories of multiple (some directories, up to 2,500+) *.docx files (newspaper articles downloaded from Lexis+) that I want to iterate through to append to a spreadsheet only those articles that satisfy a condition (i.e., a specific
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...
2023 Dec 29
1
Help request: Parsing docx files for key words and appending to a spreadsheet
...ame.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 > [...] >>> On Fri, Dec 29, 2023 at 10:14 AM Andy <phaedrusv at gmail.com> >>> wrote: > [...] >>>> I'd like to be able to accomplish the following: >>>> >>>> (1) Append the title, the month, the author, the number of >>>> words, and page number(s) to a spreadsheet >>>> >>&gt...
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 happening is that...
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
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
2024 Jan 06
0
Help request: Parsing docx files for key words and appending to a spreadsheet
...> # roll up the list to a data frame. Many ways to do this. > myDF <- do.call("rbind",myList) > > ##### > > Hope that helps. > Tim > > > >> ------------------------------ >> >> Date: Thu, 4 Jan 2024 12:59:59 +0000 >> From: Andy <phaedrusv at gmail.com> >> To: r-help at r-project.org >> Subject: Re: [R] Help request: Parsing docx files for key words and >> appending to a spreadsheet >> Message-ID: <b233190f-cc1e-d334-784c-5d403ab6e212 at gmail.com> >> Content-Type: text/plain; charset=...