search for: rtextualanalysi

Displaying 1 result from an estimated 1 matches for "rtextualanalysi".

Did you mean: rtextualanalysis
2023 Jul 05
1
textual analysis - transforming several pdf to txt - naming the files
...les: SOANE2020FS.txt, EDP2021GS.txt I'm running the following scrip, but the names of txt files that I obtain are: pdftext1, pdftext2, pdftext3... What do I need to change? Thank you very much, Cec?lia Carmo Universidade de Aveiro - Portugal dirpath <- ("/Users/ceciliacarmo/documents/RTextualAnalysis/data/pdfs") library(pdftools) library(dplyr) convertpdf2txt <- function(dirpath){ files <- list.files(dirpath, full.names = T) x <- sapply(files, function(x){ x <- pdftools::pdf_text(x) %>% paste0(collapse = " ") %>% stringr::str_squish() ret...