## Running a simple analysis with filter and search words to extract sentences
if(PDE_check_Xpdf_install() == TRUE){
outputtables <- PDE_pdfs2txt_searchandfilter(pdf = paste0(system.file(package = "PDE"),
"/examples/Methotrexate/29973177_!.pdf"),
out = paste0(system.file(package = "PDE"),"/examples/MTX_txt+-0/"),
filter.words = strsplit("cohort;case-control;group;study population;study participants", ";")[[1]],
regex.fw = FALSE,
ignore.case.fw = TRUE,
search.words = strsplit("(M|m)ethotrexate;(T|t)rexal;(R|r)heumatrex;(O|o)trexup", ";")[[1]],
regex.sw = TRUE,
ignore.case.sw = FALSE)
}
## Running an advanced analysis with filter and search words to
## extract sentences and obtain documentation files
if(PDE_check_Xpdf_install() == TRUE){
outputtables <- PDE_pdfs2txt_searchandfilter(pdf = paste0(system.file(package = "PDE"),
"/examples/Methotrexate/29973177_!.pdf"),
out = paste0(system.file(package = "PDE"),"/examples/MTX_txt+-1/"),
context = 1,
filter.words = strsplit("cohort;case-control;group;study population;study participants", ";")[[1]],
regex.fw = FALSE,
ignore.case.fw = TRUE,
filter.word.times = "0.2%",
search.words = strsplit("(M|m)ethotrexate;(T|t)rexal;(R|r)heumatrex;(O|o)trexup", ";")[[1]],
regex.sw = TRUE,
ignore.case.sw = FALSE,
eval.abbrevs = TRUE,
out.table.format = ".csv (WINDOWS-1252)",
write.txt.doc.file = TRUE,
cpy_mv = "nocpymv",
delete = TRUE)
}
Run the code above in your browser using DataLab